diff --git a/common-tools/clas-analysis/src/main/java/org/jlab/analysis/physics/TestEvent.java b/common-tools/clas-analysis/src/main/java/org/jlab/analysis/physics/TestEvent.java index de2a465184..88551876b5 100644 --- a/common-tools/clas-analysis/src/main/java/org/jlab/analysis/physics/TestEvent.java +++ b/common-tools/clas-analysis/src/main/java/org/jlab/analysis/physics/TestEvent.java @@ -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() { @@ -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 diff --git a/etc/data/test/dc.hipo b/etc/data/test/dc.hipo index 97de698439..0f15629fa1 100644 Binary files a/etc/data/test/dc.hipo and b/etc/data/test/dc.hipo differ diff --git a/validation/advanced-tests/run-eb-tests.sh b/validation/advanced-tests/run-eb-tests.sh index bbd5f7b921..748d7a5b97 100755 --- a/validation/advanced-tests/run-eb-tests.sh +++ b/validation/advanced-tests/run-eb-tests.sh @@ -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/ diff --git a/validation/advanced-tests/src/eb/EBTwoTrackTest.java b/validation/advanced-tests/src/eb/EBTwoTrackTest.java index 41061a2568..a0e4b26f40 100644 --- a/validation/advanced-tests/src/eb/EBTwoTrackTest.java +++ b/validation/advanced-tests/src/eb/EBTwoTrackTest.java @@ -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; diff --git a/validation/advanced-tests/src/eb/scripts/gen.groovy b/validation/advanced-tests/src/eb/scripts/gen.groovy index 4bf9b846db..c5ea774d58 100644 --- a/validation/advanced-tests/src/eb/scripts/gen.groovy +++ b/validation/advanced-tests/src/eb/scripts/gen.groovy @@ -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