eventAnalysis  7.0-49-g0ac7482
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TTrackerECALReconModule.hxx
Go to the documentation of this file.
1 ///
2 /// For questions or suggestions about this module please contact the
3 /// current responsible and CC in the eventAnalysis package manager.
4 ///
5 /// 2015-3-25: Currently responsible lp208 [at] ac [dot] ic [dot] uk
6 ///
7 #ifndef TTrackerECALReconModule_hxx_seen
8 #define TTrackerECALReconModule_hxx_seen
9 
10 #include <iostream>
11 #include <set>
12 #include <sstream>
13 #include <string>
14 
15 #include "TClonesArray.h"
16 #include "TH2F.h"
17 #include "TNamed.h"
18 #include "TTree.h"
19 
20 #include "TG4Trajectory.hxx"
21 #include "TIntegerDatum.hxx"
22 #include "TND280Event.hxx"
23 #include "TReconCluster.hxx"
24 #include "TReconHit.hxx"
25 #include "TReconPID.hxx"
26 #include "TReconShower.hxx"
27 #include "TReconTrack.hxx"
28 #include "TReconVertex.hxx"
29 #include "vertexReconstruction/TECALVertexing.hxx"
30 
32 
33 namespace ND {
34  namespace TTrackerECALReconModule {
35 
36  class OutputManager;
37 
38  #ifdef TTRACKERECALRECONMODULE_USE_EXP
39  class TECALReconHit;
40  #endif
41  class TECALReconVertexCandidate;
42  class TECALReconTrack;
43  class TECALReconShower;
44  class TECALReconCluster;
45  class TECALReconObject;
46  class TECALReconUnmatchedObject;
47  class TECALReconVertexCluster;
48  class TECALReconVertexTrack;
49  class TECALReconVertexCrossing;
50 
51  #ifdef TTRACKERECALRECONMODULE_USE_EXP
52  /// Describes a reconstructed ECal Hit.
53  /// Contains information about the charge deposited in MEU, the reconstructed
54  /// position and associated uncertainty, and the reconstructed objects that
55  /// this hit was included in.
56  ///\note Associations are kept on the hits rather than the objects to avoid
57  /// changing the recon object output format.
58  class TECALReconHit : public TObject {
59  const static int MaxAssocs = 20;
60 
61  public:
62  ~TECALReconHit();
63  TECALReconHit();
64  /// Attempts to add a recon object association.
65  void AddAssocUID(unsigned int tuid);
66 
67  Int_t GeomId; ///< oaEvent TGeometryId of the physical volume associated with this hit.
68 
69 
70  Int_t UsedByNObjs; ///< Keeps track of the number of recon object associations this hit has.
71 
72  /// VLA of recon object associations.
73  UInt_t *ObjUIDs; //[UsedByNObjs]
74 
75  TLorentzVector Position; ///< Reconstructed position of the hit.
76 
77  TVector3 PosUncertainty; ///< Reconstructed position uncertainty of the hit.
78 
79  double ChargeDeposit; ///< Reconstructed charge deposition of the hit, scaled to MEU.
80 
81  short IsXYZ; ///< IsXYZ Hit
82 
83 
84  ClassDef(ND::TTrackerECALReconModule::TECALReconHit, 1);
85  };
86  #endif
87 
88  ///\brief Reconstructed ECal vertex candidate, contains fitted position and
89  /// associated track UIDs.
90  /// See ND::TECalVertexing for how these are created from vertex clusters
91  /// and 3D hough prongs.
93  public:
96 
97  UInt_t VertexClusterUID; ///< The UID of the associated TECALReconVertexCluster
98 
99  TLorentzVector Position; ///< The fitted position of the vertex candidate.
100 
101  std::string ECalModule; ///< The ECalModule that this vertex was reconstructed in.
102 
103  Int_t NTracks; ///< The number of tracks that contributed to the fitted position.
104 
105  Int_t NHits;///< The number of hits that were included in fitted tracks or were closer to this vertex candidate than any other in the cluster.
106 
107  Int_t G4IDSingle; ///< The G4ID of the single biggest contributor to the cluster
108 
109  Float_t CompletenessSingle; ///< The Completeness of the single biggest contributor to the cluster
110 
111  Float_t CleanlinessSingle; ///< The cleanliness (hit purity) of the single biggest contributor to the cluster
112 
113  Int_t G4IDPrimary; ///< The G4ID of the primary contributor to the cluster
114 
115  Float_t CompletenessPrimary; ///< The Completeness of the primary contributor to the cluster
116 
117  Float_t CleanlinessPrimary; ///< The cleanliness (hit purity) of the primary contributor to the cluster
118 
119  Int_t G4IDRecursive; ///< The G4ID of the Recursive contributor to the cluster
120 
121  Float_t CompletenessRecursive; ///< The Completeness of the Recursive contributor to the cluster
122 
123  Float_t CleanlinessRecursive; ///< The cleanliness (hit purity) of the Recursive contributor to the cluster
124 
125 
126  UInt_t *TrackUIDs; //[NTracks] ///< The UIDs of the associated TECALReconVertexTracks
127 
129  };
130 
131  /// Fills this vertex candidate from a ND::TECALReconVertex.
133  const ND::TECALReconVertex &, ND::THandle<ND::TReconVertex>, bool,
134  void *pos = NULL);
135 
137  ND::THandle<ND::TReconVertex>, UInt_t, bool, void *pos = NULL);
138 
139  /// The main object that contains ECAL track information
140  class TECALReconTrack : public TObject {
141  public:
142  virtual ~TECALReconTrack();
144 
145  TVector3 Direction; ///< The track direction
146 
147 
148  double EDeposit; ///< The charge deposited by the track in units of MIPs
149 
150 
151  TLorentzVector Position; ///< The track starting 4-position.
152 
153 
154  TLorentzVector PositionVar; ///< The track starting 4-position variance.
155 
156 
157  TLorentzVector BackPosition; ///< The position of the end of the track
158 
159 
160  ///< Track 'width'
161  ///< Used by GlobalRecon, isn't needed here, so generate streamer info.
162  TVector3 Width; //!
163 
165  };
166 
167  /// The main object that contains ECAL shower information
168  class TECALReconShower : public TObject {
169  public:
170  virtual ~TECALReconShower();
171 
172  TVector3 ConeAngle; ///< The shower opening angle.
173 
174 
175  TVector3 Direction; ///< The shower direction.
176 
177 
178  double EDeposit; ///< The energy deposited in the shower
179 
180 
181  TLorentzVector Position; ///< The shower position.
182 
183 
184  TLorentzVector PositionVar; ///< The shower position variance.
185 
186 
187  TLorentzVector BackPosition; ///< The charge weighted position of the end of the shower
188 
189 
191  };
192 
193  /// The main object that contains ECAL cluster information
194  class TECALReconCluster : public TObject {
195  public:
196  virtual ~TECALReconCluster();
198  TLorentzVector Position; ///< The cluster position.
199 
200 
201  TLorentzVector PositionVar; ///< The cluster position variance.
202 
203 
204  int NDOF; ///< The number of degrees of freedom in the reconstruction.
205 
206 
207  double EDeposit; ///< The charge deposited by the cluster.
208 
209 
211  };
212 
213  /// The main object that contains ECAL recon information
214  class TECALReconObject : public TObject {
215  public:
217  virtual ~TECALReconObject();
218 
219  bool FilledAsTrack; ///< Was filled by a Track-like TReconPID \note This is an ease of use boolean NOT a PID. For determining PID please use the PID variables.
220 
221  bool FilledAsShower; ///< Was filled by a Shower-like TReconPID \note This is an ease of use boolean NOT a PID. For determining PID please use the PID variables.
222 
223  TECALReconTrack Track; ///< Objects to store information for a track.
224 
225 
226  TECALReconShower Shower; ///< Objects to store information for a shower.
227 
228 
229  TECALReconCluster Cluster; ///< Objects to store information for a cluster.
230 
231 
232  UInt_t UniqueID; ///< Unique ID number to allow matching to Global Recon object.
233 
234 
235  Int_t G4ID; ///< G4ID for truth matched objects, using TrackTruthInfo the original truth-matching algorithm).
236 
237  Int_t G4ID_Primary; ///< G4ID of the primary particle associated with this object. See TShowerTruthInfo in oaUtility for details.
238 
239  Double_t Completeness_Primary; ///< Truth-matching completeness for G4ID_Primary
240 
241  Double_t Cleanliness_Primary; ///< Truth-matching cleanliness for G4ID_Primary
242 
243 
244  Int_t G4ID_Recursive; ///< G4ID of the highest-level parent particle that enters the ECal module, and which had a daughter that contributed to this object. See TShowerTruthInfo in oaUtility for details.
245 
246  Int_t G4ID_Recursive2; ///< G4ID of the highest-level parent particle that enters the ECal module, and which had a daughter that contributed to this object. See TShowerTruthInfo in oaUtility for details.
247 
248  Int_t G4ID_Recursive3; ///< G4ID of the highest-level parent particle that enters the ECal module, and which had a daughter that contributed to this object. See TShowerTruthInfo in oaUtility for details.
249 
250  Int_t G4ID_Recursive4; ///< G4ID of the highest-level parent particle that enters the ECal module, and which had a daughter that contributed to this object. See TShowerTruthInfo in oaUtility for details.
251 
252  Double_t Completeness_Recursive; ///< Truth-matching completeness for G4ID_Recursive
253 
254 
255  Double_t Cleanliness_Recursive; ///< Truth-matching cleanliness for G4ID_Recursive
256 
257 
258  Int_t G4ID_Single; ///< The single true particle that contributed most hits to this object. Should be the same as G4ID in most cases (unless two particles contributed the same amount). See TShowerTruthInfo in oaUtility for details.
259 
260  Double_t Completeness_Single; ///< Truth-matching completeness for G4ID_Single
261 
262  Double_t Cleanliness_Single; ///< Truth-matching cleanliness for G4ID_Single
263 
264 
265  Int_t NHits; ///< Number of hits in this object
266 
267 
268  Int_t NIsXHits; ///< Number of hits with precise X information in the object
269 
270 
271  Int_t NIsYHits; ///< Number of hits with precise Y information in the object
272 
273 
274  Int_t NIsZHits; ///< Number of hits with precise Z information in the object
275 
276 
277  Int_t NLayersHit; ///< Number of layers hit by this object
278 
279 
280  Int_t MaxPerpBarHit; ///<\ The maximum bar number hit in a cluster, for layers perpendicular to the beam axis
281  ///<\details The maximum value is 95 for Barrel ECals, 49 for DsECal
282 
283  Int_t MaxParaBarHit; ///< The maximum bar number hit in a cluster, for layers parallel to the beam axis
284  ///<\details The maximum value is 56 or 37 for Side and Top/Bottom Barrel
285  ///< ECals and 49 for DsECal
286 
287 
288  Int_t MinBarHit; ///< The minimum bar number hit in a cluster The minimum value of this is 0 for all ECals
289 
290  Int_t MostUpStreamLayerHit; ///< The layer closest to the tracker that was hit by the object. 0 indexed.
291 
292  Int_t MostDownStreamLayerHit; ///< The layer furthest from the tracker that was hit by the object. This is layer number 30 (the 31st layer) for Barrel ECals and layer number 33 (the 34th layer) for the downstream ECal
293 
294  Double_t TotalHitCharge; ///< Sum of charges of the consitituent hits in reconstructed object.
295 
296 
297  Double_t AverageHitTime; ///< Average time of hits in reconstructed object.
298 
299 
300  std::string Module; ///< Name of ECAL module in which object was reconstructed.
301 
302 
303  Double_t ObjectLength; ///< Recon object length in mm
304 
305 
306  ///Pid Variables, For more info on the Pid variable see the documentation
307  ///in ecalRecon or the technical note at;
308  /// http://www.t2k.org/docs/technotes/002
309 
310  double PID_Circularity; ///< The combined "circularity" of the object. (showers) 0.0 <= circularity <= 1.0 (tracks) This variable is a replacement for AMR. PID_Circularity = PID_CircularityView0 * PID_CircularityView1
311 
312  double PID_Angle; ///< The zenith angle with respect to each detector.
313 
314 
315  double PID_ShowerAngle; ///< The angle from the start of an object to its width at its charge centre
316 
317  double PID_Asymmetry; ///< Ratio of the big width of an object by its small width.
318 
319  double PID_TruncatedMaxRatio; ///< A truncated Max Ratio. See ecalRecon docs for the full definition.
320 
321 
322  double PID_TransverseChargeRatio; ///< A variable sensitive to the charge distribution in the plane transverse to a shower/track direction. See the ecalRecon documentation for the full definition.
323 
324  double PID_FrontBackRatio; ///< The ratio of the charge in equal length blocks at each end of the track. \note Assumes particle is coming from the tracker into the ECal.
325 
326  double Containment; ///< Containment: contained = 1.0, not-contained = 0.0, default = -1.0. An object is classed as contained if it has no hits in the outer bars of the ECal (bar number 0 or the maximum bar in a layer) and no hits in the outermost layer of the ECal.
327 
328  double PID_LLR_Quality; ///< A quality flag for the likelihood PID variables. Good quality = 0, Bad quality != 0. The quality criteria is defined in ecalRecon.
329 
330  double PID_LLR_MIP_EM; ///< A combined discriminator for separating MIPs from EM showers. Positive values = EM shower-like; Negative values = MIP-like. Analysers should check the PID_LLR_Quality flag before using this variable.
331  ///< You should not use this variable for physics if the quality is not good.
332  ///< For more details on the Likelihood PID see ecalRecon documentation or
333  ///< http://www.t2k.org/docs/technotes/111
334  ///< This variable should eventually replace the old TrShval
335  ///< See the ecalRecon documentation for more details.
336 
337 
338  double PID_LLR_MIP_Pion; ///< Discriminator for tagging showering pions in a sample of MIP-like tracks. Positive values = showering pion-like; Negative values = MIP-like.
339  ///< See the ecalRecon documentation for more details.
340  ///< Analysers should check the PID_LLR_Quality flag before using this variable.
341  ///< You should not use this variable for physics if the quality is not good.
342 
343  double PID_LLR_EM_HIP; ///< A combined discriminator for separating protons from electrons. Positive values = stopping track-like; Negative values = EM shower-like.
344  ///< See the ecalRecon documentation for more details.
345  ///< Analysers should check the PID_LLR_Quality flag before using this variable.
346  ///< You should not use this variable for physics if the quality is not good.
347 
348  double PID_LLR_MIP_EM_LowMomentum; ///< A combined discriminator for separating MIPs from EM showers. This is similar to LLR_MIP_EM but trained specifically on low-momentum electrons and muon. NB: this variable is still being developed and should be considered to be unstable. Positive values = electron-like; Negative values = muon-like. See the ecalRecon documentation for more details.
349 
350  double AverageZPosition; ///< Unweighted average Z position of object-constituent hits.
351 
352 
353  double EMEnergyFit_Result; ///< The result from the EM energy fit to the cluster
354 
355  double EMEnergyFit_Uncertainty; ///< The uncertainty of the EM energy fit to the cluster
356 
357  double EMEnergyFit_Likelihood_energyGrad; ///< Energy fit experts please fill this in
358 
359  double EMEnergyFit_Likelihood_energy_qsumGrad; ///< Energy fit experts please fill this in
360 
361  double EMEnergyFit_Likelihood_qsum_like; ///< Energy fit experts please fill this in
362 
363  double EMEnergyFit_Para_QSum; ///< The summed charge present in the cluster in units of MIPs
364 
365  double EMEnergyFit_Para_QMean; ///< The mean charge of hits in the cluster in units of MIPs
366 
367  double EMEnergyFit_Para_QRMS; ///< The RMS of the hit charges for the cluster in units of MIPs
368 
369  double EMEnergyFit_Para_QSkew; ///< The skew of hit charges for the cluster in units of MIPs
370 
371  double EMEnergyFit_Para_QMax; ///< The maximum hit charge in units of MIPs.
372 
373 
374  double Thrust;
375  TVector3 ThrustOrigin;
376  TVector3 ThrustAxis;
377 
378  double MatchingLikelihood; ///< The matching likelihood
379 
380 
381  int NHitsAtLayersWithManyHits; ///< The number of hits in a layer when there are at least 2 hits.
382 
383  int NLayersTwoHits; ///< The number of layers which have at least 2 hits.
384 
385  int NLayersThreeHits; ///< The number of layers which have at least 3 hits.
386 
387  int FirstLayerManyHits; ///< The number of the first layer in which there are at least 2 hits.
388 
389  int LastLayerManyHits; ///< The last layer in which there are at least 2 hits.
390 
391  int MaxHitsInALayer; ///< The layer which received the maximum number of hits.
392 
393  int MaxHitChargeLayer; ///< The layer which received the highest hit charge.
394 
395 
396  Int_t Clustering_3DSeedType; ///< The 3D seed type from the 3D clustering algorithm (-1 means was not created by 3D clustering, 0 means seed was from a pair of crossed bars, 1 means seed was from a double ended bar). Further details can be found in TECAL3DClusters.cxx in ecalRecon.
397 
398  TVector3 Pointing; ///< Pointing vector.
399 
400 
402  };
403 
404  /// Handles Filling from a PID's track hypothesis constituent.
405  ///
406  /// If `pos == NULL`, then a standard new is invoked. If a position is passed
407  /// then placement new is used. If `Allocate == false`, then pos is assumed to
408  /// point to an already allocated object.
409  /// Also used by TGlobalReconModule to jury rig filling.
410  TECALReconObject *TECALReconObjectFactory(ND::THandle<ND::TReconTrack>,
411  ND::THandle<ND::TReconPID>, bool,
412  void *pos = NULL,
413  bool Allocate = true);
414  /// Handles Filling from a PID's shower hypothesis constituent.
415  ///
416  /// If `pos == NULL`, then a standard new is invoked. If a position is passed
417  /// then placement new is used. If `Allocate == false`, then pos is assumed to
418  /// point to an already allocated object.
419  /// Also used by TGlobalReconModule to jury rig filling.
420  TECALReconObject *TECALReconObjectFactory(ND::THandle<ND::TReconShower>,
421  ND::THandle<ND::TReconPID>, bool,
422  void *pos = NULL,
423  bool Allocate = true);
424  ///\brief Method to calculate the position in the last layer reached by
425  /// the particle.
426  TLorentzVector FindBackPosition(ND::THandle<ND::THitSelection>, int);
427 
428  /// Calculates the pointing vector.
429  TVector3 CalculatePointing(ND::THandle<ND::THitSelection>);
430 
431  /// Method to fill hit info is seperate to help keep things tidy.
432  void FillHitInfo(TECALReconObject *, ND::THandle<ND::THitSelection>);
433 
434  /// Method to add information in RealDatums stored in the tracks or showers.
435  /// Examples of what this information includes,
436  /// - Pid, Parameters for the TMVA Tool used.
437  /// - Energy likelihood fit parametres, uncertainties etc...
438  /// - Michel Electron Tag information on any tagged delayed clusters.
439  void FillDatumInfo(TECALReconObject *, ND::THandle<ND::TReconBase>);
440 
441  /// Method to calculate the FrontBackRatio variable
442  double CalculateFrontBackRatio(ND::THandle<ND::THitSelection> hits);
443 
444  /// Object containing information about 2D unmatched clusters from the ECALs.
446  public:
448  virtual ~TECALReconUnmatchedObject();
449  int NHits; ///< Number of hits in the cluster
450 
451  int View; ///< View of the cluster. View 0 - Y measuring (odd) Layers and View 1 - X measuring (even) layers
452 
453  double TotalHitCharge; ///< Summed hit charge in the cluster in units of MIPs
454 
455  double AverageHitTime; ///< Average time of the cluster in ns
456 
457  TVector3 FrontPosition; ///< Position of the end of the cluster closest to the tracker
458 
459  TVector3 BackPosition; ///< Position in end of the cluster furthest from the tracker
460 
461  int MostUpStreamLayerHit; ///< The layer closest to the tracker that was hit by the cluster
462 
463  int MostDownStreamLayerHit; ///< The layer furthest from the tracker that was hit by the cluster
464 
465 
466  Int_t G4ID; ///< Truth-matched particle ID.
467 
468 
469  Int_t G4ID_Primary; ///< G4ID of the primary particle associated with this object.
470  ///< See TShowerTruthInfo in oaUtility for details.
471 
472  Int_t G4ID_Recursive; ///< G4ID of the highest-level parent particle that enters the ECal module, and which had a daughter that contributed to this object. See TShowerTruthInfo in oaUtility for details.
473 
474  Int_t G4ID_Single; ///< The single true particle that contributed most hits to this object. Should be the same as G4ID in most cases (unless two particles contributed the same amount). See TShowerTruthInfo in oaUtility for details.
475 
477  };
478 
479  /// Method that fills the data members from the unmatched cluster hits
480  void FillHitInfo(TECALReconUnmatchedObject *, ND::THandle<ND::THitSelection>);
481  /// Method that fills the data members from the unmatched cluster hits
483  ND::THandle<ND::TReconCluster>, bool, void *pos = NULL);
484 
486  public:
489 
490  UInt_t UniqueID; ///< UniqueID of the cluster
491 
492  Int_t NHits; ///< Number of hits in cluster
493 
494  Float_t TotalCharge; ///< The total charge of the cluster.
495 
496  TLorentzVector Position; ///< Position of cluster
497 
498  std::string Module; ///< Name of ECal module the cluster is reconstructed in
499 
500 
501  Int_t MinLayerHit; ///< The minimum layer number hit
502 
503  Int_t MaxLayerHit; ///< The maximum layer number hit
504 
505  Int_t MinParaBarHit; ///< The minimum bar number hit parallel to the beam axis
506 
507  Int_t MaxParaBarHit; ///< The maximum bar number hit parallel to the beam axis
508 
509  Int_t MinPerpBarHit; ///< The minimum bar number hit perpendicular to the beam axis
510 
511  Int_t MaxPerpBarHit; ///< The maximum bar number hit perpendicular to the beam axis
512 
513 
514  Int_t N2DTracksMax; ///< The maximum number of 2D tracks found in a view
515 
516  Int_t N2DTracksMin; ///< The minimum number of 2D tracks found in a view
517 
518  Int_t G4IDSingle; ///< The G4ID of the single biggest contributor to the cluster
519 
520  Float_t CompletenessSingle; ///< The Completeness of the single biggest contributor to the cluster
521 
522  Float_t CleanlinessSingle; ///< The cleanliness (hit purity) of the single biggest contributor to the cluster
523 
524  Int_t G4IDPrimary; ///< The G4ID of the primary contributor to the cluster
525 
526  Float_t CompletenessPrimary; ///< The Completeness of the primary contributor to the cluster
527 
528  Float_t CleanlinessPrimary; ///< The cleanliness (hit purity) of the primary contributor to the cluster
529 
530  Int_t G4IDRecursive; ///< The G4ID of the recursive contributor to the cluster
531 
532  Float_t CompletenessRecursive; ///< The Completeness of the recursive contributor to the cluster
533 
534  Float_t CleanlinessRecursive; ///< The cleanliness (hit purity) of the recursive contributor to the cluster
535 
536  Int_t NTracks; ///< Number of reconstructed tracks
537 
538  TClonesArray *Tracks; ///< The constituent tracks TClonesArray
539 
540  Int_t NCrossings; ///< Number of track crossings
541 
542  TClonesArray *Crossings; ///< The constituent crossings TClonesArray
543 
544 
546  };
547 
549  public:
551  // Deep copy contructor
554 
555  Int_t Status; ///< Vertexing status of the track
556  ///< The properties of this track are as calculated by the Hough transform.
557  ///< This status flag lets us know if the track was merged or flagged as bad
558  ///< during vertex candidate reconstruction (as opposed to the Hough
559  ///< transforming of the original cluster.)
560  ///< \note N.B. Values 0--3 are all tracks that were used in vertex candidate
561  ///< reconstruction.
562  ///<
563  ///< Flag values:
564  ///< * -1 : unset
565  ///< * 0 : good track, used in a vertex candidate
566  ///< * 1 : good track, result of two or more merged hough prongs
567  ///< * 2 : good track, however, was attempted to be merged with another prong
568  ///< and failed
569  ///< * 3 : good track, was not fit by RECPACK
570  ///< * 4 : missing sub-track (2D) constituent
571  ///< * 5 : sub-tracks have no shared layers
572  ///< * 6 : sub-track traverses only a single layer
573  ///< * 7 : sub-track has only 2 hits
574  ///< * 8 : track was merged into a super track
575  ///< * 9 : intermediate merged track that does exist in the hough transform or
576  ///< in the final vertex candidate tracks.
577  ///< Failure mode will only be available when using RunVertexing, otherwise
578  ///< failed tracks will have been thrown away.
579 
580  UInt_t UniqueID; ///< Unique ID of the track
581 
582  Int_t NHits; ///< Number of hits on track
583 
584  Float_t MatchingLikelihood; ///< The matching likelihood of the track
585 
586  TLorentzVector FrontPosition; ///< The front position (closest to the tracker) of the track
587 
588  TVector3 FrontDirection; ///< The front direction (closest to the tracker) of the track
589 
590 
591  Int_t FrontLayerNumber; ///< The front layer number (closest to the tracker) of the track
592 
593 
594  TLorentzVector BackPosition; ///< The back position (furthest from the tracker) of the track
595 
596  TVector3 BackDirection; ///< The back direction (furthest from the tracker) of the track
597 
598  Int_t BackLayerNumber; ///< The back layer number (closest to the tracker) of the track
599 
600 
601  Float_t TotalCharge; ///< The total charge deposited by the track
602 
603  Float_t StraightTrackLength; ///< Distance between the two track end positions
604 
605  Float_t NodeTrackLength; ///< Distance integrating along the track representation nodes.
606 
607 
608  // Charge weighted hit time along the track.
609  Float_t AverageHitTime;
610 
611  Int_t G4IDSingle; ///< The G4ID of the single biggest contributor to the track
612 
613 
614  #ifdef USE_FULL_VERTEX_TRACK_INFO
615  Float_t CompletenessSingle; ///< The Completeness of the single biggest contributor to the track
616 
617  Float_t CleanlinessSingle;///< The cleanliness (hit purity) of the single biggest contributor to the track
618 
619  TVector3 Single_FrontPosition; ///< Position of the closest G4 point of the best match single trajectory to the front position
620 
621  TVector3 Single_FrontDirection; ///< Direction of the closest G4 point of the best match single trajectory to the front position
622 
623  double Single_FrontG4PointDist; ///< Distance of the closest G4 point of the best match single trajectory to the front position
624 
625  TVector3 Single_BackPosition; ///< Position of the closest G4 point of the best match single trajectory to the back position
626 
627  TVector3 Single_BackDirection; ///< Direction of the closest G4 point of the best match single trajectory to the back position
628 
629 
630  double Single_BackG4PointDist; ///<\brief Distance of the closest G4 point of the best match single trajectory to the back position
631 
632  Int_t G4IDPrimary; ///< The G4ID of the primary contributor to the track
633 
634  Float_t CompletenessPrimary; ///< The Completeness of the primary contributor to the track
635 
636  Float_t CleanlinessPrimary; ///< The cleanliness (hit purity) of the primary contributor to the track
637 
638  Int_t G4IDRecursive; ///< The G4ID of the recursive contributor to the track
639 
640  Float_t CompletenessRecursive; ///< The Completeness of the recursive contributor to the track
641 
642  Float_t CleanlinessRecursive; ///< The cleanliness (hit purity) of the recursive contributor to the track
643 
644  Int_t SubTrack_UniqueID[2]; ///< The unique IDs of the 2D constituents of the track
645 
646  Int_t SubTrack_NHits[2]; ///< The number of hits on the 2D constituents of the track
647 
648  Int_t SubTrack_Angle[2]; ///< The angle the 2D constituents makes with the local x or y axis
649 
650  Int_t SubTrack_FrontLayerNumber[2]; ///< The front layer number (closest to the tracker) of the 2D track
651 
652  Int_t SubTrack_BackLayerNumber[2]; ///< The back layer number (furthest from the tracker) of the 2D track
653 
654  Int_t SubTrack_DOCA[2]; ///< The distance of closest approach of the 2D constituents to the cluster centre
655 
656  Float_t SubTrack_TotalCharge[2]; ///< The total charge of the 2D constituents
657 
658  Int_t SubTrack_G4IDSingle[2]; ///< The G4ID of the single biggest contributor to the 2D constituents
659 
660  Float_t SubTrack_CompletenessSingle[2]; ///< The Completeness of the single biggest contributor to the 2D constituents
661 
662  Float_t SubTrack_CleanlinessSingle[2]; ///< The cleanliness (hit purity) of the single biggest contributor to the 2D constituents
663 
664  Int_t SubTrack_G4IDPrimary[2]; ///< The G4ID of the primary contributor to the 2D constituents
665 
666 
667  Float_t SubTrack_CompletenessPrimary[2]; ///< The Completeness of the primary contributor to the 2D constituents
668 
669  Float_t SubTrack_CleanlinessPrimary[2]; ///< The cleanliness (hit purity) of the primary contributor to the 2D constituents
670 
671 
672  Int_t SubTrack_G4IDRecursive[2]; ///< The G4ID of the recursive contributor to the 2D constituents
673 
674  Float_t SubTrack_CompletenessRecursive[2]; ///< The Completeness of the recursive contributor to the 2D constituents
675 
676  Float_t SubTrack_CleanlinessRecursive[2]; ///< The cleanliness (hit purity) of the recursive contributor to the 2D constituents
677 
678  Int_t NCrossings; ///< The number of crossings associated with the track
679 
680  UInt_t *CrossingIDs; //[NCrossings] ///< The IDs of the crossings associated with the track
681 
682  #endif
683 
684  double PID_LLR_MIP_EM; ///< A combined discriminator for separating MIPs from EM showers. Positive values = EM shower-like; Negative values = MIP-like.
685  ///< For more details on the Likelihood PID see ecalRecon documentation or
686  ///< http://www.t2k.org/docs/technotes/111
687 
688  ///< This variable should eventually replace the old TrShval
689  ///< See the ecalRecon documentation for more details.
690 
691  double PID_LLR_EM_HIP; ///< A combined discriminator for separating protons from electrons. Positive values = stopping track-like; Negative values = EM shower-like.
692  ///< See the ecalRecon documentation for more details.
693 
694  double PID_LLR_MIP_HIP; ///< A combined discriminator for separating MIPs from HIPs. Positive values = HIP-LIKE; Negative values = MIP-like
695  ///< For more details on the Likelihood PID see ecalRecon documentation or
696  ///< http://www.t2k.org/docs/technotes/111
697 
698  double PID_LLR_MIP_HIP_VACut; ///< A combined discriminator for separating MIPs from HIPs where the hits nearest the vertex have been ignored. Positive values = HIP-LIKE; Negative values = MIP-like.
699  ///<
700  ///< For more details on the Likelihood PID see ecalRecon documentation or
701  ///< http://www.t2k.org/docs/technotes/111
702 
703 
704  double Containment; ///< Containment: contained = 1.0, not-contained = 0.0, default = -1.0.
705  ///<
706  ///< An object is classed as contained if it has no hits in the outer bars
707  ///< of the ECal (bar number 0 or the maximum bar in a layer)
708  ///< and no hits in the outermost layer of the ECal.
709 
711  };
712 
714  ND::THandle<ND::TReconPID>, bool, void *pos = NULL,
715  ND::THandle<ND::TG4TrajectoryContainer> trajectories =
716  ND::THandle<ND::TG4TrajectoryContainer>(NULL),
717  bool Allocate = true);
718 
720  public:
723  UInt_t UniqueID; ///< Unique ID of the crossing
724 
725  Int_t NHits; ///< Number of hits directly associated with the crossing
726 
727  Float_t *HitCharges; //[NHits] ///< Charges of associated hits
728 
729  Float_t *HitPositionsX; //[NHits] ///< X coordinates of associated hits
730 
731  Float_t *HitPositionsY; //[NHits] ///< Y coordinates of associated hits
732 
733  Float_t *HitPositionsZ; //[NHits] ///< Z coordinates of associated hits
734 
735  Float_t *HitTimes; //[NHits] ///< Times of associated hits
736 
737  Int_t *HitLayerNumbers; //[NHits] ///< Layer numbers of associated hits
738 
739  Int_t *HitBarNumbers; //[NHits] ///< Bar numbers of associated hits
740 
741  TLorentzVector Position; ///< The reconstruction position of the crossing
742 
743  Float_t DOCA; ///< The distance of closest approach of the two lines
744 
745  Int_t NTracks; ///< The number of tracks which created this crossing
746 
747  UInt_t *TrackIDs; //[NTracks] ///< The track IDs which created this crossing
748 
749 
751  };
752 
753  ///\brief Responsible for setting up output tree, looping over oaEvent
754  /// containers, and filling output objects.
755  ///
756  ///\details This eventAnalysis module provides information gleaned from the output
757  /// of the ecalRecon reconstruction package.
758  /// Amongst other quantities, the output of this module provides:
759  /// - Variables which quantify the extent to which the reconstructed object
760  /// resembles a track or a shower.
761  /// - Track and shower specific reconstructed quantities.
762  /// - Information concerning the constituent hits of reconstructed objects.
763  /// Users are encouraged to add information to this module.
764  /// Originally documented by Tom Maryon and others.
766  public:
767  OutputManager(const char *name = "TrackerECal",
768  const char *title = "Tracker ECal Recon Module");
769  virtual ~OutputManager();
770 
771  virtual Bool_t ProcessFirstEvent(ND::TND280Event &event);
772 
773  /// \brief Returns true if there is at least one Recon object in the Tracker
774  /// ECals.
775  ///
776  /// If -preselection=TTrackerECALReconModule is specified,
777  /// the full oaEvent event will be output for this event
778  virtual bool IsFullEventWorthSaving(ND::TND280Event &event);
779 
780  void SayAvailableOpts(std::string indent = "") {
781  std::cout << indent << "=SaveVertexCandy: Will Save reconstructed "
782  "vertex\n"
783  << indent << " candidate info" << std::endl;
784  std::cout << indent
785  << "=SaveTheHoff: Will save the bare Hough transform results."
786  << std::endl;
787  std::cout << indent << "=RunVertexing: will run\n"
788  <<indent <<" vertexing if the container\n"
789  << indent << " is not found" << std::endl;
790  #ifdef TTRACKERECALRECONMODULE_USE_EXP
791  std::cout << indent << "=SaveHitInfo: Will save hit info\n" << std::endl;
792 
793  std::cout << indent << "**Experimental functionality enabled**"
794  << std::endl;
795  #endif
796  }
797 
798  protected:
799  virtual void InitializeModule();
800 
801  virtual void InitializeBranches();
802  virtual bool FillTree(ND::TND280Event &);
803 
805  ND::THandle<ND::TAlgorithmResult> ecalFinalResult,
806  ND::THandle<ND::TG4TrajectoryContainer> trajectories);
807 
808  /// Handles saving of the results of the ecalRecon Hough transform
810  ND::THandle<ND::TAlgorithmResult> ecalFinalResult,
811  ND::THandle<ND::TG4TrajectoryContainer> trajectories);
812 
813  /// Just saves the final ECal-iso vertexing results.
814  /// Useful for matching extra ECal info for studies to global vertices
815  /// created with ECal vertexing more downstream.
817  ND::THandle<ND::TAlgorithmResult> ecalFinalResult,
818  ND::THandle<ND::TG4TrajectoryContainer> trajectories);
819 
820  /// Processes any results in the ecalRecon *other* container
821  void ProcessOtherContainer(ND::THandle<ND::TReconObjectContainer> other);
822  /// Processes any results in the ecalRecon *final* container
823  void ProcessFinalContainer(ND::THandle<ND::TReconObjectContainer> final);
824  /// Handles clearing and resetting of event level variables/arrays
825  void PerEvReset();
826 
827  #ifdef TTRACKERECALRECONMODULE_USE_EXP
828  /// Saves a THit, with object association UID
829  /// Will optionally overwrite a previous hit deemed to be equivalent via
830  /// TECALHitHasher---practically if they occur on the same bar at times within
831  /// 100 ns of each other.
832  void SaveUsedHit(ND::THandle<ND::THit> hit, unsigned int UID,
833  bool overwritePrevious = false);
834 
835  ///\brief Simple hit hashing function, uses the geomID and the hit time to
836  /// attempt to uniquely identify a hit.
837  ///\details Unlikely to result in collisions between hits that were not
838  /// originally the same, the time window for collision is one tenth of a ms.
839  /// - lp208 [at] ac [dot] ic [dot] uk
840  inline unsigned long TECALHitHasher(ND::THandle<ND::THit> hit) {
841  return (hit->GetGeomId().AsInt() * 1000 +
842  (int(hit->GetTime()) / 100) % 1000);
843  }
844 
845  /// Whether to save the individual hit info. [false]
846  bool fDoSaveHitInfo;
847 
848  /// Used to keep track of which ECal hits have been already used.
849  /// Maps between a 'Hit hash' and the index of the hit in
850  /// ND::OutputManager::fUsedHits.
851  std::map<unsigned long, unsigned int> fSavedHitMap;
852  #endif
853  /// Helper object which performs vertex candidate reconstruction
854  TECalVertexing *fVertexRecon;
855  ///\brief Whether to re-run the vertexing (N.B. this is reconstruction!) and
856  /// save full vertexing track results.
858  /// Whether to output the bare Hough transform results
860  /// Whether to calcluate and save the reconstructed vertx candidaties. [false]
862  /// Which tracks have already been saved
863  std::map<UInt_t, Int_t> fSavedVertexTrackIds;
864 
865  public:
866  /// Provides CLI for enabling fDoSaveHitInfo and fDoSaveVertexCandidates
867  Bool_t Configure(std::string &option);
868 
869  /// Tree Entries
876  #ifdef TTRACKERECALRECONMODULE_USE_EXP
877  Int_t fNUsedHits;
878  #endif
881 
882  long fTotal;
883 
884  TClonesArray *fReconObjects; ///< The TECALRecon Objects
885 
886  TClonesArray *fUnmatchedObjects; ///< The Unmatched Objects
887 
888  TClonesArray *fReconVertexClusters; ///< The Reconstructed Vertices
889 
890  #ifdef TTRACKERECALRECONMODULE_USE_EXP
891  TClonesArray *fUsedHits; ///< The used ECal hits
892 
893  #endif
894  TClonesArray *fVertexCandidates; ///< The reconstructed vertex candidates.
895 
896  TClonesArray *fVertexCandidateTracks; ///< The tracks associated with the reconstructed vertex candidates
897 
898  };
899  }
900 }
901 #endif
double PID_FrontBackRatio
The ratio of the charge in equal length blocks at each end of the track.
Int_t MinPerpBarHit
The minimum bar number hit perpendicular to the beam axis.
void FillHitInfo(TECALReconObject *obj, ND::THandle< ND::THitSelection > hitsel)
Method to fill hit info is seperate to help keep things tidy.
double EMEnergyFit_Likelihood_energyGrad
Energy fit experts please fill this in.
double EMEnergyFit_Para_QSum
The summed charge present in the cluster in units of MIPs.
Int_t G4IDPrimary
The G4ID of the primary contributor to the cluster.
double EMEnergyFit_Likelihood_qsum_like
Energy fit experts please fill this in.
void FillHoughTransformInformation(ND::THandle< ND::TAlgorithmResult > ecalFinalResult, ND::THandle< ND::TG4TrajectoryContainer > trajectories)
Handles saving of the results of the ecalRecon Hough transform.
Float_t CleanlinessRecursive
The cleanliness (hit purity) of the recursive contributor to the cluster.
double PID_Circularity
Pid Variables, For more info on the Pid variable see the documentation in ecalRecon or the technical ...
double PID_LLR_EM_HIP
A combined discriminator for separating protons from electrons.
Int_t G4ID_Single
The single true particle that contributed most hits to this object. Should be the same as G4ID in mos...
void FillVertexingInformation(ND::THandle< ND::TAlgorithmResult > ecalFinalResult, ND::THandle< ND::TG4TrajectoryContainer > trajectories)
TClonesArray * fUnmatchedObjects
The Unmatched Objects.
int NLayersTwoHits
The number of layers which have at least 2 hits.
Int_t G4IDRecursive
The G4ID of the recursive contributor to the cluster.
Double_t Completeness_Primary
Truth-matching completeness for G4ID_Primary.
The main object that contains ECAL shower information.
double PID_ShowerAngle
The angle from the start of an object to its width at its charge centre.
int FirstLayerManyHits
The number of the first layer in which there are at least 2 hits.
Int_t NTracks
The number of tracks that contributed to the fitted position.
double EMEnergyFit_Uncertainty
The uncertainty of the EM energy fit to the cluster.
TECalVertexing * fVertexRecon
Helper object which performs vertex candidate reconstruction.
double PID_LLR_MIP_HIP
A combined discriminator for separating MIPs from HIPs.
double PID_LLR_MIP_EM_LowMomentum
A combined discriminator for separating MIPs from EM showers. This is similar to LLR_MIP_EM but train...
UInt_t VertexClusterUID
The UID of the associated TECALReconVertexCluster.
TVector3 FrontPosition
Position of the end of the cluster closest to the tracker.
ClassDef(ND::TTrackerECALReconModule::TECALReconVertexCluster, 1)
virtual Bool_t ProcessFirstEvent(ND::TND280Event &event)
Is called after the first event is loaded in.
Double_t Completeness_Recursive
Truth-matching completeness for G4ID_Recursive.
Double_t Cleanliness_Single
Truth-matching cleanliness for G4ID_Single.
Float_t StraightTrackLength
Distance between the two track end positions.
virtual void InitializeBranches()
Initialize Branches. Don&#39;t do anything else in this function.
Int_t G4ID_Primary
G4ID of the primary particle associated with this object. See TShowerTruthInfo in oaUtility for detai...
Double_t TotalHitCharge
Sum of charges of the consitituent hits in reconstructed object.
void ProcessOtherContainer(ND::THandle< ND::TReconObjectContainer > other)
Processes any results in the ecalRecon other container.
TVector3 CalculatePointing(ND::THandle< ND::THitSelection > hits)
Calculates the pointing vector.
TLorentzVector BackPosition
The position of the end of the track.
Int_t NHits
Number of hits directly associated with the crossing.
bool fDoSaveVertexCandidates
Whether to calcluate and save the reconstructed vertx candidaties. [false].
Double_t ObjectLength
Recon object length in mm.
double EMEnergyFit_Result
The result from the EM energy fit to the cluster.
TLorentzVector BackPosition
The back position (furthest from the tracker) of the track.
Float_t CleanlinessPrimary
The cleanliness (hit purity) of the primary contributor to the cluster.
void ProcessFinalContainer(ND::THandle< ND::TReconObjectContainer > final)
Processes any results in the ecalRecon final container.
Responsible for setting up output tree, looping over oaEvent containers, and filling output objects...
double TotalHitCharge
Summed hit charge in the cluster in units of MIPs.
std::string Module
Name of ECal module the cluster is reconstructed in.
Float_t CompletenessRecursive
The Completeness of the Recursive contributor to the cluster.
Float_t TotalCharge
The total charge deposited by the track.
Int_t Clustering_3DSeedType
The 3D seed type from the 3D clustering algorithm (-1 means was not created by 3D clustering...
double PID_TruncatedMaxRatio
A truncated Max Ratio. See ecalRecon docs for the full definition.
TClonesArray * fReconObjects
The TECALRecon Objects.
OutputManager(const char *name="TrackerECal", const char *title="Tracker ECal Recon Module")
The main object that contains ECAL recon information.
Int_t MostDownStreamLayerHit
The layer furthest from the tracker that was hit by the object. This is layer number 30 (the 31st lay...
Int_t G4ID_Single
The single true particle that contributed most hits to this object. Should be the same as G4ID in mos...
void SayAvailableOpts(std::string indent="")
Subclasses should override this to let a user know what options are available.
TECALReconTrack Track
Objects to store information for a track.
Int_t N2DTracksMin
The minimum number of 2D tracks found in a view.
double EMEnergyFit_Likelihood_energy_qsumGrad
Energy fit experts please fill this in.
TLorentzVector PositionVar
The shower position variance.
Double_t AverageHitTime
Average time of hits in reconstructed object.
int MaxHitChargeLayer
The layer which received the highest hit charge.
Int_t NHits
The number of hits that were included in fitted tracks or were closer to this vertex candidate than a...
TLorentzVector Position
The reconstruction position of the crossing.
Int_t FrontLayerNumber
The front layer number (closest to the tracker) of the track.
Object containing information about 2D unmatched clusters from the ECALs.
double AverageHitTime
Average time of the cluster in ns.
Int_t G4IDSingle
The G4ID of the single biggest contributor to the cluster.
bool fDoVertexing
Whether to re-run the vertexing (N.B.
TECALReconShower Shower
Objects to store information for a shower.
void FillDatumInfo(TECALReconObject *obj, ND::THandle< ND::TReconBase > trb)
Method to add information in RealDatums stored in the tracks or showers.
Int_t G4ID_Recursive
G4ID of the highest-level parent particle that enters the ECal module, and which had a daughter that ...
TClonesArray * Tracks
The constituent tracks TClonesArray.
double AverageZPosition
Unweighted average Z position of object-constituent hits.
double PID_LLR_Quality
A quality flag for the likelihood PID variables. Good quality = 0, Bad quality != 0...
int MostDownStreamLayerHit
The layer furthest from the tracker that was hit by the cluster.
TLorentzVector Position
The fitted position of the vertex candidate.
Int_t G4IDSingle
The G4ID of the single biggest contributor to the track.
Double_t Cleanliness_Recursive
Truth-matching cleanliness for G4ID_Recursive.
Int_t G4IDRecursive
The G4ID of the Recursive contributor to the cluster.
Int_t MinBarHit
The minimum bar number hit in a cluster The minimum value of this is 0 for all ECals.
ClassDef(ND::TTrackerECALReconModule::TECALReconObject, 1)
double PID_LLR_EM_HIP
A combined discriminator for separating protons from electrons.
double EMEnergyFit_Para_QRMS
The RMS of the hit charges for the cluster in units of MIPs.
Int_t G4ID_Recursive4
G4ID of the highest-level parent particle that enters the ECal module, and which had a daughter that ...
Int_t G4ID_Recursive2
G4ID of the highest-level parent particle that enters the ECal module, and which had a daughter that ...
Int_t NLayersHit
Number of layers hit by this object.
UInt_t UniqueID
Unique ID number to allow matching to Global Recon object.
TECALReconUnmatchedObject * TECALReconUnmatchedObjectFactory(ND::THandle< ND::TReconCluster > cluster, bool IsMC, void *pos)
Method that fills the data members from the unmatched cluster hits.
double PID_Angle
The zenith angle with respect to each detector.
TLorentzVector BackPosition
The charge weighted position of the end of the shower.
TLorentzVector FrontPosition
The front position (closest to the tracker) of the track.
Float_t CleanlinessSingle
The cleanliness (hit purity) of the single biggest contributor to the cluster.
Float_t TotalCharge
The total charge of the cluster.
double PID_LLR_MIP_EM
A combined discriminator for separating MIPs from EM showers.
ClassDef(ND::TTrackerECALReconModule::TECALReconTrack, 1)
ClassDef(ND::TTrackerECALReconModule::TECALReconUnmatchedObject, 1)
Float_t DOCA
The distance of closest approach of the two lines.
Float_t CleanlinessPrimary
The cleanliness (hit purity) of the primary contributor to the cluster.
double EMEnergyFit_Para_QSkew
The skew of hit charges for the cluster in units of MIPs.
Bool_t Configure(std::string &option)
Provides CLI for enabling fDoSaveHitInfo and fDoSaveVertexCandidates.
TLorentzVector PositionVar
The track starting 4-position variance.
Float_t MatchingLikelihood
The matching likelihood of the track.
Int_t N2DTracksMax
The maximum number of 2D tracks found in a view.
virtual void InitializeModule()
Initialize Module, override if necessary.
double EDeposit
The charge deposited by the cluster.
The main object that contains ECAL cluster information.
ClassDef(ND::TTrackerECALReconModule::TECALReconCluster, 1)
double PID_LLR_MIP_Pion
Discriminator for tagging showering pions in a sample of MIP-like tracks.
double PID_TransverseChargeRatio
A variable sensitive to the charge distribution in the plane transverse to a shower/track direction...
virtual bool IsFullEventWorthSaving(ND::TND280Event &event)
Returns true if there is at least one Recon object in the Tracker ECals.
bool FilledAsTrack
Was filled by a Track-like TReconPID.
double EDeposit
The energy deposited in the shower.
TECALReconObject * TECALReconObjectFactory(ND::THandle< ND::TReconTrack > track, ND::THandle< ND::TReconPID > pid, bool IsMC, void *pos, bool Allocate)
Handles Filling from a PID&#39;s track hypothesis constituent.
Int_t NIsZHits
Number of hits with precise Z information in the object.
double PID_LLR_MIP_EM
A combined discriminator for separating MIPs from EM showers.
TVector3 BackDirection
The back direction (furthest from the tracker) of the track.
void FillECalIsoVertexingInformation(ND::THandle< ND::TAlgorithmResult > ecalFinalResult, ND::THandle< ND::TG4TrajectoryContainer > trajectories)
Just saves the final ECal-iso vertexing results.
Float_t CompletenessPrimary
The Completeness of the primary contributor to the cluster.
TECALReconCluster Cluster
Objects to store information for a cluster.
Float_t CompletenessRecursive
The Completeness of the recursive contributor to the cluster.
TClonesArray * fReconVertexClusters
The Reconstructed Vertices.
TVector3 BackPosition
Position in end of the cluster furthest from the tracker.
TLorentzVector Position
The track starting 4-position.
Reconstructed ECal vertex candidate, contains fitted position and associated track UIDs...
Float_t NodeTrackLength
Distance integrating along the track representation nodes.
TClonesArray * Crossings
The constituent crossings TClonesArray.
Int_t G4ID_Primary
G4ID of the primary particle associated with this object.
The main object that contains ECAL track information.
int MostUpStreamLayerHit
The layer closest to the tracker that was hit by the cluster.
TClonesArray * fVertexCandidates
The reconstructed vertex candidates.
std::string ECalModule
The ECalModule that this vertex was reconstructed in.
Float_t CompletenessSingle
The Completeness of the single biggest contributor to the cluster.
TClonesArray * fVertexCandidateTracks
The tracks associated with the reconstructed vertex candidates.
TVector3 FrontDirection
The front direction (closest to the tracker) of the track.
Int_t G4ID
G4ID for truth matched objects, using TrackTruthInfo the original truth-matching algorithm).
Int_t G4ID_Recursive
G4ID of the highest-level parent particle that enters the ECal module, and which had a daughter that ...
bool FilledAsShower
Was filled by a Shower-like TReconPID.
int NDOF
The number of degrees of freedom in the reconstruction.
double Containment
Containment: contained = 1.0, not-contained = 0.0, default = -1.0. An object is classed as contained ...
Int_t MaxParaBarHit
The maximum bar number hit in a cluster, for layers parallel to the beam axis.
Float_t CompletenessSingle
The Completeness of the single biggest contributor to the cluster.
double Containment
Containment: contained = 1.0, not-contained = 0.0, default = -1.0.
TECALReconVertexCandidate * TECALVertexCandidateFactory(const TECALReconVertex &rv, ND::THandle< ND::TReconVertex > top_vertex, bool IsMC, void *pos)
ClassDef(ND::TTrackerECALReconModule::TECALReconVertexCrossing, 1)
ClassDef(ND::TTrackerECALReconModule::TECALReconVertexTrack, 1)
Int_t MaxParaBarHit
The maximum bar number hit parallel to the beam axis.
ClassDef(ND::TTrackerECALReconModule::TECALReconVertexCandidate, 1)
Int_t MaxPerpBarHit
\ The maximum bar number hit in a cluster, for layers perpendicular to the beam axis ...
Int_t G4IDPrimary
The G4ID of the primary contributor to the cluster.
Int_t G4ID_Recursive3
G4ID of the highest-level parent particle that enters the ECal module, and which had a daughter that ...
Int_t MinParaBarHit
The minimum bar number hit parallel to the beam axis.
double EDeposit
The charge deposited by the track in units of MIPs.
double EMEnergyFit_Para_QMax
The maximum hit charge in units of MIPs.
Double_t Cleanliness_Primary
Truth-matching cleanliness for G4ID_Primary.
void PerEvReset()
Handles clearing and resetting of event level variables/arrays.
TLorentzVector PositionVar
The cluster position variance.
ClassDef(ND::TTrackerECALReconModule::TECALReconShower, 1)
Int_t G4IDSingle
The G4ID of the single biggest contributor to the cluster.
virtual bool FillTree(ND::TND280Event &)
Fill all the stuff that goes in the output tree.
bool fDoSaveHoughResults
Whether to output the bare Hough transform results.
Float_t CleanlinessSingle
The cleanliness (hit purity) of the single biggest contributor to the cluster.
Float_t CleanlinessRecursive
The cleanliness (hit purity) of the Recursive contributor to the cluster.
std::string Module
Name of ECAL module in which object was reconstructed.
int View
View of the cluster. View 0 - Y measuring (odd) Layers and View 1 - X measuring (even) layers...
Int_t NTracks
The number of tracks which created this crossing.
int NLayersThreeHits
The number of layers which have at least 3 hits.
int NHitsAtLayersWithManyHits
The number of hits in a layer when there are at least 2 hits.
int MaxHitsInALayer
The layer which received the maximum number of hits.
Int_t MostUpStreamLayerHit
The layer closest to the tracker that was hit by the object. 0 indexed.
Int_t NIsXHits
Number of hits with precise X information in the object.
std::map< UInt_t, Int_t > fSavedVertexTrackIds
Which tracks have already been saved.
Int_t NIsYHits
Number of hits with precise Y information in the object.
Double_t Completeness_Single
Truth-matching completeness for G4ID_Single.
TECALReconVertexTrack * TECALReconVertexTrackFactory(ND::THandle< ND::TReconPID > trk, bool IsMC, void *pos, ND::THandle< ND::TG4TrajectoryContainer > trajectories, bool Allocate)
TLorentzVector FindBackPosition(ND::THandle< ND::THitSelection > hits, int MostDownStreamLayerHit)
Method to calculate the position in the last layer reached by the particle.
double PID_Asymmetry
Ratio of the big width of an object by its small width.
int LastLayerManyHits
The last layer in which there are at least 2 hits.
double EMEnergyFit_Para_QMean
The mean charge of hits in the cluster in units of MIPs.
Float_t CompletenessPrimary
The Completeness of the primary contributor to the cluster.
A base class for analysis output modules which contain reconstructed event information.
Int_t BackLayerNumber
The back layer number (closest to the tracker) of the track.
double CalculateFrontBackRatio(ND::THandle< ND::THitSelection > hits)
Method to calculate the FrontBackRatio variable.
Int_t MaxPerpBarHit
The maximum bar number hit perpendicular to the beam axis.
double PID_LLR_MIP_HIP_VACut
A combined discriminator for separating MIPs from HIPs where the hits nearest the vertex have been ig...

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