From 90f0851a1b15c3151ba277d2fdf97bf42eb957aa Mon Sep 17 00:00:00 2001 From: Veronique Ziegler Date: Wed, 16 Aug 2017 11:31:03 -0400 Subject: [PATCH 01/29] tdc conversion factor read from ccdb --- .../java/org/jlab/rec/ctof/CCDBConstants.java | 10 ++++++++- .../jlab/rec/ctof/CCDBConstantsLoader.java | 22 ++++++++++++++++--- .../java/org/jlab/rec/ctof/Constants.java | 2 +- .../rec/tof/banks/ctof/RecoBankWriter.java | 2 +- .../java/org/jlab/rec/tof/hit/ctof/Hit.java | 3 ++- .../org/jlab/service/ctof/CTOFEngine.java | 2 +- 6 files changed, 33 insertions(+), 8 deletions(-) diff --git a/reconstruction/tof/src/main/java/org/jlab/rec/ctof/CCDBConstants.java b/reconstruction/tof/src/main/java/org/jlab/rec/ctof/CCDBConstants.java index 18eb2f2d31..3bae487ad3 100644 --- a/reconstruction/tof/src/main/java/org/jlab/rec/ctof/CCDBConstants.java +++ b/reconstruction/tof/src/main/java/org/jlab/rec/ctof/CCDBConstants.java @@ -27,7 +27,8 @@ public CCDBConstants() { private static double[][][] RFPAD = new double[1][1][48]; private static int[][][] STATUSU = new int[1][1][48]; private static int[][][] STATUSD = new int[1][1][48]; - + private static double[][][][] LSBCONVFAC = new double[1][1][48][2]; + public static synchronized double[][][] getYOFF() { return YOFF; } @@ -187,5 +188,12 @@ public static synchronized int[][][] getSTATUSD() { public static synchronized void setSTATUSD(int[][][] sTATUSD) { STATUSD = sTATUSD; } + public static synchronized double[][][][] getLSBCONVFAC() { + return LSBCONVFAC; + } + + public static synchronized void setLSBCONVFAC(double[][][][] lSBCONVFAC) { + LSBCONVFAC = lSBCONVFAC; + } } diff --git a/reconstruction/tof/src/main/java/org/jlab/rec/ctof/CCDBConstantsLoader.java b/reconstruction/tof/src/main/java/org/jlab/rec/ctof/CCDBConstantsLoader.java index 4c53cbebd8..3fe095caac 100644 --- a/reconstruction/tof/src/main/java/org/jlab/rec/ctof/CCDBConstantsLoader.java +++ b/reconstruction/tof/src/main/java/org/jlab/rec/ctof/CCDBConstantsLoader.java @@ -46,13 +46,14 @@ public static final synchronized void Load(int runNb) { double[][][] PADDLE2PADDLE = new double[1][1][48]; int[][][] STATUSU = new int[1][1][48]; int[][][] STATUSD = new int[1][1][48]; - + double[][][][] LSBCONVFAC = new double[1][1][48][2]; + // load table reads entire table and makes an array of variables for // each column in the table. dbprovider.loadTable("/calibration/ctof/attenuation"); dbprovider.loadTable("/calibration/ctof/effective_velocity"); dbprovider.loadTable("/calibration/ctof/timing_offset"); - // dbprovider.loadTable("/calibration/ctof/time_walk"); + dbprovider.loadTable("/calibration/ctof/tdc_conv"); dbprovider.loadTable("/calibration/ctof/status"); // disconncect from database. Important to do this after loading tables. dbprovider.disconnect(); @@ -186,7 +187,21 @@ public static final synchronized void Load(int runNb) { STATUSD[iSec - 1][iPan - 1][iPad - 1] = statD; } - + // Getting the TDC conversion factors + for (int i = 0; i < dbprovider + .length("/calibration/ctof/tdc_conv/sector"); i++) { + int iSec = dbprovider.getInteger("/calibration/ctof/tdc_conv/sector", + i); + int iPan = dbprovider.getInteger("/calibration/ctof/tdc_conv/layer", + i); + int iPad = dbprovider.getInteger( + "/calibration/ctof/tdc_conv/component", i); + LSBCONVFAC[iSec - 1][iPan - 1][iPad - 1][0] = dbprovider.getDouble( + "/calibration/ctof/tdc_conv/upstream", i); + LSBCONVFAC[iSec - 1][iPan - 1][iPad - 1][1] = dbprovider.getDouble( + "/calibration/ctof/tdc_conv/downstream", i); + } + CCDBConstants.setYOFF(YOFF); CCDBConstants.setLAMBDAU(LAMBDAU); CCDBConstants.setLAMBDAD(LAMBDAD); @@ -206,6 +221,7 @@ public static final synchronized void Load(int runNb) { CCDBConstants.setPADDLE2PADDLE(PADDLE2PADDLE); CCDBConstants.setSTATUSU(STATUSU); CCDBConstants.setSTATUSD(STATUSD); + CCDBConstants.setLSBCONVFAC(LSBCONVFAC); CSTLOADED = true; setDB(dbprovider); diff --git a/reconstruction/tof/src/main/java/org/jlab/rec/ctof/Constants.java b/reconstruction/tof/src/main/java/org/jlab/rec/ctof/Constants.java index a94ff30bf4..6a6db7635f 100644 --- a/reconstruction/tof/src/main/java/org/jlab/rec/ctof/Constants.java +++ b/reconstruction/tof/src/main/java/org/jlab/rec/ctof/Constants.java @@ -17,7 +17,7 @@ public Constants() { // sector public static final double[] SCBARTHICKN = new double[1]; // 3 cm - public static final double LSBCONVFAC = 24. / 1000.; // ns/bin + //public static final double LSBCONVFAC = 24. / 1000.; // ns/bin public static final double[] ADC_MIP = new double[1]; // From DB 800 public static final double DEDX_MIP = 1.956; // ~2 MeV/g/cm^2 public static final double[] PEDU = new double[1]; // L pedestal diff --git a/reconstruction/tof/src/main/java/org/jlab/rec/tof/banks/ctof/RecoBankWriter.java b/reconstruction/tof/src/main/java/org/jlab/rec/tof/banks/ctof/RecoBankWriter.java index 5b145e84b7..02390170e3 100644 --- a/reconstruction/tof/src/main/java/org/jlab/rec/tof/banks/ctof/RecoBankWriter.java +++ b/reconstruction/tof/src/main/java/org/jlab/rec/tof/banks/ctof/RecoBankWriter.java @@ -98,7 +98,7 @@ public DataBank fillRecHitsBank(DataEvent event, List hitlist) { //bank.setShort("adc_idx2",i, (short) hitlist.get(i).get_ADCbankHitIdx2()); //bank.setShort("tdc_idx1",i, (short) hitlist.get(i).get_TDCbankHitIdx1()); //bank.setShort("tdc_idx2",i, (short) hitlist.get(i).get_TDCbankHitIdx2()); - bank.setFloat("pathLength", i, (float) hitlist.get(i) + bank.setFloat("pathLength", i, (float) hitlist.get(i) .get_TrkPathLen()); bank.setFloat("pathLengthThruBar", i, (float) hitlist.get(i) .get_TrkPathLenThruBar()); diff --git a/reconstruction/tof/src/main/java/org/jlab/rec/tof/hit/ctof/Hit.java b/reconstruction/tof/src/main/java/org/jlab/rec/tof/hit/ctof/Hit.java index a8835ac579..283e4bccfb 100644 --- a/reconstruction/tof/src/main/java/org/jlab/rec/tof/hit/ctof/Hit.java +++ b/reconstruction/tof/src/main/java/org/jlab/rec/tof/hit/ctof/Hit.java @@ -355,7 +355,8 @@ public double TimeOffset() { @Override public double[] LSBConversion() { - return new double[] {Constants.LSBCONVFAC, Constants.LSBCONVFAC}; + return CCDBConstants.getLSBCONVFAC()[this.get_Sector() - 1][this.get_Panel() - 1][this + .get_Paddle() - 1]; } @Override diff --git a/reconstruction/tof/src/main/java/org/jlab/service/ctof/CTOFEngine.java b/reconstruction/tof/src/main/java/org/jlab/service/ctof/CTOFEngine.java index 719d41b88d..2d17e8bed5 100644 --- a/reconstruction/tof/src/main/java/org/jlab/service/ctof/CTOFEngine.java +++ b/reconstruction/tof/src/main/java/org/jlab/service/ctof/CTOFEngine.java @@ -174,7 +174,7 @@ public void setRunConditionsParameters(DataEvent event) { public static void main(String[] args) throws FileNotFoundException, EvioException { - String inputFile = "/Users/ziegler/data/hipo/sidis_0100.hipo"; + String inputFile = "/Users/ziegler/Workdir/Files/test/piminus_cd_0.5-2.0GeV.hipo"; // String inputFile = args[0]; // String outputFile = args[1]; From f9447e46852b0c87ff34eeadde104025b95f5b19 Mon Sep 17 00:00:00 2001 From: raffaelladevita Date: Wed, 16 Aug 2017 19:12:00 +0200 Subject: [PATCH 02/29] adding CND reconstruction --- build-coatjava.sh | 7 + .../org/jlab/clas/detector/DetectorEvent.java | 2 +- .../org/jlab/clas/reco/EngineProcessor.java | 4 +- etc/bankdefs/hipo/CND.json | 47 +- reconstruction/cnd/.classpath | 7 + reconstruction/cnd/.project | 17 + .../cnd/.settings/org.eclipse.jdt.core.prefs | 11 + reconstruction/cnd/nbactions.xml | 46 ++ reconstruction/cnd/pom.xml | 48 ++ reconstruction/cnd/src/main/java/.classpath | 11 + reconstruction/cnd/src/main/java/.project | 17 + .../org/jlab/rec/cnd/banks/HitReader.java | 60 +++ .../jlab/rec/cnd/banks/RecoBankWriter.java | 51 +++ .../costants/CalibrationConstantsLoader.java | 217 +++++++++ .../org/jlab/rec/cnd/costants/Parameters.java | 88 ++++ .../java/org/jlab/rec/cnd/hit/CndHit.java | 231 ++++++++++ .../org/jlab/rec/cnd/hit/CndHitFinder.java | 430 ++++++++++++++++++ .../org/jlab/rec/cnd/hit/CvtGetHTrack.java | 181 ++++++++ .../java/org/jlab/rec/cnd/hit/HalfHit.java | 58 +++ .../java/org/jlab/service/cnd/CNDEngine.java | 174 +++++++ .../cnd/target/maven-archiver/pom.properties | 5 + .../compile/default-compile/createdFiles.lst | 10 + .../compile/default-compile/inputFiles.lst | 9 + .../default-testCompile/inputFiles.lst | 0 24 files changed, 1706 insertions(+), 25 deletions(-) create mode 100755 reconstruction/cnd/.classpath create mode 100755 reconstruction/cnd/.project create mode 100755 reconstruction/cnd/.settings/org.eclipse.jdt.core.prefs create mode 100755 reconstruction/cnd/nbactions.xml create mode 100755 reconstruction/cnd/pom.xml create mode 100644 reconstruction/cnd/src/main/java/.classpath create mode 100644 reconstruction/cnd/src/main/java/.project create mode 100755 reconstruction/cnd/src/main/java/org/jlab/rec/cnd/banks/HitReader.java create mode 100755 reconstruction/cnd/src/main/java/org/jlab/rec/cnd/banks/RecoBankWriter.java create mode 100755 reconstruction/cnd/src/main/java/org/jlab/rec/cnd/costants/CalibrationConstantsLoader.java create mode 100755 reconstruction/cnd/src/main/java/org/jlab/rec/cnd/costants/Parameters.java create mode 100755 reconstruction/cnd/src/main/java/org/jlab/rec/cnd/hit/CndHit.java create mode 100755 reconstruction/cnd/src/main/java/org/jlab/rec/cnd/hit/CndHitFinder.java create mode 100755 reconstruction/cnd/src/main/java/org/jlab/rec/cnd/hit/CvtGetHTrack.java create mode 100755 reconstruction/cnd/src/main/java/org/jlab/rec/cnd/hit/HalfHit.java create mode 100755 reconstruction/cnd/src/main/java/org/jlab/service/cnd/CNDEngine.java create mode 100644 reconstruction/cnd/target/maven-archiver/pom.properties create mode 100644 reconstruction/cnd/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst create mode 100644 reconstruction/cnd/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst create mode 100644 reconstruction/cnd/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst diff --git a/build-coatjava.sh b/build-coatjava.sh index f902b60a55..7e17074a65 100755 --- a/build-coatjava.sh +++ b/build-coatjava.sh @@ -94,6 +94,13 @@ if [ $? != 0 ] ; then echo "htcc failure" ; exit 1 ; fi cd - cp reconstruction/htcc/target/clasrec-htcc-1.0-SNAPSHOT.jar coatjava/lib/services/ +### cnd ### +cd reconstruction/cnd +mvn install +if [ $? != 0 ] ; then echo "cnd failure" ; exit 1 ; fi +cd - +cp reconstruction/cnd/target/clas12detector-cnd-1.0-SNAPSHOT.jar coatjava/lib/services/ + ### eb ### cd reconstruction/eb mvn install diff --git a/common-tools/clas-reco/src/main/java/org/jlab/clas/detector/DetectorEvent.java b/common-tools/clas-reco/src/main/java/org/jlab/clas/detector/DetectorEvent.java index ef72660751..9cfc409f53 100644 --- a/common-tools/clas-reco/src/main/java/org/jlab/clas/detector/DetectorEvent.java +++ b/common-tools/clas-reco/src/main/java/org/jlab/clas/detector/DetectorEvent.java @@ -132,7 +132,7 @@ public List getScintillatorResponseList(){ List responses = new ArrayList(); for(DetectorParticle p : this.particleList){ for(DetectorResponse r : p.getDetectorResponses()){ - if(r.getDescriptor().getType()==DetectorType.FTOF) + if(r.getDescriptor().getType()==DetectorType.FTOF || r.getDescriptor().getType()==DetectorType.CTOF) responses.add(r); } } diff --git a/common-tools/clas-reco/src/main/java/org/jlab/clas/reco/EngineProcessor.java b/common-tools/clas-reco/src/main/java/org/jlab/clas/reco/EngineProcessor.java index 61be69244f..ea96a46a21 100644 --- a/common-tools/clas-reco/src/main/java/org/jlab/clas/reco/EngineProcessor.java +++ b/common-tools/clas-reco/src/main/java/org/jlab/clas/reco/EngineProcessor.java @@ -69,7 +69,8 @@ public void initAll(){ String[] names = new String[]{ "FTCAL", "FTHODO", "FTEB", "DCHB","DCTB","CVT", - "FTOF", "CTOF","EC","HTCC","LTCC", + "FTOF", "CTOF","CND", + "EC","HTCC","LTCC", "EBHB","EBTB" }; @@ -82,6 +83,7 @@ public void initAll(){ "org.jlab.rec.cvt.services.CVTReconstruction", "org.jlab.service.ftof.FTOFEngine", "org.jlab.service.ctof.CTOFEngine", + "org.jlab.service.cnd.CNDEngine", "org.jlab.service.ec.ECEngine", "org.jlab.service.htcc.HTCCReconstructionService", "org.jlab.service.ltcc.LTCCEngine", diff --git a/etc/bankdefs/hipo/CND.json b/etc/bankdefs/hipo/CND.json index e8899a6abe..c8eb723b16 100644 --- a/etc/bankdefs/hipo/CND.json +++ b/etc/bankdefs/hipo/CND.json @@ -4,28 +4,29 @@ "group": 311, "info": "reconstructed hit info from CND", "items": [ - {"name":"id", "id":1, "type":"int16", "info":"id of the hit"}, - {"name":"status", "id":2, "type":"int16", "info":"status of the hit"}, - {"name":"trkID", "id":3, "type":"int16", "info":"match CVT track id"}, - {"name":"sector", "id":4, "type":"int8", "info":"sector of CND"}, - {"name":"layer", "id":5, "type":"int8", "info":"panel id of CND"}, - {"name":"component", "id":6, "type":"int16", "info":"paddle id of CND"}, - {"name":"energy", "id":7, "type":"float", "info":"E dep (MeV) of hit"}, - {"name":"time", "id":8, "type":"float", "info":"Hit time (ns)"}, - {"name":"energy_unc", "id":9, "type":"float", "info":"E dep unc (MeV) of hit"}, - {"name":"time_unc", "id":10, "type":"float", "info":"Hit time unc (ns)"}, - {"name":"x", "id":11, "type":"float", "info":"Global X coor (cm) of hit"}, - {"name":"y", "id":12, "type":"float", "info":"Global Y coor (cm) of hit"}, - {"name":"z", "id":13, "type":"float", "info":"Global Z coor (cm) of hit"}, - {"name":"x_unc", "id":14, "type":"float", "info":"Global X coor unc (cm) of hit"}, - {"name":"y_unc", "id":15, "type":"float", "info":"Global Y coor unc (cm) of hit"}, - {"name":"z_unc", "id":16, "type":"float", "info":"Global Z coor unc (cm) of hit"}, - {"name":"pathlength", "id":17, "type":"float", "info":"length travelled by the particle in the paddle (cm)"}, - {"name":"indexL", "id":18, "type":"int16", "info":"index of the left halfhit"}, - {"name":"indexR", "id":19, "type":"int16", "info":"index of the right halfhit"}, - {"name":"tx", "id":20, "type":"float", "info":"Global X coor (cm) of hit from CVT info -trkID index"}, - {"name":"ty", "id":21, "type":"float", "info":"Global Y coor (cm) of hit from CVT info - trkID index"}, - {"name":"tz", "id":22, "type":"float", "info":"Global Z coor (cm) of hit from CVT info - trkID index"} - ] + {"name":"id", "id":1, "type":"int16", "info":"id of the hit"}, + {"name":"status", "id":2, "type":"int16", "info":"status of the hit"}, + {"name":"trkID", "id":3, "type":"int16", "info":"match CVT track index"}, + {"name":"sector", "id":4, "type":"int8", "info":"sector of CND"}, + {"name":"layer", "id":5, "type":"int8", "info":"panel id of CND"}, + {"name":"component", "id":6, "type":"int16", "info":"paddle id of CND"}, + {"name":"energy", "id":7, "type":"float", "info":"E dep (MeV) of hit"}, + {"name":"time", "id":8, "type":"float", "info":"Hit time (ns)"}, + {"name":"energy_unc", "id":9, "type":"float", "info":"E dep unc (MeV) of hit"}, + {"name":"time_unc", "id":10, "type":"float", "info":"Hit time unc (ns)"}, + {"name":"x", "id":11, "type":"float", "info":"Global X coor (cm) of hit"}, + {"name":"y", "id":12, "type":"float", "info":"Global Y coor (cm) of hit"}, + {"name":"z", "id":13, "type":"float", "info":"Global Z coor (cm) of hit"}, + {"name":"x_unc", "id":14, "type":"float", "info":"Global X coor unc (cm) of hit"}, + {"name":"y_unc", "id":15, "type":"float", "info":"Global Y coor unc (cm) of hit"}, + {"name":"z_unc", "id":16, "type":"float", "info":"Global Z coor unc (cm) of hit"}, + {"name":"tx", "id":17, "type":"float", "info":"Global X coor (cm) of hit from CVT info -trkID index"}, + {"name":"ty", "id":18, "type":"float", "info":"Global Y coor (cm) of hit from CVT info - trkID index"}, + {"name":"tz", "id":19, "type":"float", "info":"Global Z coor (cm) of hit from CVT info - trkID index"}, + {"name":"tlength", "id":20, "type":"float", "info":"pathlength of the track from the entrance point to the exit point through the hit bar"}, + {"name":"pathlength", "id":21, "type":"float", "info":"pathlength of the track from the vertex (doca point to the beamline to the midpoint between the entrance and exit of the hit bar"}, + {"name":"indexL", "id":22, "type":"int16", "info":"index of the left halfhit"}, + {"name":"indexR", "id":23, "type":"int16", "info":"index of the right halfhit"} + ] } ] diff --git a/reconstruction/cnd/.classpath b/reconstruction/cnd/.classpath new file mode 100755 index 0000000000..2d5e8154fc --- /dev/null +++ b/reconstruction/cnd/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/reconstruction/cnd/.project b/reconstruction/cnd/.project new file mode 100755 index 0000000000..30b0c0eb65 --- /dev/null +++ b/reconstruction/cnd/.project @@ -0,0 +1,17 @@ + + + reco + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/reconstruction/cnd/.settings/org.eclipse.jdt.core.prefs b/reconstruction/cnd/.settings/org.eclipse.jdt.core.prefs new file mode 100755 index 0000000000..416f4fb696 --- /dev/null +++ b/reconstruction/cnd/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/reconstruction/cnd/nbactions.xml b/reconstruction/cnd/nbactions.xml new file mode 100755 index 0000000000..e974bc1896 --- /dev/null +++ b/reconstruction/cnd/nbactions.xml @@ -0,0 +1,46 @@ + + + + run + + jar + + + process-classes + org.codehaus.mojo:exec-maven-plugin:1.2.1:exec + + + -DCLAS12DIR=/Users/devita/NetBeansProjects/clas12-offline-software/coatjava -classpath %classpath org.jlab.rec.cnd.services.CNDEngine + java + + + + debug + + jar + + + process-classes + org.codehaus.mojo:exec-maven-plugin:1.2.1:exec + + + -Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -DCLAS12DIR=/Users/devita/NetBeansProjects/clas12-offline-software/coatjava -classpath %classpath org.jlab.rec.cnd.services.CNDEngine + java + true + + + + profile + + jar + + + process-classes + org.codehaus.mojo:exec-maven-plugin:1.2.1:exec + + + -DCLAS12DIR=/Users/devita/NetBeansProjects/clas12-offline-software/coatjava -classpath %classpath org.jlab.rec.cnd.services.CNDEngine + java + + + diff --git a/reconstruction/cnd/pom.xml b/reconstruction/cnd/pom.xml new file mode 100755 index 0000000000..585b46b14e --- /dev/null +++ b/reconstruction/cnd/pom.xml @@ -0,0 +1,48 @@ + + + 4.0.0 + + org.jlab.clas12.detector + clas12detector-cnd + 1.0-SNAPSHOT + jar + + + + clas12maven + https://clasweb.jlab.org/clas12maven + + + + myLocalMvnRepo + file://${basedir}/../../myLocalMvnRepo + + + + + + org.jlab.clas + common-tools + 0.0 + jar + + + + org.jlab.coda + jclara + 4.3-SNAPSHOT + + + + org.jlab.clas12.detector + cvt + 1.0-SNAPSHOT + + + + 1.8 + 1.8 + + diff --git a/reconstruction/cnd/src/main/java/.classpath b/reconstruction/cnd/src/main/java/.classpath new file mode 100644 index 0000000000..5e374a37f8 --- /dev/null +++ b/reconstruction/cnd/src/main/java/.classpath @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/reconstruction/cnd/src/main/java/.project b/reconstruction/cnd/src/main/java/.project new file mode 100644 index 0000000000..5a737c5732 --- /dev/null +++ b/reconstruction/cnd/src/main/java/.project @@ -0,0 +1,17 @@ + + + clas12detector-cnd + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/banks/HitReader.java b/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/banks/HitReader.java new file mode 100755 index 0000000000..55cd5a7d32 --- /dev/null +++ b/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/banks/HitReader.java @@ -0,0 +1,60 @@ +package org.jlab.rec.cnd.banks; + +import java.util.ArrayList; + +import org.jlab.io.base.DataBank; +import org.jlab.io.base.DataEvent; +import org.jlab.rec.cnd.costants.Parameters; +import org.jlab.rec.cnd.hit.HalfHit; + +public class HitReader { + + // this method retrieves the half hits ie the adc/tdc signal from all the pmt for a given event + public static ArrayList getCndHalfHits(DataEvent event) { + + if(event==null) + return new ArrayList(); + + // Check that the file has the dgtz bank for CND. + if(event.hasBank("CND::adc")==false || event.hasBank("CND::tdc")==false) { + //System.err.println("there is no CND bank :-("); + return new ArrayList(); + } + + + DataBank bankADC = event.getBank("CND::adc"); + DataBank bankTDC = event.getBank("CND::tdc"); + + if(bankADC.rows() != bankTDC.rows()) return new ArrayList(); + + ArrayList halfhits = new ArrayList(); + + int nhits = bankADC.rows(); // number of hits in the event + + for(int i = 0; i hitlist) { + + DataBank bank = event.createBank("CND::hits", hitlist.size()); + + if (bank == null) { + System.err.println("COULD NOT CREATE A CND::Hits BANK!!!!!!"); + return null; + } + + // the bank use cm as distance units -> need to convert from mm + for(int i =0; i< hitlist.size(); i++) { + bank.setShort("id",i, (short)(i+1)); + bank.setByte("sector",i, (byte) hitlist.get(i).Sector()); + bank.setByte("layer",i, (byte) hitlist.get(i).Layer()); + bank.setShort("component",i, (short) hitlist.get(i).Component()); + bank.setShort("trkID",i, (short) hitlist.get(i).get_AssociatedTrkId()); + bank.setFloat("time",i, (float) hitlist.get(i).Time()); + bank.setFloat("x",i, (float) (hitlist.get(i).X()/10.)); + bank.setFloat("y",i, (float) (hitlist.get(i).Y()/10.)); + bank.setFloat("z",i, (float) (hitlist.get(i).Z()/10.)); + bank.setFloat("x_unc",i, (float) (hitlist.get(i).get_uX()/10.)); + bank.setFloat("y_unc",i, (float) (hitlist.get(i).get_uY()/10.)); + bank.setFloat("z_unc",i, (float) (hitlist.get(i).get_uZ()/10.)); + bank.setFloat("tx",i, (float) (hitlist.get(i).get_tX()/10.)); + bank.setFloat("ty",i, (float) (hitlist.get(i).get_tY()/10.)); + bank.setFloat("tz",i, (float) (hitlist.get(i).get_tZ()/10.)); + bank.setFloat("energy",i, (float) hitlist.get(i).Edep()); + bank.setFloat("tlength",i, (float) (hitlist.get(i).tLength()/10.)); // units is cm + bank.setFloat("pathlength",i, (float) (hitlist.get(i).pathLength()/10.)); // units is cm + bank.setShort("indexL",i, (short) hitlist.get(i).indexL()); + bank.setShort("indexR",i, (short) hitlist.get(i).indexR()); + + } + return bank; + + } + + +} diff --git a/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/costants/CalibrationConstantsLoader.java b/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/costants/CalibrationConstantsLoader.java new file mode 100755 index 0000000000..159393153a --- /dev/null +++ b/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/costants/CalibrationConstantsLoader.java @@ -0,0 +1,217 @@ +package org.jlab.rec.cnd.costants; + +import org.jlab.detector.calib.utils.DatabaseConstantProvider; + + + +/** + * + * @author ziegler + * + */ +public class CalibrationConstantsLoader { + + public CalibrationConstantsLoader() { + // TODO Auto-generated constructor stub + } + public static boolean CSTLOADED = false; + + // Instantiating the constants arrays + public static double[][] UTURNELOSS = new double[24][3]; + public static double[][] UTURNTLOSS = new double[24][3]; + public static double[][] TIMEOFFSETSLR = new double[24][3]; + public static double[][][] TDCTOTIMESLOPE = new double[24][3][2]; + public static double[][][] TDCTOTIMEOFFSET = new double[24][3][2]; + public static double[][] TIMEOFFSETSECT = new double[24][3]; + public static double[][][] EFFVEL = new double[24][3][2]; + public static double[][][] ATNLEN = new double[24][3][2]; + public static double[][][] MIPDIRECT = new double[24][3][2]; + public static double[][][] MIPINDIRECT = new double[24][3][2]; + public static int[][][] Status_LR = new int[24][3][2]; + public static double[] LENGTH = new double[3]; + public static double[] ZOFFSET = new double[3]; + public static double[] THICKNESS = new double[1]; + public static double[] INNERRADIUS = new double[1]; + //Calibration and geometry parameters from DB + + public static boolean arEnergyibConstantsLoaded = false; + + static DatabaseConstantProvider dbprovider = null; + + public static synchronized void Load(int runno, String var) { + + System.out.println(" LOADING CONSTANTS "); + dbprovider = new DatabaseConstantProvider(runno, var); // reset using the new variation + + // load table reads entire table and makes an array of variables for each column in the table. + dbprovider.loadTable("/calibration/cnd/UturnEloss"); + dbprovider.loadTable("/calibration/cnd/UturnTloss"); + dbprovider.loadTable("/calibration/cnd/TimeOffsets_LR"); + dbprovider.loadTable("/calibration/cnd/TDC_conv"); + dbprovider.loadTable("/calibration/cnd/TimeOffsets_layer"); + dbprovider.loadTable("/calibration/cnd/EffV"); + dbprovider.loadTable("/calibration/cnd/Attenuation"); + dbprovider.loadTable("/calibration/cnd/Status_LR"); + dbprovider.loadTable("/calibration/cnd/Energy"); + dbprovider.loadTable("/geometry/cnd/layer"); + dbprovider.loadTable("/geometry/cnd/cnd"); + + //disconncect from database. Important to do this after loading tables. + dbprovider.disconnect(); + + dbprovider.show(); + + + //E-loss + for(int i =0; i< dbprovider.length("/calibration/cnd/UturnEloss/sector"); i++) { + + int iSec = dbprovider.getInteger("/calibration/cnd/UturnEloss/sector", i); + int iLay = dbprovider.getInteger("/calibration/cnd/UturnEloss/layer", i); + double iEL = dbprovider.getDouble("/calibration/cnd/UturnEloss/uturn_eloss", i); + + UTURNELOSS[iSec-1][iLay-1] = iEL; + //System.out.println("UturnEloss "+iEL); + } + //T-loss + for(int i =0; i< dbprovider.length("/calibration/cnd/UturnTloss/sector"); i++) { + + int iSec = dbprovider.getInteger("/calibration/cnd/UturnTloss/sector", i); + int iLay = dbprovider.getInteger("/calibration/cnd/UturnTloss/layer", i); + double iTL = dbprovider.getDouble("/calibration/cnd/UturnTloss/uturn_tloss", i); + + UTURNTLOSS[iSec-1][iLay-1] = iTL; + //System.out.println("UturnTloss "+iTL); + } + // Time offsets + for(int i =0; i< dbprovider.length("/calibration/cnd/TimeOffsets_LR/sector"); i++) { + + int iSec = dbprovider.getInteger("/calibration/cnd/TimeOffsets_LR/sector", i); + int iLay = dbprovider.getInteger("/calibration/cnd/TimeOffsets_LR/layer", i); + double iTO = dbprovider.getDouble("/calibration/cnd/TimeOffsets_LR/time_offset_LR", i); + + TIMEOFFSETSLR[iSec-1][iLay-1] = iTO; + //System.out.println("time_offset_LR "+iTO); + } + //TDC to time conversion + for(int i =0; i< dbprovider.length("/calibration/cnd/TDC_conv/sector"); i++) { + + int iSec = dbprovider.getInteger("/calibration/cnd/TDC_conv/sector", i); + int iLay = dbprovider.getInteger("/calibration/cnd/TDC_conv/layer", i); + double iSlL = dbprovider.getDouble("/calibration/cnd/TDC_conv/slope_L", i); + double iSlR = dbprovider.getDouble("/calibration/cnd/TDC_conv/slope_R", i); + double iOfL = dbprovider.getDouble("/calibration/cnd/TDC_conv/offset_L", i); + double iOfR = dbprovider.getDouble("/calibration/cnd/TDC_conv/offset_R", i); + + TDCTOTIMESLOPE[iSec-1][iLay-1][0] = iSlL; + TDCTOTIMEOFFSET[iSec-1][iLay-1][0] = iOfL; + TDCTOTIMESLOPE[iSec-1][iLay-1][1] = iSlR; + TDCTOTIMEOFFSET[iSec-1][iLay-1][1] = iOfR; + //System.out.println("TDCTOTIMESLOPE "+iSl); + //System.out.println("TDCTOTIMEOFFSET "+iOf); + } + // ?Time offsets _layer ... DB entry says time_offset_sector + for(int i =0; i< dbprovider.length("/calibration/cnd/TimeOffsets_layer/sector"); i++) { + + int iSec = dbprovider.getInteger("/calibration/cnd/TimeOffsets_layer/sector", i); + int iLay = dbprovider.getInteger("/calibration/cnd/TimeOffsets_layer/layer", i); + double iTO = dbprovider.getDouble("/calibration/cnd/TimeOffsets_layer/time_offset_layer", i); + + TIMEOFFSETSECT[iSec-1][iLay-1] = iTO; + } + // Attenuation length + for(int i =0; i< dbprovider.length("/calibration/cnd/Attenuation/sector"); i++) { + + int iSec = dbprovider.getInteger("/calibration/cnd/Attenuation/sector", i); + int iLay = dbprovider.getInteger("/calibration/cnd/Attenuation/layer", i); + double iALL = dbprovider.getDouble("/calibration/cnd/Attenuation/attlen_L", i); + double iALR = dbprovider.getDouble("/calibration/cnd/Attenuation/attlen_R", i); + + ATNLEN[iSec-1][iLay-1][0] = iALL; + ATNLEN[iSec-1][iLay-1][1] = iALR; + } + // Effective velocity + for(int i =0; i< dbprovider.length("/calibration/cnd/EffV/sector"); i++) { + + int iSec = dbprovider.getInteger("/calibration/cnd/EffV/sector", i); + int iLay = dbprovider.getInteger("/calibration/cnd/EffV/layer", i); + double iVEL = dbprovider.getDouble("/calibration/cnd/EffV/veff_L", i); + double iVER = dbprovider.getDouble("/calibration/cnd/EffV/veff_R", i); + + EFFVEL[iSec-1][iLay-1][0] = iVEL; + EFFVEL[iSec-1][iLay-1][1] = iVER; + } + // Energy + for(int i =0; i< dbprovider.length("/calibration/cnd/Energy/sector"); i++) { + + int iSec = dbprovider.getInteger("/calibration/cnd/Energy/sector", i); + int iLay = dbprovider.getInteger("/calibration/cnd/Energy/layer", i); + double iMIPDL = dbprovider.getDouble("/calibration/cnd/Energy/mip_dir_L", i); + double iMIPIL = dbprovider.getDouble("/calibration/cnd/Energy/mip_indir_L", i); + double iMIPDR = dbprovider.getDouble("/calibration/cnd/Energy/mip_dir_R", i); + double iMIPIR = dbprovider.getDouble("/calibration/cnd/Energy/mip_indir_R", i); + + MIPDIRECT[iSec-1][iLay-1][0] = iMIPDL; + MIPINDIRECT[iSec-1][iLay-1][0] = iMIPIL; + MIPDIRECT[iSec-1][iLay-1][1] = iMIPDR; + MIPINDIRECT[iSec-1][iLay-1][1] = iMIPIR; + } + // Status_LR + for(int i =0; i< dbprovider.length("/calibration/cnd/Status_LR/sector"); i++) { + + int iSec = dbprovider.getInteger("/calibration/cnd/Status_LR/sector", i); + int iLay = dbprovider.getInteger("/calibration/cnd/Status_LR/layer", i); + int iStatL= dbprovider.getInteger("/calibration/cnd/Status_LR/status_L", i); + int iStatR= dbprovider.getInteger("/calibration/cnd/Status_LR/status_R", i); + + Status_LR[iSec-1][iLay-1][0] = iStatL; + Status_LR[iSec-1][iLay-1][1] = iStatR; + //System.out.println("Status_LR "+iStat); + } + // Geometry + for(int i =0; i< dbprovider.length("/geometry/cnd/layer/layer"); i++) { + int iLay = dbprovider.getInteger("/geometry/cnd/layer/layer", i); + double iLowerBase = dbprovider.getDouble("/geometry/cnd/layer/LowerBase", i); + double iHigherBase = dbprovider.getDouble("/geometry/cnd/layer/HigherBase", i); + double iLength = dbprovider.getDouble("/geometry/cnd/layer/Length", i); + double iUpstreamZOffset = dbprovider.getDouble("/geometry/cnd/layer/UpstreamZOffset", i); + + LENGTH[iLay-1] = iLength; + ZOFFSET[iLay-1] = iUpstreamZOffset; + } + + // +1 added + for(int i =0; i< dbprovider.length("/geometry/cnd/cnd")+1; i++) { + int iCND = dbprovider.getInteger("/geometry/cnd/cnd", i); + double iInnerRadius = dbprovider.getDouble("/geometry/cnd/cnd/InnerRadius", i); + double iOpenAngle = dbprovider.getDouble("/geometry/cnd/cnd/OpenAngle", i); + double iThickness = dbprovider.getDouble("/geometry/cnd/cnd/Thickness", i); + double iAzimuthalGap = dbprovider.getDouble("/geometry/cnd/cnd/AzimuthalGap", i); + double iLateralGap = dbprovider.getDouble("/geometry/cnd/cnd/LateralGap", i); + + INNERRADIUS[iCND] = iInnerRadius; + THICKNESS[iCND] = iThickness; + + } + CSTLOADED = true; + System.out.println("SUCCESSFULLY LOADED CND CALIBRATION CONSTANTS...."); + + setDB(dbprovider); + } + + + private static DatabaseConstantProvider DB; + + public static final DatabaseConstantProvider getDB() { + return DB; + } + + + + public static final void setDB(DatabaseConstantProvider dB) { + DB = dB; + } + + public static void main (String arg[]) { + CalibrationConstantsLoader.Load(10,"default"); + } +} diff --git a/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/costants/Parameters.java b/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/costants/Parameters.java new file mode 100755 index 0000000000..931e50e8d6 --- /dev/null +++ b/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/costants/Parameters.java @@ -0,0 +1,88 @@ +package org.jlab.rec.cnd.costants; + +public class Parameters { + + Parameters(){ + + } + + public static final int lightspeed = 30; // c (cm/ns) + + // SIMULATION FLAG + public static boolean isSimulation = true; + + // GEOMETRY PARAMETERS + public static final int SectNum = 24; // Number of sectors (blocks) + public static final int LayNum = 3; // Number of layer + public static final int CompNum = 2; // Number of components (paddles) in each layer, sector + + public static final double R0 = 28.92; // radius of inner-most surface of CND paddle (cm) + public static final double Thickness = 3.08; // thickness of each paddle (cm) + public static final double LayerGap = 0.01; // radial gap between surfaces of paddles in neighbouring layers (cm) + public static final double BlockSlice = 360./SectNum; // azimuthal angle subtended by each sector + + public static final double[] PLength = new double[LayNum] ; // Paddle length in each layer (cm) + + //RECONSTRUCTION PARAMETERS + + public static final int[][][] pedestal = new int[SectNum][LayNum][CompNum]; // ADC pedestals, per ADC + public static final double[][][] ADCslope = new double[SectNum][LayNum][CompNum]; // conversion factors from ADC channels to energy (MeV^-1) at the upstream end of paddle + public static final double[][][] ADCoffset = new double[SectNum][LayNum][CompNum]; // ADC offset + + public static final int NullTDC = 4096; // Max number of channels in the TDC + public static final double[][][] TDCslope = new double[SectNum][LayNum][CompNum]; // conversion factors from TDC channels to time (ns). + public static final double[][][] TDCoffset = new double[SectNum][LayNum][CompNum]; // TDC offset + public static final double[][][] ToffsetSector = new double[SectNum][LayNum][CompNum]; // Global time offset + public static final double[][][] ToffsetLR = new double[SectNum][LayNum][CompNum]; // Time offset between the two components in each sector/layer + + // public static final double[][][] Veff = new double[SectNum][LayNum][CompNum]; // Effective velocity in each paddle; + public static final double[][][] uturn_tloss = new double[SectNum][LayNum][CompNum]; // Time of propagation around the u-turn + + public static final double[][][] AttL = new double[SectNum][LayNum][CompNum]; // Attenuation length + public static final double[][][] uturn_Eloss = new double[SectNum][LayNum][CompNum]; // Fractional energy loss in u-turn + + public static final double[] Zres = new double[LayNum] ; // expected resolution in z for each layer (cm) + public static final double[] POffset = new double[LayNum] ; // offset of paddle wrt Central Detector center (cm) + + public static final double TarZ = 0.; // position of the target wrt Central Detector centre + + public static final double Tres = 0.2; // Average time resolution for hit + public static final double[] MaxTime = new double[LayNum]; // Max time of particle hit in paddle for a good event + public static final double[] MinTime = new double[LayNum]; // Min time of particle hit in paddle for a good event + + public static double EThresh = 2. ; // Min reconstructed deposited energy threshold for a good event + + + public static void SetParameters() { + + for (int l=0; l implements Comparable{ + + /** + * A CndHit consists of an array of particle hits in the CND reconstructed according to + * the algorithm of the CndHitFinder class + */ + + private static final long serialVersionUID = 1L; // What is this?? + + private int _pad_d; // index, to the half-hit array list, of the "direct" half-hit + private int _pad_n; // index, to the half-hit array list, of the "indirect", neighbour half-hit + private double _T; // reconstructed time of hit + private double _Z; // z co-ordinate of hit (wrt target center) + private double _X; // x co-ordinate of hit (wrt target center) + private double _Y; // y co-ordinate of hit (wrt target center) + private double _tX; // x co-ordinate of track wrt to middle of the counter + private double _tY; // y co-ordinate of track wrt to middle of the counter + private double _tZ; // z co-ordinate of track wrt to middle of the counter + private double _uX; // uncertainty in hit x coordinate + private double _uY; // uncertainty in hit y coordinate + private double _uZ; // uncertainty in hit z coordinate + private double _pathlength; // reconstructed path length from the vertex + private double _tLength; // reconstructed path length in the hit paddle + private double _E; // reconstructed energy of hit + private double _phi; // azimuthal angle of hit (assuming hit in center of paddle width) + private double _theta; // polar angle of hit (assuming hit in center of paddle thickness) + private int _sector, _layer, _component; + private int _indexL; // index to match row adc and tdc to reconstructed hit (index L (resp.R) should be the same for adc and tdc) + private int _indexR; + + // constructor + public CndHit(int padd, int padn) { + this._pad_d = padd; + this._pad_n = padn; + } + + public int index_d() { + return _pad_d; + } + + public int index_n() { + return _pad_n; + } + + public double Time() { + return _T; + } + + public void set_Time(double time) { + this._T = time; + } + + public double Z() { + return _Z; + } + + public double X() { + return _X; + } + + public double Y() { + return _Y; + } + + public double pathLength() { + return _pathlength; + } + + public double tLength() { + return _tLength; + } + + public void set_Z(double zpos) { + this._Z = zpos; + } + + public void set_X(double xpos) { + this._X = xpos; + } + + public void set_Y(double ypos) { + this._Y = ypos; + } + + public void set_pathlength(double path) { + this._pathlength=path; + } + + public void set_tLength(double dL) { + this._tLength=dL; + } + + public double Edep() { + return _E; + } + + public void set_Edep(double energy) { + this._E = energy; + } + + public double Phi() { + return _phi; + } + + public void set_Phi(double phi) { + this._phi = phi; + } + + public double Theta() { + return _theta; + } + + public void set_Theta(double theta) { + this._theta = theta; + } + + public int Sector() { + return _sector; + } + + public void set_Sector(int sector) { + this._sector = sector; + } + + public int Layer() { + return _layer; + } + + public void set_Layer(int layer) { + this._layer = layer; + } + + public int Component() { + return _component; + } + + public void set_Component(int component) { + this._component = component; + } + + public double indexL() { + return _indexL; + } + + public void set_indexL(int indexL) { + this._indexL = indexL; + } + + public double indexR() { + return _indexR; + } + + public void set_indexR(int indexR) { + this._indexR = indexR; + } + + public double get_tX() { + return _tX; + } + + public void set_tX(double _tX) { + this._tX = _tX; + } + + public double get_tY() { + return _tY; + } + + public void set_tY(double _tY) { + this._tY = _tY; + } + + public double get_tZ() { + return _tZ; + } + + public void set_tZ(double _tZ) { + this._tZ = _tZ; + } + + public double get_uX() { + return _uX; + } + + public void set_uX(double _uX) { + this._uX = _uX; + } + + public double get_uY() { + return _uY; + } + + public void set_uY(double _uY) { + this._uY = _uY; + } + + public double get_uZ() { + return _uZ; + } + + public void set_uZ(double _uZ) { + this._uZ = _uZ; + } + + public int compareTo(CndHit arg0) { // Sorts into ascending time order + if(this.Time() findHits(ArrayList halfhits) + { + + Parameters.SetParameters(); + + ArrayList HitArray = new ArrayList(); // array list of all "good" reconstructed hits in CND + ArrayList goodCndHits = new ArrayList(); // array list of unambiguous reconstructed hits in CND + + if(halfhits.size() > 0) { + + // Loop through the half-hits array to find possible physical combinations with neighbours. + + + double E1=0;//used to check that the two component of the deposited energy are roughtly the same + double E2=0; + + int neigh = 0; // index of the coupled neighbour paddle to the one under consideration + int pad = 0; // index of paddle (component) under consideration in the half-hit list + int lay = 0; // index of layer under consideration in the half-hit list + int block = 0; // index of block (sector) under consideration in the half-hit list + int pad_d = 0; // index of the paddle with the direct signal + int pad_n = 0; // index of the paddle with the indirect (neighbour) signal + + int indexR=0; // index of the hit in the row adcR/tdcR bank + int indexL=0; // index of the hit in the row adcL/tdcL bank + + double Tup = 0.; // Time at upstream end of hit paddle (taken from direct signal) + double Tdown = 0.; // Time at downstream end of hit paddle (taken from the neighbour signal) + double Eup = 0.; // Energy at upstream end of hit paddle + double Edown = 0.; // Energy at downstream end of hit paddle + + double Z_av = 0.; // Z of the hit position (local co-ordinates, wrt the centre of the paddle) + double T_hit = 0.; // Reconstructed time of particle hit in the paddle + double z_hit = 0.; // Reconstructed position of the particle hit in the paddle (global co-ordinates, wrt to centre of the Central Detector) + double x_hit = 0.; // Reconstructed position of the particle hit in the paddle (global co-ordinates, wrt to centre of the Central Detector) + double y_hit = 0.; // Reconstructed position of the particle hit in the paddle (global co-ordinates, wrt to centre of the Central Detector) + double E_hit = 0; // Reconstructed energy deposit of the particle in the paddle + double r_hit = 0.; // Perpendicular distance of the hit position (assuming center of paddle) from the beam-axis + double path = 0.; // path length travelled by particle (assuming a straight line) + double phi_hit = 0.; // Phi angle of the hit position (assuming center of paddle) from the x-axis. + double theta_hit = 0.; // Theta angle of the hit position from the z-axis; + + int totrec = 0; // counter for "good" reconstructions + + for(int i = 0; i < (halfhits.size()); i++) + { + HalfHit hit1 = halfhits.get(i); // first, get the half-hit + + // for each half-hit (signal), work out the coupled paddle: + block = hit1.Sector(); // the sector (block) of the hit + pad = hit1.Component(); // the paddle associated with the hit + lay = hit1.Layer(); + if (pad == 1) neigh = 2; // the neighbouring paddle + else neigh = 1; + + // Now loop through the half-hits again and match any which can give a physical reconstruction, + // but off-set the start of the list to make sure no repeats: + + for (int j = i+1; j < halfhits.size(); j++) + { + HalfHit hit2 = halfhits.get(j); // get the second half-hit + + if (block != hit2.Sector()) continue; // half-hits must be in the same sector + if (lay != hit2.Layer()) continue; // half-hits must be in the same layer + if (hit2.Component() != neigh) continue; // half-hits must come from coupled paddles + + // Decide which one of the two signals is the direct and which one is indirect on the basis of timing. + // Works if effective velocities in the coupled paddles don't differ much. + + HalfHit hit_d; + HalfHit hit_n; + + if (hit1.Tprop() < hit2.Tprop()) + { + hit_d = hit1; + hit_n = hit2; + pad_d = i; + pad_n = j; + } + else if (hit1.Tprop() > hit2.Tprop()) + { + hit_d = hit2; + hit_n = hit1; + pad_d = j; + pad_n = i; + } + else continue; // loose events where it's really not clear which paddle they hit in. + + // Now calculate the time and energy at the upstream and downstream ends of the paddle the hit happened in: + // attlen is in cm. need to convert to mm -> *10 + Tup = hit_d.Tprop(); + Tdown = hit_n.Tprop() - CalibrationConstantsLoader.LENGTH[lay-1]/(10.*CalibrationConstantsLoader.EFFVEL[block-1][lay-1][hit_n.Component()-1]) - CalibrationConstantsLoader.UTURNTLOSS[block-1][lay-1]; + Eup = hit_d.Eatt()/CalibrationConstantsLoader.MIPDIRECT[block-1][lay-1][hit_d.Component()-1]; + Edown = hit_n.Eatt()/(Math.exp(-1.*CalibrationConstantsLoader.LENGTH[lay-1]/(10.*CalibrationConstantsLoader.ATNLEN[block-1][lay-1][hit_n.Component()-1]))*CalibrationConstantsLoader.UTURNELOSS[block-1][lay-1]*CalibrationConstantsLoader.MIPDIRECT[block-1][lay-1][hit_n.Component()-1]); + + //The next two lines have to be used if want to use MIP Indirect for reconstruction + // Eup = hit_d.Eatt()/CalibrationConstantsLoader.MIPDIRECT[hit_d.Sector()-1][hit_d.Layer()-1][hit_d.Component()-1]; + // Edown = hit_n.Eatt()/CalibrationConstantsLoader.MIPINDIRECT[hit_d.Sector()-1][hit_d.Layer()-1][hit_d.Component()-1]; + + //test (first check on energy and time) + // System.out.println(" hit found...... = "+" Tup "+(Tup)+" Tdown "+(Tdown)+" Ehit "+hit_d.Eatt()+" Eup "+Eup+" Edown " + Edown); + + + + // For this particular combination, check whether this gives a z within the paddle length (+/- z resolution). + // "local" position of hit on the paddle (wrt paddle center): + Z_av = ((Tup-Tdown) * 10. * CalibrationConstantsLoader.EFFVEL[block-1][lay-1][hit_d.Component()-1]) / 2.; + + if ( (Z_av < ((CalibrationConstantsLoader.LENGTH[lay-1] / (-2.)) - 10.*Parameters.Zres[lay-1])) || (Z_av > ((CalibrationConstantsLoader.LENGTH[lay-1] / 2.) + 10.*Parameters.Zres[lay-1])) ) continue; + + // Calculate time of hit in paddle and check that it's in a physical window for the event: + T_hit = (Tup + Tdown - (CalibrationConstantsLoader.LENGTH[lay-1] / (10.*CalibrationConstantsLoader.EFFVEL[block-1][lay-1][hit_d.Component()-1]))) / 2.; // time of hit in the paddle + + //test (check time of hit) + //System.out.println(T_hit); + + //First cut : the time of hit has to be in a physical time window + if ((T_hit) < Parameters.MinTime[lay-1] || (T_hit) > Parameters.MaxTime[lay-1]) continue; + + + // Calculate the deposited energy and check whether it's over the imposed threshold. + E_hit = (Eup / Math.exp(-1.*(CalibrationConstantsLoader.LENGTH[lay-1]/2. + Z_av) / (10.*CalibrationConstantsLoader.ATNLEN[block-1][lay-1][hit_d.Component()-1]))) + (Edown / Math.exp(-1.*(CalibrationConstantsLoader.LENGTH[lay-1]/2. - Z_av) / (10.*CalibrationConstantsLoader.ATNLEN[block-1][lay-1][hit_d.Component()-1]))); + + //test (check if the two component of the energy are roughtly the same) + E1=(Eup / Math.exp(-1.*(CalibrationConstantsLoader.LENGTH[lay-1]/2. + Z_av) / (10.*CalibrationConstantsLoader.ATNLEN[block-1][lay-1][hit_d.Component()-1]))); + E2=(Edown / Math.exp(-1.*(CalibrationConstantsLoader.LENGTH[lay-1]/2. - Z_av) / (10.*CalibrationConstantsLoader.ATNLEN[block-1][lay-1][hit_d.Component()-1]))); + // System.out.println(E1); + // System.out.println(E2); + + //second cut : the energy of the hit have to be higher than the threshold + // the threshold is currently 2Mev + if (E_hit < Parameters.EThresh) continue; + + // third cut (added by Pierre) : the energy of both component of the energy have to be of the same order of magnitude + if (Math.abs(E1-E2) > ((E1+E2)/2.)) continue; + + // test of the previous cut + // System.out.println((Eup / Math.exp(-1.*(CalibrationConstantsLoader.LENGTH[lay-1]/2. + Z_av) / (10.*CalibrationConstantsLoader.ATNLEN[block-1][lay-1][hit_d.Component()-1])))); + // System.out.println((Edown / Math.exp(-1.*(CalibrationConstantsLoader.LENGTH[lay-1]/2. - Z_av) / (10.*CalibrationConstantsLoader.ATNLEN[block-1][lay-1][hit_d.Component()-1])))); + // System.out.println(); + + + + // If you get a "good" reconstruction, calculate the rest of the details: + + if (hit_d.Component() == 1) phi_hit = (block-1) * Parameters.BlockSlice - 0.25*Parameters.BlockSlice; + else if (hit_d.Component() == 2) phi_hit = (block-1) * Parameters.BlockSlice + 0.25*Parameters.BlockSlice; + + //in mm + z_hit = (((-1.*CalibrationConstantsLoader.ZOFFSET[lay-1]) + (CalibrationConstantsLoader.LENGTH[lay-1]/2.)) + Z_av); // z co-ordinate of hit in the paddle wrt Central Detector centre + r_hit = CalibrationConstantsLoader.INNERRADIUS[0] + (lay - 0.5)*CalibrationConstantsLoader.THICKNESS[0] + (lay-1)*Parameters.LayerGap; + path = Math.sqrt(r_hit*r_hit + z_hit*z_hit); + + //in mm + x_hit = (r_hit * Math.cos(phi_hit*Math.PI/180.)); + //in mm + y_hit = (r_hit * Math.sin(phi_hit*Math.PI/180.)); + + theta_hit = Math.acos(z_hit/path) * 180./Math.PI; + + totrec++; // count number of "good" reconstructions + + //test (check of the remaining hits after cuts) + // System.out.println(" hit found......Zav "+ Z_av +" T up= "+Tup +" Tdown = "+Tdown +" T = "+T_hit+" Theta = "+theta_hit); + + // Create a new CndHit and fill it with the relevant info: + + CndHit GoodHit = new CndHit(pad_d,pad_n); // Takes as index the halfhits array indices of the two half-hits involved. + + GoodHit.set_Time(T_hit); + GoodHit.set_X(x_hit); + GoodHit.set_Y(y_hit); + GoodHit.set_Z(z_hit); + GoodHit.set_Edep(E_hit); + GoodHit.set_Theta(theta_hit); + GoodHit.set_Phi(phi_hit); + GoodHit.set_Sector(block); + GoodHit.set_Layer(lay); +// GoodHit.set_Component(hit_d.Component()); + GoodHit.set_Component(1); // set component to 1 for hits + + // set the index of the right and left signal for the reconstucted hit + // index of adc and tdc on one side (left or right) are the same. See hitreader + if(hit1.Component()==2){ + indexR=hit1.BankIndex(); + indexL=hit2.BankIndex(); + } + else{ + indexR=hit2.BankIndex(); + indexL=hit1.BankIndex(); + } + GoodHit.set_indexL(indexL); + GoodHit.set_indexR(indexR); + + HitArray.add(GoodHit); + + } // close loop over j + } // close loop over i + + // At this stage an array of possible reconstructed hits, type CndHit and called HitArray, has been created. + // There may be cases of ambiguous reconstruction: where two signals from one paddle can be matched up with a single one from the neighbour. + // Remove those reconstructions: + + int ambig_rec[] = new int[totrec]; // to keep track of ambiguous reconstructions in the next loops + + for (int i=0; i helices) + { + // this method is used to find the length of the path followed by the detected charged particle in the cnd + // first we need to know if the particle is charged by matching the hit to the cvt helical tracks + // then we can calculate the length of the track + + double length = 0; + double xi=hit.X(); // retrieve cnd hit coordinates + double yi=hit.Y(); + double zi=hit.Z(); + int lay=hit.Layer(); + // Constants SHOULD NOT be in the code methods BUT in a parameters file or in CCDB!!! + double radius = CalibrationConstantsLoader.INNERRADIUS[0] + (lay - 0.5)*CalibrationConstantsLoader.THICKNESS[0] + (lay-1)*Parameters.LayerGap; + double incx = Math.sqrt(((xi*xi*15.*15.)/(radius*radius))+((yi*yi)*(3.75*3.75*(Math.PI/180.)*(Math.PI/180.)))); //15 is half the paddle thickness + double incy = Math.sqrt(((yi*yi*15.*15.)/(radius*radius))+((xi*xi)*(3.75*3.75*(Math.PI/180.)*(Math.PI/180.)))); // 3.75 is the incertainty in phi + double incz = 38.4/Math.sqrt(hit.Edep()); //evaluated with the non-corrected energy + //uncertainty in z is estimated using uncertainty in T_d multiplied by veff + hit.set_uX(incx); + hit.set_uY(incy); + hit.set_uZ(incz); + + for(int i =0 ; i entrypoints = new ArrayList(); + List exitpoints = new ArrayList(); + cyl1.intersectionRay(line, entrypoints); + cyl2.intersectionRay(line, exitpoints); + if(entrypoints.size()==1 && exitpoints.size()==1){ + length=entrypoints.get(0).distance(exitpoints.get(0)); + System.err.println("length neutral " + length); + } + else { + System.err.println("probleme intersection"+" entrypoints nb "+entrypoints.size()+" exitpoints nb "+exitpoints.size());} + + hit.set_Edep(energyNCorr*(Math.max(length, CalibrationConstantsLoader.THICKNESS[0])/CalibrationConstantsLoader.THICKNESS[0])); + return length; + } + else return length; + + } // fingLengthNeutral + + + +} // CndHitFinder diff --git a/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/hit/CvtGetHTrack.java b/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/hit/CvtGetHTrack.java new file mode 100755 index 0000000000..0d4be3a736 --- /dev/null +++ b/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/hit/CvtGetHTrack.java @@ -0,0 +1,181 @@ +package org.jlab.rec.cnd.hit; + +import java.util.ArrayList; +import java.util.List; + +import org.jlab.geom.prim.Point3D; +import org.jlab.io.base.DataBank; +import org.jlab.io.base.DataEvent; +import org.jlab.rec.cnd.costants.CalibrationConstantsLoader; +import org.jlab.rec.cnd.costants.Parameters; +import org.jlab.rec.cvt.trajectory.Helix; + +public class CvtGetHTrack { // this class is used to extract helical tracks from the cvt event bank. + + public CvtGetHTrack() { + helices = new ArrayList(); + } + + private List helices; + + public List getHelices() { + return helices; + } + + public void setHelices(List helices) { + this.helices = helices; + } + + public void getCvtHTrack(DataEvent event) { + + helices.clear(); + + if (event == null) { // check if there is an event + //System.out.println(" no event"); + } + + if (event.hasBank("CVTRec::Tracks") == false) { + // check if there are some cvt tracks in the event + //System.out.println(" no cvt tracks"); + } + + if (event.hasBank("CVTRec::Tracks") == true) { + + //System.out.println(" cvt tracks present"); + DataBank bank = event.getBank("CVTRec::Tracks"); + DataBank config = event.getBank("RUN::config"); + + int nt = bank.rows(); // number of tracks in the cvt event + + //test (check if cvt bank is here) + //System.out.println("number of cvt tracks "+nt); + //bank.show(); + //config.show(); + // retrieve the helix parameters + for (int i = 0; i < nt; i++) { + //Matrix m = new Matrix(5,5); + int trkID = i; + double dca = bank.getFloat("d0", i); + double phi0 = bank.getFloat("phi0", i); + double z0 = bank.getFloat("z0", i); + double tandip = bank.getFloat("tandip", i); + int q = bank.getInt("q", i); + double pt = bank.getFloat("pt", i); + // use the formula R=pt/qB to get the curvature (see cvt reconstruction class Track)/Pt is in Gev + double rho = (0.000299792458 * q * 5. * config.getFloat("solenoid", 0)) / pt; + // the max value of B is set to 5.Tesla + //double p=bank.getFloat("p", i); + + //test (check the parameters) + // bank.show(); + // System.out.println("p helixi "+bank.getFloat("p", i)); + // System.out.println("pt "+bank.getFloat("pt", i)); + // System.out.println(config.getFloat("solenoid",0)); + // System.out.println(bank.getFloat("tandip", i)); + // System.out.println((bank.getFloat("cov_d02", i))); + // System.out.println("R "+ 1./rho); + //not used in the code + //m.set(0,0, bank.getFloat("cov_d02", i)); + //m.set(0,1, bank.getFloat("cov_d0phi0", i)); + //m.set(1,0, bank.getFloat("cov_d0phi0", i)); + //m.set(0,2, bank.getFloat("cov_d0rho", i)); + //m.set(2,0, bank.getFloat("cov_d0rho", i)); + //m.set(1,1, bank.getFloat("cov_phi02", i)); + //m.set(1,2, bank.getFloat("cov_phi0rho", i)); + //m.set(2,1, bank.getFloat("cov_phi0rho", i)); + //m.set(2,2, bank.getFloat("cov_rho2", i)); + //m.set(3,3, bank.getFloat("cov_z02", i)); + //m.set(4,4, bank.getFloat("cov_tandip2", i)); + //Helix helixi = new Helix(dca,phi0,rho,z0,tandip,null); // reconstruct the helix from the cvt track + //System.out.println("helix proj "+helixi.getPointAtRadius(CalibrationConstantsLoader.INNERRADIUS[0]).toString()); + //Track track= new Track(helixi); + //track.set_P(p); + //track.set_Pt(pt); + //track.set_Q(q); + //helix.add(track); + CVTTrack trk = new CVTTrack(); + trk.set_Helix(new Helix(dca, phi0, rho, z0, tandip, null)); + trk.set_Id(trkID); + + //(VZ) + //find the points of intersection of the track with the relevant radii at the CND surfaces; these will be used for matching + // The position of the tracks at the relevant radii is accessed as an ordered List of List: + // first index 0...2 is layer index + // second index 0...2 corresponds to entrance, middle and exit of track wrt the counter + for (int lay = 1; lay <= 3; lay++) { + double radius = CalibrationConstantsLoader.INNERRADIUS[0] + (lay - 0.5) * CalibrationConstantsLoader.THICKNESS[0] + (lay - 1) * Parameters.LayerGap; + double entryradius = CalibrationConstantsLoader.INNERRADIUS[0] + (lay - 1) * CalibrationConstantsLoader.THICKNESS[0] + (lay - 1) * Parameters.LayerGap; + double escaperadius = CalibrationConstantsLoader.INNERRADIUS[0] + (lay) * CalibrationConstantsLoader.THICKNESS[0] + (lay - 1) * Parameters.LayerGap; + trk._TrkInters.get(lay - 1).add(trk.get_Helix().getPointAtRadius(entryradius)); + Point3D Xm = trk.get_Helix().getPointAtRadius(radius); + trk._TrkInters.get(lay - 1).add(Xm); + trk._TrkInters.get(lay - 1).add(trk.get_Helix().getPointAtRadius(escaperadius)); + double r = Math.sqrt(Xm.x() * Xm.x() + Xm.y() * Xm.y()); + double par = 1. - ((r * r - dca * dca) * rho * rho) / (2. * (1. + dca * Math.abs(rho))); + double pathLength = Math.abs(Math.acos(par) / rho); + trk._TrkLengths.add(pathLength); + } + helices.add(trk); + } + + } + + } + + /** + * A class to hold the CVT track information relevant for CND analysis + * + * @author ziegler + * + */ + public class CVTTrack { + + private Helix _Helix; + private int _Id; + + // The position of the tracks at the relevant radii is accessed as an ordered List of List: + // first index 0...2 is layer index + // second index 0...2 corresponds to entrance, middle and exit of track wrt the counter + private List> _TrkInters = new ArrayList>(); // intersection point wrt front middle and end of counter + private List _TrkLengths = new ArrayList(); //the pathlength of the track from the doca to the beam line to the middle of the CND counter + + public CVTTrack() { + for (int i = 0; i < 3; i++) { + _TrkInters.add(new ArrayList()); + } + } + + public Helix get_Helix() { + return _Helix; + } + + public void set_Helix(Helix _Helix) { + this._Helix = _Helix; + } + + public int get_Id() { + return _Id; + } + + public void set_Id(int _Id) { + this._Id = _Id; + } + + public List> get_TrkInters() { + return _TrkInters; + } + + public void set_TrkInters(List> _TrkInters) { + this._TrkInters = _TrkInters; + } + + public List get_TrkLengths() { + return _TrkLengths; + } + + public void set_TrkLengths(List _PathLengths) { + this._TrkLengths = _PathLengths; + } + + } +} diff --git a/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/hit/HalfHit.java b/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/hit/HalfHit.java new file mode 100755 index 0000000000..52ce8fbd82 --- /dev/null +++ b/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/hit/HalfHit.java @@ -0,0 +1,58 @@ +package org.jlab.rec.cnd.hit; + +import org.jlab.rec.cnd.costants.CalibrationConstantsLoader; +import org.jlab.rec.cnd.costants.Parameters; + +public class HalfHit { + + // In the constructor below, bank_index refers to index in the raw CND bank, + // flag is 0 if it's real data or the "direct" signal in the simulation, 1 if it is the "indirect" signal in the simulation. + + public HalfHit(int sector, int layer, int component, int adc, int tdc, int bank_index) + { + this._sector = sector; + this._layer = layer; + this._component = component; + this._bankindex = bank_index; + + //first step of the adc and tdc processing + this._Eatt = (double)adc * ((0.1956*CalibrationConstantsLoader.THICKNESS[0])/(2.)); // the 2 accounts for the splitting of the deposited energy along the two coupled paddles + this._Tprop = ((double)tdc * CalibrationConstantsLoader.TDCTOTIMESLOPE[sector-1][layer-1][component-1])+ CalibrationConstantsLoader.TDCTOTIMEOFFSET[sector-1][layer-1][component-1] + CalibrationConstantsLoader.TIMEOFFSETSECT[sector-1][layer-1] + CalibrationConstantsLoader.TIMEOFFSETSLR[sector-1][layer-1] ; // And other constants! + } + + private double _Eatt; // Attenuated energy (MeV) at the upstream end of the paddle + private double _Tprop; // Time (ns) at the upstream end of the paddle + + private int _sector; // sector (block) of the CND + private int _layer; // layer in which the signal is registered + private int _component; // component (paddle) with which the signal is associated + + private int _bankindex; // Index of the signal in the raw CND bank + + public int Sector() { + return _sector; + } + + public int Layer() { + return _layer; + } + + public int Component() { + return _component; + } + + public int BankIndex() { + return _bankindex; + } + + + public double Eatt() { + return _Eatt; + } + + public double Tprop() { + return _Tprop; + } + + +} diff --git a/reconstruction/cnd/src/main/java/org/jlab/service/cnd/CNDEngine.java b/reconstruction/cnd/src/main/java/org/jlab/service/cnd/CNDEngine.java new file mode 100755 index 0000000000..7647753ef5 --- /dev/null +++ b/reconstruction/cnd/src/main/java/org/jlab/service/cnd/CNDEngine.java @@ -0,0 +1,174 @@ +package org.jlab.service.cnd; + + +import java.io.IOException; +import java.util.ArrayList; + +import org.jlab.clas.reco.ReconstructionEngine; +import org.jlab.geom.prim.Point3D; +import org.jlab.io.base.DataBank; +import org.jlab.io.base.DataEvent; +import org.jlab.io.evio.EvioDataEvent; +import org.jlab.io.hipo.HipoDataSource; +import org.jlab.io.hipo.HipoDataSync; +import org.jlab.rec.cnd.costants.CalibrationConstantsLoader; +import org.jlab.rec.cnd.banks.HitReader; +import org.jlab.rec.cnd.banks.RecoBankWriter; +import org.jlab.rec.cnd.hit.CndHit; +import org.jlab.rec.cnd.hit.CvtGetHTrack; +import org.jlab.rec.cnd.hit.HalfHit; +import org.jlab.rec.cnd.hit.CndHitFinder; +import org.jlab.rec.cvt.track.Track; +import org.jlab.rec.cvt.trajectory.Helix; +import org.jlab.rec.cvt.trajectory.TrkSwimmer; +/** + * Service to return reconstructed CND Hits - the output is in Hipo format + * + * + */ + +public class CNDEngine extends ReconstructionEngine { + + + public CNDEngine() { + super("CND", "sokhan", "1.0"); + } + + int Run = -1; + + //test + static int enb =0; + static int ecnd=0; + static int hcvt=0; + static int match=0; + static int posmatch=0; + + @Override + public boolean processDataEvent(DataEvent event) { + ArrayList halfhits = new ArrayList(); + ArrayList hits = new ArrayList(); + + //test + if(event.hasBank("CVTRec::Tracks")){ + hcvt++; + } + + halfhits = HitReader.getCndHalfHits(event); + //1) exit if halfhit list is empty + if(halfhits.size()==0 ) + return true; + + // update calibration constants based on run number if changed + setRunConditionsParameters(event); + + //2) find the CND hits from these half-hits + CndHitFinder hitFinder = new CndHitFinder(); + hits = hitFinder.findHits(halfhits); + + CvtGetHTrack cvttry = new CvtGetHTrack(); + cvttry.getCvtHTrack(event); // get the list of helix associated with the event + + int flag=0; + for (CndHit hit : hits){ // findlength for charged particles + double length =hitFinder.findLength(hit, cvttry.getHelices()); + if (length!=0){ + hit.set_tLength(length); // the path length is non zero only when there is a match with cvt track + if(flag==0){match++;} + flag=1; + } + + } + + // GetVertex getVertex = new GetVertex(); + // Point3D vertex = getVertex.getVertex(event); + // for (CndHit hit : hits){ // check findlengthneutral + // hitFinder.findLengthNeutral( vertex, hit); + // } + // + + if(hits.size()!=0){ + + DataBank outbank = RecoBankWriter.fillCndHitBanks(event, hits); + event.appendBank(outbank); + ecnd++; + if(event.hasBank("CVTRec::Tracks")){ + posmatch++; + } + //outbank.show(); + } + return true; + } + + @Override + public boolean init() { + // TODO Auto-generated method stub + return true; + } + + public void setRunConditionsParameters(DataEvent event) { + if(event.hasBank("RUN::config")==false) { + System.err.println("RUN CONDITIONS NOT READ!"); + } + else { + int newRun = Run; + + DataBank bank = event.getBank("RUN::config"); + newRun = bank.getInt("run", 0); + // Load the constants + //------------------- + if(Run!=newRun) { + CalibrationConstantsLoader.Load(newRun,"default"); + Run = newRun; + } + } + + } + + public static void main (String arg[]) throws IOException { + CNDEngine en = new CNDEngine(); + en.init(); + //String input = "/Users/ziegler/Workdir/Files/GEMC/ForwardTracks/pi-.r100.evio"; + //String input = "/projet/nucleon/silvia/test.hipo"; + //String input = "/projet/nucleon/silvia/ctof_pion.rec.hipo"; + //String input = "/projet/nucleon/silvia/out_ep.hipo"; + //String input = "/projet/nucleon/silvia/out_out_bis.hipo"; + //String input = "/projet/nucleon/silvia/out_bis.hipo"; + //String input = "/projet/nucleon/silvia/test.rec.hipo"; + //String input = "/projet/nucleon/pierre/test_out3.hipo"; + String input = "/Users/devita/Work/clas12/simulations/tests/clas12Tags/4a.2.0/out.rec.hipo"; + //String input = "/projet/nucleon/silvia/test.hipo"; + //String input = "/projet/nucleon/pierre/test.rec.hipo"; + HipoDataSource reader = new HipoDataSource(); + reader.open(input); + String outputFile="/Users/devita/Work/clas12/simulations/tests/clas12Tags/4a.2.0/out.rec1.hipo"; + HipoDataSync writer = new HipoDataSync(); + writer.open(outputFile); + + + while(reader.hasEvent()) { + enb++; + DataEvent event = (DataEvent) reader.getNextEvent(); + + event.show(); + //event.getBank("CND::hits").show(); + en.processDataEvent(event); + writer.writeEvent(event); + event.getBank("CND::hits").show(); + System.out.println("event nb "+enb); + //event.getBank("CND::hits").show(); + //System.out.println(); + if(enb>1000) + break; + } + writer.close(); + + System.out.println("enb "+enb); + System.out.println("ecnd "+ecnd); + System.out.println("hcvt "+hcvt); + System.out.println("posmatch "+posmatch); + System.out.println("match "+match); + System.out.println("%match "+100.*match/posmatch); + System.out.println("Done"); + } + +} diff --git a/reconstruction/cnd/target/maven-archiver/pom.properties b/reconstruction/cnd/target/maven-archiver/pom.properties new file mode 100644 index 0000000000..71bb77aaf9 --- /dev/null +++ b/reconstruction/cnd/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Wed Aug 16 18:25:36 CEST 2017 +version=1.0-SNAPSHOT +groupId=org.jlab.clas12.detector +artifactId=clas12detector-cnd diff --git a/reconstruction/cnd/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/reconstruction/cnd/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000000..e639bf0f7a --- /dev/null +++ b/reconstruction/cnd/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,10 @@ +org/jlab/rec/cnd/banks/HitReader.class +org/jlab/rec/cnd/hit/CvtGetHTrack.class +org/jlab/rec/cnd/hit/HalfHit.class +org/jlab/service/cnd/CNDEngine.class +org/jlab/rec/cnd/costants/Parameters.class +org/jlab/rec/cnd/banks/RecoBankWriter.class +org/jlab/rec/cnd/hit/CvtGetHTrack$CVTTrack.class +org/jlab/rec/cnd/costants/CalibrationConstantsLoader.class +org/jlab/rec/cnd/hit/CndHitFinder.class +org/jlab/rec/cnd/hit/CndHit.class diff --git a/reconstruction/cnd/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/reconstruction/cnd/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000000..dba96f890a --- /dev/null +++ b/reconstruction/cnd/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,9 @@ +/Users/devita/NetBeansProjects/clas12-offline-software/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/costants/Parameters.java +/Users/devita/NetBeansProjects/clas12-offline-software/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/banks/HitReader.java +/Users/devita/NetBeansProjects/clas12-offline-software/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/hit/CndHitFinder.java +/Users/devita/NetBeansProjects/clas12-offline-software/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/banks/RecoBankWriter.java +/Users/devita/NetBeansProjects/clas12-offline-software/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/hit/HalfHit.java +/Users/devita/NetBeansProjects/clas12-offline-software/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/costants/CalibrationConstantsLoader.java +/Users/devita/NetBeansProjects/clas12-offline-software/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/hit/CvtGetHTrack.java +/Users/devita/NetBeansProjects/clas12-offline-software/reconstruction/cnd/src/main/java/org/jlab/service/cnd/CNDEngine.java +/Users/devita/NetBeansProjects/clas12-offline-software/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/hit/CndHit.java diff --git a/reconstruction/cnd/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/reconstruction/cnd/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst new file mode 100644 index 0000000000..e69de29bb2 From 711aeadfa8db4c696ac9443c27d297e12fe71c8e Mon Sep 17 00:00:00 2001 From: raffaelladevita Date: Wed, 16 Aug 2017 19:18:33 +0200 Subject: [PATCH 03/29] adding CND reconstruction --- reconstruction/cnd/src/main/java/.classpath | 11 ----------- reconstruction/cnd/src/main/java/.project | 17 ----------------- 2 files changed, 28 deletions(-) delete mode 100644 reconstruction/cnd/src/main/java/.classpath delete mode 100644 reconstruction/cnd/src/main/java/.project diff --git a/reconstruction/cnd/src/main/java/.classpath b/reconstruction/cnd/src/main/java/.classpath deleted file mode 100644 index 5e374a37f8..0000000000 --- a/reconstruction/cnd/src/main/java/.classpath +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/reconstruction/cnd/src/main/java/.project b/reconstruction/cnd/src/main/java/.project deleted file mode 100644 index 5a737c5732..0000000000 --- a/reconstruction/cnd/src/main/java/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - clas12detector-cnd - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - From 12cd9dc0c250198007f2dc3278cbdc6156701fa9 Mon Sep 17 00:00:00 2001 From: raffaelladevita Date: Wed, 16 Aug 2017 19:22:41 +0200 Subject: [PATCH 04/29] adding CND reconstruction --- reconstruction/cnd/.classpath | 7 --- reconstruction/cnd/.project | 17 ------- .../cnd/.settings/org.eclipse.jdt.core.prefs | 11 ----- reconstruction/cnd/nbactions.xml | 46 ------------------- .../cnd/target/maven-archiver/pom.properties | 5 -- .../compile/default-compile/createdFiles.lst | 10 ---- .../compile/default-compile/inputFiles.lst | 9 ---- .../default-testCompile/inputFiles.lst | 0 8 files changed, 105 deletions(-) delete mode 100755 reconstruction/cnd/.classpath delete mode 100755 reconstruction/cnd/.project delete mode 100755 reconstruction/cnd/.settings/org.eclipse.jdt.core.prefs delete mode 100755 reconstruction/cnd/nbactions.xml delete mode 100644 reconstruction/cnd/target/maven-archiver/pom.properties delete mode 100644 reconstruction/cnd/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst delete mode 100644 reconstruction/cnd/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst delete mode 100644 reconstruction/cnd/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst diff --git a/reconstruction/cnd/.classpath b/reconstruction/cnd/.classpath deleted file mode 100755 index 2d5e8154fc..0000000000 --- a/reconstruction/cnd/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/reconstruction/cnd/.project b/reconstruction/cnd/.project deleted file mode 100755 index 30b0c0eb65..0000000000 --- a/reconstruction/cnd/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - reco - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/reconstruction/cnd/.settings/org.eclipse.jdt.core.prefs b/reconstruction/cnd/.settings/org.eclipse.jdt.core.prefs deleted file mode 100755 index 416f4fb696..0000000000 --- a/reconstruction/cnd/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/reconstruction/cnd/nbactions.xml b/reconstruction/cnd/nbactions.xml deleted file mode 100755 index e974bc1896..0000000000 --- a/reconstruction/cnd/nbactions.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - run - - jar - - - process-classes - org.codehaus.mojo:exec-maven-plugin:1.2.1:exec - - - -DCLAS12DIR=/Users/devita/NetBeansProjects/clas12-offline-software/coatjava -classpath %classpath org.jlab.rec.cnd.services.CNDEngine - java - - - - debug - - jar - - - process-classes - org.codehaus.mojo:exec-maven-plugin:1.2.1:exec - - - -Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -DCLAS12DIR=/Users/devita/NetBeansProjects/clas12-offline-software/coatjava -classpath %classpath org.jlab.rec.cnd.services.CNDEngine - java - true - - - - profile - - jar - - - process-classes - org.codehaus.mojo:exec-maven-plugin:1.2.1:exec - - - -DCLAS12DIR=/Users/devita/NetBeansProjects/clas12-offline-software/coatjava -classpath %classpath org.jlab.rec.cnd.services.CNDEngine - java - - - diff --git a/reconstruction/cnd/target/maven-archiver/pom.properties b/reconstruction/cnd/target/maven-archiver/pom.properties deleted file mode 100644 index 71bb77aaf9..0000000000 --- a/reconstruction/cnd/target/maven-archiver/pom.properties +++ /dev/null @@ -1,5 +0,0 @@ -#Generated by Maven -#Wed Aug 16 18:25:36 CEST 2017 -version=1.0-SNAPSHOT -groupId=org.jlab.clas12.detector -artifactId=clas12detector-cnd diff --git a/reconstruction/cnd/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/reconstruction/cnd/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst deleted file mode 100644 index e639bf0f7a..0000000000 --- a/reconstruction/cnd/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +++ /dev/null @@ -1,10 +0,0 @@ -org/jlab/rec/cnd/banks/HitReader.class -org/jlab/rec/cnd/hit/CvtGetHTrack.class -org/jlab/rec/cnd/hit/HalfHit.class -org/jlab/service/cnd/CNDEngine.class -org/jlab/rec/cnd/costants/Parameters.class -org/jlab/rec/cnd/banks/RecoBankWriter.class -org/jlab/rec/cnd/hit/CvtGetHTrack$CVTTrack.class -org/jlab/rec/cnd/costants/CalibrationConstantsLoader.class -org/jlab/rec/cnd/hit/CndHitFinder.class -org/jlab/rec/cnd/hit/CndHit.class diff --git a/reconstruction/cnd/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/reconstruction/cnd/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst deleted file mode 100644 index dba96f890a..0000000000 --- a/reconstruction/cnd/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +++ /dev/null @@ -1,9 +0,0 @@ -/Users/devita/NetBeansProjects/clas12-offline-software/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/costants/Parameters.java -/Users/devita/NetBeansProjects/clas12-offline-software/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/banks/HitReader.java -/Users/devita/NetBeansProjects/clas12-offline-software/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/hit/CndHitFinder.java -/Users/devita/NetBeansProjects/clas12-offline-software/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/banks/RecoBankWriter.java -/Users/devita/NetBeansProjects/clas12-offline-software/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/hit/HalfHit.java -/Users/devita/NetBeansProjects/clas12-offline-software/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/costants/CalibrationConstantsLoader.java -/Users/devita/NetBeansProjects/clas12-offline-software/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/hit/CvtGetHTrack.java -/Users/devita/NetBeansProjects/clas12-offline-software/reconstruction/cnd/src/main/java/org/jlab/service/cnd/CNDEngine.java -/Users/devita/NetBeansProjects/clas12-offline-software/reconstruction/cnd/src/main/java/org/jlab/rec/cnd/hit/CndHit.java diff --git a/reconstruction/cnd/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/reconstruction/cnd/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst deleted file mode 100644 index e69de29bb2..0000000000 From f053fe86cb0d522a2fc2b5bf2fd7c640b70fbc96 Mon Sep 17 00:00:00 2001 From: Veronique Ziegler Date: Wed, 16 Aug 2017 16:38:09 -0400 Subject: [PATCH 05/29] Fixed banks in LTCC XML --- etc/bankdefs/clas12/LTCC.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/etc/bankdefs/clas12/LTCC.xml b/etc/bankdefs/clas12/LTCC.xml index f093adcdc7..fadc9509bc 100644 --- a/etc/bankdefs/clas12/LTCC.xml +++ b/etc/bankdefs/clas12/LTCC.xml @@ -33,9 +33,10 @@ - - - + + + + From 895d0fa56df8673aeadd1a006276782f2f42e685 Mon Sep 17 00:00:00 2001 From: Andrey Kim Date: Fri, 18 Aug 2017 09:24:11 -0400 Subject: [PATCH 06/29] geometry update * removed upstream lightguides from CTOF * removed region 4 from SVT --- .../java/org/jlab/detector/geant4/v2/CTOFGeant4Factory.java | 2 +- .../org/jlab/detector/geant4/v2/SVT/SVTVolumeFactory.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/CTOFGeant4Factory.java b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/CTOFGeant4Factory.java index f9a7eb0150..0846b3a492 100644 --- a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/CTOFGeant4Factory.java +++ b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/CTOFGeant4Factory.java @@ -27,7 +27,7 @@ public CTOFGeant4Factory() { ClassLoader cloader = getClass().getClassLoader(); - for (String name : new String[]{"sc", "lgu", "lgd"}) { + for (String name : new String[]{"sc", "lgd"}) { for (int iscint = 1; iscint <= npaddles; iscint++) { CTOFpaddle component = new CTOFpaddle(String.format("%s%02d", name, iscint), cloader.getResourceAsStream(String.format("ctof/cad/%s%02d.stl", name, iscint)), iscint); diff --git a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/SVT/SVTVolumeFactory.java b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/SVT/SVTVolumeFactory.java index 9050e66f4d..f0475af449 100644 --- a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/SVT/SVTVolumeFactory.java +++ b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/SVT/SVTVolumeFactory.java @@ -119,8 +119,8 @@ public SVTVolumeFactory( DatabaseConstantProvider cp, boolean applyAlignmentShif setRange( 1, SVTConstants.NREGIONS, new int[]{ 1, 1, 1, 1 }, SVTConstants.NSECTORS, 1, SVTConstants.NMODULES ); // all regions, sectors, and modules double rmin = SVTConstants.LAYERRADIUS[0][0]*0.9; - double rmax = SVTConstants.LAYERRADIUS[regionMax-1][1]*1.1; - double zlen = SVTConstants.SECTORLEN*1.5; + double rmax = SVTConstants.LAYERRADIUS[regionMax-1][1]*1.13; + double zlen = SVTConstants.SECTORLEN*1.404; motherVol = new G4Tubs("svt", rmin*0.1, rmax*0.1, zlen/2.0*0.1, 0, 360 ); From 0326d63c1aed958fafbe8a3da12a78e9087f8f19 Mon Sep 17 00:00:00 2001 From: Veronique Ziegler Date: Fri, 18 Aug 2017 18:09:11 -0400 Subject: [PATCH 07/29] 1) Fix for t>tmax 2) read B field at wire position along track trajectory (B-field-dependent term in T2D function) and iterate to recompute doca using the value of B along the track segment 3) Modified vertex reconstruction algorithm to swim the track to a plane perpendicular the to sector midplane axis 4) remove obsolete hit smearing class --- .../java/org/jlab/rec/dc/GeometryLoader.java | 13 +-- .../java/org/jlab/rec/dc/banks/HitReader.java | 3 +- .../java/org/jlab/rec/dc/cross/Cross.java | 20 +++++ .../jlab/rec/dc/cross/CrossListFinder.java | 68 ++++++++++++-- .../org/jlab/rec/dc/cross/CrossMaker.java | 3 +- .../java/org/jlab/rec/dc/hit/FittedHit.java | 32 ++++--- .../java/org/jlab/rec/dc/hit/SmearDCHit.java | 88 ------------------- .../rec/dc/track/TrackCandListFinder.java | 43 ++++++--- .../org/jlab/rec/dc/track/fit/KFitter.java | 2 +- .../org/jlab/rec/dc/trajectory/DCSwimmer.java | 23 +++-- .../java/org/jlab/service/dc/DCHBEngine.java | 10 +-- .../org/jlab/service/dc/DCHBEngineCalib.java | 2 +- .../jlab/service/dc/DCHBEngineT2DEffs.java | 2 +- .../java/org/jlab/service/dc/DCTBEngine.java | 2 +- .../jlab/service/dc/DCTBEngineT2DEffs.java | 2 +- .../org/jlab/service/dc/DCTBRasterEngine.java | 2 +- 16 files changed, 169 insertions(+), 146 deletions(-) delete mode 100644 reconstruction/dc/src/main/java/org/jlab/rec/dc/hit/SmearDCHit.java diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/GeometryLoader.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/GeometryLoader.java index 3cf7e02ece..c6a94be4c2 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/GeometryLoader.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/GeometryLoader.java @@ -41,15 +41,16 @@ public static synchronized void Load(int runNb, String var) { } public static void main(String arg[]) throws FileNotFoundException { - + Constants.setUseMiniStagger(false); GeometryLoader.Load(10, "default"); - - Vector3d wmid0 = GeometryLoader.dcDetector.getWireMidpoint(0, 0, 0); + + Vector3d wmid0 = GeometryLoader.dcDetector.getWireMidpoint(4, 1, 1); Point3D ep1 = new Point3D(wmid0.x, wmid0.y, wmid0.z); - Vector3d wmid1 = GeometryLoader.dcDetector.getWireMidpoint(0, 1, 0); + Vector3d wmid1 = GeometryLoader.dcDetector.getWireMidpoint(4, 1, 2); Point3D ep2 = new Point3D(wmid1.x, wmid1.y, wmid1.z); - - System.out.println(ep1.toString() + ", " + ep2.toString()); + Vector3d wmid2 = GeometryLoader.dcDetector.getWireMidpoint(4, 1, 3); + Point3D ep3 = new Point3D(wmid2.x, wmid2.y, wmid2.z); + System.out.println(ep1.toString() + "\n " + ep2.toString()+ "\n" + ep3.toString()); //pw.close(); /* System.out.println("dx; = "+(GeometryLoader.dcDetector.getSector(0).getSuperlayer(0).getLayer(0).getComponent(0).getMidpoint().x()- GeometryLoader.dcDetector.getSector(0).getSuperlayer(0).getLayer(0).getComponent(1).getMidpoint().x())*Math.cos(Math.toRadians(6.))); diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/HitReader.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/HitReader.java index c357e1da57..695d95f8a9 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/HitReader.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/HitReader.java @@ -196,7 +196,8 @@ public void read_HBHits(DataEvent event) { } FittedHit hit = new FittedHit(sector[i], slayer[i], layer[i], wire[i], time[i] - this.get_T0(sector[i], slayer[i], layer[i], wire[i], Constants.getT0())[0], 0, B[i], id[i]); - // System.out.println("getting the hit time: tdc "+time[i]+" "+Constants.getT0()+" b "+B[i]+" t0 "+this.get_T0(sector[i], slayer[i], layer[i], wire[i], Constants.getT0())[0]); + hit.set_B(B[i]); +// System.out.println("getting the hit time: tdc "+time[i]+" "+Constants.getT0()+" b "+B[i]+" t0 "+this.get_T0(sector[i], slayer[i], layer[i], wire[i], Constants.getT0())[0]); hit.set_LeftRightAmb(LR[i]); hit.set_TrkgStatus(0); hit.set_TimeToDistance(1.0, B[i]); diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/cross/Cross.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/cross/Cross.java index 5e4db08846..442344b669 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/cross/Cross.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/cross/Cross.java @@ -6,6 +6,7 @@ import org.jlab.geom.prim.Point3D; import org.jlab.rec.dc.GeometryLoader; import org.jlab.rec.dc.segment.Segment; +import org.jlab.rec.dc.trajectory.DCSwimmer; /** * The crosses are objects used to find tracks and are characterized by a 3-D @@ -378,4 +379,23 @@ public double[] ReCalcPseudoCross(Cross c2, Cross c3) { } */ + void set_CrossDirIntersSegWires() { + //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + double Zref = this.get_Point().z(); + for(int i =0; i trkCnds = new ArrayList(); - public CrossList candCrossLists(List dccrosslist) { + public CrossList candCrossLists(List dccrosslist, boolean TimeBased) { //List> trkCnds = new ArrayList>(); trkCnds.clear(); if(dccrosslist.size()>0) { @@ -93,7 +100,7 @@ public CrossList candCrossLists(List dccrosslist) { if(cosTh1 dccrosslist) { boolean linefitstatusOK = linefit.fitStatus(X, Y, errX, errY, Z.length); if(!linefitstatusOK) continue; // fit failed - - + if(TimeBased) { + this.updateBFittedHits(c1); + this.updateBFittedHits(c2); + this.updateBFittedHits(c3); + } BaseCand bCand = new BaseCand(); bCand.CrossesOnTrack.clear(); bCand.CrossesOnTrack.add(c1); @@ -174,6 +184,32 @@ private void RecalculateCrossDirErr(Cross c1, double slope, double slopeErr) { } + private void recalcParsSegment(Segment _Segment1) { + //refit + double cosTrkAngle = 1. / Math.sqrt(1. + _Segment1.get_fittedCluster().get_clusterLineFitSlope() * _Segment1.get_fittedCluster().get_clusterLineFitSlope()); + // update the hits + for (FittedHit fhit : _Segment1.get_fittedCluster()) { + fhit.updateHitPositionWithTime(cosTrkAngle, fhit.get_B()); + } + + cf.SetFitArray(_Segment1.get_fittedCluster(), "TSC"); + cf.Fit(_Segment1.get_fittedCluster(), true); + cosTrkAngle = 1. / Math.sqrt(1. + _Segment1.get_fittedCluster().get_clusterLineFitSlope() * _Segment1.get_fittedCluster().get_clusterLineFitSlope()); + + for (FittedHit fhit : _Segment1.get_fittedCluster()) { + fhit.updateHitPositionWithTime(cosTrkAngle, fhit.get_B()); + } + cf.SetFitArray(_Segment1.get_fittedCluster(), "TSC"); + cf.Fit(_Segment1.get_fittedCluster(), true); + cf.SetResidualDerivedParams(_Segment1.get_fittedCluster(), true, false); //calcTimeResidual=false, resetLRAmbig=false + + cf.SetFitArray(_Segment1.get_fittedCluster(), "TSC"); + cf.Fit(_Segment1.get_fittedCluster(), false); + + cf.SetSegmentLineParameters(_Segment1.get_fittedCluster().get(0).get_Z(), _Segment1.get_fittedCluster()); + + } + private class BaseCand { public double Chisq; public List CrossesOnTrack = new ArrayList(); @@ -288,6 +324,28 @@ public List> get_CrossesInSectors(List crosses) { return CrossesBySectors; } + private DCSwimmer swimmer = new DCSwimmer(); + ClusterFitter cf = new ClusterFitter(); + SegmentFinder segFinder = new SegmentFinder(); + private void updateBFittedHits(Cross c) { + for(int i =0; i find_Crosses(List allSegments) { cross.set_Segment1(seg1); cross.set_Segment2(seg2); cross.set_CrossParams(); - + Point3D CS = cross.getCoordsInSector(cross.get_Point().x(), cross.get_Point().y(), cross.get_Point().z()); if (CS.x() > 0) { @@ -64,6 +64,7 @@ public List find_Crosses(List allSegments) { if (cross.isPseudoCross) { cross.set_Id(-1); } + cross.set_CrossDirIntersSegWires(); crosses.add(cross); //insures the cross is correctly reconstructed in the sector } } diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/hit/FittedHit.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/hit/FittedHit.java index 94562ad6f3..cd7c46a3aa 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/hit/FittedHit.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/hit/FittedHit.java @@ -5,7 +5,7 @@ import org.jlab.rec.dc.GeometryLoader; import org.jlab.rec.dc.timetodistance.TimeToDistanceEstimator; import org.jlab.rec.dc.trajectory.DCSwimmer; - +import org.jlab.geom.prim.Point3D; /** * A hit that was used in a fitted cluster. It extends the Hit class and * contains local and sector coordinate information at the MidPlane. An estimate @@ -270,10 +270,16 @@ public void set_TimeToDistance(double cosTrkAngle, double B) { deltatime_beta = (Math.sqrt(x * x + (CCDBConstants.getDISTBETA()[this.get_Sector() - 1][this.get_Superlayer() - 1] * beta * beta) * (CCDBConstants.getDISTBETA()[this.get_Sector() - 1][this.get_Superlayer() - 1] * beta * beta)) - x) / CCDBConstants.getV0()[this.get_Sector() - 1][this.get_Superlayer() - 1]; } // System.out.println("setting the time : fit doca = "+x+" dtime(b) = "+deltatime_beta+" intime "+this.get_Time()+" time "+(this.get_Time() + deltatime_beta)); - this.set_Time(this.get_Time() - deltatime_beta); - if(this.get_Time()<=0) - this.set_Time(0.01); - d = tde.interpolateOnGrid(B, Math.toDegrees(ralpha), this.get_Time(), secIdx, slIdx) / this.get_Time(); + // this.set_Time(this.get_Time() - deltatime_beta); + // if(this.get_Time()<=0) + // this.set_Time(0.01); + // d = tde.interpolateOnGrid(B, Math.toDegrees(ralpha), this.get_Time(), secIdx, slIdx) / this.get_Time(); + double correctedTime = (this.get_Time() - deltatime_beta); + if(correctedTime<=0) + correctedTime=0.01; + if(correctedTime>CCDBConstants.getTMAXSUPERLAYER()[secIdx][slIdx]) + correctedTime=CCDBConstants.getTMAXSUPERLAYER()[secIdx][slIdx]; + d = tde.interpolateOnGrid(B, Math.toDegrees(ralpha), correctedTime, secIdx, slIdx) / this.get_Time(); } @@ -357,14 +363,13 @@ public void set_Z(double _Z) { this._Z = _Z; } + /** * A method to update the hit position information after the fit to the * local coord.sys. wire positions */ public void updateHitPosition() { - DCSwimmer swimmer = new DCSwimmer(); - //double z = GeometryLoader.dcDetector.getSector(0).getSuperlayer(this.get_Superlayer()-1).getLayer(this.get_Layer()-1).getComponent(this.get_Wire()-1).getMidpoint().z(); double z = GeometryLoader.getDcDetector().getWireMidpoint(this.get_Superlayer() - 1, this.get_Layer() - 1, this.get_Wire() - 1).z; @@ -389,10 +394,7 @@ public void updateHitPosition() { this.set_X(x); this.set_Z(z); - float[] result = new float[3]; - swimmer.Bfield(x, 0, z, result); - this.set_B(Math.sqrt(result[0]*result[0]+result[1]*result[1]+result[2]*result[2]) ); } @@ -527,4 +529,14 @@ public int get_AssociatedTBTrackID() { return _AssociatedTBTrackID; } + // intersection of cross direction line with the hit wire (TCS) + private Point3D CrossDirIntersWire; + + public Point3D getCrossDirIntersWire() { + return CrossDirIntersWire; + } + + public void setCrossDirIntersWire(Point3D CrossDirIntersWire) { + this.CrossDirIntersWire = CrossDirIntersWire; + } } diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/hit/SmearDCHit.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/hit/SmearDCHit.java deleted file mode 100644 index 0a6adbbda7..0000000000 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/hit/SmearDCHit.java +++ /dev/null @@ -1,88 +0,0 @@ -package org.jlab.rec.dc.hit; - -import java.util.Random; - -/** - * A class to smear a Monte Carlo DC hit doca and time according to a function - * derived from CLAS 6 data - * - * @author ziegler - * - */ -public class SmearDCHit { - - private Random rn; - - public SmearDCHit() { - rn = new Random(); - } - - public double smearedDocaSigma(double d, int superlayer) { - - int region = (int) ((superlayer + 1) / 2); - - double[] reg1Pars = {671.232, - -8432.06, - 68630.7, - -290897, - 657285, - -753106, - 349788}; - double[] reg2Pars = {716.247, - -5681.78, - 26387.2, - -63076.8, - 80902.5, - -52713.9, - 13724.1}; - double[] reg3Pars = {620.714, - -1833.35, - 6018.07, - -13483.4, - 16142.7, - -9304.73, - 2052.39}; - - double dSmear = 0; - double[] polynPars = new double[7]; - if (region == 1) { - polynPars = reg1Pars; - } - if (region == 2) { - polynPars = reg2Pars; - } - if (region == 3) { - polynPars = reg3Pars; - } - dSmear = polynPars[0] + polynPars[1] * d + polynPars[2] * d * d + polynPars[3] * d * d * d + polynPars[4] * d * d * d * d + polynPars[5] * d * d * d * d * d + polynPars[6] * d * d * d * d * d * d; - - return dSmear / 10000.; - - } - - public double smearedDoca(double d, int superlayer) { - - double sigma = this.smearedDocaSigma(d, superlayer); - - double smearing = sigma * rn.nextGaussian(); - - if ((d + smearing) < 0) { - smearing *= -1; - } - - double smearedDoca = d + smearing; - - return smearedDoca; - - } - - public double smearedTime(double invTimeToDist, double d, int superlayer) { - - return smearedDoca(d, superlayer) / invTimeToDist; - } - - public double smearedTimeSigma(double invTimeToDist, double d, int superlayer) { - - return smearedDocaSigma(d, superlayer) / invTimeToDist; - } -} diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/TrackCandListFinder.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/TrackCandListFinder.java index 8bfc8f5f4a..f3b95b47e8 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/TrackCandListFinder.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/TrackCandListFinder.java @@ -303,14 +303,33 @@ public void setTrackPars(Track cand, Trajectory traj, TrajectoryFinder trjFind, Point3D R3TrkMomentum = C.getCoordsInLab(pz*stateVec.tanThetaX(),pz*stateVec.tanThetaY(),pz); - dcSwim.SetSwimParameters(R3TrkPoint.x(), R3TrkPoint.y(), R3TrkPoint.z(), -R3TrkMomentum.x(), -R3TrkMomentum.y(), -R3TrkMomentum.z(), -cand.get_Q()); - double[] VecAtTarlab0 = dcSwim.SwimToPlaneLab(0.0); - Vertex vtx = new Vertex(); - double[] Bvtx = new double[]{0.0,0.0}; - double[] Vt = vtx.VertexParams(VecAtTarlab0[0], VecAtTarlab0[1], VecAtTarlab0[2], -VecAtTarlab0[3], -VecAtTarlab0[4], -VecAtTarlab0[5], (double) cand.get_Q(), dcSwim.BfieldLab(VecAtTarlab0[0], VecAtTarlab0[1], VecAtTarlab0[2]).toVector3D().mag(), Bvtx[0], Bvtx[1]); + //dcSwim.SetSwimParameters(R3TrkPoint.x(), R3TrkPoint.y(), R3TrkPoint.z(), -R3TrkMomentum.x(), -R3TrkMomentum.y(), -R3TrkMomentum.z(), -cand.get_Q()); + //double[] VecAtTarlab0 = dcSwim.SwimToPlaneLab(0.0); + //Vertex vtx = new Vertex(); + //double[] Bvtx = new double[]{0.0,0.0}; + //double[] Vt = vtx.VertexParams(VecAtTarlab0[0], VecAtTarlab0[1], VecAtTarlab0[2], -VecAtTarlab0[3], -VecAtTarlab0[4], -VecAtTarlab0[5], (double) cand.get_Q(), dcSwim.BfieldLab(VecAtTarlab0[0], VecAtTarlab0[1], VecAtTarlab0[2]).toVector3D().mag(), Bvtx[0], Bvtx[1]); //Vt = new double[]{VecAtTarlab0[0], VecAtTarlab0[1], VecAtTarlab0[2], -VecAtTarlab0[3], -VecAtTarlab0[4], -VecAtTarlab0[5],0}; - int sectorNearTarget = this.getSector(Vt[0], Vt[1]); + //int sectorNearTarget = this.getSector(Vt[0], Vt[1]); + // System.out.println("Swim to fixed z "+VecAtTarlab0[0]+", "+VecAtTarlab0[1]+", "+VecAtTarlab0[2]+"; "+VecAtTarlab0[3]+", "+VecAtTarlab0[4]+", "+VecAtTarlab0[5]); + dcSwim.SetSwimParameters(R3TrkPoint.x(), R3TrkPoint.y(), R3TrkPoint.z(), -R3TrkMomentum.x(), -R3TrkMomentum.y(), -R3TrkMomentum.z(), -cand.get_Q()); + + // recalc new vertex using plane stopper + int sector = cand.get(2).get_Sector(); + double theta_n = ((double)(sector-1))*Math.toRadians(60.); + double x_n = Math.cos(theta_n) ; + double y_n = Math.sin(theta_n) ; +//System.out.println("sector "+sector+" xn "+x_n+" yn "+y_n); + double[] Vt = dcSwim.SwimToPlaneBoundary(0, new Vector3D(x_n, y_n, 0)); + // System.out.println("Swim to fixed plane "+newVtx[0]+", "+newVtx[1]+", "+newVtx[2]+"; "+newVtx[3]+", "+newVtx[4]+", "+newVtx[5]); + + /* Vt[0]=newVtx[0]; + Vt[1]=newVtx[1]; + Vt[2]=newVtx[2]; + Vt[3]=newVtx[3]; + Vt[4]=newVtx[4]; + Vt[5]=newVtx[5]; */ + int status = 99999; /* if(sectorNearTarget==cand.get(0).get_Sector()) { status = 1; @@ -335,12 +354,13 @@ public void setTrackPars(Track cand, Trajectory traj, TrajectoryFinder trjFind, double xOrFix = Vt[0]; double yOrFix = Vt[1]; double zOrFix = Vt[2]; - double pxOrFix = Vt[3]; - double pyOrFix = Vt[4]; - double pzOrFix = Vt[5]; + double pxOrFix = -Vt[3]; + double pyOrFix = -Vt[4]; + double pzOrFix = -Vt[5]; double arclen = Vt[6]; - double totPathLen = VecAtTarlab0[6] + VecAtTarOut[6] + arclen; + //double totPathLen = VecAtTarlab0[6] + VecAtTarOut[6] + arclen; + double totPathLen = arclen; cand.set_TotPathLen(totPathLen); cand.set_Vtx0(new Point3D(xOrFix,yOrFix, zOrFix)); @@ -366,8 +386,7 @@ public void setTrackPars(Track cand, Trajectory traj, TrajectoryFinder trjFind, public void removeOverlappingTracks(List trkcands) { - - + List selectedTracks =new ArrayList(); List list = new ArrayList(); for(int i =0; i _d); + double dtrk = y[0]*_n.x()+y[1]*_n.y()+y[2]*_n.z(); + + double accuracy = 20e-6; //20 microns + //System.out.println(" dist "+dtrk*100+ " state "+y[0]*100+", "+y[1]*100+" , "+y[2]*100); + + return dtrk<_d; } @@ -447,17 +449,14 @@ public void setFinalT(double finalPathLength) { } } - public double[] SwimToPlane(double d, Vector3D n) { + public double[] SwimToPlaneBoundary(double d_cm, Vector3D n) { double[] value = new double[8]; // using adaptive stepsize + double d= d_cm/100; + PlaneBoundarySwimStopper stopper = new PlaneBoundarySwimStopper(d,n); - PlaneBoundarySwimStopper stopper = new PlaneBoundarySwimStopper(d, n); - - // step size in m - double stepSize = 1e-4; // m - - SwimTrajectory st = swimmer.swim(_charge, _x0, _y0, _z0, _pTot, _theta, _phi, stopper, _maxPathLength, stepSize, 0.0005); + SwimTrajectory st = labswimmer.swim(_charge, _x0, _y0, _z0, _pTot, _theta, _phi, stopper, _maxPathLength, Constants.SWIMSTEPSIZE, 0.0005); st.computeBDL(prob); //st.computeBDL(compositeField); diff --git a/reconstruction/dc/src/main/java/org/jlab/service/dc/DCHBEngine.java b/reconstruction/dc/src/main/java/org/jlab/service/dc/DCHBEngine.java index 4f32a13126..491cdbfce5 100644 --- a/reconstruction/dc/src/main/java/org/jlab/service/dc/DCHBEngine.java +++ b/reconstruction/dc/src/main/java/org/jlab/service/dc/DCHBEngine.java @@ -148,7 +148,7 @@ public boolean processDataEvent(DataEvent event) { } } - CrossList crosslist = crossLister.candCrossLists(crosses); + CrossList crosslist = crossLister.candCrossLists(crosses, false); if(crosslist.size()==0) { @@ -288,7 +288,7 @@ public static void main(String[] args) throws FileNotFoundException, EvioExcepti //Writer //String outputFile="/Users/ziegler/Workdir/Distribution/DCTest_797D.hipo"; // String outputFile="/Users/ziegler/Workdir/Files/test/electron_fd_rcF3.hipo"; - String outputFile = "/Users/ziegler/Workdir//Files/GEMC/TestDCOnlyE2.rec3.hipo"; + String outputFile = "/Users/ziegler/Workdir//Files/GEMC/TestDCOnlyE2.rec3.test.hipo"; writer.open(outputFile); long t1 = 0; @@ -306,9 +306,9 @@ public static void main(String[] args) throws FileNotFoundException, EvioExcepti // Processing TB en2.processDataEvent(event); System.out.println(" EVENT "+counter); - // if (counter > 13) { - // break; - //} + if (counter > 160000) { + break; + } //event.show(); //if(counter%100==0) System.out.println("*************************************************************run " + counter + " events"); diff --git a/reconstruction/dc/src/main/java/org/jlab/service/dc/DCHBEngineCalib.java b/reconstruction/dc/src/main/java/org/jlab/service/dc/DCHBEngineCalib.java index b621dfcb61..de7f237c4f 100644 --- a/reconstruction/dc/src/main/java/org/jlab/service/dc/DCHBEngineCalib.java +++ b/reconstruction/dc/src/main/java/org/jlab/service/dc/DCHBEngineCalib.java @@ -146,7 +146,7 @@ public boolean processDataEvent(DataEvent event) { } } - CrossList crosslist = crossLister.candCrossLists(crosses); + CrossList crosslist = crossLister.candCrossLists(crosses, false); if(crosslist.size()==0) { diff --git a/reconstruction/dc/src/main/java/org/jlab/service/dc/DCHBEngineT2DEffs.java b/reconstruction/dc/src/main/java/org/jlab/service/dc/DCHBEngineT2DEffs.java index a690526b37..79e03d2c28 100644 --- a/reconstruction/dc/src/main/java/org/jlab/service/dc/DCHBEngineT2DEffs.java +++ b/reconstruction/dc/src/main/java/org/jlab/service/dc/DCHBEngineT2DEffs.java @@ -140,7 +140,7 @@ public boolean processDataEvent(DataEvent event) { } } - CrossList crosslist = crossLister.candCrossLists(crosses); + CrossList crosslist = crossLister.candCrossLists(crosses, false); if(crosslist.size()==0) { diff --git a/reconstruction/dc/src/main/java/org/jlab/service/dc/DCTBEngine.java b/reconstruction/dc/src/main/java/org/jlab/service/dc/DCTBEngine.java index d1ee8a931e..07289e8978 100644 --- a/reconstruction/dc/src/main/java/org/jlab/service/dc/DCTBEngine.java +++ b/reconstruction/dc/src/main/java/org/jlab/service/dc/DCTBEngine.java @@ -120,7 +120,7 @@ public boolean processDataEvent(DataEvent event) { //5) make list of crosses consistent with a track candidate CrossListFinder crossLister = new CrossListFinder(); - CrossList crosslist = crossLister.candCrossLists(crosses); + CrossList crosslist = crossLister.candCrossLists(crosses, true); if(crosslist.size()==0) { //System.out.println(" Failed on cross list !"); diff --git a/reconstruction/dc/src/main/java/org/jlab/service/dc/DCTBEngineT2DEffs.java b/reconstruction/dc/src/main/java/org/jlab/service/dc/DCTBEngineT2DEffs.java index 91700e064a..d334e676b7 100644 --- a/reconstruction/dc/src/main/java/org/jlab/service/dc/DCTBEngineT2DEffs.java +++ b/reconstruction/dc/src/main/java/org/jlab/service/dc/DCTBEngineT2DEffs.java @@ -107,7 +107,7 @@ public boolean processDataEvent(DataEvent event) { //5) make list of crosses consistent with a track candidate CrossListFinder crossLister = new CrossListFinder(); - CrossList crosslist = crossLister.candCrossLists(crosses); + CrossList crosslist = crossLister.candCrossLists(crosses, true); if (crosslist.size() == 0) { diff --git a/reconstruction/dc/src/main/java/org/jlab/service/dc/DCTBRasterEngine.java b/reconstruction/dc/src/main/java/org/jlab/service/dc/DCTBRasterEngine.java index b6cb07d1d7..4e0287a1cf 100644 --- a/reconstruction/dc/src/main/java/org/jlab/service/dc/DCTBRasterEngine.java +++ b/reconstruction/dc/src/main/java/org/jlab/service/dc/DCTBRasterEngine.java @@ -108,7 +108,7 @@ public boolean processDataEvent(DataEvent event) { //5) make list of crosses consistent with a track candidate CrossListFinder crossLister = new CrossListFinder(); - CrossList crosslist = crossLister.candCrossLists(crosses); + CrossList crosslist = crossLister.candCrossLists(crosses, true); if (crosslist.size() == 0) { From 27aa556420a549f0ceefaa739ea07fa92e82ff92 Mon Sep 17 00:00:00 2001 From: Veronique Ziegler Date: Tue, 22 Aug 2017 18:18:24 -0400 Subject: [PATCH 08/29] 1) Read material budget from ccdb for MM 2) Correction to multiple scattering matrix to use correct sigma_MS^2 3) bug fix in conversion to helix parameters at last pass of KF 4) change swimmer step size --- reconstruction/cvt/pom.xml | 12 +++ .../jlab/rec/cvt/bmt/CCDBConstantsLoader.java | 74 +++++++++++++++-- .../java/org/jlab/rec/cvt/bmt/Constants.java | 25 +++++- .../rec/cvt/services/CVTReconstruction.java | 9 ++- .../org/jlab/rec/cvt/track/fit/KFitter.java | 5 ++ .../org/jlab/rec/cvt/track/fit/StateVecs.java | 81 +++++++++++++------ .../jlab/rec/cvt/trajectory/TrkSwimmer.java | 14 ++-- 7 files changed, 177 insertions(+), 43 deletions(-) diff --git a/reconstruction/cvt/pom.xml b/reconstruction/cvt/pom.xml index ba4a876397..40add22379 100644 --- a/reconstruction/cvt/pom.xml +++ b/reconstruction/cvt/pom.xml @@ -34,6 +34,18 @@ 3.0-SNAPSHOT jar + + org.jlab.clas12.detector + dc + 1.0-SNAPSHOT + jar + + + org.jlab.clas12.detector + tof + 1.0-SNAPSHOT + jar + diff --git a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/bmt/CCDBConstantsLoader.java b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/bmt/CCDBConstantsLoader.java index 98a4677e25..79af5d43d8 100644 --- a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/bmt/CCDBConstantsLoader.java +++ b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/bmt/CCDBConstantsLoader.java @@ -46,10 +46,13 @@ public static final synchronized void Load(int runNb) { double[] CRCOFFSET = new double[NREGIONS]; // Beginning of strips in mm int[][] CRCGROUP = new int[NREGIONS][100]; // Number of strips with same width double[][] CRCWIDTH = new double[NREGIONS][100]; // the width of the corresponding group of strips - double[][] CRCEDGE1 = new double[NREGIONS][3]; // the angle of the first edge of each PCB detector A, B, C - double[][] CRCEDGE2 = new double[NREGIONS][3]; // the angle of the second edge of each PCB detector A, B, C + double[][] CRCEDGE1 = new double[NREGIONS][3]; // the angle of the first edge of each PCB detector A, B, C + double[][] CRCEDGE2 = new double[NREGIONS][3]; // the angle of the second edge of each PCB detector A, B, C double[] CRCXPOS = new double[NREGIONS]; // Distance on the PCB between the PCB first edge and the edge of the first strip in mm + double[] EFF_Z_OVER_A = new double[NREGIONS*2]; + double[] T_OVER_X0 = new double[NREGIONS*2]; + // Load the tables dbprovider = new DatabaseConstantProvider(runNb, "default"); // reset // using @@ -64,9 +67,18 @@ public static final synchronized void Load(int runNb) { dbprovider.loadTable("/geometry/cvt/mvt/bmt_strip_L4"); dbprovider.loadTable("/geometry/cvt/mvt/bmt_strip_L5"); dbprovider.loadTable("/geometry/cvt/mvt/bmt_strip_L6"); + + //load material budget: + dbprovider.loadTable("/test/mvt/bmt_mat_l1"); + dbprovider.loadTable("/test/mvt/bmt_mat_l2"); + dbprovider.loadTable("/test/mvt/bmt_mat_l3"); + dbprovider.loadTable("/test/mvt/bmt_mat_l4"); + dbprovider.loadTable("/test/mvt/bmt_mat_l5"); + dbprovider.loadTable("/test/mvt/bmt_mat_l6"); + dbprovider.disconnect(); - // dbprovider.show(); + // dbprovider.show(); // Getting the Constants // 1) pitch info for (int i = 0; i < dbprovider.length("/geometry/cvt/mvt/bmt_strip_L1/Group_size"); i++) { @@ -149,7 +161,57 @@ public static final synchronized void Load(int runNb) { } } - + + //material budget + //=============== + for (int i = 0; i < dbprovider.length("/test/mvt/bmt_mat_l1/thickness"); i++) { + double thickness = dbprovider.getDouble("/test/mvt/bmt_mat_l1/thickness", i)/10000.; + double Zeff = dbprovider.getDouble("/test/mvt/bmt_mat_l1/average_z", i); + double Aeff = dbprovider.getDouble("/test/mvt/bmt_mat_l1/average_a", i); + double X0 = dbprovider.getDouble("/test/mvt/bmt_mat_l1/x0", i); + EFF_Z_OVER_A[0] += thickness*Zeff/Aeff; + T_OVER_X0[0]+=thickness/X0; + } + for (int i = 0; i < dbprovider.length("/test/mvt/bmt_mat_l2/thickness"); i++) { + double thickness = dbprovider.getDouble("/test/mvt/bmt_mat_l2/thickness", i)/10000.; + double Zeff = dbprovider.getDouble("/test/mvt/bmt_mat_l2/average_z", i); + double Aeff = dbprovider.getDouble("/test/mvt/bmt_mat_l2/average_a", i); + double X0 = dbprovider.getDouble("/test/mvt/bmt_mat_l2/x0", i); + EFF_Z_OVER_A[1] += thickness*Zeff/Aeff; + T_OVER_X0[1]+=thickness/X0; + } + for (int i = 0; i < dbprovider.length("/test/mvt/bmt_mat_l3/thickness"); i++) { + double thickness = dbprovider.getDouble("/test/mvt/bmt_mat_l3/thickness", i)/10000.; + double Zeff = dbprovider.getDouble("/test/mvt/bmt_mat_l3/average_z", i); + double Aeff = dbprovider.getDouble("/test/mvt/bmt_mat_l3/average_a", i); + double X0 = dbprovider.getDouble("/test/mvt/bmt_mat_l3/x0", i); + EFF_Z_OVER_A[2] += thickness*Zeff/Aeff; + T_OVER_X0[2]+=thickness/X0; + } + for (int i = 0; i < dbprovider.length("/test/mvt/bmt_mat_l4/thickness"); i++) { + double thickness = dbprovider.getDouble("/test/mvt/bmt_mat_l4/thickness", i)/10000.; + double Zeff = dbprovider.getDouble("/test/mvt/bmt_mat_l4/average_z", i); + double Aeff = dbprovider.getDouble("/test/mvt/bmt_mat_l4/average_a", i); + double X0 = dbprovider.getDouble("/test/mvt/bmt_mat_l4/x0", i); + EFF_Z_OVER_A[3] += thickness*Zeff/Aeff; + T_OVER_X0[3]+=thickness/X0; + } + for (int i = 0; i < dbprovider.length("/test/mvt/bmt_mat_l5/thickness"); i++) { + double thickness = dbprovider.getDouble("/test/mvt/bmt_mat_l5/thickness", i)/10000.; + double Zeff = dbprovider.getDouble("/test/mvt/bmt_mat_l5/average_z", i); + double Aeff = dbprovider.getDouble("/test/mvt/bmt_mat_l5/average_a", i); + double X0 = dbprovider.getDouble("/test/mvt/bmt_mat_l5/x0", i); + EFF_Z_OVER_A[4] += thickness*Zeff/Aeff; + T_OVER_X0[4]+=thickness/X0; + } + for (int i = 0; i < dbprovider.length("/test/mvt/bmt_mat_l6/thickness"); i++) { + double thickness = dbprovider.getDouble("/test/mvt/bmt_mat_l6/thickness", i)/10000.; + double Zeff = dbprovider.getDouble("/test/mvt/bmt_mat_l6/average_z", i); + double Aeff = dbprovider.getDouble("/test/mvt/bmt_mat_l6/average_a", i); + double X0 = dbprovider.getDouble("/test/mvt/bmt_mat_l6/x0", i); + EFF_Z_OVER_A[5] += thickness*Zeff/Aeff; + T_OVER_X0[5]+=thickness/X0; + } Constants.setCRCRADIUS(CRCRADIUS); Constants.setCRZRADIUS(CRZRADIUS); Constants.setCRZNSTRIPS(CRZNSTRIPS); @@ -170,7 +232,9 @@ public static final synchronized void Load(int runNb) { Constants.setCRCGROUP(CRCGROUP); Constants.setCRCWIDTH(CRCWIDTH); Constants.setCRZWIDTH(CRZWIDTH); - + Constants.setEFF_Z_OVER_A(EFF_Z_OVER_A); + Constants.set_T_OVER_X0(T_OVER_X0); + CSTLOADED = true; System.out .println("SUCCESSFULLY LOADED BMT CONSTANTS...."); diff --git a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/bmt/Constants.java b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/bmt/Constants.java index 2af4890d28..606a70c596 100644 --- a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/bmt/Constants.java +++ b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/bmt/Constants.java @@ -14,7 +14,7 @@ private Constants() { The angles are defined with theZ-axis oriented from the accelerator to the beam dump. */ // THE GEOMETRY CONSTANTS - public static final int NREGIONS = 3; // 3 regions of MM + public static final int NREGIONS = 3; // 3 regions of MM //public static final int STARTINGLAYR = 5; // current configuration is 3 SVT + 3BMT (outermost BST ring) //Z detector characteristics @@ -38,18 +38,21 @@ private Constants() { private static double[] CRCZMIN = new double[NREGIONS]; // PCB upstream extremity mm private static double[] CRCZMAX = new double[NREGIONS]; // PCB downstream extremity mm private static double[] CRCOFFSET = new double[NREGIONS]; // Beginning of strips in mm - private static int[][] CRCGROUP = new int[NREGIONS][]; // Number of strips with same width + private static int[][] CRCGROUP = new int[NREGIONS][]; // Number of strips with same width private static double[][] CRCWIDTH = new double[NREGIONS][]; // the width of the corresponding group of strips private static double[][] CRCEDGE1 = new double[NREGIONS][3]; // the angle of the first edge of each PCB detector A, B, C private static double[][] CRCEDGE2 = new double[NREGIONS][3]; // the angle of the second edge of each PCB detector A, B, C private static double[] CRCXPOS = new double[NREGIONS]; // Distance on the PCB between the PCB first edge and the edge of the first strip in mm + private static double[] EFF_Z_OVER_A = new double[NREGIONS*2]; // for ELOSS + private static double[] T_OVER_X0 = new double[NREGIONS*2]; // for M.Scat. + // THE RECONSTRUCTION CONSTANTS public static final double SigmaDrift = 0.4; // Max transverse diffusion value (GEMC value) public static final double hDrift = 3.0; // Size of the drift gap - public static final double hStrip2Det = hDrift / 2; // distance between strips and the middle of the conversion gap (~half the drift gap) + public static final double hStrip2Det = hDrift / 2; // distance between strips and the middle of the conversion gap (~half the drift gap) - private static double ThetaL = 0; // the Lorentz angle for 5-T B-field + private static double ThetaL = 0; // the Lorentz angle for 5-T B-field //private static double w_i =25.0; public static boolean areConstantsLoaded = false; @@ -269,4 +272,18 @@ public static synchronized void setCRCXPOS(double[] cRCXPOS) { CRCXPOS = cRCXPOS; } + public static synchronized double[] getEFF_Z_OVER_A() { + return EFF_Z_OVER_A; + } + public static synchronized void setEFF_Z_OVER_A(double[] eFF_Z_OVER_A) { + EFF_Z_OVER_A = eFF_Z_OVER_A; + } + + public static synchronized double[] get_T_OVER_X0() { + return T_OVER_X0; + } + public static synchronized void set_T_OVER_X0(double[] t_OVER_X0) { + T_OVER_X0 = t_OVER_X0; + } + } diff --git a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/services/CVTReconstruction.java b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/services/CVTReconstruction.java index 4fb5d4e364..919b4695c8 100644 --- a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/services/CVTReconstruction.java +++ b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/services/CVTReconstruction.java @@ -285,7 +285,7 @@ public boolean init() { public static void main(String[] args) throws FileNotFoundException, EvioException { //String inputFile = "/Users/ziegler/Workdir/Files/GEMC/CVT/YurisTest.hipo"; - String inputFile = "/Users/ziegler/Workdir/Files/GEMC/CVT/cvt_1.1.hipo"; + String inputFile = "/Users/ziegler/Workdir/Files/cvt/gen_cvt1.hipo"; System.err.println(" \n[PROCESSING FILE] : " + inputFile); @@ -299,7 +299,7 @@ public static void main(String[] args) throws FileNotFoundException, EvioExcepti HipoDataSync writer = new HipoDataSync(); //Writer - String outputFile = "/Users/ziegler/Workdir/Files/GEMC/CVT/cvt_1_rec0.hipo"; + String outputFile = "/Users/ziegler/Workdir/Files/cvt/myreco2_cvt1.hipo"; writer.open(outputFile); long t1 = 0; @@ -313,8 +313,9 @@ public static void main(String[] args) throws FileNotFoundException, EvioExcepti // Processing en.processDataEvent(event); - writer.writeEvent(event); - + if(event.hasBank("CVTRec::Tracks")) { + writer.writeEvent(event); + } System.out.println(" EVENT " + counter); /* * event.show(); diff --git a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/fit/KFitter.java b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/fit/KFitter.java index 1f1c4c9387..f8ebd6666d 100644 --- a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/fit/KFitter.java +++ b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/fit/KFitter.java @@ -151,7 +151,12 @@ public void Rinit() { public Track OutputTrack(Seed trk, org.jlab.rec.cvt.svt.Geometry geo) { Helix helix = sv.setTrackPars(sv.X0.size() - 1); + Track cand = new Track(helix); + + if(cand.get_P()<0.3) + this.setFitFailed = true; + for (Cross c : trk.get_Crosses()) { if (c.get_Detector().equalsIgnoreCase("SVT")) { continue; diff --git a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/fit/StateVecs.java b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/fit/StateVecs.java index def9c613b9..a447905d55 100644 --- a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/fit/StateVecs.java +++ b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/fit/StateVecs.java @@ -7,12 +7,12 @@ import org.jlab.geom.prim.Point3D; import org.jlab.geom.prim.Vector3D; -import org.jlab.rec.cvt.svt.Constants; import org.jlab.rec.cvt.track.Seed; import org.jlab.rec.cvt.trajectory.Helix; import org.jlab.rec.cvt.trajectory.TrkSwimmer; import Jama.Matrix; +import org.jlab.rec.cvt.svt.Constants; public class StateVecs { @@ -220,9 +220,9 @@ public void transport(int i, int f, StateVec iVec, CovMat icovMat, org.jlab.rec. fVec.kappa = iVec.kappa; - double[] ElossTot = new double[3]; + double[] ElossTot = ELoss_hypo(iVec, f - i); for (int e = 0; e < 3; e++) { - ElossTot[e] = iVec.get_ELoss()[e] + ELoss_hypo(iVec, f - i)[e]; + ElossTot[e] = iVec.get_ELoss()[e] + ElossTot[e]; } fVec.set_ELoss(ElossTot); @@ -290,17 +290,49 @@ public void transport(int i, int f, StateVec iVec, CovMat icovMat, org.jlab.rec. } } + private double get_t_ov_X0(double radius) { + double value = Constants.SILICONTHICK / Constants.SILICONRADLEN; + if(radius>=org.jlab.rec.cvt.bmt.Constants.getCRCRADIUS()[0]) + value = org.jlab.rec.cvt.bmt.Constants.get_T_OVER_X0()[this.getBMTLayer(radius)-1]; + return value; + } + + private double detMat_Z_ov_A_timesThickn(double radius) { + double value = 0; + if(radius>=Constants.MODULERADIUS[0][0]&& radius=org.jlab.rec.cvt.bmt.Constants.getCRCRADIUS()[0] && this.getBMTLayer(radius)>0) + value = org.jlab.rec.cvt.bmt.Constants.getEFF_Z_OVER_A()[this.getBMTLayer(radius)-1]; + return value; + } + private int getBMTLayer(double radius) { + int layer = 0; + if(radius>=org.jlab.rec.cvt.bmt.Constants.getCRCRADIUS()[0] && radius=org.jlab.rec.cvt.bmt.Constants.getCRZRADIUS()[0] && radius=org.jlab.rec.cvt.bmt.Constants.getCRZRADIUS()[1] && radius=org.jlab.rec.cvt.bmt.Constants.getCRCRADIUS()[1] && radius=org.jlab.rec.cvt.bmt.Constants.getCRZRADIUS()[2] && radius=org.jlab.rec.cvt.bmt.Constants.getCRCRADIUS()[2]) + layer=6; + + return layer; + } private double[] ELoss_hypo(StateVec iVec, int dir) { double[] Eloss = new double[3]; //Eloss for pion, kaon, proton hypotheses - if (dir < 0) { + if (dir < 0 || Math.sqrt(iVec.x*iVec.x+iVec.y*iVec.y) 0) { + // if (iVec.k % 2 == 1 && dir > 0) { + if (dir >0 && Math.sqrt(iVec.x*iVec.x+iVec.y*iVec.y)>=Constants.MODULERADIUS[0][0]) { Vector3D trkDir = this.P(iVec.k); trkDir.unit(); double cosEntranceAngle = Math.abs(this.P(iVec.k).z()); @@ -345,20 +378,21 @@ private Matrix Q(StateVec iVec, int dir) { double pz = pt * iVec.tanL; double p = Math.sqrt(pt * pt + pz * pz); - double t_ov_X0 = 2. * 0.32 / Constants.SILICONRADLEN; //path length in radiation length units = t/X0 [true path length/ X0] ; Si radiation length = 9.36 cm - + //double t_ov_X0 = 2. * 0.32 / Constants.SILICONRADLEN; //path length in radiation length units = t/X0 [true path length/ X0] ; Si radiation length = 9.36 cm + double t_ov_X0 = this.get_t_ov_X0(Math.sqrt(iVec.x*iVec.x+iVec.y*iVec.y)); //System.out.println(Math.log(t_ov_X0)/9.+" rad "+Math.sqrt(iVec.x*iVec.x+iVec.y*iVec.y)+" t/x0 "+t_ov_X0); double mass = MassHypothesis(2); // assume given mass hypothesis (2=pion) double beta = p / Math.sqrt(p * p + mass * mass); // use particle momentum double pathLength = t_ov_X0 / cosEntranceAngle; +//0.0136? - double sctRMS = (0.0136 / (beta * p)) * Math.sqrt(pathLength) * (1 + 0.038 * Math.log(pathLength)); // Highland-Lynch-Dahl formula - + double sctRMS = (0.00141 / (beta * p)) * Math.sqrt(pathLength) * (1 + Math.log10(pathLength)/9.); // Highland-Lynch-Dahl formula + Q = new Matrix(new double[][]{ {0, 0, 0, 0, 0}, - {0, sctRMS * (1 + iVec.tanL * iVec.tanL), 0, 0, 0}, - {0, 0, sctRMS * (iVec.kappa * iVec.kappa * iVec.tanL * iVec.tanL), 0, sctRMS * (iVec.kappa * iVec.tanL * (1 + iVec.tanL * iVec.tanL))}, + {0, sctRMS*sctRMS * (1 + iVec.tanL * iVec.tanL), 0, 0, 0}, + {0, 0, sctRMS*sctRMS * (iVec.kappa * iVec.kappa * iVec.tanL * iVec.tanL), 0, sctRMS*sctRMS * (iVec.kappa * iVec.tanL * (1 + iVec.tanL * iVec.tanL))}, {0, 0, 0, 0, 0}, - {0, 0, sctRMS * (iVec.kappa * iVec.tanL * (1 + iVec.tanL * iVec.tanL)), 0, sctRMS * (1 + iVec.tanL * iVec.tanL) * (1 + iVec.tanL * iVec.tanL)} + {0, 0, sctRMS*sctRMS * (iVec.kappa * iVec.tanL * (1 + iVec.tanL * iVec.tanL)), 0, sctRMS*sctRMS * (1 + iVec.tanL * iVec.tanL) * (1 + iVec.tanL * iVec.tanL)} }); } @@ -433,7 +467,8 @@ public class B { this.By = bf.y(); this.Bz = bf.z(); - this.alpha = 1. / (StateVecs.speedLight * bf.z()); + this.alpha = 1. / (StateVecs.speedLight * bf.toVector3D().z()); + //this.alpha = 1. / (5.); } } @@ -486,9 +521,9 @@ public Helix setTrackPars(int kf) { double x = this.trackTraj.get(kf).d_rho * Math.cos(this.trackTraj.get(kf).phi0); double y = this.trackTraj.get(kf).d_rho * Math.sin(this.trackTraj.get(kf).phi0); double z = this.trackTraj.get(kf).dz; - double px = -Math.abs(1 / this.trackTraj.get(kf).kappa) * Math.sin(this.trackTraj.get(kf).phi0); - double py = Math.abs(1 / this.trackTraj.get(kf).kappa) * Math.cos(this.trackTraj.get(kf).phi0); - double pz = Math.abs(1 / this.trackTraj.get(kf).kappa) * this.trackTraj.get(kf).tanL; + double px = -Math.abs(1. / this.trackTraj.get(kf).kappa) * Math.sin(this.trackTraj.get(kf).phi0); + double py = Math.abs(1. / this.trackTraj.get(kf).kappa) * Math.cos(this.trackTraj.get(kf).phi0); + double pz = Math.abs(1. / this.trackTraj.get(kf).kappa) * this.trackTraj.get(kf).tanL; int q = (int) Math.signum(this.trackTraj.get(kf).kappa); double p_unc = Math.sqrt(px * px + py * py + pz * pz); @@ -497,12 +532,12 @@ public Helix setTrackPars(int kf) { double h_dca = Math.sqrt(x * x + y * y); double h_phi0 = Math.atan2(py, px); double kappa = Math.signum(this.trackTraj.get(kf).kappa) / Math.sqrt(px * px + py * py); - double h_omega = kappa / this.trackTraj.get(kf).alpha; + double h_omega = kappa / this.trackTraj.get(kf).alpha; h_omega = kappa/this.trackTraj.get(0).alpha; double h_dz = z; - double h_tandip = pz / Math.sqrt(px * px + py * py);; - + double h_tandip = pz / Math.sqrt(px * px + py * py); + Helix trkHelix = new Helix(h_dca, h_phi0, h_omega, h_dz, h_tandip, this.trackCov.get(kf).covMat); - //System.out.println("x "+x/10+" y "+y/10+" z "+z/10+" p "+p_unc+" pt "+Math.sqrt(px*px+py*py) +" theta "+Math.toDegrees(Math.acos(pz/Math.sqrt(px*px+py*py+pz*pz)))+" phi "+Math.toDegrees(Math.atan2(py, px))+" q "+q); + // System.out.println("x "+x+" y "+y+" z "+z+" p "+p_unc+" pt "+Math.sqrt(px*px+py*py) +" theta "+Math.toDegrees(Math.acos(pz/Math.sqrt(px*px+py*py+pz*pz)))+" phi "+Math.toDegrees(Math.atan2(py, px))+" q "+q); return trkHelix; } diff --git a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/trajectory/TrkSwimmer.java b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/trajectory/TrkSwimmer.java index 8e60fe5913..4a8acdddac 100644 --- a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/trajectory/TrkSwimmer.java +++ b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/trajectory/TrkSwimmer.java @@ -78,7 +78,7 @@ public void SetSwimParameters(Helix helix, _maxPathLength = maxPathLength; _charge = charge; _phi = Math.toDegrees(helix.get_phi_at_dca()); - _theta = Math.toDegrees(Math.acos(helix.costheta())); + _theta = Math.toDegrees(Math.acos(helix.costheta())); _pTot = p; _x0 = helix.xdca() / 1000; _y0 = helix.ydca() / 1000; @@ -126,8 +126,8 @@ public double[] SwimToPlane(double z_mm) { double hdata[] = new double[3]; double z = z_mm / 1000; // the magfield method uses meters double[] value = new double[8]; - double accuracy = 20e-6; //20 microns - double stepSize = 1e-5; // m + double accuracy = 2.0e-6; //2.0 microns + double stepSize = 1e-6; // m if (_pTot < 0.05) // fiducial cut 50 MeV { return null; @@ -141,9 +141,9 @@ public double[] SwimToPlane(double z_mm) { traj.computeBDL(sField); double[] lastY = traj.lastElement(); - value[0] = lastY[0] * 1000; // convert back to mm - value[1] = lastY[1] * 1000; // convert back to mm - value[2] = lastY[2] * 1000; // convert back to mm + value[0] = lastY[0] * 1000.; // convert back to mm + value[1] = lastY[1] * 1000.; // convert back to mm + value[2] = lastY[2] * 1000.; // convert back to mm value[3] = lastY[3] * _pTot; //normalized values * p value[4] = lastY[4] * _pTot; value[5] = lastY[5] * _pTot; @@ -198,7 +198,7 @@ public Point3D Bfield(double x_cm, double y_cm, double z_cm) { sField.field((float) x_cm, (float) y_cm, (float) z_cm, result); - return new Point3D(result[0] / 10, result[1] / 10, result[2] / 10); + return new Point3D(result[0] / 10., result[1] / 10., result[2] / 10.); } From e5eeaaa46df463a1db21242e0d0e1b67213c09b9 Mon Sep 17 00:00:00 2001 From: Andrey Kim Date: Wed, 23 Aug 2017 00:20:37 -0400 Subject: [PATCH 09/29] added method to EvioSource to open data buffer --- .../src/main/java/org/jlab/io/evio/EvioSource.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/common-tools/clas-io/src/main/java/org/jlab/io/evio/EvioSource.java b/common-tools/clas-io/src/main/java/org/jlab/io/evio/EvioSource.java index d62cf3f7ae..274454f61f 100644 --- a/common-tools/clas-io/src/main/java/org/jlab/io/evio/EvioSource.java +++ b/common-tools/clas-io/src/main/java/org/jlab/io/evio/EvioSource.java @@ -110,7 +110,15 @@ public void open(String filename) { } public void open(ByteBuffer buff) { - // TODO Auto-generated method stub + try { + evioReader = new EvioCompactReader(buff); + currentEvent = 1; + currentFileEntries = evioReader.getEventCount()+1; + storeByteOrder = evioReader.getFileByteOrder(); + // System.out.println("****** opened BUFFER [] ** NEVENTS = " + currentFileEntries + " *******"); + } catch (EvioException ex) { + Logger.getLogger(EvioSource.class.getName()).log(Level.SEVERE, null, ex); + } } public void close() { From ad84f10fb1210a6db6a4c96719af973154152e0c Mon Sep 17 00:00:00 2001 From: Andrey Kim Date: Wed, 23 Aug 2017 14:30:02 -0400 Subject: [PATCH 10/29] transition geometry to Maven from Gradle --- common-tools/clas-jcsg/build.gradle | 169 ------------------ common-tools/clas-jcsg/gradle.properties | 2 - .../gradle/wrapper/gradle-wrapper.jar | Bin 53636 -> 0 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 - common-tools/clas-jcsg/gradlew | 160 ----------------- common-tools/clas-jcsg/gradlew.bat | 90 ---------- common-tools/clas-jcsg/license-template.txt | 29 --- common-tools/clas-jcsg/pom.xml | 38 ++++ common-tools/clas-jcsg/settings.gradle | 1 - 9 files changed, 38 insertions(+), 457 deletions(-) delete mode 100644 common-tools/clas-jcsg/build.gradle delete mode 100644 common-tools/clas-jcsg/gradle.properties delete mode 100644 common-tools/clas-jcsg/gradle/wrapper/gradle-wrapper.jar delete mode 100644 common-tools/clas-jcsg/gradle/wrapper/gradle-wrapper.properties delete mode 100755 common-tools/clas-jcsg/gradlew delete mode 100644 common-tools/clas-jcsg/gradlew.bat delete mode 100644 common-tools/clas-jcsg/license-template.txt create mode 100644 common-tools/clas-jcsg/pom.xml delete mode 100644 common-tools/clas-jcsg/settings.gradle diff --git a/common-tools/clas-jcsg/build.gradle b/common-tools/clas-jcsg/build.gradle deleted file mode 100644 index 9ff01fc8af..0000000000 --- a/common-tools/clas-jcsg/build.gradle +++ /dev/null @@ -1,169 +0,0 @@ -plugins { - id 'application' - id 'java' - id 'maven-publish' - id 'net.nemerosa.versioning' version '1.5.0' - id 'com.jfrog.bintray' version '1.6' -} - -sourceCompatibility = '1.8' -[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' - -//apply from: 'http://gradle-plugins.mihosoft.eu/latest/vlicenseheader.gradle' -//repairHeaders.licenseHeaderText = new File(projectDir,'./license-template.txt') - -task wrapper(type: Wrapper, description: 'Creates and deploys the Gradle wrapper to the current directory.') { - gradleVersion = '2.10' -} - -if (!hasProperty('mainClass')) { - ext.mainClass = 'eu.mihosoft.vrl.v3d.Main' -} - -applicationDefaultJvmArgs = ["-Xss515m"] -mainClassName = mainClass - -repositories { - mavenCentral() - jcenter() -} - -// javadoc is way too strict for my taste. -if (JavaVersion.current().isJava8Compatible()) { - allprojects { - tasks.withType(Javadoc) { - options.addStringOption("encoding", "UTF-8") - options.addStringOption('Xdoclint:none', '-quiet') - } - } -} - -task javadocJar(type: Jar, dependsOn: javadoc) { - - classifier = 'javadoc' - from javadoc.destinationDir -} - -// create one jar for the source files -task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' - from sourceSets.main.allSource -} - -artifacts { - archives jar - archives javadocJar - archives sourcesJar -} - - - - -dependencies { - - testCompile group: 'junit', name: 'junit', version: '4.+' - - compile group: 'java3d', name: 'vecmath', version: '1.3.1' - compile 'org.slf4j:slf4j-simple:1.6.1' - //compile group: 'java3d', name: 'vecmath', version: '1.3.1' , classifier: "javadoc" - compile files("$System.env.COATJAVA/lib/clas/coat-libs-3.0-SNAPSHOT.jar") -} - -Date buildTimeAndDate = new Date() -ext { - buildDate = new java.text.SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate) - buildTime = new java.text.SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate) -} - -// create a fat-jar (class files plus dependencies -// excludes VRL.jar (plugin jar files must not start with 'vrl-\\d+') -jar { - - - // TODO add switch for fat-jar generation - // dependencies except VRL - // from configurations.runtime.asFileTree. - // filter({file->return !file.name.startsWith("vrl-0")}). - // files.collect { zipTree(it) } - // - // // project class files compiled from source - // from files(sourceSets.main.output) - - manifest { - - attributes( - 'Built-By': System.properties['user.name'], - 'Created-By': System.properties['java.version'] + " (" + System.properties['java.vendor'] + " " + System.properties['java.vm.version'] + ")", - 'Build-Date': project.buildDate, - 'Build-Time': project.buildTime, - 'Build-Revision': versioning.info.commit, - 'Specification-Title': project.name, - 'Specification-Version': project.version, - 'Implementation-Title': project.name, - 'Implementation-Version': project.version - ) - } -} - - -def pomConfig = { - name 'jcsg' - description 'Java implementation of BSP based CSG (Constructive Solid Geometry)' - url 'https://github.com/miho/JCSG/wiki' - inceptionYear '2016' - licenses { - license([:]) { - name 'BSD 2-Clause' - url 'https://github.com/miho/JCSG/blob/master/LICENSE.txt' - distribution 'repo' - } - } - scm { - url 'scm:git@github.com:miho/JCSG.git' - connection 'scm:git@github.com:miho/JCSG.git' - developerConnection 'scm:git@github.com:miho/JCSG.git' - } - developers { - developer { - id 'miho' - name 'Michael Hoffer' - } - } -} - -publishing { - publications { - mavenCustom(MavenPublication) { - from components.java - artifact sourcesJar - artifact javadocJar - - pom.withXml { - def root = asNode() - root.appendNode 'description', 'Java implementation of BSP based CSG (Constructive Solid Geometry)' - root.children().last() + pomConfig - } - } - } -} - -if (!project.hasProperty('bintrayUsername')) ext.bintrayUsername = '' -if (!project.hasProperty('bintrayApiKey')) ext.bintrayApiKey = '' - -bintray { - user = project.bintrayUsername - key = project.bintrayApiKey - publications = ['mavenCustom'] - pkg { - repo = 'JCSG' - userOrg = 'miho' - name = project.name - desc = 'Java implementation of BSP based CSG (Constructive Solid Geometry)' - licenses = ['BSD 2-Clause'] - labels = ['javafx', 'java', 'CSG', 'Constructive Solid Geometry', 'VRL', '3D', 'STL', 'OBJ'] - websiteUrl = 'https://github.com/miho/JCSG/wiki' - issueTrackerUrl = 'https://github.com/miho/JCSG/issues' - vcsUrl = 'git@github.com:miho/JCSG.git' - publicDownloadNumbers = true - } -} diff --git a/common-tools/clas-jcsg/gradle.properties b/common-tools/clas-jcsg/gradle.properties deleted file mode 100644 index 0b17d8c8d4..0000000000 --- a/common-tools/clas-jcsg/gradle.properties +++ /dev/null @@ -1,2 +0,0 @@ -group = eu.mihosoft.vrl.jcsg -version = 0.3.2 diff --git a/common-tools/clas-jcsg/gradle/wrapper/gradle-wrapper.jar b/common-tools/clas-jcsg/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 13372aef5e24af05341d49695ee84e5f9b594659..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 53636 zcmafaW0a=B^559DjdyHo$F^PVt zzd|cWgMz^T0YO0lQ8%TE1O06v|NZl~LH{LLQ58WtNjWhFP#}eWVO&eiP!jmdp!%24 z{&z-MK{-h=QDqf+S+Pgi=_wg$I{F28X*%lJ>A7Yl#$}fMhymMu?R9TEB?#6@|Q^e^AHhxcRL$z1gsc`-Q`3j+eYAd<4@z^{+?JM8bmu zSVlrVZ5-)SzLn&LU9GhXYG{{I+u(+6ES+tAtQUanYC0^6kWkks8cG;C&r1KGs)Cq}WZSd3k1c?lkzwLySimkP5z)T2Ox3pNs;PdQ=8JPDkT7#0L!cV? zzn${PZs;o7UjcCVd&DCDpFJvjI=h(KDmdByJuDYXQ|G@u4^Kf?7YkE67fWM97kj6F z973tGtv!k$k{<>jd~D&c(x5hVbJa`bILdy(00%lY5}HZ2N>)a|))3UZ&fUa5@uB`H z+LrYm@~t?g`9~@dFzW5l>=p0hG%rv0>(S}jEzqQg6-jImG%Pr%HPtqIV_Ym6yRydW z4L+)NhcyYp*g#vLH{1lK-hQQSScfvNiNx|?nSn-?cc8}-9~Z_0oxlr~(b^EiD`Mx< zlOLK)MH?nl4dD|hx!jBCIku-lI(&v~bCU#!L7d0{)h z;k4y^X+=#XarKzK*)lv0d6?kE1< zmCG^yDYrSwrKIn04tG)>>10%+ zEKzs$S*Zrl+GeE55f)QjY$ zD5hi~J17k;4VSF_`{lPFwf^Qroqg%kqM+Pdn%h#oOPIsOIwu?JR717atg~!)*CgXk zERAW?c}(66rnI+LqM^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o-(+5aQ diff --git a/common-tools/clas-jcsg/gradle/wrapper/gradle-wrapper.properties b/common-tools/clas-jcsg/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 8e6e4a25ad..0000000000 --- a/common-tools/clas-jcsg/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Tue Feb 16 22:28:25 CET 2016 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-bin.zip diff --git a/common-tools/clas-jcsg/gradlew b/common-tools/clas-jcsg/gradlew deleted file mode 100755 index 9d82f78915..0000000000 --- a/common-tools/clas-jcsg/gradlew +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/common-tools/clas-jcsg/gradlew.bat b/common-tools/clas-jcsg/gradlew.bat deleted file mode 100644 index aec99730b4..0000000000 --- a/common-tools/clas-jcsg/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/common-tools/clas-jcsg/license-template.txt b/common-tools/clas-jcsg/license-template.txt deleted file mode 100644 index 6dcd13f89d..0000000000 --- a/common-tools/clas-jcsg/license-template.txt +++ /dev/null @@ -1,29 +0,0 @@ -/** - * ${VRL-LICENSE-HEADER-FILE-NAME} - * - * Copyright 2014-${VRL-LICENSE-HEADER-YEAR} Michael Hoffer . All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY Michael Hoffer "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Michael Hoffer OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of Michael Hoffer . - */ diff --git a/common-tools/clas-jcsg/pom.xml b/common-tools/clas-jcsg/pom.xml new file mode 100644 index 0000000000..b9591b0797 --- /dev/null +++ b/common-tools/clas-jcsg/pom.xml @@ -0,0 +1,38 @@ + + + 4.0.0 + eu.mihosoft.vrl.jcsg + jcsg + 0.3.2 + jar + + + + org.jlab.coat + coat-libs + 3.0-SNAPSHOT + + + java3d + vecmath + 1.3.1 + + + org.slf4j + slf4j-simple + 1.6.1 + + + + + + clas12maven + https://clasweb.jlab.org/clas12maven + + + + + 1.8 + 1.8 + + diff --git a/common-tools/clas-jcsg/settings.gradle b/common-tools/clas-jcsg/settings.gradle deleted file mode 100644 index ca068e46ac..0000000000 --- a/common-tools/clas-jcsg/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'jcsg' From 51acd5162a15e984628168a5546678bf626052f9 Mon Sep 17 00:00:00 2001 From: Andrew Kim Date: Wed, 23 Aug 2017 15:12:06 -0400 Subject: [PATCH 11/29] typo in CVT pom file * DC is added to the list of dependencies (should be "clas12detector-dc", not just "dc") --- reconstruction/cvt/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reconstruction/cvt/pom.xml b/reconstruction/cvt/pom.xml index 40add22379..237aad5e1c 100644 --- a/reconstruction/cvt/pom.xml +++ b/reconstruction/cvt/pom.xml @@ -36,7 +36,7 @@ org.jlab.clas12.detector - dc + clas12detector-dc 1.0-SNAPSHOT jar From 7d8228097e5f50ebc5c2ccb88156368ebd519f36 Mon Sep 17 00:00:00 2001 From: Andrew Kim Date: Wed, 23 Aug 2017 17:37:33 -0400 Subject: [PATCH 12/29] revert CVT pom file back --- reconstruction/cvt/pom.xml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/reconstruction/cvt/pom.xml b/reconstruction/cvt/pom.xml index 237aad5e1c..ba4a876397 100644 --- a/reconstruction/cvt/pom.xml +++ b/reconstruction/cvt/pom.xml @@ -34,18 +34,6 @@ 3.0-SNAPSHOT jar - - org.jlab.clas12.detector - clas12detector-dc - 1.0-SNAPSHOT - jar - - - org.jlab.clas12.detector - tof - 1.0-SNAPSHOT - jar - From 18242aeede453502f7739b865186a44be1fc51ab Mon Sep 17 00:00:00 2001 From: Andrey Kim Date: Wed, 23 Aug 2017 18:00:56 -0400 Subject: [PATCH 13/29] modify coat-lib pom file to build clas-jcsg inside coat-lib jar file --- build-coatjava.sh | 10 ---------- common-tools/clas-jcsg/pom.xml | 13 +++++++++---- common-tools/coat-lib/pom.xml | 6 ++++++ common-tools/pom.xml | 1 + 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/build-coatjava.sh b/build-coatjava.sh index 7e17074a65..213b3ca9ab 100755 --- a/build-coatjava.sh +++ b/build-coatjava.sh @@ -27,19 +27,9 @@ if [ $? != 0 ] ; then echo "common tools failure 2" ; exit 1 ; fi cd - cp common-tools/coat-lib/target/coat-libs*.jar coatjava/lib/clas/ -### jcsg ### -export COATJAVA=$PWD/coatjava/ -cd common-tools/clas-jcsg -./gradlew assemble -if [ $? != 0 ] ; then echo "jcsg failure" ; exit 1 ; fi -cd - -cp common-tools/clas-jcsg/build/libs/jcsg-0.3.2.jar coatjava/lib/clas/ - ### create local mvn repo containing coat-libs and jcsg ## mvn deploy:deploy-file -Dfile=./common-tools/coat-lib/target/coat-libs-3.0-SNAPSHOT.jar -DgroupId=org.jlab.clas -DartifactId=common-tools -Dversion=0.0 -Dpackaging=jar -Durl=file:./myLocalMvnRepo/ -DrepositoryId=myLocalMvnRepo -DupdateReleaseInfo=true if [ $? != 0 ] ; then echo "failed to create local mvn repo" ; exit 1 ; fi -mvn deploy:deploy-file -Dfile=./common-tools/clas-jcsg/build/libs/jcsg-0.3.2.jar -DgroupId=org.jlab.clas -DartifactId=clas-jcsg -Dversion=0.0 -Dpackaging=jar -Durl=file:./myLocalMvnRepo/ -DrepositoryId=myLocalMvnRepo -DupdateReleaseInfo=true -if [ $? != 0 ] ; then echo "failed to create local mvn repo" ; exit 1 ; fi ### dc (depends on jcsg) ### cd reconstruction/dc diff --git a/common-tools/clas-jcsg/pom.xml b/common-tools/clas-jcsg/pom.xml index b9591b0797..4c66566e42 100644 --- a/common-tools/clas-jcsg/pom.xml +++ b/common-tools/clas-jcsg/pom.xml @@ -1,15 +1,20 @@ 4.0.0 - eu.mihosoft.vrl.jcsg - jcsg + org.jlab.clas + clas-jcsg 0.3.2 jar - org.jlab.coat - coat-libs + org.jlab.clas + clas-geometry + 3.0-SNAPSHOT + + + org.jlab.clas + clas-detector 3.0-SNAPSHOT diff --git a/common-tools/coat-lib/pom.xml b/common-tools/coat-lib/pom.xml index 7e1e5abe27..6a33e3f044 100644 --- a/common-tools/coat-lib/pom.xml +++ b/common-tools/coat-lib/pom.xml @@ -93,6 +93,12 @@ 3.0-SNAPSHOT + + org.jlab.clas + clas-jcsg + 0.3.2 + + org.jlab.clas clas-detector diff --git a/common-tools/pom.xml b/common-tools/pom.xml index 90a6c41ef6..3a4694f382 100644 --- a/common-tools/pom.xml +++ b/common-tools/pom.xml @@ -17,6 +17,7 @@ clas-physics clas-io clas-geometry + clas-jcsg clas-detector clas-reco clas-analysis From 1efa26ef12bb754a4057af20f097ef4c8248cbe4 Mon Sep 17 00:00:00 2001 From: Andrey Kim Date: Wed, 23 Aug 2017 21:44:48 -0400 Subject: [PATCH 14/29] correct version of clas-jcsg in reconstruction packages --- reconstruction/dc/pom.xml | 2 +- reconstruction/tof/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reconstruction/dc/pom.xml b/reconstruction/dc/pom.xml index 75fb92a7c2..a1fcbd08cc 100644 --- a/reconstruction/dc/pom.xml +++ b/reconstruction/dc/pom.xml @@ -25,7 +25,7 @@ org.jlab.clas clas-jcsg - 0.0 + 0.3.2 jar diff --git a/reconstruction/tof/pom.xml b/reconstruction/tof/pom.xml index 5073d7bfde..7e94abd043 100644 --- a/reconstruction/tof/pom.xml +++ b/reconstruction/tof/pom.xml @@ -25,7 +25,7 @@ org.jlab.clas clas-jcsg - 0.0 + 0.3.2 jar From 314a74560a337e3d59726d4d46d6595ab281ff39 Mon Sep 17 00:00:00 2001 From: Andrey Kim Date: Wed, 23 Aug 2017 21:46:52 -0400 Subject: [PATCH 15/29] remove old jcsg jar file --- build-coatjava.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build-coatjava.sh b/build-coatjava.sh index 213b3ca9ab..885f25e562 100755 --- a/build-coatjava.sh +++ b/build-coatjava.sh @@ -1,5 +1,6 @@ #!/bin/bash +rm -f coatjava/lib/clas/jcsg-0.3.2.jar mkdir coatjava cp -r bin coatjava/ cp -r etc coatjava/ From 13e9187dcd05e73867e35038de82d6de9a96c170 Mon Sep 17 00:00:00 2001 From: Veronique Ziegler Date: Mon, 28 Aug 2017 16:03:40 -0400 Subject: [PATCH 16/29] Fix in clustering algorithm - separating BMT and SVT hits. Use Bmag instead of Bz in KF --- .../src/main/java/org/jlab/rec/cvt/bmt/Constants.java | 2 +- .../main/java/org/jlab/rec/cvt/cluster/Cluster.java | 4 ++-- .../rec/cvt/services/CVTCosmicsReconstruction.java | 5 +++-- .../org/jlab/rec/cvt/services/CVTReconstruction.java | 11 ++++++----- .../main/java/org/jlab/rec/cvt/track/fit/KFitter.java | 4 ++-- .../java/org/jlab/rec/cvt/track/fit/StateVecs.java | 2 +- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/bmt/Constants.java b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/bmt/Constants.java index 606a70c596..03747e5302 100644 --- a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/bmt/Constants.java +++ b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/bmt/Constants.java @@ -74,7 +74,7 @@ public static synchronized void Load() { } if (org.jlab.rec.cvt.Constants.isCosmicsData() == false) { - setThetaL(Math.toRadians(25. * org.jlab.rec.cvt.Constants.getSolenoidscale())); // for 5-T field + setThetaL(Math.toRadians(20. * org.jlab.rec.cvt.Constants.getSolenoidscale())); // for 5-T field } areConstantsLoaded = true; diff --git a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/cluster/Cluster.java b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/cluster/Cluster.java index ec8e439b72..bc84d5424e 100644 --- a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/cluster/Cluster.java +++ b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/cluster/Cluster.java @@ -175,7 +175,7 @@ public void calc_CentroidParams() { // for the SVT the analysis only uses the centroid strpNb = thehit.get_Strip().get_Strip(); } - if (this.get_Detector().equalsIgnoreCase("BMT")) { + if (this.get_Detector().equalsIgnoreCase("BMT")) { // for the BMT the analysis distinguishes between C and Z type detectors if (this.get_DetectorType().equalsIgnoreCase("C")) { // C-detectors strpNb = thehit.get_Strip().get_Strip(); @@ -390,7 +390,7 @@ public void set_CentroidResidual(double _CentroidResidual) { * @return cluster info. about location and number of hits contained in it */ public void printInfo() { - String s = "cluster: Detector " + this.get_Detector() + " ID " + this.get_Id() + " Sector " + this.get_Sector() + " Layer " + this.get_Layer() + " Size " + this.size(); + String s = "cluster: Detector " + this.get_Detector() + " ID " + this.get_Id() + " Sector " + this.get_Sector() + " Layer " + this.get_Layer() + " Size " + this.size() +" centroid "+this.get_Centroid(); System.out.println(s); } diff --git a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/services/CVTCosmicsReconstruction.java b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/services/CVTCosmicsReconstruction.java index 8f0d725c21..c6dc7b6546 100644 --- a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/services/CVTCosmicsReconstruction.java +++ b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/services/CVTCosmicsReconstruction.java @@ -166,8 +166,9 @@ public boolean processDataEvent(DataEvent event) { //2) find the clusters from these hits ClusterFinder clusFinder = new ClusterFinder(); - clusters = clusFinder.findClusters(hits); - + //clusters = clusFinder.findClusters(hits); + clusters.addAll(clusFinder.findClusters(svt_hits)); + clusters.addAll(clusFinder.findClusters(bmt_hits)); // test /* for(Hit h0 : hits) { FittedHit h = new FittedHit(h0.get_Detector(), h0.get_DetectorType(), h0.get_Sector(),h0.get_Layer(),h0.get_Strip()); diff --git a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/services/CVTReconstruction.java b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/services/CVTReconstruction.java index 919b4695c8..6b3231fda8 100644 --- a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/services/CVTReconstruction.java +++ b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/services/CVTReconstruction.java @@ -167,8 +167,9 @@ public boolean processDataEvent(DataEvent event) { //2) find the clusters from these hits ClusterFinder clusFinder = new ClusterFinder(); - clusters = clusFinder.findClusters(hits); - + clusters.addAll(clusFinder.findClusters(svt_hits)); + clusters.addAll(clusFinder.findClusters(bmt_hits)); + if (clusters.size() == 0) { return true; } @@ -285,7 +286,7 @@ public boolean init() { public static void main(String[] args) throws FileNotFoundException, EvioException { //String inputFile = "/Users/ziegler/Workdir/Files/GEMC/CVT/YurisTest.hipo"; - String inputFile = "/Users/ziegler/Workdir/Files/cvt/gen_cvt1.hipo"; + String inputFile = "/Users/ziegler/Workdir/Files/cvt/neg_muons.hipo"; System.err.println(" \n[PROCESSING FILE] : " + inputFile); @@ -299,7 +300,7 @@ public static void main(String[] args) throws FileNotFoundException, EvioExcepti HipoDataSync writer = new HipoDataSync(); //Writer - String outputFile = "/Users/ziegler/Workdir/Files/cvt/myreco2_cvt1.hipo"; + String outputFile = "/Users/ziegler/Workdir/Files/cvt/neg_muons.NomField.hipo"; writer.open(outputFile); long t1 = 0; @@ -330,7 +331,7 @@ public static void main(String[] args) throws FileNotFoundException, EvioExcepti dde.show(); } */ - //if(counter>3) break; + // if(counter>304) break; //event.show(); //if(counter%100==0) //System.out.println("run "+counter+" events"); diff --git a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/fit/KFitter.java b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/fit/KFitter.java index f8ebd6666d..cdd3c0ad08 100644 --- a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/fit/KFitter.java +++ b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/fit/KFitter.java @@ -226,7 +226,7 @@ private void filter(int k, org.jlab.rec.cvt.svt.Geometry sgeo, org.jlab.rec.cvt. Matrix Ci = null; //this.printMatrix(new Matrix(HTGH));System.err.println("-------------------------------\n"); if (this.isNonsingular(sv.trackCov.get(k).covMat) == false) { - System.err.println("Covariance Matrix is non-invertible - quit filter!"); + //System.err.println("Covariance Matrix is non-invertible - quit filter!"); //this.printMatrix(sv.trackCov.get(k).covMat); return; } @@ -243,7 +243,7 @@ private void filter(int k, org.jlab.rec.cvt.svt.Geometry sgeo, org.jlab.rec.cvt. return; } if (Ca != null && this.isNonsingular(Ca) == false) { - System.err.println("Covariance Matrix is non-invertible - quit filter!"); + //System.err.println("Covariance Matrix is non-invertible - quit filter!"); return; } if (Ca != null && this.isNonsingular(Ca) == true) { diff --git a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/fit/StateVecs.java b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/fit/StateVecs.java index a447905d55..74c9925d1b 100644 --- a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/fit/StateVecs.java +++ b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/fit/StateVecs.java @@ -467,7 +467,7 @@ public class B { this.By = bf.y(); this.Bz = bf.z(); - this.alpha = 1. / (StateVecs.speedLight * bf.toVector3D().z()); + this.alpha = 1. / (StateVecs.speedLight * bf.toVector3D().mag()); //this.alpha = 1. / (5.); } } From 33c9812dd9b495d01ad639c94f072b81ac6079d8 Mon Sep 17 00:00:00 2001 From: Andrey Kim Date: Tue, 29 Aug 2017 18:28:12 -0400 Subject: [PATCH 17/29] Added access to detector Front face for reconstruction --- .../detector/geant4/v2/ECGeant4Factory.java | 18 +++++++++- .../detector/geant4/v2/FTOFGeant4Factory.java | 28 ++++++++++++--- .../detector/geant4/v2/PCALGeant4Factory.java | 16 +++++++++ .../java/org/jlab/detector/volume/G4Box.java | 2 -- .../java/org/jlab/detector/volume/G4Trd.java | 34 +++++++++++++++++-- .../java/org/jlab/geometry/prim/Straight.java | 5 +++ 6 files changed, 93 insertions(+), 10 deletions(-) diff --git a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/ECGeant4Factory.java b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/ECGeant4Factory.java index f6e55fa368..39fce877e3 100644 --- a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/ECGeant4Factory.java +++ b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/ECGeant4Factory.java @@ -7,10 +7,12 @@ import eu.mihosoft.vrl.v3d.Vector3d; import org.jlab.detector.units.SystemOfUnits.Length; +import org.jlab.detector.volume.G4Box; import org.jlab.detector.volume.G4Trap; import org.jlab.detector.volume.G4World; import org.jlab.detector.volume.Geant4Basic; import org.jlab.geom.base.ConstantProvider; +import org.jlab.geom.prim.Plane3D; /** * @@ -331,7 +333,7 @@ public int getNumberOfPaddles() { public G4Trap getPaddle(int isector, int ilayer, int ipaddle) { int iview = (ilayer - 1) % 3; int[] npaddles = {nustrips, nvstrips, nwstrips}; - if (isector < 1 || isector > nsectors || ilayer < 1 || ilayer > nlayers*nviews || ipaddle < 1 || ipaddle > npaddles[iview]) { + if (isector < 1 || isector > nsectors || ilayer < 1 || ilayer > nlayers * nviews || ipaddle < 1 || ipaddle > npaddles[iview]) { System.err.println(String.format("Paddle #%d in sector %d, layer %d doesn't exist", ipaddle, isector, ilayer)); throw new IndexOutOfBoundsException(); } @@ -341,4 +343,18 @@ public G4Trap getPaddle(int isector, int ilayer, int ipaddle) { .getChildren().get(ipaddle - 1); } + public Plane3D getFrontalFace(int sector) { + if (sector < 1 || sector > nsectors) { + System.err.println(String.format("Sector %d doesn't exist", sector)); + throw new IndexOutOfBoundsException(); + } + + Geant4Basic layerVol = motherVolume.getChildren().get(sector - 1).getChildren().get(3); + G4Trap padl = (G4Trap) layerVol.getChildren().get(1); + Vector3d point = new Vector3d(padl.getVertex(0)); + Vector3d normal = new Vector3d(layerVol.getLineZ().diff().normalized()); + //System.out.println("color(\"red\") translate(" + point + ") sphere(2, $fn=100);"); + //System.out.println("line3d(" + point + ", "+point.plus(normal.times(20))+");"); + return new Plane3D(point.x, point.y, point.z, normal.x, normal.y, normal.z); + } } diff --git a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/FTOFGeant4Factory.java b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/FTOFGeant4Factory.java index e07d7c910c..5be58b13fb 100644 --- a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/FTOFGeant4Factory.java +++ b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/FTOFGeant4Factory.java @@ -5,6 +5,7 @@ */ package org.jlab.detector.geant4.v2; +import eu.mihosoft.vrl.v3d.Vector3d; import org.jlab.detector.volume.Geant4Basic; import org.jlab.detector.volume.G4Trd; import org.jlab.detector.volume.G4Box; @@ -14,6 +15,8 @@ import static org.jlab.detector.units.SystemOfUnits.Length; import org.jlab.detector.volume.G4World; import org.jlab.geom.base.ConstantProvider; +import org.jlab.geom.prim.Plane3D; +import org.jlab.geometry.prim.Line3d; /** * @@ -48,7 +51,7 @@ public FTOFGeant4Factory(ConstantProvider provider) { properties.put("date", "06/03/13"); } - public Geant4Basic createPanel(ConstantProvider cp, int sector, int layer) { + private Geant4Basic createPanel(ConstantProvider cp, int sector, int layer) { double thtilt = Math.toRadians(cp.getDouble(stringLayers[layer - 1] + "/panel/thtilt", 0)); double thmin = Math.toRadians(cp.getDouble(stringLayers[layer - 1] + "/panel/thmin", 0)); double dist2edge = cp.getDouble(stringLayers[layer - 1] + "/panel/dist2edge", 0) * Length.cm; @@ -94,7 +97,7 @@ public Geant4Basic createPanel(ConstantProvider cp, int sector, int layer) { return panelVolume; } - public List createLayer(ConstantProvider cp, int layer) { + private List createLayer(ConstantProvider cp, int layer) { int numPaddles = cp.length(stringLayers[layer - 1] + "/paddles/paddle"); double paddlewidth = cp.getDouble(stringLayers[layer - 1] + "/panel/paddlewidth", 0); @@ -124,7 +127,6 @@ public List createLayer(ConstantProvider cp, int layer) { public G4Box getComponent(int sector, int layer, int paddle) { int ivolume = (sector - 1) * 3 + layer - 1; - G4Box volComponent = null; if (sector >= 1 && sector <= 6 && layer >= 1 && layer <= 3) { @@ -139,9 +141,25 @@ public G4Box getComponent(int sector, int layer, int paddle) { System.err.println("ERROR!!!"); System.err.println("Component: sector: " + sector + ", layer: " + layer + ", paddle: " + paddle + " doesn't exist"); - System.exit(111); + throw new IndexOutOfBoundsException(); + } + + public Plane3D getFrontalFace(int sector, int layer) { + if (sector < 1 || sector > 6 + || layer < 1 || layer > 3) { + System.err.println("ERROR!!!"); + System.err.println("Component: sector: " + sector + ", layer: " + layer + " doesn't exist"); + throw new IndexOutOfBoundsException(); + } + + int ivolume = (sector - 1) * 3 + layer - 1; + + Geant4Basic panel = motherVolume.getChildren().get(ivolume); + G4Box padl = (G4Box) panel.getChildren().get(1); + Vector3d point = new Vector3d(padl.getVertex(0)); + Vector3d normal = new Vector3d(panel.getLineY().diff().normalized()); - return volComponent; + return new Plane3D(point.x, point.y, point.z, normal.x, normal.y, normal.z); } public G4World getMother() { diff --git a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/PCALGeant4Factory.java b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/PCALGeant4Factory.java index fe53a1a777..f81573f11e 100644 --- a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/PCALGeant4Factory.java +++ b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/PCALGeant4Factory.java @@ -13,6 +13,7 @@ import org.jlab.detector.volume.G4World; import org.jlab.detector.volume.Geant4Basic; import org.jlab.geom.base.ConstantProvider; +import org.jlab.geom.prim.Plane3D; /** * @@ -378,4 +379,19 @@ public G4Trap getPaddle(int isector, int ilayer, int ipaddle) { return (G4Trap) lVol.scipaddles.get(ipaddle); } + + public Plane3D getFrontalFace(int sector) { + if (sector < 1 || sector >= sectorVolumes.size()) { + System.err.println(String.format("Sector %d doesn't exist", sector)); + throw new IndexOutOfBoundsException(); + } + Layer lVol = sectorVolumes.get(sector - 1).layerVolumes.get(0); + Geant4Basic layerVol = lVol.layerVol; + G4Trap padl = (G4Trap) lVol.scipaddles.get(0); + Vector3d point = new Vector3d(padl.getVertex(0)); + Vector3d normal = new Vector3d(layerVol.getLineZ().diff().normalized()); + System.out.println("color(\"red\") translate(" + point + ") sphere(2, $fn=100);"); + System.out.println("line3d(" + point + ", "+point.plus(normal.times(20))+");"); + return new Plane3D(point.x, point.y, point.z, normal.x, normal.y, normal.z); + } } diff --git a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/volume/G4Box.java b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/volume/G4Box.java index d9a84ff21b..640d29ec00 100644 --- a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/volume/G4Box.java +++ b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/volume/G4Box.java @@ -5,10 +5,8 @@ */ package org.jlab.detector.volume; -import eu.mihosoft.vrl.v3d.CSG; import eu.mihosoft.vrl.v3d.Vector3d; import org.jlab.detector.units.SystemOfUnits.Length; -import org.jlab.geom.prim.Point3D; import org.jlab.geometry.prim.Box; import org.jlab.geometry.prim.Line3d; diff --git a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/volume/G4Trd.java b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/volume/G4Trd.java index a023aa7035..35ccc09eca 100644 --- a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/volume/G4Trd.java +++ b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/volume/G4Trd.java @@ -5,19 +5,49 @@ */ package org.jlab.detector.volume; +import eu.mihosoft.vrl.v3d.CSG; +import eu.mihosoft.vrl.v3d.Vector3d; import org.jlab.geometry.prim.Trd; import org.jlab.detector.units.SystemOfUnits.Length; +import org.jlab.geometry.prim.Line3d; +import org.jlab.geometry.prim.Ray3d; /** * * @author kenjo */ -public class G4Trd extends Geant4Basic{ - +public class G4Trd extends Geant4Basic { + + private Line3d localAxisX, localAxisY, localAxisZ; + public G4Trd(String name, double pdx1, double pdx2, double pdy1, double pdy2, double pdz) { super(new Trd(pdx1, pdx2, pdy1, pdy2, pdz)); setName(name); setType("Trd"); setDimensions(Length.value(pdx1), Length.value(pdx2), Length.value(pdy1), Length.value(pdy2), Length.value(pdz)); + + CSG volCSG = volumeSolid.toCSG(); + + localAxisX = new Line3d(volCSG.getIntersections(new Ray3d(new Vector3d(0, 0, 0), new Vector3d(1, 0, 0))).get(0), + volCSG.getIntersections(new Ray3d(new Vector3d(0, 0, 0), new Vector3d(-1, 0, 0))).get(0)); + localAxisY = new Line3d(volCSG.getIntersections(new Ray3d(new Vector3d(0, 0, 0), new Vector3d(0, 1, 0))).get(0), + volCSG.getIntersections(new Ray3d(new Vector3d(0, 0, 0), new Vector3d(0, -1, 0))).get(0)); + localAxisZ = new Line3d(volCSG.getIntersections(new Ray3d(new Vector3d(0, 0, 0), new Vector3d(0, 0, 1))).get(0), + volCSG.getIntersections(new Ray3d(new Vector3d(0, 0, 0), new Vector3d(0, 0, -1))).get(0)); + } + + @Override + public Line3d getLineX() { + return new Line3d(localAxisX).transformed(getGlobalTransform()); + } + + @Override + public Line3d getLineY() { + return new Line3d(localAxisY).transformed(getGlobalTransform()); + } + + @Override + public Line3d getLineZ() { + return new Line3d(localAxisZ).transformed(getGlobalTransform()); } } diff --git a/common-tools/clas-jcsg/src/main/java/org/jlab/geometry/prim/Straight.java b/common-tools/clas-jcsg/src/main/java/org/jlab/geometry/prim/Straight.java index 0236dc6e8e..d51effe60a 100644 --- a/common-tools/clas-jcsg/src/main/java/org/jlab/geometry/prim/Straight.java +++ b/common-tools/clas-jcsg/src/main/java/org/jlab/geometry/prim/Straight.java @@ -69,4 +69,9 @@ protected void transform(Transform trans){ public String toString(){ return "Straight line from "+origin+" to "+end; } + + public void scale(double times) { + Vector3d diff = end.minus(origin).times(times); + end = origin.plus(diff); + } } From bf6f8b6150c19639156b35775c8bf3f3fa3a1099 Mon Sep 17 00:00:00 2001 From: Andrey Kim Date: Wed, 30 Aug 2017 03:06:55 -0400 Subject: [PATCH 18/29] remove debug output --- .../java/org/jlab/detector/geant4/v2/PCALGeant4Factory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/PCALGeant4Factory.java b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/PCALGeant4Factory.java index f81573f11e..ac431c14b9 100644 --- a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/PCALGeant4Factory.java +++ b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/PCALGeant4Factory.java @@ -390,8 +390,8 @@ public Plane3D getFrontalFace(int sector) { G4Trap padl = (G4Trap) lVol.scipaddles.get(0); Vector3d point = new Vector3d(padl.getVertex(0)); Vector3d normal = new Vector3d(layerVol.getLineZ().diff().normalized()); - System.out.println("color(\"red\") translate(" + point + ") sphere(2, $fn=100);"); - System.out.println("line3d(" + point + ", "+point.plus(normal.times(20))+");"); +// System.out.println("color(\"red\") translate(" + point + ") sphere(2, $fn=100);"); +// System.out.println("line3d(" + point + ", "+point.plus(normal.times(20))+");"); return new Plane3D(point.x, point.y, point.z, normal.x, normal.y, normal.z); } } From aff8d13df8ea2af340f55c80f12f919af9e8d4f0 Mon Sep 17 00:00:00 2001 From: Andrey Kim Date: Wed, 30 Aug 2017 13:28:20 -0400 Subject: [PATCH 19/29] fixed typo in PCAL frontal face getter --- .../java/org/jlab/detector/geant4/v2/PCALGeant4Factory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/PCALGeant4Factory.java b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/PCALGeant4Factory.java index ac431c14b9..51041f285e 100644 --- a/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/PCALGeant4Factory.java +++ b/common-tools/clas-jcsg/src/main/java/org/jlab/detector/geant4/v2/PCALGeant4Factory.java @@ -381,7 +381,7 @@ public G4Trap getPaddle(int isector, int ilayer, int ipaddle) { } public Plane3D getFrontalFace(int sector) { - if (sector < 1 || sector >= sectorVolumes.size()) { + if (sector < 1 || sector > sectorVolumes.size()) { System.err.println(String.format("Sector %d doesn't exist", sector)); throw new IndexOutOfBoundsException(); } From 97ba67727ea3874536fdea2c146e33f52a3e6b0a Mon Sep 17 00:00:00 2001 From: Nathan Harrison Date: Thu, 31 Aug 2017 09:12:54 -0400 Subject: [PATCH 20/29] Updated DCHB unit test --- .../src/dc/DCReconstructionTest.java | 4 +- .../unit-tests/src/events/TestEvent.java | 103 +++++++++--------- 2 files changed, 54 insertions(+), 53 deletions(-) diff --git a/validation/unit-tests/src/dc/DCReconstructionTest.java b/validation/unit-tests/src/dc/DCReconstructionTest.java index 1370cc81bc..43e01fdc04 100644 --- a/validation/unit-tests/src/dc/DCReconstructionTest.java +++ b/validation/unit-tests/src/dc/DCReconstructionTest.java @@ -27,10 +27,10 @@ public void testDCReconstruction() { assertEquals(testEvent.hasBank("HitBasedTrkg::HBTracks"), true); assertEquals(testEvent.getBank("HitBasedTrkg::HBTracks").rows(), 1); assertEquals(testEvent.getBank("HitBasedTrkg::HBTracks").getByte("q", 0), -1); - assertEquals(isWithinXPercent(10.0, testEvent.getBank("HitBasedTrkg::HBTracks").getFloat("p0_x", 0), 1.057), true); + assertEquals(isWithinXPercent(16.0, testEvent.getBank("HitBasedTrkg::HBTracks").getFloat("p0_x", 0), 1.057), true); assertEquals(testEvent.getBank("HitBasedTrkg::HBTracks").getFloat("p0_y", 0) > -0.1, true); assertEquals(testEvent.getBank("HitBasedTrkg::HBTracks").getFloat("p0_y", 0) < 0.1, true); - assertEquals(isWithinXPercent(10.0, testEvent.getBank("HitBasedTrkg::HBTracks").getFloat("p0_z", 0), 2.266), true); + assertEquals(isWithinXPercent(16.0, testEvent.getBank("HitBasedTrkg::HBTracks").getFloat("p0_z", 0), 2.266), true); DCTBEngine engineTB = new DCTBEngine(); engineTB.init(); diff --git a/validation/unit-tests/src/events/TestEvent.java b/validation/unit-tests/src/events/TestEvent.java index 486885a6e3..574dfa8938 100644 --- a/validation/unit-tests/src/events/TestEvent.java +++ b/validation/unit-tests/src/events/TestEvent.java @@ -21,6 +21,7 @@ public static HipoDataEvent getDCSector1ElectronEvent() { // (i.e. px=1.057, py=0, pz=2.266) // torus = -1.0 , solenoid = 0.0 // updated to use non-linear t2d + // updated to include mini-stagger config.setInt("run", 0, (int) 11); config.setInt("event", 0, (int) 1); @@ -36,7 +37,7 @@ public static HipoDataEvent getDCSector1ElectronEvent() { for(int i = 0; i < 37; i++) { DCtdc.setByte("sector", i, (byte) 1); DCtdc.setByte("order", i, (byte) 2); - if(i >= 19) DCtdc.setByte("layer", i, (byte) i); + if(i >= 32) DCtdc.setByte("layer", i, (byte) i); else DCtdc.setByte("layer", i, (byte) (i+1)); } @@ -58,63 +59,63 @@ public static HipoDataEvent getDCSector1ElectronEvent() { DCtdc.setShort("component", 15, (short) 58); DCtdc.setShort("component", 16, (short) 58); DCtdc.setShort("component", 17, (short) 58); - DCtdc.setShort("component", 18, (short) 58); - DCtdc.setShort("component", 19, (short) 57); - DCtdc.setShort("component", 20, (short) 58); - DCtdc.setShort("component", 21, (short) 57); - DCtdc.setShort("component", 22, (short) 58); - DCtdc.setShort("component", 23, (short) 57); - DCtdc.setShort("component", 24, (short) 58); + DCtdc.setShort("component", 18, (short) 57); + DCtdc.setShort("component", 19, (short) 58); + DCtdc.setShort("component", 20, (short) 57); + DCtdc.setShort("component", 21, (short) 58); + DCtdc.setShort("component", 22, (short) 57); + DCtdc.setShort("component", 23, (short) 58); + DCtdc.setShort("component", 24, (short) 51); DCtdc.setShort("component", 25, (short) 51); DCtdc.setShort("component", 26, (short) 51); DCtdc.setShort("component", 27, (short) 51); - DCtdc.setShort("component", 28, (short) 51); - DCtdc.setShort("component", 29, (short) 50); - DCtdc.setShort("component", 30, (short) 51); - DCtdc.setShort("component", 31, (short) 50); - DCtdc.setShort("component", 32, (short) 51); + DCtdc.setShort("component", 28, (short) 50); + DCtdc.setShort("component", 29, (short) 51); + DCtdc.setShort("component", 30, (short) 50); + DCtdc.setShort("component", 31, (short) 51); + DCtdc.setShort("component", 32, (short) 50); DCtdc.setShort("component", 33, (short) 50); DCtdc.setShort("component", 34, (short) 50); DCtdc.setShort("component", 35, (short) 50); DCtdc.setShort("component", 36, (short) 50); - - DCtdc.setInt("TDC", 0, (int) 77); - DCtdc.setInt("TDC", 1, (int) 70); - DCtdc.setInt("TDC", 2, (int) 77); - DCtdc.setInt("TDC", 3, (int) 68); - DCtdc.setInt("TDC", 4, (int) 69); - DCtdc.setInt("TDC", 5, (int) 66); - DCtdc.setInt("TDC", 6, (int) 30); - DCtdc.setInt("TDC", 7, (int) 126); - DCtdc.setInt("TDC", 8, (int) 30); - DCtdc.setInt("TDC", 9, (int) 130); - DCtdc.setInt("TDC", 10, (int) 31); - DCtdc.setInt("TDC", 11, (int) 119); - DCtdc.setInt("TDC", 12, (int) 5); - DCtdc.setInt("TDC", 13, (int) 264); - DCtdc.setInt("TDC", 14, (int) 53); - DCtdc.setInt("TDC", 15, (int) 180); - DCtdc.setInt("TDC", 16, (int) 113); - DCtdc.setInt("TDC", 17, (int) 108); - DCtdc.setInt("TDC", 18, (int) 360); - DCtdc.setInt("TDC", 19, (int) 332); - DCtdc.setInt("TDC", 20, (int) 39); - DCtdc.setInt("TDC", 21, (int) 200); - DCtdc.setInt("TDC", 22, (int) 110); - DCtdc.setInt("TDC", 23, (int) 121); - DCtdc.setInt("TDC", 24, (int) 200); - DCtdc.setInt("TDC", 25, (int) 84); - DCtdc.setInt("TDC", 26, (int) 269); - DCtdc.setInt("TDC", 27, (int) 366); - DCtdc.setInt("TDC", 28, (int) 28); - DCtdc.setInt("TDC", 29, (int) 506); - DCtdc.setInt("TDC", 30, (int) 168); - DCtdc.setInt("TDC", 31, (int) 160); - DCtdc.setInt("TDC", 32, (int) 578); - DCtdc.setInt("TDC", 33, (int) 40); - DCtdc.setInt("TDC", 34, (int) 353); - DCtdc.setInt("TDC", 35, (int) 318); - DCtdc.setInt("TDC", 36, (int) 63); + + DCtdc.setInt("TDC", 0, (int) 54); + DCtdc.setInt("TDC", 1, (int) 88); + DCtdc.setInt("TDC", 2, (int) 58); + DCtdc.setInt("TDC", 3, (int) 83); + DCtdc.setInt("TDC", 4, (int) 53); + DCtdc.setInt("TDC", 5, (int) 88); + DCtdc.setInt("TDC", 6, (int) 42); + DCtdc.setInt("TDC", 7, (int) 112); + DCtdc.setInt("TDC", 8, (int) 41); + DCtdc.setInt("TDC", 9, (int) 110); + DCtdc.setInt("TDC", 10, (int) 46); + DCtdc.setInt("TDC", 11, (int) 104); + DCtdc.setInt("TDC", 12, (int) 32); + DCtdc.setInt("TDC", 13, (int) 204); + DCtdc.setInt("TDC", 14, (int) 83); + DCtdc.setInt("TDC", 15, (int) 137); + DCtdc.setInt("TDC", 16, (int) 151); + DCtdc.setInt("TDC", 17, (int) 81); + DCtdc.setInt("TDC", 18, (int) 276); + DCtdc.setInt("TDC", 19, (int) 57); + DCtdc.setInt("TDC", 20, (int) 167); + DCtdc.setInt("TDC", 21, (int) 136); + DCtdc.setInt("TDC", 22, (int) 94); + DCtdc.setInt("TDC", 23, (int) 225); + DCtdc.setInt("TDC", 24, (int) 110); + DCtdc.setInt("TDC", 25, (int) 190); + DCtdc.setInt("TDC", 26, (int) 334); + DCtdc.setInt("TDC", 27, (int) 2); + DCtdc.setInt("TDC", 28, (int) 354); + DCtdc.setInt("TDC", 29, (int) 188); + DCtdc.setInt("TDC", 30, (int) 158); + DCtdc.setInt("TDC", 31, (int) 424); + DCtdc.setInt("TDC", 32, (int) 679); + DCtdc.setInt("TDC", 33, (int) 37); + DCtdc.setInt("TDC", 34, (int) 312); + DCtdc.setInt("TDC", 35, (int) 260); + DCtdc.setInt("TDC", 36, (int) 68); testEvent.appendBank(config); testEvent.appendBank(DCtdc); From a555445a991a22ab467b8ab4080821835402819e Mon Sep 17 00:00:00 2001 From: raffaelladevita Date: Thu, 31 Aug 2017 19:03:59 +0200 Subject: [PATCH 21/29] LTCC adc in hipo bank defined based on adc from evio bank (gemc 4a.2.1) and updated FT reco with hits banks --- .../java/org/jlab/io/hipo/EvioHipoEvent.java | 40 ++++++++++++++++++- .../main/java/org/jlab/rec/ft/FTEBEngine.java | 18 ++++++--- .../java/org/jlab/rec/ft/FTEventBuilder.java | 2 +- .../jlab/rec/ft/cal/FTCALConstantsLoader.java | 19 +++++---- .../java/org/jlab/rec/ft/cal/FTCALHit.java | 2 +- .../jlab/rec/ft/cal/FTCALReconstruction.java | 1 + .../rec/ft/hodo/FTHODOReconstruction.java | 1 + 7 files changed, 68 insertions(+), 15 deletions(-) diff --git a/common-tools/clas-io/src/main/java/org/jlab/io/hipo/EvioHipoEvent.java b/common-tools/clas-io/src/main/java/org/jlab/io/hipo/EvioHipoEvent.java index 76735f7ef0..bdfcfff9ee 100644 --- a/common-tools/clas-io/src/main/java/org/jlab/io/hipo/EvioHipoEvent.java +++ b/common-tools/clas-io/src/main/java/org/jlab/io/hipo/EvioHipoEvent.java @@ -135,7 +135,7 @@ public void fillHipoEventLTCC(HipoDataEvent hipoEvent, EvioDataEvent evioEvent){ hipoBank.setByte("sector", i, (byte) evioBank.getInt("sector",i)); hipoBank.setByte("layer", i, (byte) evioBank.getInt("side",i)); hipoBank.setShort("component", i, (short) evioBank.getInt("segment",i)); - hipoBank.setInt("ADC", i, evioBank.getInt("npheD", i)*100); + hipoBank.setInt("ADC", i, evioBank.getInt("adc", i)); hipoBank.setFloat("time", i, (float) evioBank.getDouble("time",i)); hipoBank.setShort("ped", i, (short) 0); } @@ -481,6 +481,23 @@ public void fillHipoEventECAL(HipoDataEvent hipoEvent, EvioDataEvent evioEvent){ } public void fillHipoEventGenPart(HipoDataEvent hipoEvent, EvioDataEvent evioEvent){ +// if(evioEvent.hasBank("Header::true")==true){ +// EvioDataBank evioBank = (EvioDataBank) evioEvent.getBank("Header::true"); +// HipoDataBank hipoBank = (HipoDataBank) hipoEvent.createBank("MC::Event", evioBank.rows()); +// for(int i = 0; i < evioBank.rows(); i++){ +// hipoBank.setShort("npart", i, (short) evioBank.getDouble("nParticles", i)); +// hipoBank.setFloat("pbeam", i, (float) (evioBank.getDouble("beamPol", i)) ); +// hipoBank.setShort("atarget", i, (short) (evioBank.getDouble("nNucleons", i)) ); +// hipoBank.setShort("ztarget", i, (short) (evioBank.getDouble("nProtons", i)) ); +// hipoBank.setFloat("ptarget", i, (float) (evioBank.getDouble("targetPol", i)) ); +// hipoBank.setShort("btype", i, (short) (evioBank.getDouble("x", i)) ); +// hipoBank.setFloat("ebeam", i, (float) (evioBank.getDouble("y", i)) ); +// hipoBank.setShort("targetid", i, (short) (evioBank.getDouble("w", i)) ); +// hipoBank.setShort("processid", i, (short) (evioBank.getDouble("Q2", i)) ); +// hipoBank.setFloat("weight", i, (float) (evioBank.getDouble("nu", i)) ); +// } +// if(evioBank.rows()>0) hipoEvent.appendBanks(hipoBank); +// } if(evioEvent.hasBank("GenPart::true")==true){ EvioDataBank evioBank = (EvioDataBank) evioEvent.getBank("GenPart::true"); HipoDataBank hipoBank = (HipoDataBank) hipoEvent.createBank("MC::Particle", evioBank.rows()); @@ -495,6 +512,27 @@ public void fillHipoEventGenPart(HipoDataEvent hipoEvent, EvioDataEvent evioEven } if(evioBank.rows()>0) hipoEvent.appendBanks(hipoBank); } +// if(evioEvent.hasBank("LundPart::true")==true){ +// EvioDataBank evioBank = (EvioDataBank) evioEvent.getBank("LundPart::true"); +// HipoDataBank hipoBank = (HipoDataBank) hipoEvent.createBank("MC::Lund", evioBank.rows()); +// for(int i = 0; i < evioBank.rows(); i++){ +// hipoBank.setByte("index", i, (byte) evioBank.getInt("index", i)); +// hipoBank.setByte("charge", i, (byte) evioBank.getInt("charge", i)); +// hipoBank.setByte("type", i, (byte) evioBank.getInt("type", i)); +// hipoBank.setInt("pid", i, evioBank.getInt("pid", i)); +// hipoBank.setByte("parent", i, (byte) evioBank.getInt("parent", i)); +// hipoBank.setByte("daughter", i, (byte) evioBank.getInt("daughter", i)); +// hipoBank.setFloat("px", i, (float) (evioBank.getDouble("px", i)/1000.0) ); +// hipoBank.setFloat("py", i, (float) (evioBank.getDouble("py", i)/1000.0) ); +// hipoBank.setFloat("pz", i, (float) (evioBank.getDouble("pz", i)/1000.0) ); +// hipoBank.setFloat("vx", i, (float) (evioBank.getDouble("vx", i)) ); +// hipoBank.setFloat("vy", i, (float) (evioBank.getDouble("vy", i)) ); +// hipoBank.setFloat("vz", i, (float) (evioBank.getDouble("vz", i)) ); +// hipoBank.setFloat("energy", i, (float) (evioBank.getDouble("energy", i)) ); +// hipoBank.setFloat("mass", i, (float) (evioBank.getDouble("mass", i)) ); +// } +// if(evioBank.rows()>0) hipoEvent.appendBanks(hipoBank); +// } } public HipoDataBank createHeaderBank(HipoDataEvent event, int nrun, int nevent, float torus, float solenoid){ diff --git a/reconstruction/ft/src/main/java/org/jlab/rec/ft/FTEBEngine.java b/reconstruction/ft/src/main/java/org/jlab/rec/ft/FTEBEngine.java index 94c478090d..e8d1dc2328 100644 --- a/reconstruction/ft/src/main/java/org/jlab/rec/ft/FTEBEngine.java +++ b/reconstruction/ft/src/main/java/org/jlab/rec/ft/FTEBEngine.java @@ -13,6 +13,7 @@ import org.jlab.clas.reco.ReconstructionEngine; import org.jlab.geom.prim.Vector3D; import org.jlab.groot.data.H1F; +import org.jlab.groot.data.H2F; import org.jlab.groot.graphics.EmbeddedCanvas; import org.jlab.io.base.DataBank; import org.jlab.io.base.DataEvent; @@ -63,12 +64,13 @@ public static void main (String arg[]) throws IOException { en.init(); // String input = "/Users/devita/Work/clas12/simulations/tests/detectors/clas12/ft/elec_nofield_header.evio"; // EvioSource reader = new EvioSource(); - String input = "/Users/devita/Work/clas12/simulations/tests/detectors.ftm/clas12/ft/test.hipo"; + String input = "/Users/devita/Work/clas12/simulations/tests/clas12Tags/4a.2.1/gamma.hipo"; +// String input = "/Users/devita/out_gemc_10.hipo"; HipoDataSource reader = new HipoDataSource(); reader.open(input); // initialize histos - H1F h1 = new H1F("Cluster Energy",100, 0.,5.); + H1F h1 = new H1F("Cluster Energy",100, 0.,8.); h1.setOptStat(Integer.parseInt("1111")); h1.setTitleX("Cluster Energy (GeV)"); H1F h2 = new H1F("Energy Resolution",100, -1, 1); h2.setOptStat(Integer.parseInt("1111")); h2.setTitleX("Energy Resolution(GeV)"); @@ -76,8 +78,10 @@ public static void main (String arg[]) throws IOException { h3.setOptStat(Integer.parseInt("1111")); h3.setTitleX("Theta Resolution(deg)"); H1F h4 = new H1F("Phi Resolution",100, -10, 10); h4.setOptStat(Integer.parseInt("1111")); h4.setTitleX("Phi Resolution(deg)"); - H1F h5 = new H1F("Time Resolution",100, -10, 10); + H1F h5 = new H1F("Time Resolution",100, -2, 2); h5.setOptStat(Integer.parseInt("1111")); h5.setTitleX("Time Resolution(ns)"); + H2F h6 = new H2F("Cluster Energy",100, 2.,5.,100, -0.5, 0.5); + h6.setTitleX("Theta"); h6.setTitleY("Energy Resolution(GeV)"); while(reader.hasEvent()){ DataEvent event = (DataEvent) reader.getNextEvent(); @@ -98,6 +102,7 @@ public static void main (String arg[]) throws IOException { h3.fill(Math.toDegrees(part.theta()-gen.getParticle("[11]").theta())); h4.fill(Math.toDegrees(part.phi()-gen.getParticle("[11]").phi())); h5.fill(bank.getDouble("Time",i)); + h6.fill(bank.getDouble("Energy",i),bank.getDouble("Energy",i)-gen.getParticle("[11]").vector().p()); } } } @@ -113,7 +118,9 @@ public static void main (String arg[]) throws IOException { Vector3D part = new Vector3D(bank.getFloat("cx",i),bank.getFloat("cy",i),bank.getFloat("cz",i)); h3.fill(Math.toDegrees(part.theta()-gen.getGeneratedParticle(0).theta())); h4.fill(Math.toDegrees(part.phi()-gen.getGeneratedParticle(0).phi())); - h5.fill(bank.getFloat("time",i)); + h5.fill(bank.getFloat("time",i)-124.25); +// h6.fill(Math.toDegrees(gen.getGeneratedParticle(0).theta()),bank.getFloat("energy",i)-gen.getGeneratedParticle(0).vector().p()); + h6.fill(gen.getGeneratedParticle(0).vector().p(),bank.getFloat("energy",i)-gen.getGeneratedParticle(0).vector().p()); } } @@ -127,7 +134,8 @@ public static void main (String arg[]) throws IOException { canvas.cd(1); canvas.draw(h2); canvas.cd(2); canvas.draw(h3); canvas.cd(3); canvas.draw(h4); - canvas.cd(5); canvas.draw(h5); + canvas.cd(4); canvas.draw(h5); + canvas.cd(5); canvas.draw(h6); frame.add(canvas); frame.setLocationRelativeTo(null); frame.setVisible(true); diff --git a/reconstruction/ft/src/main/java/org/jlab/rec/ft/FTEventBuilder.java b/reconstruction/ft/src/main/java/org/jlab/rec/ft/FTEventBuilder.java index 9f44c15774..e4841c6d80 100644 --- a/reconstruction/ft/src/main/java/org/jlab/rec/ft/FTEventBuilder.java +++ b/reconstruction/ft/src/main/java/org/jlab/rec/ft/FTEventBuilder.java @@ -122,7 +122,7 @@ public List initFTparticles(List responses) { track.setField(this.solenoidField); track.setEnergy(responses.get(i).getEnergy()); track.setPosition(responses.get(i).getPosition()); - track.setTime(responses.get(i).getTime()-responses.get(i).getPosition().mag()/297.); + track.setTime(responses.get(i).getTime()-responses.get(i).getPosition().mag()/299.7); track.setCalorimeterIndex(i); track.setHodoscopeIndex(-1); track.setTrackerIndex(-1); diff --git a/reconstruction/ft/src/main/java/org/jlab/rec/ft/cal/FTCALConstantsLoader.java b/reconstruction/ft/src/main/java/org/jlab/rec/ft/cal/FTCALConstantsLoader.java index d1b8602f96..7cf946158e 100644 --- a/reconstruction/ft/src/main/java/org/jlab/rec/ft/cal/FTCALConstantsLoader.java +++ b/reconstruction/ft/src/main/java/org/jlab/rec/ft/cal/FTCALConstantsLoader.java @@ -42,7 +42,7 @@ public FTCALConstantsLoader() { // RECONSTRUCTION CONSTANTS public static final double TIMECONVFAC = 100./4.; // conversion factor from TDC channel to time (ns^-1) - public static final double VEFF = 150.; // conversion factor from TDC channel to time (ns^-1) + public static final double VEFF = 150.; // speed of light in the scintillator mm/ns // CLUSTER RECONSTRUCTION PARAMETERS public static double seed_min_energy; // minimum cluster reconstructed energy @@ -146,7 +146,7 @@ public static synchronized void Load(int runno, String var) { time_window = itime; w0 = iw0; depth_z = idepth; - if(debugMode>=1) System.out.println("cluster table: " + time_window + " " + cluster_min_energy + " " + cluster_min_size); + if(debugMode>=1) System.out.println("cluster table: " + time_window + " " + cluster_min_energy + " " + cluster_min_size + " " + depth_z); } // 5) Energy Corrections : ECORR for(int i =0; i< dbprovider.length("/calibration/ft/ftcal/ecorr/ecorr0"); i++) { @@ -161,11 +161,16 @@ public static synchronized void Load(int runno, String var) { energy_corr[0] = ecorr0; energy_corr[1] = ecorr1; energy_corr[2] = ecorr2; - energy_corr[0] = 0.0507040; - energy_corr[1] = 0.0782326; - energy_corr[2] = -0.00446163; - energy_corr[3] = 0.000169353; - energy_corr[4] = 0; +/* energy_corr[0] = 0.0426930; + energy_corr[1] = 0.0907798; + energy_corr[2] = -0.0130983; + energy_corr[3] = 0.00162423; + energy_corr[4] = -0.0000745987;*/ + energy_corr[0] = 0.0587502; + energy_corr[1] = 0.0881192; + energy_corr[2] = -0.0120113; + energy_corr[3] = 0.00131961; + energy_corr[4] = -0.0000550674; if(debugMode>=1) System.out.println("energy correction: " + ecorr0 + " " + ecorr1 + " " + ecorr2); } // 6) Theta Corrections : THETACORR diff --git a/reconstruction/ft/src/main/java/org/jlab/rec/ft/cal/FTCALHit.java b/reconstruction/ft/src/main/java/org/jlab/rec/ft/cal/FTCALHit.java index 13d2803846..e92d2cb27f 100644 --- a/reconstruction/ft/src/main/java/org/jlab/rec/ft/cal/FTCALHit.java +++ b/reconstruction/ft/src/main/java/org/jlab/rec/ft/cal/FTCALHit.java @@ -34,11 +34,11 @@ public FTCALHit(int i, int ICOMPONENT, int ADC, float time) { this._IDY = ((int) ICOMPONENT/22) + 1; this._IDX = ICOMPONENT + 1 - (this._IDY-1)*22; this._ADC = ADC; - this._Time = time; this.set_Edep(((double) this._ADC)*FTCALConstantsLoader.fadc_to_charge[0][0][ICOMPONENT-1] *FTCALConstantsLoader.mips_energy[0][0][ICOMPONENT-1] /FTCALConstantsLoader.mips_charge[0][0][ICOMPONENT-1]/1000.); + this.set_Time(time -(FTCALConstantsLoader.CRYS_LENGTH-FTCALConstantsLoader.depth_z)/FTCALConstantsLoader.VEFF-FTCALConstantsLoader.time_offset[0][0][ICOMPONENT-1]); // if(this.get_Edep()>0.1) System.out.println(ICOMPONENT + " " + this._TDC + " " + // FTCALConstantsLoader.TIMECONVFAC + " " + FTCALConstantsLoader.time_offset[0][0][ICOMPONENT-1] + " " + // this.get_Time()); diff --git a/reconstruction/ft/src/main/java/org/jlab/rec/ft/cal/FTCALReconstruction.java b/reconstruction/ft/src/main/java/org/jlab/rec/ft/cal/FTCALReconstruction.java index 3bfd4d436b..b6f9cff5f6 100644 --- a/reconstruction/ft/src/main/java/org/jlab/rec/ft/cal/FTCALReconstruction.java +++ b/reconstruction/ft/src/main/java/org/jlab/rec/ft/cal/FTCALReconstruction.java @@ -130,6 +130,7 @@ private void writeHipoBanks(DataEvent event, List hits, List hits, List Date: Thu, 31 Aug 2017 15:09:04 -0400 Subject: [PATCH 22/29] implement status work for hits and clusters --- .../org/jlab/rec/dc/banks/RecoBankWriter.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/RecoBankWriter.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/RecoBankWriter.java index daa414ff34..e623828724 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/RecoBankWriter.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/RecoBankWriter.java @@ -62,7 +62,7 @@ public DataBank fillHBHitsBank(DataEvent event, List hitlist) { continue; } bank.setShort("id", i, (short) hitlist.get(i).get_Id()); - bank.setShort("status", i, (short) 1); + bank.setShort("status", i, (short) 0); bank.setByte("superlayer", i, (byte) hitlist.get(i).get_Superlayer()); bank.setByte("layer", i, (byte) hitlist.get(i).get_Layer()); bank.setByte("sector", i, (byte) hitlist.get(i).get_Sector()); @@ -105,7 +105,10 @@ public DataBank fillHBClustersBank(DataEvent event, List cluslist double chi2 = 0; bank.setShort("id", i, (short) cluslist.get(i).get_Id()); - bank.setShort("status", i, (short) 1); + int status = 0; + if(cluslist.get(i).size()<6) + status = 1; + bank.setShort("status", i, (short) status); bank.setByte("superlayer", i, (byte) cluslist.get(i).get_Superlayer()); bank.setByte("sector", i, (byte) cluslist.get(i).get_Sector()); @@ -257,7 +260,7 @@ public DataBank fillHBCrossesBank(DataEvent event, List crosslist) { for (int i = 0; i < crosslist.size(); i++) { if (crosslist.get(i).get_Id() != -1) { bank.setShort("id", index, (short) crosslist.get(i).get_Id()); - bank.setShort("status", index, (short) 1); + bank.setShort("status", index, (short) 0); bank.setByte("sector", index, (byte) crosslist.get(i).get_Sector()); bank.setByte("region", index, (byte) crosslist.get(i).get_Region()); bank.setFloat("x", index, (float) crosslist.get(i).get_Point().x()); @@ -343,7 +346,7 @@ public DataBank fillTBHitsBank(DataEvent event, List hitlist) { continue; } bank.setShort("id", i, (short) hitlist.get(i).get_Id()); - bank.setShort("status", i, (short) 1); + bank.setShort("status", i, (short) hitlist.get(i).get_QualityFac()); bank.setByte("superlayer", i, (byte) hitlist.get(i).get_Superlayer()); bank.setByte("layer", i, (byte) hitlist.get(i).get_Layer()); bank.setByte("sector", i, (byte) hitlist.get(i).get_Sector()); @@ -391,7 +394,10 @@ public DataBank fillTBClustersBank(DataEvent event, List cluslist double chi2 = 0; bank.setShort("id", i, (short) cluslist.get(i).get_Id()); - bank.setShort("status", i, (short) 1); + int status =0; + if(cluslist.get(i).size()<6) + status = 1; + bank.setShort("status", i, (short) 0); bank.setByte("superlayer", i, (byte) cluslist.get(i).get_Superlayer()); bank.setByte("sector", i, (byte) cluslist.get(i).get_Sector()); @@ -451,7 +457,7 @@ public DataBank fillTBSegmentsBank(DataEvent event, List seglist) { double chi2 = 0; bank.setShort("id", i, (short) seglist.get(i).get_Id()); - bank.setShort("status", i, (short) 1); + bank.setShort("status", i, (short) 0); bank.setByte("superlayer", i, (byte) seglist.get(i).get_Superlayer()); bank.setByte("sector", i, (byte) seglist.get(i).get_Sector()); FittedCluster cls = seglist.get(i).get_fittedCluster(); From 423e50b42881232825170a6e8fd2e5dac5c59df3 Mon Sep 17 00:00:00 2001 From: Veronique Ziegler Date: Thu, 31 Aug 2017 15:17:19 -0400 Subject: [PATCH 23/29] read beta from TOF --- .../java/org/jlab/rec/dc/banks/HitReader.java | 43 ++++++++++++++++++- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/HitReader.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/HitReader.java index 695d95f8a9..22b12c5120 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/HitReader.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/HitReader.java @@ -201,21 +201,60 @@ public void read_HBHits(DataEvent event) { hit.set_LeftRightAmb(LR[i]); hit.set_TrkgStatus(0); hit.set_TimeToDistance(1.0, B[i]); + hit.set_QualityFac(0); //hit.set_Doca(hit.get_TimeToDistance()); if (hit.get_Doca() > hit.get_CellSize() || hit.get_Time()>CCDBConstants.getTMAXSUPERLAYER()[hit.get_Sector()-1][hit.get_Superlayer()-1]) { //this.fix_TimeToDistance(this.get_CellSize()); hit.set_OutOfTimeFlag(true); - } + hit.set_QualityFac(2); + } + if(hit.get_Time()<0) + hit.set_QualityFac(1); + hit.set_DocaErr(hit.get_PosErr(B[i])); hit.set_AssociatedClusterID(clusterID[i]); hit.set_AssociatedHBTrackID(trkID[i]); + hit.set_Beta(this.readBeta(event, trkID[i])); hits.add(hit); - + } this.set_HBHits(hits); } + + private double[] betaArray = new double[3]; + public double readBeta(DataEvent event, int trkId) { + double _beta =1.0; + betaArray[0]=-1; + betaArray[1]=-1; + betaArray[2]=-1; + if (event.hasBank("RUN::config") == false) + return 1.0; + DataBank bank = event.getBank("RUN::config"); + double startTime = bank.getFloat("startTime", 0); + + if (event.hasBank("FTOF::hits") == false) + return 1.0; + + DataBank bankftof = event.getBank("FTOF::hits"); + int rows = bank.rows(); + for (int i = 0; i < rows; i++) { + if(bankftof.getShort("trackid", i)==trkId) { + betaArray[bankftof.getByte("layer", i)-1]= bankftof.getFloat("pathLength", i)/(bankftof.getFloat("time", i)-startTime)/30.0 ; + } + } + if(betaArray[0]==-1 && betaArray[1]==-1 && betaArray[2]!=-1) + _beta = betaArray[2]; + if(betaArray[0]!=-1 && betaArray[1]==-1) + _beta = betaArray[0]; + if(betaArray[1]!=-1) + _beta = betaArray[1]; + + return _beta; + } + + private double[] get_T0(int sector, int superlayer, int layer, int wire, boolean applyCorr) { double[] T0Corr = new double[2]; From 10d37b93d42e95f5eb51374fa2cbe3ca9fa741bb Mon Sep 17 00:00:00 2001 From: Veronique Ziegler Date: Thu, 31 Aug 2017 16:11:36 -0400 Subject: [PATCH 24/29] Swim direction implemented for plane stopper --- .../java/org/jlab/rec/dc/trajectory/DCSwimmer.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/trajectory/DCSwimmer.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/trajectory/DCSwimmer.java index a43e373f23..5fd06684b5 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/trajectory/DCSwimmer.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/trajectory/DCSwimmer.java @@ -410,15 +410,17 @@ private class PlaneBoundarySwimStopper implements IStopper { private double _d; private Vector3D _n; private double _dist2plane; + private int _dir; /** * A swim stopper that will stop if the boundary of a plane is crossed * * @param maxR the max radial coordinate in meters. */ - private PlaneBoundarySwimStopper(double d, Vector3D n) { + private PlaneBoundarySwimStopper(double d, Vector3D n, int dir) { // DC reconstruction units are cm. Swimmer units are m. Hence scale by 100 _d = d; _n = n; + _dir = dir; } @Override @@ -427,8 +429,11 @@ public boolean stopIntegration(double t, double[] y) { double accuracy = 20e-6; //20 microns //System.out.println(" dist "+dtrk*100+ " state "+y[0]*100+", "+y[1]*100+" , "+y[2]*100); - + if(_dir<0) { return dtrk<_d; + } else { + return dtrk>_d; + } } @@ -449,12 +454,12 @@ public void setFinalT(double finalPathLength) { } } - public double[] SwimToPlaneBoundary(double d_cm, Vector3D n) { + public double[] SwimToPlaneBoundary(double d_cm, Vector3D n, int dir) { double[] value = new double[8]; // using adaptive stepsize double d= d_cm/100; - PlaneBoundarySwimStopper stopper = new PlaneBoundarySwimStopper(d,n); + PlaneBoundarySwimStopper stopper = new PlaneBoundarySwimStopper(d,n, dir); SwimTrajectory st = labswimmer.swim(_charge, _x0, _y0, _z0, _pTot, _theta, _phi, stopper, _maxPathLength, Constants.SWIMSTEPSIZE, 0.0005); st.computeBDL(prob); From a36403b6a645fac47e54ed4dd1c8e98f35b16b58 Mon Sep 17 00:00:00 2001 From: Veronique Ziegler Date: Thu, 31 Aug 2017 16:12:24 -0400 Subject: [PATCH 25/29] Read TB hits and get the beta from TOF --- .../java/org/jlab/rec/dc/banks/HitReader.java | 89 ++++++++++++++++++- 1 file changed, 88 insertions(+), 1 deletion(-) diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/HitReader.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/HitReader.java index 22b12c5120..bfd2b2f97d 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/HitReader.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/banks/HitReader.java @@ -29,6 +29,7 @@ public class HitReader { private List _DCHits; private List _HBHits; //hit-based tracking hit information + private List _TBHits; //time-based tracking hit information /** * @@ -63,6 +64,23 @@ public List get_HBHits() { public void set_HBHits(List _HBHits) { this._HBHits = _HBHits; } + + /** + * + * @return list of DCTB hits + */ + public List get_TBHits() { + return _TBHits; + } + + /** + * sets the list of HB DC hits + * + * @param _TBHits list of DC hits + */ + public void set_TBHits(List _TBHits) { + this._TBHits = _TBHits; + } /** * reads the hits using clas-io methods to get the EvioBank for the DC and @@ -214,13 +232,82 @@ public void read_HBHits(DataEvent event) { hit.set_DocaErr(hit.get_PosErr(B[i])); hit.set_AssociatedClusterID(clusterID[i]); hit.set_AssociatedHBTrackID(trkID[i]); - hit.set_Beta(this.readBeta(event, trkID[i])); hits.add(hit); } this.set_HBHits(hits); } + public void read_TBHits(DataEvent event) { + + if (event.hasBank("TimeBasedTrkg::TBHits") == false) { + //System.err.println("there is no HB dc bank "); + _TBHits = new ArrayList(); + return; + } + + DataBank bank = event.getBank("TimeBasedTrkg::TBHits"); + int rows = bank.rows(); + + int[] id = new int[rows]; + int[] sector = new int[rows]; + int[] slayer = new int[rows]; + int[] layer = new int[rows]; + int[] wire = new int[rows]; + double[] time = new double[rows]; + int[] LR = new int[rows]; + double[] B = new double[rows]; + int[] clusterID = new int[rows]; + int[] trkID = new int[rows]; + + for (int i = 0; i < rows; i++) { + sector[i] = bank.getByte("sector", i); + slayer[i] = bank.getByte("superlayer", i); + layer[i] = bank.getByte("layer", i); + wire[i] = bank.getShort("wire", i); + time[i] = bank.getFloat("time", i); + id[i] = bank.getShort("id", i); + LR[i] = bank.getByte("LR", i); + B[i] = bank.getFloat("B", i); + clusterID[i] = bank.getShort("clusterID", i); + trkID[i] = bank.getByte("trkID", i); + } + + int size = layer.length; + + List hits = new ArrayList(); + for (int i = 0; i < size; i++) { + //use only hits that have been fit to a track + if (clusterID[i] == -1) { + continue; + } + + FittedHit hit = new FittedHit(sector[i], slayer[i], layer[i], wire[i], time[i], 0, B[i], id[i]); + hit.set_B(B[i]); +// System.out.println("getting the hit time: tdc "+time[i]+" "+Constants.getT0()+" b "+B[i]+" t0 "+this.get_T0(sector[i], slayer[i], layer[i], wire[i], Constants.getT0())[0]); + hit.set_LeftRightAmb(LR[i]); + hit.set_TrkgStatus(0); + hit.set_TimeToDistance(1.0, B[i]); + hit.set_QualityFac(0); + //hit.set_Doca(hit.get_TimeToDistance()); + if (hit.get_Doca() > hit.get_CellSize() || hit.get_Time()>CCDBConstants.getTMAXSUPERLAYER()[hit.get_Sector()-1][hit.get_Superlayer()-1]) { + //this.fix_TimeToDistance(this.get_CellSize()); + hit.set_OutOfTimeFlag(true); + hit.set_QualityFac(2); + } + if(hit.get_Time()<0) + hit.set_QualityFac(1); + + hit.set_DocaErr(hit.get_PosErr(B[i])); + hit.set_AssociatedClusterID(clusterID[i]); + hit.set_AssociatedTBTrackID(trkID[i]); + hit.set_Beta(this.readBeta(event, trkID[i])); + hits.add(hit); + + } + + this.set_TBHits(hits); + } private double[] betaArray = new double[3]; From 908ea77ff14636fc1587438f6f401a5a2ac53bb2 Mon Sep 17 00:00:00 2001 From: Veronique Ziegler Date: Thu, 31 Aug 2017 16:12:49 -0400 Subject: [PATCH 26/29] Assign beta to hit using TOF --- .../main/java/org/jlab/rec/dc/hit/FittedHit.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/hit/FittedHit.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/hit/FittedHit.java index cd7c46a3aa..35b6b21b70 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/hit/FittedHit.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/hit/FittedHit.java @@ -4,7 +4,6 @@ import org.jlab.rec.dc.Constants; import org.jlab.rec.dc.GeometryLoader; import org.jlab.rec.dc.timetodistance.TimeToDistanceEstimator; -import org.jlab.rec.dc.trajectory.DCSwimmer; import org.jlab.geom.prim.Point3D; /** * A hit that was used in a fitted cluster. It extends the Hit class and @@ -47,7 +46,7 @@ public FittedHit(int sector, int superlayer, int layer, int wire, private double _ClusFitDoca = -1; private double _TrkFitDoca = -1; private double _TimeToDistance = 0; - + private double _Beta = -1; /** * * @return the local hit x-position in the local superlayer coordinate @@ -262,7 +261,7 @@ public void set_TimeToDistance(double cosTrkAngle, double B) { if (useTimeToDistanceGrid == true) { double alpha = Math.acos(cosTrkAngle); double ralpha = this.reducedAngle(alpha); - double beta = 1; + double beta = this.get_Beta(); double x = this.get_ClusFitDoca(); TimeToDistanceEstimator tde = new TimeToDistanceEstimator(); double deltatime_beta = 0; @@ -539,4 +538,12 @@ public Point3D getCrossDirIntersWire() { public void setCrossDirIntersWire(Point3D CrossDirIntersWire) { this.CrossDirIntersWire = CrossDirIntersWire; } + + public double get_Beta() { + return _Beta; + } + + public void set_Beta(double beta) { + _Beta = beta; + } } From b2d3e1bef361fab07968ea0f3cf0edb5a8713336 Mon Sep 17 00:00:00 2001 From: Veronique Ziegler Date: Thu, 31 Aug 2017 16:14:08 -0400 Subject: [PATCH 27/29] Added capability to run a second pass after the beta from TOF is used in tracking. Bank overwrite not yet implemented. --- .../main/java/org/jlab/service/dc/DCTBEngine.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/reconstruction/dc/src/main/java/org/jlab/service/dc/DCTBEngine.java b/reconstruction/dc/src/main/java/org/jlab/service/dc/DCTBEngine.java index 07289e8978..ca89dd525a 100644 --- a/reconstruction/dc/src/main/java/org/jlab/service/dc/DCTBEngine.java +++ b/reconstruction/dc/src/main/java/org/jlab/service/dc/DCTBEngine.java @@ -36,9 +36,10 @@ public boolean init() { @Override public boolean processDataEvent(DataEvent event) { + //System.out.println(" RUNNING TIME BASED...................................."); ClusterFitter cf = new ClusterFitter(); - ClusterCleanerUtilities ct = new ClusterCleanerUtilities(); + ClusterCleanerUtilities ct = new ClusterCleanerUtilities(); List fhits = new ArrayList(); List clusters = new ArrayList(); @@ -51,10 +52,15 @@ public boolean processDataEvent(DataEvent event) { HitReader hitRead = new HitReader(); hitRead.read_HBHits(event); - + hitRead.read_TBHits(event); List hits = new ArrayList(); //I) get the hits - hits = hitRead.get_HBHits(); + if(hitRead.get_TBHits().size()==0) { + hits = hitRead.get_HBHits(); + + } else { + hits = hitRead.get_TBHits(); + } //II) process the hits From ff4e989c1a11755c2df4bcb88b6d012053d33616 Mon Sep 17 00:00:00 2001 From: Veronique Ziegler Date: Thu, 31 Aug 2017 16:24:47 -0400 Subject: [PATCH 28/29] Swim to plane modification to take direction as argument. Remove unused import. --- .../main/java/org/jlab/rec/dc/track/TrackCandListFinder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/TrackCandListFinder.java b/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/TrackCandListFinder.java index f3b95b47e8..fbadea479d 100644 --- a/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/TrackCandListFinder.java +++ b/reconstruction/dc/src/main/java/org/jlab/rec/dc/track/TrackCandListFinder.java @@ -16,7 +16,7 @@ import org.jlab.rec.dc.trajectory.StateVec; import org.jlab.rec.dc.trajectory.Trajectory; import org.jlab.rec.dc.trajectory.TrajectoryFinder; -import org.jlab.rec.dc.trajectory.Vertex; +//import org.jlab.rec.dc.trajectory.Vertex; import trackfitter.fitter.LineFitPars; import trackfitter.fitter.LineFitter; @@ -320,7 +320,7 @@ public void setTrackPars(Track cand, Trajectory traj, TrajectoryFinder trjFind, double x_n = Math.cos(theta_n) ; double y_n = Math.sin(theta_n) ; //System.out.println("sector "+sector+" xn "+x_n+" yn "+y_n); - double[] Vt = dcSwim.SwimToPlaneBoundary(0, new Vector3D(x_n, y_n, 0)); + double[] Vt = dcSwim.SwimToPlaneBoundary(0, new Vector3D(x_n, y_n, 0), -1); // System.out.println("Swim to fixed plane "+newVtx[0]+", "+newVtx[1]+", "+newVtx[2]+"; "+newVtx[3]+", "+newVtx[4]+", "+newVtx[5]); /* Vt[0]=newVtx[0]; From 44a66412da8db6dde92db383570fa068d8acd37c Mon Sep 17 00:00:00 2001 From: Veronique Ziegler Date: Thu, 31 Aug 2017 16:39:55 -0400 Subject: [PATCH 29/29] Fixed cluster index for BMT cosmics reconstruction. Cluster2 forming a cross no longer used for BMT cross. --- .../main/java/org/jlab/rec/cvt/track/TrackCandListFinder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/TrackCandListFinder.java b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/TrackCandListFinder.java index b1e51f0987..fd66b235c6 100644 --- a/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/TrackCandListFinder.java +++ b/reconstruction/cvt/src/main/java/org/jlab/rec/cvt/track/TrackCandListFinder.java @@ -807,7 +807,7 @@ public ArrayList matchTrackToMM(List MMCrosses, StraightTrack thec for (Cross Ccross : MatchedMMCrossCDet) { for (Cross Zcross : MatchedMMCrossZDet) { - if ((Ccross.get_Cluster2().get_Layer() - Zcross.get_Cluster1().get_Layer()) == 1 && (Ccross.get_Cluster2().get_Sector() == Zcross.get_Cluster1().get_Sector())) { + if ((Ccross.get_Cluster1().get_Layer() - Zcross.get_Cluster1().get_Layer()) == 1 && (Ccross.get_Cluster1().get_Sector() == Zcross.get_Cluster1().get_Sector())) { Ccross.set_MatchedZCross(Zcross); Zcross.set_MatchedCCross(Ccross); }