Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,20 @@ public static void main(String args[]) {
}

public static HipoDataEvent get(DetectorType t) {
SchemaFactory sf = new SchemaFactory();
sf.initFromDirectory(CLASResources.getResourcePath("etc/bankdefs/hipo4"));

HipoReader reader = new HipoReader();
String dir = CLASResources.getResourcePath("etc/data/test");
String stub = t.getName().toLowerCase();
reader.open(String.format("%s/%s.hipo",dir,stub));

Event e = new Event();
reader.getEvent(e, 0);
return new HipoDataEvent(e,reader.getSchemaFactory());
if(t==DetectorType.DC)
return getDCSector1ElectronEvent(e);
else
return new HipoDataEvent(e,sf);
}

private static void write() {
Expand All @@ -47,15 +54,21 @@ private static void write(String path, Event e) {
}
}

public static HipoDataEvent getDCSector1ElectronEvent(int event) {
HipoReader reader = new HipoReader();
reader.open(CLASResources.getResourcePath("etc/data/test/dc.hipo"));
Event e = new Event();
reader.getEvent(e, event);
return new HipoDataEvent(e,reader.getSchemaFactory());
public static HipoDataEvent getDCSector1ElectronEvent(Event e) {
SchemaFactory sf = new SchemaFactory();
sf.initFromDirectory(CLASResources.getResourcePath("etc/bankdefs/hipo4"));

Bank mcPart = new Bank(sf.getSchema("MC::Particle"));
e.read(mcPart);
Bank recEvent = new Bank(sf.getSchema("RECHB::Event"), 1);
recEvent.putFloat("startTime", 0, mcPart.getByte("vt", 0));
e.write(recEvent);

return new HipoDataEvent(e,sf);
}

public static HipoDataEvent getDCSector1ElectronEvent(SchemaFactory schemaFactory) {

@Deprecated
public static HipoDataEvent getDCSector1ElectronEvent(SchemaFactory schemaFactory) {
Event testEvent = new Event();

// this event is based on a gemc event with
Expand Down
Binary file modified etc/data/test/dc.hipo
Binary file not shown.
2 changes: 1 addition & 1 deletion validation/advanced-tests/run-eb-tests.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

webDir=http://clasweb.jlab.org/clas12offline/distribution/coatjava/validation_files/eb
webVersion=5.11-fid-tm-r11
webVersion=5.11-fid-tm-dc2-r11
webDir=$webDir/$webVersion

# coatjava must already be built at ../../coatjava/
Expand Down
4 changes: 1 addition & 3 deletions validation/advanced-tests/src/eb/EBTwoTrackTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@ else if (ss.equals("electrondeuteronC")) {
hadronPDG=45;
}
else if (ss.equals("electrongammaFT")) {
isForwardTagger=true;
ftPDG=22;
hadronPDG=11;
hadronPDG=22;
}
else udfFileType=true;

Expand Down
2 changes: 1 addition & 1 deletion validation/advanced-tests/src/eb/scripts/gen.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ if (isForwardTagger) {
pgen2.setRange(
3.0, 8.0,
2.5, 4.5,
-10.0, 10.0);
110.0, 130.0);
}
else if (pid==-22 || pid==-211 || pid==-2212 || pid==-321) {
// electron in FT
Expand Down