CVTReconstruction extends ReconstructionEngine { public CVTReconstruction() { super("CVTTracks", "ziegler", "4.0"); SVTGeom = new org.jlab.rec.cvt.svt.Geometry(); BMTGeom = new org.jlab.rec.cvt.bmt.Geometry(); } CVTReconstruction(); void setRunConditionsParameters(DataEvent event, String FieldsConfig, int iRun, boolean addMisAlignmts, String misAlgnFile); int getRun(); void setRun(int run); String getFieldsConfig(); void setFieldsConfig(String fieldsConfig); @Override boolean processDataEvent(DataEvent event); boolean init();  }
@Test public void testCVTReconstruction() { System.setProperty("CLAS12DIR", "../../"); String mapDir = CLASResources.getResourcePath("etc")+"/data/magfield"; try { MagneticFields.getInstance().initializeMagneticFields(mapDir, "Symm_torus_r2501_phi16_z251_24Apr2018.dat","Symm_solenoid_r601_phi1_z1201_13June2018.dat"); } catch (Exception e) { e.printStackTrace(); } String dir = ClasUtilsFile.getResourceDir("CLAS12DIR", "etc/bankdefs/hipo4"); SchemaFactory schemaFactory = new SchemaFactory(); schemaFactory.initFromDirectory(dir); DataEvent testEvent = TestEvent.getCVTTestEvent(schemaFactory); MagFieldsEngine enf = new MagFieldsEngine(); enf.init(); enf.processDataEvent(testEvent); CVTReconstruction CVTengine = new CVTReconstruction(); CVTengine.init(); testEvent.show(); CVTengine.processDataEvent(testEvent); testEvent.show(); EBHBEngine EBHBengine = new EBHBEngine(); EBHBengine.init(); EBHBengine.processDataEvent(testEvent); EBTBEngine EBTBengine = new EBTBEngine(); EBTBengine.init(); EBTBengine.processDataEvent(testEvent); assertEquals(testEvent.hasBank("REC::Particle"), true); assertEquals(testEvent.getBank("REC::Particle").rows(), 1); assertEquals(testEvent.getBank("REC::Particle").getByte("charge", 0), 1); assertEquals(ClasMath.isWithinXPercent(10.0, testEvent.getBank("REC::Particle").getFloat("px", 0), 1.9504), true); assertEquals(ClasMath.isWithinXPercent(10.0, testEvent.getBank("REC::Particle").getFloat("py", 0), 0.2741), true); assertEquals(ClasMath.isWithinXPercent(10.0, testEvent.getBank("REC::Particle").getFloat("pz", 0), 0.3473), true); assertEquals(ClasMath.isWithinXPercent(30.0, testEvent.getBank("REC::Particle").getFloat("vz", 0), -1.95444), true); }