11package org .hps .analysis .tuple ;
22
3+ //import hep.physics.vec.BasicHep3Vector;
4+ //import hep.physics.vec.Hep3Vector;
5+ //import hep.physics.vec.VecOp;
6+
37import java .util .ArrayList ;
48import java .util .Arrays ;
59import java .util .List ;
10+ //import java.util.Map;
11+ //import java.util.Map.Entry;
12+
13+ //import org.hps.analysis.MC.MCFullDetectorTruth;
14+ //import org.hps.analysis.MC.TrackTruthMatching;
615import org .hps .recon .particle .ReconParticleDriver ;
716import org .hps .recon .tracking .TrackType ;
817import org .hps .recon .vertexing .BilliorTrack ;
918import org .hps .record .triggerbank .AbstractIntData ;
1019import org .hps .record .triggerbank .TIData ;
1120import org .lcsim .event .EventHeader ;
1221import org .lcsim .event .GenericObject ;
22+ //import org.lcsim.event.MCParticle;
1323import org .lcsim .event .ReconstructedParticle ;
24+ //import org.lcsim.event.SimCalorimeterHit;
25+ //import org.lcsim.event.SimTrackerHit;
1426import org .lcsim .event .Track ;
1527import org .lcsim .event .TrackState ;
28+ //import org.lcsim.geometry.IDDecoder;
1629
1730public class TridentTupleDriver extends TupleDriver {
1831
@@ -21,6 +34,8 @@ public class TridentTupleDriver extends TupleDriver {
2134 private final double tupleTrkPCut = 0.9 ;
2235 private final double tupleMaxSumCut = 1.3 ;
2336 private boolean getMC = false ;
37+ private boolean getFullTruth = false ;
38+ private int tupleevent = 0 ;
2439
2540 @ Override
2641 protected void setupVariables () {
@@ -29,6 +44,9 @@ protected void setupVariables() {
2944 addVertexVariables ();
3045 addParticleVariables ("ele" );
3146 addParticleVariables ("pos" );
47+ if (getFullTruth ){
48+ addFullTruthVertexVariables ();
49+ }
3250 String [] newVars = new String []{"minPositiveIso/D" , "minNegativeIso/D" , "minIso/D" };
3351 tupleVariables .addAll (Arrays .asList (newVars ));
3452 if (getMC ) {
@@ -39,10 +57,16 @@ protected void setupVariables() {
3957 public void setGetMC (boolean getMC ) {
4058 this .getMC = getMC ;
4159 }
60+
61+ public void setGetFullTruth (boolean getFullTruth ) {
62+ this .getFullTruth = getFullTruth ;
63+ }
4264
4365 @ Override
4466 public void process (EventHeader event ) {
4567 /* make sure everything is there */
68+ tupleevent ++;
69+ //tupleMap.put("tupleevent/I",(double) tupleevent);
4670 if (!event .hasCollection (ReconstructedParticle .class , unconstrainedV0CandidatesColName )) {
4771 return ;
4872 }
@@ -94,10 +118,15 @@ public void process(EventHeader event) {
94118 tupleMap .put ("minPositiveIso/D" , minPositiveIso );
95119 tupleMap .put ("minNegativeIso/D" , minNegativeIso );
96120 tupleMap .put ("minIso/D" , minIso );
121+ tupleMap .put ("tupleevent/I" ,(double ) tupleevent );
97122
98123 if (getMC ) {
99124 fillMCTridentVariables (event );
100125 }
126+
127+ if (getFullTruth ){
128+ fillFullVertexTruth (event ,eleTrack ,posTrack );
129+ }
101130
102131 if (tupleWriter != null ) {
103132 boolean trkCut = tupleMap .get ("eleP/D" ) < tupleTrkPCut * ebeam && tupleMap .get ("posP/D" ) < tupleTrkPCut * ebeam ;
0 commit comments