eventAnalysis  7.0-49-g0ac7482
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TTrackerReconModule.hxx
Go to the documentation of this file.
1 /// /// For questions or suggestions about this module please contact the
2 /// current responsible and CC in the eventAnalysis package manager.
3 ///
4 /// 21-Jul-2010: Current responsible for this module is,
5 /// Blair Jamieson (jamieson [*a*t*] physics.ubc.ca)
6 ///
7 #ifndef TTrackerReconModule_hxx_seen
8 #define TTrackerReconModule_hxx_seen
9 
10 #include <string>
11 
12 #include <TClonesArray.h>
13 #include <TLorentzVector.h>
14 #include <TNamed.h>
15 #include <TTree.h>
16 
17 #include <TND280Event.hxx>
18 
19 #include <TG4PrimaryVertex.hxx>
20 #include <TG4Trajectory.hxx>
21 #include <TReconPID.hxx>
22 #include <TReconVertex.hxx>
23 
25 #include "TTrueVertex.hxx"
26 
27 namespace ND {
28 class TTrackerReconModule;
29 };
30 
31 /// This module summarizes the reconstruction information from the trackerRecon.
33  public:
34  /// An object to describe a reconstructed track.
35 
36  /// An object to store unused hits
37  /// That is, hits that were not associated with any track
38  class TUnusedHit : public TObject {
39  public:
40  virtual ~TUnusedHit();
41 
42  double TotalCharge; ///< Deposited charge (the hit EDeposit)
43 
44  TVector3 Position; ///< The position of the hit component 0=x 1=y 2=z in mm
45 
46  TVector3 Variance; ///< The position variance in mm
47 
48  double Time; ///< Time of the hit in ns
49 
50  double TimeUnc; ///< Time Uncertainty of hit in ns
51 
53  };
54 
55  /// An object to describe a reconstructed vertex
56  class TTrackerVertex : public TObject {
57  public:
58  virtual ~TTrackerVertex();
59 
60  std::string
61  AlgorithmName; ///< The name of the algorithm that created this object.
62 
63  int Status; ///< The status for the fit.
64 
65  double Quality; ///< The quality of the fit. Ie. the Prob(chi2,ndof)
66 
67  int NDOF; ///< The number of degrees of freedom.
68 
69  /// The position of the vertex
70  /// components [0]=x [1]=y [2]=z [3]=t
71  /// x,y,z are in mm, t is in ns
72  TLorentzVector Position; //! The position of the vertex
73 
74  /// The position variance;
75  /// components [0]=var(x) [1]=var(y) [2]=var(z) [3]=var(t)
76  /// x,y,z are in mm^2, t is in ns^2
77  TLorentzVector Variance; //! The position variance;
78 
80  };
81 
82  /// TPC pid and track variables
83  class TTPCTrack : public TObject {
84  public:
85  virtual ~TTPCTrack();
86  UInt_t UniqueID; ///< Unique ID number to allow matching to Global Reconobject.
87  int Detector; ///< TPC number 1, 2 or 3
88  int Ndof; ///< Number of degrees of freedom in TPC fit
89  double Chi2; ///< TPC chi2 calculated after likelihood fit
90  int NHits; ///< number of clusters used in TPC fit
91 
92  double Momentum; ///< Momentum of the TPC pid in MeV/c
93  double MomentumError; ///< Uncertainty in the Momentum in MeV/c from theTPC pid
94  double Charge; ///< Charge from the TPC pid (+1, or -1)
95  TLorentzVector
96  Position; ///< Position at which kinematics are reported in mm, ns
97  TLorentzVector PositionVariance; ///< Variance in Position in mm^2, ns^2
98 
99  TVector3 Direction; ///< TPC pid direction vector in mm
100  TVector3
101  DirectionVariance; ///< TPC pid variance in vector direction in mm^2
102 
103  double NTrun; ///< 70% of the number of clusters
104  double Ccorr; ///< Corrected truncated mean charge deposit in PID
105  double PullEle; ///< Pull for TPC pid electron hypothesis
106  double PullMuon; ///< Pull for TPC pid muon hypothesis
107  double PullPion; ///< Pull for TPC pid pion hypothesis
108  double PullKaon; ///< Pull for TPC pid kaon hypothesis
109  double PullProton; ///< Pull for TPC pid proton hypothesis
110  double dEdxexpEle; ///< Estimated dE/dx for electron hypothesis
111  double dEdxexpMuon; ///< Estimated dE/dx for muon hypothesis
112  double dEdxexpPion; ///< Estimated dE/dx for pion hypothesis
113  double dEdxexpKaon; ///< Estimated dE/dx for kaon hypothesis
114  double dEdxexpProton; ///< Estimated dE/dx for proton hypothesis
115  double SigmaEle; ///< Sigma estimated width of TPC pid electron hypothesis
116  double SigmaMuon; ///< Sigma estimated width of TPC pid muon hypothesis
117  double SigmaPion; ///< Sigma estimated width of TPC pid pion hypothesis
118  double SigmaKaon; ///< Sigma estimated width of TPC pid kaon hypothesis
119  double SigmaProton; ///< Sigma estimated width of TPC pid proton hypothesis
120 
121  // Other fit parameters (diffusion related)
122  /// TPC track diffusion parameters depend on diffusion model used
123  /// Original TPC diffusion model was:
124  /// sigma^2 = sigma0 + sigma1*drift + sigma*drift^2
125  /// Updated TPC diffusion model is:
126  /// sigma^2 = sigma0*(drift-mean_drift) + sigma1*mean_drift +
127  /// sigma2*drift^2
128  /// units are mm, to convert to microns/sqrt(cm) take for example:
129  /// D = sqrt( sigma/10 )*10000
130  double Sigma0; ///< TPC track diffusion sigma0 parameter
131  double Sigma1; ///< TPC track diffusion sigma1 parameter
132  double Sigma2; ///< TPC track diffusion sigma2 parameter
133  double MeanDrift; ///< TPC track mean drift value used in diffusion model
134 
135  /// Number of constituents (probably 1, for track!)
137 
138  // dig for original track and store curvature information
139  // -- somewhat redundant with pid information, but here for checking --
140  TVector3 TrDirection; ///< track direction vector
141  TVector3 TrDirectionVar; ///< variance in track direction vector
142  double TrCurvature; ///< track curvature, units are 1/mm
143  double TrCurvatureVar; ///< variance in track direction vector, units are(1mm)^2
144 
145  // Associated FGD information using Claudio's 2010a method of hit
146  // association
147  bool HasExtrapolation; ///< extrapolation method of vertex is calculated ornot
148  double
149  ExtrapolatedVertexXX; ///< for xbar vertex, this is x coordinate in mm
150  double
151  ExtrapolatedVertexZX; ///< for xbar vertex, this is z coordinate in mm
152  double
153  ExtrapolatedVertexYY; ///< for ybar vertex, this is y coordinate in mm
154  double
155  ExtrapolatedVertexZY; ///< for ybar vertex, this is z coordinate in mm
156  bool EnteringFGD; ///< not sure
157  // std::vector<TVector3*> ExtrapolatedHits;
158 
160  };
161 
162  /// An object to hold specific FGD track variables
163  class TFGDTrack : public TObject {
164  public:
165  virtual ~TFGDTrack();
166  UInt_t UniqueID; ///< Unique ID number to allow matching to Global Reconobject.
167  int Detector; ///< FGD number 1 or 2
168  int Ndof; ///< Number of degrees of freedom in FGD track fit
169  double Chi2; ///< Chi2 of the FGD track fit the FGD track starting position vector coordinates in order x,y,z,t where x,y,z are in mm, t is in ns
170  TLorentzVector Position;
171  /// the FGD track direction vector (dx,dy,dz)
172  TVector3 Direction;
173  /// the FGD track energy deposit (total number of pe's)
174  double EDeposit;
175 
177  };
178 
179  /// An object to describe the true G4 particle associated to the
180  /// TTrackerResult
181  class TTrueParticle : public TObject {
182  public:
183  virtual ~TTrueParticle();
184  int ID; ///< Trajectoy Id
185  double Pur; ///< The purity for matching
186  double Eff; ///< The efficiency for matching
187  ND::TTrueVertex Vertex; ///< True vertex associated to this TrueParticle
188 
190  };
191 
192  /// An object to describe a track that has
193  /// no fit result
194  class TTrackOther : public TObject {
195  public:
196  TTrackOther();
197  virtual ~TTrackOther();
198  std::string
199  AlgorithmName; ///< The name of the algorithm that created this object.
200 
201  int Detector; ///< Detector used (1,2,3 for TPC, or 4,5 for FGD?)
202 
203  int NHits; ///< The number of hits.
204 
205  TClonesArray *Hits; ///< The hits
206 
207  double EDeposit; ///< The deposited charge for the object.
208 
209  TLorentzVector FrontPosition; ///< The position of the track at itsupstream-most end (x,y,z,t) in mm, ns
210 
211  TLorentzVector BackPosition; ///< The position of the track at itsdownstream-most end (x,y,z,t) in mm,ns
212 
213  // JIMHACK - Just for now include an instance of TUnusedHit object here as
214  // TFile::MakeProject does not seem able to find them when they are hidden
215  // inside a
216  // TClonesArray. Nothing is done with these - it is just an ugly workaround.
217  TUnusedHit hackHits; ///<This is just here to fool TFile::MakeProject, nota real object.
219  };
220 
221  /// An object to describe a constituent of a
222  /// trackerRecon result. These are combinations
223  /// of FGD and TPC pid results.
224  class TTrackerConstituent : public TObject {
225  public:
227  virtual ~TTrackerConstituent();
228  std::string AlgorithmName; ///< algorithm that created this object.
229  int Detectors; ///< Detectors used
230  unsigned long Status; ///< The status for the fit.
231  double Quality; ///< The quality of the fit.(probability)
232  int NDOF; ///< The number of degrees of freedom.
233  double Chi2; ///< The chi2 of the fit.
234  int NNodes; ///< The number of nodes
235  int NHits; ///< The number of hits.
236  Int_t NConstituents; ///< The number of constituents this constituent ismade of
237  Int_t ConstitIdx[2]; ///< Index into Constituents inTTrackerResult::Constituents of this constituent'sconstituents
238  bool isForward; ///< Sense of track
239  double Charge; ///< The Charge of this constituent (+-1)
240  double EDeposit; ///< The deposited charge for the constituent object(number of pe's).
241  TLorentzVector FrontPosition; ///< The 4-vector position at the front ofthe track (x,y,z,t) in mm, ns
242  TLorentzVector BackPosition; ///< The 4-vector position of the back of thetrack (x,y,z,t) in mm, ns
243  TLorentzVector FrontVariance; ///< The 4-vector position variance at thefront of the track(var(x),var(y),var(z),var(t)) in mm^2,ns^2
244  TLorentzVector BackVariance; ///< The 4-vector position variance at theback of the track(var(x),var(y),var(z),var(t)) in mm^2, ns^2
245  TVector3
246  FrontDirection; ///< The direction vector at the front of the track
247  TVector3 BackDirection; ///< The direction vector at the back of the track
248  double FrontMomentum; ///< the momentum at the front of the track in MeV/c
249  double BackMomentum; ///< the momentum at the back of the track iin MeV/c
250  TLorentzVector Position; ///< position 4-vector (x,y,z,t) in mm, ns
251  TLorentzVector Variance; ///< position variance 4-vector(var(x),var(y),var(z),var(t)) in mm^2, ns^2
252  TVector3 Direction; ///< direction vector
253  TVector3 DirectionVariance; ///< direction variance vector
254  double Momentum; ///< momentum MeV/c
255  double MomentumError; ///< uncertainty in momentum MeV/c
257  };
258 
259  /// Object to describe the fit parameters at a track node
260  class TTrackerNode : public TObject {
261  public:
262  virtual ~TTrackerNode();
263  double Charge; ///< The Charge (+-1)
264  double EDeposit; ///< The Energy Deposit (number of pe's)
265  TLorentzVector Position; ///< Position 4-vector (at node) x,y,z,t in mm, ns
266  TLorentzVector Variance; ///< Position variance 4-vector (at node)var(x),var(y),var(z),var(t) in mm^2, ns^2
267  TVector3 Direction; ///< Direction vector (at node)
268  TVector3 DirectionVariance; ///< Direction variance vector (at node)
269  double Momentum; ///< Track Momentum (at node) in MeV/c
270  double MomentumError; ///< Track Momentum uncertainty (at node) in MeV/c
272  };
273 
274  /// An object to describe a reconstructed trackerRecon result.
275  class TTrackerResult : public TObject {
276  public:
277  TTrackerResult();
278  virtual ~TTrackerResult();
279  UInt_t UniqueID; ///< Unique ID number to allow matching to Global Reconobject.
280  std::string
281  AlgorithmName; ///< The name of the algorithm that created this object.
282  int Detectors; ///< Detectors used
283  unsigned long Status; ///< The status for the fit.
284  double Quality; ///< The quality of the fit.(probability(chi2,ndof))
285  int NDOF; ///< The number of degrees of freedom.
286  double Chi2; ///< The chi2 of the fit.
287  int NHits; ///< The number of hits.
288  Int_t NConstituents; ///< The number of constituents (tracks and pids) usedto build this track
289  Int_t ConstitIdx[2]; ///< Index into Constituents of the constituents usedto build this track
290  Int_t NTotalConstituents; ///< Number of all constituents, andconstituents-constituents...
291  TClonesArray
292  *Constituents; ///< All constituents, and constituents-constituents...
293  bool isForward; ///< Sense of object.
294  double Charge; ///< The Charge (+-1)
295  double EDeposit; ///< The deposited charge for the object (number of pe's)
296  double Length; ///< The total length of the object in mm
297  int matchingFailure_flag; ///< Flag a object where the TPC-FGD matchingfailed
298 
299  /// the PID likelihoods for combined PID
300  /// for now this is the product of the three TPC PID probabilities
301  /// The first entry is the most likely hypothesis, followed by alternate
302  /// hypotheses
303  /// The Pid for the given likelihood is in the same index into the vectors.
304  /// Value of the Pid is based on the one from TReconPID, ie:
305  /// notset=0, other=1, shower=2, em=3, electron=4, gamma=5,
306  /// hadronic=6, pi0=7, light-track=8, muon=9, pion=10,
307  /// heavy-track=11, proton=12, kaon=13
308  std::vector<double> Likelihoods;
309  std::vector<int> Pids; ///< the PID that goes with Likelihoods
310  TLorentzVector Position; ///< track position 4-vector (x,y,z,t) in mm, ns
311  TLorentzVector Variance; ///< track position variance 4-vectorvar(x),var(y),var(z),var(t) in mm^2, ns^2
312  TVector3 Direction; ///< track direction vector
313  TVector3 DirectionVariance; ///< track direction variance
314  double Momentum; ///< track momentum MeV/c
315  double MomentumError; ///< track momentum MeV/c
316  TTrueParticle TrueParticle; ///< information about the true particleassociated with this track
317  Int_t NTPCs; ///< Number of TPC tracks used to build this track
318  TClonesArray *TPC; ///< Information about the TPC pids/tracks used to buildthis track
319  Int_t NFGDs; ///< Number of FGD Specific objects
320  TClonesArray *FGD; ///< FGD objects associated with track
321  int NNodes; ///< The number of nodes (fgd hits + tpc tracks)
322  TClonesArray
323  *Nodes; ///< Kinematics of the track at each node in the track fit
324 
325  // JIMHACK - Just for now include an instance of TPC, FGD, Constituents
326  // object here as
327  // TFile::MakeProject does not seem able to find them when they are hidden
328  // inside a
329  // TClonesArray. Nothing is done with these - it is just an ugly workaround.
330  TTrackerConstituent hackConstituentsObject; ///<This is just here to foolTFile::MakeProject, not areal object.
331  TTPCTrack hackTPCTrack; ///<This is just here to fool TFile::MakeProject,not a real object.
332  TFGDTrack hackFGDTrack; ///<This is just here to fool TFile::MakeProject,not a real object.
333  TTrackerNode hackNodes; ///<This is just here to fool TFile::MakeProject,not a real object.
334 
336  };
337 
338  public:
339  /// Constructor
340  TTrackerReconModule(const char *name = "Tracker",
341  const char *title = "Tracker Recon Module");
342 
343  /// Destructor
344  virtual ~TTrackerReconModule();
345 
346  /// Method for special handling of first event
347  virtual Bool_t ProcessFirstEvent(ND::TND280Event &event);
348 
349  protected:
350  /// Method to initialize this module
351  virtual void InitializeModule();
352 
353  /// Method to find the total number of hits used to build the
354  /// reconstructed track/pid/etc.
355  int GetNumberOfHits(ND::THandle<ND::TReconBase> object);
356 
357  /// Initialize the branches in the trackerRecon eventAnalysis tree
358  virtual void InitializeBranches();
359 
360  void FillConfigTree(TTree* configTree);
361 
362  /// Main call to fill all of the branches of the trackerRecon
363  /// eventAnalysis tree for a given event
364  virtual bool FillTree(ND::TND280Event &);
365 
366  /// Method to fill trackerRecon tree with vertex information
367  /// Input is a TReconVertex. The method makes a new TTrackerVertex
368  /// tree entry and fills its values. The method is passed a pointer
369  /// to the TClonesArray of TReconVertex to add values to at index idx.
370  void FillVertex(ND::THandle<ND::TReconVertex> in, TClonesArray *out, int idx);
371 
372  /// Method to fill trackerRecon tree with TPC information
373  /// Input is a TReconPID of TPC fit information. The method makes a new
374  /// TTPCTrack
375  /// tree entry and fills its values. The method is passed a pointer
376  /// to the TClonesArray of TTPCTrack to add values to at index idx.
377  /// It is done this way so the same method can be called, but passing
378  /// different
379  /// pointer to TClonesArray of TTPCTrack for both the TTrackerResult::TPC and
380  /// the fTPCIso isolated tpc tracks.
381  void FillTPC(ND::THandle<ND::TReconPID> in, TClonesArray *out, int idx);
382 
383  /// Method to make a TPC object with extrapolated hit association information.
384  bool ExtrapolateTPC(ND::THandle<ND::TReconPID> in, TClonesArray *out, int idx,
385  ND::THandle<ND::THitSelection> fgd);
386 
387  /// Method to fill trackerRecon tree with FGD information
388  /// Input is a TReconPID of FGD fit information. The method makes a new
389  /// TFGDTrack
390  /// tree entry and fills its values. The method is passed a pointer
391  /// to the TClonesArray of TFGDTrack to add values to at index idx.
392  /// It is done this way so the same method can be called, but passing
393  /// different
394  /// pointer to TClonesArray of TFGDTrack for both the TTrackerResult::FGD and
395  /// the fFGDIso isolated fgd tracks.
396  void FillFGD(ND::THandle<ND::TReconTrack> in, TClonesArray *out, int idx);
397 
398  /// Method to fill trackerRecon tree with unfit track information
399  /// Input is a TReconTrack that was not fit. The method makes a new
400  /// TTrackOther
401  /// tree entry and fills its values. The method is passed a pointer
402  /// to the TClonesArray of TTrackOther to add values to at index idx.
403  /// It is done this way so the same method can be called, but passing
404  /// different
405  /// pointer to TClonesArray of TTrackOther for both the fFGDOther and
406  /// the fTPCOther tracks without fits.
407  void FillOther(ND::THandle<ND::TReconTrack> in, TClonesArray *out, int idx);
408 
409  /// Method to get the tpc combo hits from the tpc hit selection (used for tpc
410  /// other)
411  ND::THandle<ND::THitSelection> GetHitsFromComboHits(
412  ND::THandle<ND::THitSelection> tpc);
413 
414  /// Method to fill information about constituent pids. That is the pid
415  /// pieces used to build the final pid. Note that only the multiple detector
416  /// constituents are filled here, while the FGD and TPC only tracks are filled
417  /// by calling FillTPC and FillFGD. This method is recursively called to fill
418  /// all constituents, constituents of constituents, and so on.
419  /// If new constituent is created it returns true, otherwise returns false,
420  /// and
421  /// returns the index into TTrackResult::Constituents if a new constituent was
422  /// added to the tree.
423  bool FillConstituentPid(TTrackerResult *result, ND::THandle<ND::TReconPID> in,
424  int &idx);
425 
426  /// Method to fill information about constituent tracks. That is the track
427  /// pieces used to build the final track. Note that only the multiple
428  /// detector
429  /// constituents are filled here, while the FGD and TPC only tracks are filled
430  /// by calling FillTPC and FillFGD. This method is recursively called to fill
431  /// all constituents, constituents of constituents, and so on.
432  /// If new constituent is created it returns true, otherwise returns false,
433  /// and
434  /// returns the index into TTrackResult::Constituents if a new constituent was
435  /// added to the tree.
437  ND::THandle<ND::TReconTrack> in, int &idx);
438 
439  /// Helper method to convert TTrackState curvature information into momentum
440  /// and momentum uncertainty
441  void GetMomentum(ND::THandle<ND::TTrackState> state, double &p, double &ep);
442 
443  /// Helper method to convert TTrackState curvature information into track
444  /// charge
445  double GetCharge(ND::THandle<ND::TTrackState> state);
446 
447  /// Method to fill a trackerRecon result entry
448  void FillFinalPid(TTrackerResult *result, ND::THandle<ND::TReconPID> reco);
449 
450  /// Method to fill a trackerRecon result entry
451  void FillFinalTrack(TTrackerResult *result,
452  ND::THandle<ND::TReconTrack> reco);
453 
454  /// Method to build an integer key that describes the detectors used
455  /// to build the TRecon object. Each base 10 digit of the integer
456  /// represents one detector that was used. the numbering of the
457  /// detectors is: 1=TPC1, 2=TPC2, 3=TPC3, 4=FGD1, 5=FGD2, 6=DSECAL,
458  /// 7=BarrelECAL, 8=P0D, 9=SMRD
459  int GetDetectorNumber(ND::THandle<ND::TReconBase> object);
460 
461  /// Method to get the G4 trajectory that best matches the TRecon object
462  ND::TG4Trajectory GetTrajectory(ND::TND280Event &event,
463  ND::THandle<ND::TReconBase> reco);
464 
465  /// Method to measure the purity of a reconstructed track against the truth
466  std::map<int, double> TrkRecModGetG4TrajectoryFractions(
467  const ND::THandle<ND::TReconBase> track);
468 
469  /// Method to fill the true particle information given a G4track
470  void FillTrueParticle(ND::TG4Trajectory *G4track, double pur, double eff,
472 
473  /// Method to get the parent G4 track for a given G4 track
474  ND::THandle<ND::TG4Trajectory> GetParent(ND::TG4Trajectory *G4track);
475  ND::THandle<ND::TG4Trajectory> GetParent(
476  ND::THandle<ND::TG4Trajectory> G4track);
477 
478  /// Method to fill the true vertex information from a given G4 vertex
479  void FillTrueVertex(bool found, const ND::TG4PrimaryVertex &G4vertex,
480  double pur, double eff, ND::TTrueVertex &vertex);
481 
482  /// Method to find the best matching G4 vertex for a given G4 track
483  bool GetG4Vertex(ND::TG4Trajectory *G4track, ND::TG4PrimaryVertex &G4vertex);
484 
485  /// Method to find the incident particle (neutrino) that gave rise to a given
486  /// G4 track
487  bool GetIncomingParticle(const ND::TG4PrimaryVertex &G4vertex,
488  ND::TG4PrimaryParticle &incoming);
489 
490  /// called recursively to look for bottom level track that built a PID. In
491  /// case
492  /// the PID is made of several PIDs, the one with the track with smallest
493  /// relative curvature
494  /// error is returned.
495  ND::THandle<ND::TReconTrack> GetConstituentTrack(
496  ND::THandle<ND::TReconPID> in, int &nconstit);
497 
498  /// Method to find FGD constituent track from a matching object and fill
499  /// matchingFailure_flag
501  ND::THandle<ND::TReconBase> reco);
502 
503  public:
504  /// Tree Entries
505  Int_t fNVertices; ///< The number of added vertices
506  TClonesArray
507  *fVertices; ///< The vector of trackerRecon vertices (none ever?).
508 
509  Int_t fNTracks; ///< The number of trackerRecon results
510  TClonesArray *fTracks; ///< The vector of overall trackerRecon results
511 
512  Int_t fNFGDOther; ///< The number of FGD tracks with no fit (none ever?).
513  TClonesArray *fFGDOther; ///< The vector of FGD tracks with no fit
514 
515  Int_t fNTPCOther; ///< The number of TPC tracks with no fit
516  TClonesArray *fTPCOther; ///< The vector of TPC tracks with no fit
517 
518  // The code producing the TPC iso objects is commented out in trackerRecon
519  // v0r9
520  Int_t fNTPCIso; ///< The number of isolated TPC tracks with fits (none ever?)
521  TClonesArray *fTPCIso; ///< The vector of isolated TPC tracks with fits
522 
523  Int_t fNTPCUnused; ///< The number of unused TPC hits
524  TClonesArray *fTPCUnused; ///< The vector of unused TPC hits
525 
526  Int_t fNFGDUnused; ///< The number of unused FGD hits
527  TClonesArray *fFGDUnused; ///< The vector of unused TPC hits
528 
529  Int_t fNTPCExtrapolation; ///< The number of TPC tracks extrapolated into theFGD following Claudio's (2010a) method
530  TClonesArray *fTPCExtrapolation; ///< The vector of TPC tracks extrapolatedinto the FGD following Claudio's (2010a)method
531 
532  private:
533  double fMaxDrift; ///< TPC maximum drift used for tpc other hits
534  double fCathodeOffset; ///< TPC cathode offset used for tpc other hits
535  double fDriftVelocity; ///< TPC drift velocity used for tpc other hits
536 
537 };
538 #endif
double ExtrapolatedVertexZY
for ybar vertex, this is z coordinate in mm
TClonesArray * fVertices
The vector of trackerRecon vertices (none ever?).
TClonesArray * fTPCUnused
The vector of unused TPC hits.
bool ExtrapolateTPC(ND::THandle< ND::TReconPID > in, TClonesArray *out, int idx, ND::THandle< ND::THitSelection > fgd)
Method to make a TPC object with extrapolated hit association information.
TTrueParticle TrueParticle
information about the true particleassociated with this track
double EDeposit
The deposited charge for the constituent object(number of pe&#39;s).
An object to describe a reconstructed trackerRecon result.
std::string AlgorithmName
The name of the algorithm that created this object.
Int_t fNTPCExtrapolation
The number of TPC tracks extrapolated into theFGD following Claudio&#39;s (2010a) method.
double Length
The total length of the object in mm.
int Detector
Detector used (1,2,3 for TPC, or 4,5 for FGD?)
double ExtrapolatedVertexXX
for xbar vertex, this is x coordinate in mm
int GetDetectorNumber(ND::THandle< ND::TReconBase > object)
Method to build an integer key that describes the detectors used to build the TRecon object...
int Ndof
Number of degrees of freedom in FGD track fit.
TVector3 Direction
the FGD track direction vector (dx,dy,dz)
Int_t NTotalConstituents
Number of all constituents, andconstituents-constituents...
TLorentzVector BackVariance
The 4-vector position variance at theback of the track(var(x),var(y),var(z),var(t)) in mm^2...
double PullPion
Pull for TPC pid pion hypothesis.
double fCathodeOffset
TPC cathode offset used for tpc other hits.
UInt_t UniqueID
Unique ID number to allow matching to Global Reconobject.
double Quality
The quality of the fit.(probability)
TLorentzVector FrontPosition
The 4-vector position at the front ofthe track (x,y,z,t) in mm, ns.
void FillConfigTree(TTree *configTree)
double TrCurvature
track curvature, units are 1/mm
An object to describe a reconstructed track.
UInt_t UniqueID
Unique ID number to allow matching to Global Reconobject.
ClassDef(TTrackerReconModule::TTrackerConstituent, 1)
bool GetG4Vertex(ND::TG4Trajectory *G4track, ND::TG4PrimaryVertex &G4vertex)
Method to find the best matching G4 vertex for a given G4 track.
double MomentumError
uncertainty in momentum MeV/c
ClassDef(TTrackerReconModule::TTPCTrack, 1)
double PullMuon
Pull for TPC pid muon hypothesis.
TClonesArray * FGD
FGD objects associated with track.
double Quality
The quality of the fit. Ie. the Prob(chi2,ndof)
int NDOF
The number of degrees of freedom.
TLorentzVector Position
Position 4-vector (at node) x,y,z,t in mm, ns.
TClonesArray * fTPCIso
The vector of isolated TPC tracks with fits.
ClassDef(TTrackerReconModule::TFGDTrack, 1)
Int_t NFGDs
Number of FGD Specific objects.
TFGDTrack hackFGDTrack
This is just here to fool TFile::MakeProject,not a real object.
virtual void InitializeBranches()
Initialize the branches in the trackerRecon eventAnalysis tree.
void FillFinalTrack(TTrackerResult *result, ND::THandle< ND::TReconTrack > reco)
Method to fill a trackerRecon result entry.
An object to describe a reconstructed vertex.
ND::THandle< ND::TReconTrack > GetConstituentTrack(ND::THandle< ND::TReconPID > in, int &nconstit)
called recursively to look for bottom level track that built a PID.
ND::THandle< ND::TG4Trajectory > GetParent(ND::TG4Trajectory *G4track)
Method to get the parent G4 track for a given G4 track.
int NNodes
The number of nodes (fgd hits + tpc tracks)
double Charge
Charge from the TPC pid (+1, or -1)
TTPCTrack hackTPCTrack
This is just here to fool TFile::MakeProject,not a real object.
Int_t fNFGDUnused
The number of unused FGD hits.
void FillTrueVertex(bool found, const ND::TG4PrimaryVertex &G4vertex, double pur, double eff, ND::TTrueVertex &vertex)
Method to fill the true vertex information from a given G4 vertex.
void FillFGD(ND::THandle< ND::TReconTrack > in, TClonesArray *out, int idx)
Method to fill trackerRecon tree with FGD information Input is a TReconPID of FGD fit information...
void FillVertex(ND::THandle< ND::TReconVertex > in, TClonesArray *out, int idx)
Method to fill trackerRecon tree with vertex information Input is a TReconVertex. ...
ClassDef(TTrackerReconModule::TTrackerVertex, 1)
The position variance;.
double ExtrapolatedVertexZX
for xbar vertex, this is z coordinate in mm
double fMaxDrift
TPC maximum drift used for tpc other hits.
double SigmaPion
Sigma estimated width of TPC pid pion hypothesis.
std::string AlgorithmName
algorithm that created this object.
Int_t fNFGDOther
The number of FGD tracks with no fit (none ever?).
TLorentzVector Position
position 4-vector (x,y,z,t) in mm, ns
double MomentumError
Uncertainty in the Momentum in MeV/c from theTPC pid.
Int_t fNTPCOther
The number of TPC tracks with no fit.
std::map< int, double > TrkRecModGetG4TrajectoryFractions(const ND::THandle< ND::TReconBase > track)
Method to measure the purity of a reconstructed track against the truth.
An object to hold specific FGD track variables.
double EDeposit
The deposited charge for the object.
TLorentzVector FrontVariance
The 4-vector position variance at thefront of the track(var(x),var(y),var(z),var(t)) in mm^2...
bool HasExtrapolation
extrapolation method of vertex is calculated ornot
TClonesArray * fFGDUnused
The vector of unused TPC hits.
void FillTrueParticle(ND::TG4Trajectory *G4track, double pur, double eff, ND::TTrackerReconModule::TTrueParticle &trueParticle)
Method to fill the true particle information given a G4track.
virtual Bool_t ProcessFirstEvent(ND::TND280Event &event)
Method for special handling of first event.
An object to describe the true G4 particle associated to the TTrackerResult.
TLorentzVector Position
The position of the vertex components [0]=x [1]=y [2]=z [3]=t x,y,z are in mm, t is in ns...
TLorentzVector Variance
Position variance 4-vector (at node)var(x),var(y),var(z),var(t) in mm^2, ns^2.
TLorentzVector PositionVariance
Variance in Position in mm^2, ns^2.
TVector3 Variance
The position variance in mm.
std::vector< int > Pids
the PID that goes with Likelihoods
int NConstituents
Number of constituents (probably 1, for track!)
Int_t ConstitIdx[2]
Index into Constituents inTTrackerResult::Constituents of this constituent&#39;sconstituents.
TVector3 Direction
Direction vector (at node)
TVector3 Direction
TPC pid direction vector in mm.
double Pur
The purity for matching.
bool FillConstituentTrack(TTrackerResult *result, ND::THandle< ND::TReconTrack > in, int &idx)
Method to fill information about constituent tracks.
int matchingFailure_flag
Flag a object where the TPC-FGD matchingfailed.
double Charge
The Charge of this constituent (+-1)
TLorentzVector Position
Position at which kinematics are reported in mm, ns.
TVector3 DirectionVariance
direction variance vector
ClassDef(TTrackerReconModule::TTrackOther, 1)
TVector3 DirectionVariance
TPC pid variance in vector direction in mm^2.
double EDeposit
the FGD track energy deposit (total number of pe&#39;s)
unsigned long Status
The status for the fit.
double FrontMomentum
the momentum at the front of the track in MeV/c
ClassDef(TTrackerReconModule::TUnusedHit, 1)
std::vector< double > Likelihoods
the PID likelihoods for combined PID for now this is the product of the three TPC PID probabilities T...
Int_t fNVertices
Tree Entries.
int NDOF
The number of degrees of freedom.
double Sigma0
TPC track diffusion parameters depend on diffusion model used Original TPC diffusion model was: sigma...
int GetNumberOfHits(ND::THandle< ND::TReconBase > object)
Method to find the total number of hits used to build the reconstructed track/pid/etc.
double MomentumError
Track Momentum uncertainty (at node) in MeV/c.
double SigmaMuon
Sigma estimated width of TPC pid muon hypothesis.
double dEdxexpKaon
Estimated dE/dx for kaon hypothesis.
TVector3 BackDirection
The direction vector at the back of the track.
void FillOther(ND::THandle< ND::TReconTrack > in, TClonesArray *out, int idx)
Method to fill trackerRecon tree with unfit track information Input is a TReconTrack that was not fit...
std::string AlgorithmName
The name of the algorithm that created this object.
TLorentzVector Variance
The position of the vertex.
virtual void InitializeModule()
Method to initialize this module.
TClonesArray * Constituents
All constituents, and constituents-constituents...
TTrackerReconModule(const char *name="Tracker", const char *title="Tracker Recon Module")
Constructor.
virtual ~TTrackerReconModule()
Destructor.
double Ccorr
Corrected truncated mean charge deposit in PID.
virtual bool FillTree(ND::TND280Event &)
Main call to fill all of the branches of the trackerRecon eventAnalysis tree for a given event...
double Chi2
Chi2 of the FGD track fit the FGD track starting position vector coordinates in order x...
Object to describe the fit parameters at a track node.
double EDeposit
The Energy Deposit (number of pe&#39;s)
TVector3 DirectionVariance
track direction variance
double EDeposit
The deposited charge for the object (number of pe&#39;s)
double SigmaKaon
Sigma estimated width of TPC pid kaon hypothesis.
ND::TG4Trajectory GetTrajectory(ND::TND280Event &event, ND::THandle< ND::TReconBase > reco)
Method to get the G4 trajectory that best matches the TRecon object.
TTrackerConstituent hackConstituentsObject
This is just here to foolTFile::MakeProject, not areal object.
unsigned long Status
The status for the fit.
double dEdxexpMuon
Estimated dE/dx for muon hypothesis.
void CheckMatchingFailure(TTrackerResult *result, ND::THandle< ND::TReconBase > reco)
Method to find FGD constituent track from a matching object and fill matchingFailure_flag.
double PullEle
Pull for TPC pid electron hypothesis.
double Quality
The quality of the fit.(probability(chi2,ndof))
ND::TTrueVertex Vertex
True vertex associated to this TrueParticle.
TClonesArray * fFGDOther
The vector of FGD tracks with no fit.
double Momentum
Momentum of the TPC pid in MeV/c.
bool GetIncomingParticle(const ND::TG4PrimaryVertex &G4vertex, ND::TG4PrimaryParticle &incoming)
Method to find the incident particle (neutrino) that gave rise to a given G4 track.
int NHits
number of clusters used in TPC fit
TLorentzVector BackPosition
The 4-vector position of the back of thetrack (x,y,z,t) in mm, ns.
double Time
Time of the hit in ns.
std::string AlgorithmName
The name of the algorithm that created this object.
double SigmaEle
Sigma estimated width of TPC pid electron hypothesis.
TLorentzVector BackPosition
The position of the track at itsdownstream-most end (x,y,z,t) in mm,ns.
TLorentzVector Position
track position 4-vector (x,y,z,t) in mm, ns
TVector3 DirectionVariance
Direction variance vector (at node)
Int_t NConstituents
The number of constituents this constituent ismade of.
ClassDef(TTrackerReconModule::TTrackerNode, 1)
bool FillConstituentPid(TTrackerResult *result, ND::THandle< ND::TReconPID > in, int &idx)
Method to fill information about constituent pids.
TVector3 TrDirectionVar
variance in track direction vector
int Ndof
Number of degrees of freedom in TPC fit.
TPC pid and track variables.
double ExtrapolatedVertexYY
for ybar vertex, this is y coordinate in mm
ClassDef(TTrackerReconModule::TTrackerResult, 1)
double Chi2
TPC chi2 calculated after likelihood fit.
double dEdxexpPion
Estimated dE/dx for pion hypothesis.
TTrackerNode hackNodes
This is just here to fool TFile::MakeProject,not a real object.
double Sigma1
TPC track diffusion sigma1 parameter.
TClonesArray * fTPCOther
The vector of TPC tracks with no fit.
int NDOF
The number of degrees of freedom.
double BackMomentum
the momentum at the back of the track iin MeV/c
ClassDef(TTrackerReconModule::TTrueParticle, 1)
TVector3 Position
The position of the hit component 0=x 1=y 2=z in mm.
Int_t NTPCs
Number of TPC tracks used to build this track.
TUnusedHit hackHits
This is just here to fool TFile::MakeProject, nota real object.
double TimeUnc
Time Uncertainty of hit in ns.
double dEdxexpEle
Estimated dE/dx for electron hypothesis.
An object to describe a track that has no fit result.
Int_t fNTPCIso
The number of isolated TPC tracks with fits (none ever?)
This module summarizes the reconstruction information from the trackerRecon.
Int_t fNTPCUnused
The number of unused TPC hits.
An object to describe the true G4 vertex associated to the TGlobalVertex.
Definition: TTrueVertex.hxx:14
UInt_t UniqueID
Unique ID number to allow matching to Global Reconobject.
TClonesArray * fTracks
The vector of overall trackerRecon results.
Int_t NConstituents
The number of constituents (tracks and pids) usedto build this track.
double PullKaon
Pull for TPC pid kaon hypothesis.
double TrCurvatureVar
variance in track direction vector, units are(1mm)^2
double Eff
The efficiency for matching.
Int_t ConstitIdx[2]
Index into Constituents of the constituents usedto build this track.
TLorentzVector FrontPosition
The position of the track at itsupstream-most end (x,y,z,t) in mm, ns.
double SigmaProton
Sigma estimated width of TPC pid proton hypothesis.
TClonesArray * TPC
Information about the TPC pids/tracks used to buildthis track.
TClonesArray * fTPCExtrapolation
The vector of TPC tracks extrapolatedinto the FGD following Claudio&#39;s (2010a)method.
double dEdxexpProton
Estimated dE/dx for proton hypothesis.
An object to describe a constituent of a trackerRecon result.
void GetMomentum(ND::THandle< ND::TTrackState > state, double &p, double &ep)
Helper method to convert TTrackState curvature information into momentum and momentum uncertainty...
double fDriftVelocity
TPC drift velocity used for tpc other hits.
TClonesArray * Nodes
Kinematics of the track at each node in the track fit.
double GetCharge(ND::THandle< ND::TTrackState > state)
Helper method to convert TTrackState curvature information into track charge.
double Sigma2
TPC track diffusion sigma2 parameter.
void FillFinalPid(TTrackerResult *result, ND::THandle< ND::TReconPID > reco)
Method to fill a trackerRecon result entry.
TVector3 Direction
track direction vector
double PullProton
Pull for TPC pid proton hypothesis.
double NTrun
70% of the number of clusters
Int_t fNTracks
The number of trackerRecon results.
TLorentzVector Variance
track position variance 4-vectorvar(x),var(y),var(z),var(t) in mm^2, ns^2
ND::THandle< ND::THitSelection > GetHitsFromComboHits(ND::THandle< ND::THitSelection > tpc)
Method to get the tpc combo hits from the tpc hit selection (used for tpc other)
TVector3 TrDirection
track direction vector
TLorentzVector Variance
position variance 4-vector(var(x),var(y),var(z),var(t)) in mm^2, ns^2
TVector3 FrontDirection
The direction vector at the front of the track.
double MeanDrift
TPC track mean drift value used in diffusion model.
double TotalCharge
Deposited charge (the hit EDeposit)
A base class for analysis output modules which contain reconstructed event information.
double Momentum
Track Momentum (at node) in MeV/c.
void FillTPC(ND::THandle< ND::TReconPID > in, TClonesArray *out, int idx)
Method to fill trackerRecon tree with TPC information Input is a TReconPID of TPC fit information...

Package Summary
Package Name: eventAnalysis
Package Version: 7.0-49-g0ac7482
Package Manager:

Generated on Mon Mar 25 2024 14:43:59 for eventAnalysis by doxygen 1.8.5