eventAnalysis  7.0-49-g0ac7482
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TP0DReconModule.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 /// 14-Feb-2012: Current responsible for this module is,
6 /// Ian Taylor (itaylor [*a*t*] nngroup.physics.sunysb.edu)
7 ///
8 #ifndef TP0DReconModule_hxx_seen
9 #define TP0DReconModule_hxx_seen
10 
11 #include <string>
12 
13 #include <TClonesArray.h>
14 #include <TLorentzVector.h>
15 #include <TNamed.h>
16 #include <TPRegexp.h>
17 #include <TTree.h>
18 #include <TVector3.h>
19 
20 #include <TND280Event.hxx>
21 #include <TReconCluster.hxx>
22 #include <TReconPID.hxx>
23 #include <TReconShower.hxx>
24 #include <TReconTrack.hxx>
25 #include <TReconVertex.hxx>
26 
27 #include <TG4VHit.hxx>
28 #include <TMCDigit.hxx>
29 #include <TMCHit.hxx>
30 
32 
33 namespace ND {
34 class TP0DReconModule;
35 };
36 
37 /// Used to fill a TTree of summary information for the P0D
38 /// reconstruction algorithms.
40  public:
41  /// An internal Id and object type for each Reconstruction object.
42  struct ObjectID {
43  /// An internal Id for each Reconstruction object.
44  /// These Ids are sequential from 0 for each object type within each event
45  /// and correspond to their position within the respective TClonesArrays
46  /// e.g.
47  /// ND::TP0DReconModule::fNVertices.
48  /// They are set within the various Fill<type>() methods e.g.
49  /// ND::TP0DReconModule::FillVertexObject
50  ///\dontinclude TP0DReconModule.cxx
51  ///\skip ObjectID vertexID;
52  ///\until vertexID.id
53  /// and used by the, per event, reconstruction objects to keep track of
54  /// which
55  /// other objects relate to this one e.g.
56  /// ND::TP0DReconModule::TP0DVertex::Particles.
57  short id;
58  enum OType_t {
59  kBlank = 0,
66  };
67  /// The reconstruction object type that this internal Id refers to.
68  /// Not explicitly stored in output TTree. Used in
69  /// ND::TP0DReconModule::FillReconObject to determine which Fill<type>()
70  /// Method to call.
71  ///\dontinclude TP0DReconModule.cxx
72  ///\skip td::string reco_class_name
73  ///\until }
76  id = -1;
77  type = kBlank;
78  }
79  };
80 
81  //###################################################
82  ///\short Used to summarise the various reconstruction algorithm results that
83  /// p0dRecon employs.
84  class TP0DAlgoRes : public TObject {
85  public:
86  virtual ~TP0DAlgoRes();
87 
88  //###################################################
89  // These items are used by templated code, and must be the same
90  // for all of: P0DAlgoRes, P0DVertex, P0DParticle, P0DTrack,
91  // P0DShower and P0DCluster.
92  //###################################################
93 
94  /// The name of the p0dRecon algorithm that created this object.
95  std::string AlgorithmName;
96 
97  //###################################################
98 
99  short Cycle; ///< The cycle number, based on the first hit.
100 
101  //###################################################
102 
103  std::vector<short> Vertices;///< Holds internal Ids of Vertices pertinent to this algorithm result.
104  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
105  ///< ND::TP0DReconModule::TP0DVertex objects which are equivalent to indicies
106  ///< of ND::TP0DReconModule::fVertices which hold Vertices related to this
107  ///< algorithm result.
108  std::vector<short> Particles;///< Holds internal Ids of Particles pertinent to this algorithm result.
109  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
110  ///< ND::TP0DReconModule::TP0DParticle objects which are equivalent to
111  ///< indicies of ND::TP0DReconModule::fParticles which hold Particles related
112  ///< to this algorithm result.
113  std::vector<short> Tracks;///< Holds internal Ids of Tracks pertinent to this algorithm result.
114  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
115  ///< ND::TP0DReconModule::TP0DTrack objects which are equivalent to indicies
116  ///< of ND::TP0DReconModule::fTracks which hold Tracks related to this
117  ///< algorithm result.
118  std::vector<short> Showers;///< Holds internal Ids of Showers pertinent to this algorithm result.
119  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
120  ///< ND::TP0DReconModule::TP0DShower objects which are equivalent to indicies
121  ///< of ND::TP0DReconModule::fShowers which hold Showers related to this
122  ///< algorithm result.
123  std::vector<short> Clusters;///< Holds internal Ids of Clusters pertinent to this algorithm result.
124  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
125  ///< ND::TP0DReconModule::TP0DCluster objects which are equivalent to
126  ///< indicies of ND::TP0DReconModule::fClusters which hold Clusters related
127  ///< to this algorithm result.
128  std::vector<short> Nodes;///< Holds internal Ids of Nodes pertinent to this algorithm result.
129  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
130  ///< ND::TP0DReconModule::TP0DNode objects which are equivalent to indicies
131  ///< of ND::TP0DReconModule::fNodes which hold Nodes related to this
132  ///< algorithm result.
133  std::vector<short> Hits;///< Holds internal Ids of Hits pertinent to this algorithm result.
134  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
135  ///< ND::TP0DReconModule::TP0DHit objects which are equivalent to indicies
136  ///< of ND::TP0DReconModule::fHits which hold Hits related to this
137  ///< algorithm result.
138  short NHits; ///< A count of the Hits associated with this object.
139 
140  //###################################################
141 
142 
143  UInt_t UniqueID;///< UNUSED: A unique ID used for reconstruction objects.
144  ///<\details This is not used for this class. Filled by
145  ///< ND::TP0DReconModule::FillBaseObject which is not called by
146  ///< ND::TP0DReconModule::FillAlgorithmResult.
147 
148  //###################################################
149  // Objects below here are unique to their individual classes.
150  //###################################################
151 
152  std::string FullName;///< The name of the p0dRecon algorithm that corresponds to this
153  ///< algorithm result summary.
154  std::vector<short> AlgoResults;///< Holds internal Ids of daughter algorithm results to this one.
155  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
156  ///< ND::TP0DReconModule::TP0DAlgoRes objects which are equivalent to
157  ///< indicies of ND::TP0DReconModule::fAlgoResults which hold algorithm
158  ///< results related to this algorithm result.
159  short Parent;///< The internal Id of the parent algorithm result of this one.
160  ///<\details An ND::TP0DReconModule::ObjectID::id of an
161  ///< ND::TP0DReconModule::TP0DAlgoRes which is equivalent to
162  ///< the index of ND::TP0DReconModule::fAlgoResults which is the parent of
163  ///< this one. If this is the root result defaults to '-1'.
164  short UsedHitCluster;///< The internal Id of the cluster of hits which were used in a
165  ///< reconstruction object by this algorithm.
166  ///<\details An ND::TP0DReconModule::ObjectID::id of an
167  ///< ND::TP0DReconModule::TP0DCluster which is equivalent to
168  ///< the index of ND::TP0DReconModule::fClusters which is the used hit
169  ///< 'selection'.
170  short UnusedHitCluster;///< The internal Id of the cluster of hits which were not used in a
171  ///< reconstruction object by this algorithm.
172  ///<\details An ND::TP0DReconModule::ObjectID::id of an
173  ///< ND::TP0DReconModule::TP0DCluster which is equivalent to
174  ///< the index of ND::TP0DReconModule::fClusters which is the unused hit
175  ///< 'selection'.
176 
178  };
179 
180  //###################################################
181  /// Contains a summary of the reconstruction information in a TReconVertex.
182  class TP0DVertex : public TObject {
183  public:
184  virtual ~TP0DVertex();
185 
186  //###################################################
187  // These items are used by templated code, and must be the same
188  // for all of: P0DAlgoRes, P0DVertex, P0DParticle, P0DTrack,
189  // P0DShower and P0DCluster.
190  //###################################################
191 
192  /// The name of the p0dRecon algorithm that created this object.
193  std::string AlgorithmName;
194 
195  //###################################################
196 
197  short Cycle; ///< The cycle number, based on the first hit.
198 
199  //###################################################
200 
201  std::vector<short> Vertices;///< Holds internal Ids of Vertices pertinent to this reconstructed vertex.
202  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
203  ///< ND::TP0DReconModule::TP0DVertex objects which are equivalent to indicies
204  ///< of ND::TP0DReconModule::fVertices which hold Vertices related to this
205  ///< reconstructed vertex.
206  std::vector<short> Particles;///< Holds internal Ids of Particles pertinent to this reconstructed vertex.
207  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
208  ///< ND::TP0DReconModule::TP0DParticle objects which are equivalent to
209  ///< indicies of ND::TP0DReconModule::fParticles which hold Particles related
210  ///< to this reconstructed vertex.
211  std::vector<short> Tracks;///< Holds internal Ids of Tracks pertinent to this reconstructed vertex.
212  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
213  ///< ND::TP0DReconModule::TP0DTrack objects which are equivalent to indicies
214  ///< of ND::TP0DReconModule::fTracks which hold Tracks related to this
215  ///< reconstructed vertex.
216  std::vector<short> Showers;///< Holds internal Ids of Showers pertinent to this reconstructed vertex.
217  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
218  ///< ND::TP0DReconModule::TP0DShower objects which are equivalent to indicies
219  ///< of ND::TP0DReconModule::fShowers which hold Showers related to this
220  ///< reconstructed vertex.
221  std::vector<short> Clusters;///< Holds internal Ids of Clusters pertinent to this reconstructed vertex.
222  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
223  ///< ND::TP0DReconModule::TP0DCluster objects which are equivalent to
224  ///< indicies of ND::TP0DReconModule::fClusters which hold Clusters related
225  ///< to this reconstructed vertex.
226  std::vector<short> Nodes;///< Holds internal Ids of Nodes pertinent to this reconstructed vertex.
227  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
228  ///< ND::TP0DReconModule::TP0DNode objects which are equivalent to indicies
229  ///< of ND::TP0DReconModule::fNodes which hold Nodes related to this
230  ///< reconstructed vertex.
231  std::vector<short> Hits;///< Holds internal Ids of Hits pertinent to this reconstructed vertex.
232  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
233  ///< ND::TP0DReconModule::TP0DHit objects which are equivalent to indicies
234  ///< of ND::TP0DReconModule::fHits which hold Hits related to this
235  ///< reconstructed vertex.
236  short NHits; ///< A count of the Hits associated with this object.
237 
238  //###################################################
239 
240  UInt_t UniqueID;///< The Unique ID of the corresponding ND::TReconVertex, used for global-subdetector matching.
241  ///<\details In ND::TP0DReconModule::FillBaseObject
242  ///<\dontinclude TP0DReconModule.cxx
243  ///<\skipline basePtr->UniqueID
244 
245  //###################################################
246  // Objects below here are unique to their individual classes.
247  //###################################################
248 
249  int Status;///< The reported Status of the corresponding ND::TReconVertex.
250  ///<\dontinclude TP0DReconModule.cxx
251  ///<\skipline p0dVertex->Status
252  ///< Use ND::TReconBase::StateBits to check the which status flags are set.
253  float Quality;///< The reported reconstruction 'quality' of the corresponding ND::TReconVertex.
254  ///<\details Uses ND::TReconBase::GetQuality
255  ///<\dontinclude TP0DReconModule.cxx
256  ///<\skipline p0dVertex->Quality
257  int NDOF;///< The Number of Degrees of Freedom in the reconstruction of the
258  ///< corresponding ND::TReconVertex.
259  ///<\details Retreived from ND::TReconBase::GetNDOF
260  ///<\dontinclude TP0DReconModule.cxx
261  ///<\skipline p0dVertex->NDOF
262 
263  // Truth level hit information. For the MC hits in an object we
264  // store: the true trajectory IDs, the number of hits contributed
265  // by each and the charge share.
266 
267  std::vector<int> Truth_PrimaryTrajIDs;///< The vector of primary true trajectory IDs which contribute to the ND::THits which are constituents of this vertex.
268  ///<\details These are
269  ///< 'pseudo-primaries', which may or may not be primaries for a
270  ///< vertex. It is the 'interesting' primary that is defined by
271  ///< nd280Geant4Sim, and can include particles such as photons from pi0
272  ///< decay and michel electrons from muon decay. If you want to be
273  ///< sure of finding a vertex, use the TP0DVertex::Truth_TrajIDs list and
274  ///< get primary ID from the trajectories.
275  ///< See ND::TP0DReconModule::HitTruthPrimaryInfo for how they are
276  ///< calculated.
277 
278  std::vector<int> Truth_TrajIDs;///< The vector of true trajectory IDs which contribute to the ND::THits which are constituents of this vertex.
279  ///<\details The index of a given trajectory id within this vector is used
280  ///< as the index for the corresponding information held in
281  ///< TP0DVertex::Truth_HitCount and TP0DVertex::Truth_ChargeShare.
282  ///< See ND::TP0DReconModule::HitTruthInfo for how they are
283  ///< calculated.
284 
285  std::vector<short> Truth_HitCount;///< The number of THits that each truth trajectory contributed to.
286  ///<\details This doesn't have to equal the
287  ///< number of hits, hits can be shared and some hits may not have
288  ///< associated trajectories.
289  ///< Indexed by the position of the relevant trajectory ID in
290  ///< TP0DVertex::Truth_TrajIDs.
291  ///< See ND::TP0DReconModule::HitTruthInfo for how they are
292  ///< calculated.
293 
294  std::vector<float> Truth_ChargeShare;///< The weighted reconstructed charge deposited by each truth trajectory.
295  ///<\details For each THit, a trajectory will
296  ///< receive a proportional share of the charge, based on the total
297  ///< true charge deposited by all contributing trajectories.
298  ///< Indexed by the position of the relevant trajectory ID in
299  ///< TP0DVertex::Truth_TrajIDs.
300  ///< See ND::TP0DReconModule::HitTruthInfo for how they are
301  ///< calculated.
302 
303  TLorentzVector Position;///< Position of the TVertexState of the corresponding ND::TReconVertex.
304  ///<\dontinclude TP0DReconModule.cxx
305  ///<\skipline ND::THandle<ND::TVertexState> vertexState
306  ///<\skipline p0dVertex->Position
307  TLorentzVector PosVariance;///< Variance on the position of the TVertexState of the corresponding ND::TReconVertex.
308  ///<\details
309  ///<\dontinclude TP0DReconModule.cxx
310  ///<\skipline ND::THandle<ND::TVertexState> vertexState
311  ///<\skipline p0dVertex->PosVariance
312 
313  short ValidDimensions;///< Bit flag demarkating valid dimensions for this vertex's position.
314  ///< values(valid dimensions) : 1(x),2(y),4(z),3(xy),5(xz),6(yz),7(xyz)
315 
316  float Fiducial;///< The distance to the outside of the fiducial volume
317  ///<(negative if the vertex is outside).
318  ///<\details
319  ///<\dontinclude TP0DReconModule.cxx
320  ///<\skip p0dVertex->Fiducial =
321  ///<\until ;
322 
324  };
325 
326  /// A summary of the reconstruction information in a TReconPID. Do NOT
327  /// access nodes for a TP0DParticle. Instead access the TP0DTrack or
328  /// TP0DShower associated with the TP0DParticle and access the TP0DNodes
329  /// associated with those objects. Currently, TP0DParticle's Nodes are not
330  /// filled correctly.
331  class TP0DParticle : public TObject {
332  public:
333  virtual ~TP0DParticle();
334 
335  //###################################################
336  // These items are used by templated code, and must be the same
337  // for all of: P0DAlgoRes, P0DVertex, P0DParticle, P0DTrack,
338  // P0DShower and P0DCluster.
339  //###################################################
340 
341  std::string AlgorithmName;///< The name of the p0dRecon algorithm that created this object.
342 
343  //###################################################
344 
345  short Cycle; ///< The cycle number, based on the first hit.
346 
347  //###################################################
348 
349  std::vector<short> Vertices;///< Holds internal Ids of Vertices pertinent to this reconstructed particle.
350  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
351  ///< ND::TP0DReconModule::TP0DVertex objects which are equivalent to indicies
352  ///< of ND::TP0DReconModule::fVertices which hold Vertices related to this
353  ///< reconstructed particle.
354  std::vector<short> Particles;///< Holds internal Ids of Particles pertinent to this reconstructed particle.
355  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
356  ///< ND::TP0DReconModule::TP0DParticle objects which are equivalent to
357  ///< indicies of ND::TP0DReconModule::fParticles which hold Particles related
358  ///< to this reconstructed particle.
359  std::vector<short> Tracks;///< Holds internal Ids of Tracks pertinent to this reconstructed particle.
360  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
361  ///< ND::TP0DReconModule::TP0DTrack objects which are equivalent to indicies
362  ///< of ND::TP0DReconModule::fTracks which hold Tracks related to this
363  ///< reconstructed particle.
364  std::vector<short> Showers;///< Holds internal Ids of Showers pertinent to this reconstructed particle.
365  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
366  ///< ND::TP0DReconModule::TP0DShower objects which are equivalent to indicies
367  ///< of ND::TP0DReconModule::fShowers which hold Showers related to this
368  ///< reconstructed particle.
369  std::vector<short> Clusters;///< Holds internal Ids of Clusters pertinent to this reconstructed particle.
370  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
371  ///< ND::TP0DReconModule::TP0DCluster objects which are equivalent to
372  ///< indicies of ND::TP0DReconModule::fClusters which hold Clusters related
373  ///< to this reconstructed particle.
374  std::vector<short> Nodes;///< Holds internal Ids of Nodes pertinent to this reconstructed particle (probably not what you want for a TP0DParticle). This vector has the index in the ND::TP0DReconModule::fNodes vector of the nodes associated with this object. The nodes for a TP0DParticle don't hold the expected information for most P0D analyses, so you probably should be accessing the nodes of the constituent track.
375  std::vector<short> Hits;///< Holds internal Ids of Hits pertinent to this reconstructed particle.
376  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
377  ///< ND::TP0DReconModule::TP0DHit objects which are equivalent to indicies
378  ///< of ND::TP0DReconModule::fHits which hold Hits related to this
379  ///< reconstructed particle.
380  short NHits; ///< A count of the Hits associated with this object.
381  //###################################################
382 
383  UInt_t UniqueID;///< The Unique ID of the corresponding ND::TReconPID, used for global-subdetector matching.
384  ///<\details In ND::TP0DReconModule::FillBaseObject
385  ///<\dontinclude TP0DReconModule.cxx
386  ///<\skipline basePtr->UniqueID
387 
388  //###################################################
389  // Objects below here are unique to their individual classes.
390  //###################################################
391 
392  int Status;///< The reported Status of the corresponding ND::TReconPID.
393  ///<\dontinclude TP0DReconModule.cxx
394  ///<\skipline p0dVertex->Status
395  ///< Use ND::TReconBase::StateBits to check the which status flags are set.
396  float Quality;///< The reported reconstruction 'quality' of the corresponding ND::TReconPID.
397  ///<\details Uses ND::TReconBase::GetQuality
398  ///<\dontinclude TP0DReconModule.cxx
399  ///<\skipline p0dVertex->Quality
400  int NDOF;///< The Number of Degrees of Freedom in the reconstruction of the
401  ///< corresponding ND::TReconPID.
402  ///<\details Retreived from ND::TReconBase::GetNDOF
403  ///<\dontinclude TP0DReconModule.cxx
404  ///<\skipline p0dVertex->NDOF
405 
406  // Truth level hit information. For the MC hits in an object we
407  // store: the true trajectory IDs, the number of hits contributed
408  // by each and the charge share.
409 
410  std::vector<int> Truth_PrimaryTrajIDs;///< The vector of primary true trajectory IDs which contribute to the ND::THits which are constituents of this vertex.
411  ///<\details These are
412  ///< 'pseudo-primaries', which may or may not be primaries for a
413  ///< vertex. It is the 'interesting' primary that is defined by
414  ///< nd280Geant4Sim, and can include particles such as photons from pi0
415  ///< decay and michel electrons from muon decay. If you want to be
416  ///< sure of finding a vertex, use the TP0DParticle::Truth_TrajIDs list and
417  ///< get primary ID from the trajectories.
418  ///< See ND::TP0DReconModule::HitTruthPrimaryInfo for how they are
419  ///< calculated.
420 
421  std::vector<int> Truth_TrajIDs;///< The vector of true trajectory IDs which contribute to the ND::THits which are constituents of this vertex.
422  ///<\details The index of a given trajectory id within this vector is used
423  ///< as the index for the corresponding information held in
424  ///< TP0DParticle::Truth_HitCount and TP0DParticle::Truth_ChargeShare.
425  ///< See ND::TP0DReconModule::HitTruthInfo for how they are
426  ///< calculated.
427 
428  std::vector<short> Truth_HitCount;///< The number of THits that each truth trajectory contributed to.
429  ///<\details This doesn't have to equal the
430  ///< number of hits, hits can be shared and some hits may not have
431  ///< associated trajectories.
432  ///< Indexed by the position of the relevant trajectory ID in
433  ///< TP0DParticle::Truth_TrajIDs.
434  ///< See ND::TP0DReconModule::HitTruthInfo for how they are
435  ///< calculated.
436 
437  std::vector<float> Truth_ChargeShare;///< The weighted reconstructed charge deposited by each truth trajectory.
438  ///<\details For each THit, a trajectory will
439  ///< receive a proportional share of the charge, based on the total
440  ///< true charge deposited by all contributing trajectories.
441  ///< Indexed by the position of the relevant trajectory ID in
442  ///< TP0DParticle::Truth_TrajIDs.
443  ///< See ND::TP0DReconModule::HitTruthInfo for how they are
444  ///< calculated.
445 
446  float SideDeposit;///< The deposited charge in the side bars.
447  ///<\dontinclude TP0DReconModule.cxx
448  ///<\skip p0dParticle->SideDeposit
449  ///<\skipline ND::TGeometryId geomid = (*hit)->GetGeomId();
450  ///<\skip int layer = ND::TGeomInfo::P0D().GetBar(geomid).GetLayer();
451  ///<\until int bar
452  ///<\skip if(bar < 4 || (layer == 0 && bar > 121)
453  ///<\until }
454  float EndDeposit;///< The deposited charge in the end p0dules.
455  ///<\dontinclude TP0DReconModule.cxx
456  ///<\skip p0dParticle->SideDeposit
457  ///<\skipline ND::TGeometryId geomid = (*hit)->GetGeomId();
458  ///<\skipline int p0dule = ND::TGeomInfo::P0D().GetBar(geomid).GetP0Dule();
459  ///<\skip if(p0dule > 38){
460  ///<\until }
461 
462  TLorentzVector Position;///< Position of the TPIDState of the corresponding ND::TReconPID.
463  ///<\dontinclude TP0DReconModule.cxx
464  ///<\skipline ND::THandle<ND::TPIDState> particleState
465  ///<\skipline p0dParticle->Position
466  TLorentzVector PosVariance;///< Variance on the position of the TPIDState of the corresponding ND::TReconPID.
467  ///<\details
468  ///<\dontinclude TP0DReconModule.cxx
469  ///<\skipline ND::THandle<ND::TPIDState> particleState
470  ///<\skipline p0dParticle->PosVariance
471 
472  short ValidDimensions;///< Bit flag demarkating valid dimensions for this particle's position.
473  ///< values(valid dimensions) : 1(x),2(y),4(z),3(xy),5(xz),6(yz),7(xyz)
474 
475  TVector3 Direction;///< Direction of the TPIDState of the corresponding ND::TReconPID.
476  ///<\dontinclude TP0DReconModule.cxx
477  ///<\skipline ND::THandle<ND::TPIDState> particleState
478  ///<\skipline p0dParticle->Direction
479  TVector3 DirVariance;///< Variance on the TP0DParticle::Direction of the TPIDState of the corresponding ND::TReconPID.
480  ///<\details
481  ///<\dontinclude TP0DReconModule.cxx
482  ///<\skipline ND::THandle<ND::TPIDState> particleState
483  ///<\skipline p0dParticle->DirVariance
484 
485  float Momentum;///< The reconstructed momentum of the corresponding TReconPID.
486 
487  float Charge; ///< The reconstructed charge of the corresponding TReconPID.
488 
489  std::vector<std::string> realPIDNames;///< Holds the variable names of ND::TRealDatum stored in the TReconPID.
490  ///< The index of a given variable's name corresponds to the index of it's
491  ///< value held in TP0DParticle::realPIDValues.
492  std::vector<std::vector<float> > realPIDValues;///< Holds the PID variable values from ND::TRealDatum stored in the TReconPID.
493  ///<\details The index of a given variable's value vector corresponds to
494  ///< the index of it's name in TP0DParticle::realPIDNames.
495 
496  std::vector<std::string> integerPIDNames;///< Holds the variable names of ND::TIntegerDatum stored in the TReconPID.
497  ///< The index of a given variable's name corresponds to the index of it's
498  ///< value held in TP0DParticle::integerPIDValues.
499  std::vector<std::vector<short> > integerPIDValues;///< Holds the PID variable values from ND::TIntegerDatum stored in the TReconPID.
500  ///<\details The index of a given variable's value vector corresponds to
501  ///< the index of it's name in TP0DParticle::integerPIDNames.
502 
503  std::vector<short> PID;///< Potential PIDs (ND::TReconPID::ParticleId) matching with
504  ///< TP0DParticle::PID_Weight values.
505 
506  std::vector<float> PID_weight;///< PID weights for each PID in TP0DParticle::PID.
507 
509  };
510 
511  /// Contains a summary of the reconstruction information in a TReconShower.
512  class TP0DShower : public TObject {
513  public:
514  virtual ~TP0DShower();
515 
516  //###################################################
517  // These items are used by templated code, and must be the same
518  // for all of: P0DAlgoRes, P0DVertex, P0DParticle, P0DTrack,
519  // P0DShower and P0DCluster.
520  //###################################################
521 
522  std::string AlgorithmName;///< The name of the p0dRecon algorithm that created this object.
523 
524  //###################################################
525 
526  short Cycle; ///< The cycle number, based on the first hit.
527 
528  //###################################################
529 
530  std::vector<short> Vertices;///< Holds internal Ids of Vertices pertinent to this reconstructed shower.
531  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
532  ///< ND::TP0DReconModule::TP0DVertex objects which are equivalent to indicies
533  ///< of ND::TP0DReconModule::fVertices which hold Vertices related to this
534  ///< reconstructed shower.
535  std::vector<short> Particles;///< Holds internal Ids of Particles pertinent to this reconstructed shower.
536  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
537  ///< ND::TP0DReconModule::TP0DParticle objects which are equivalent to
538  ///< indicies of ND::TP0DReconModule::fParticles which hold Particles related
539  ///< to this reconstructed shower.
540  std::vector<short> Tracks;///< Holds internal Ids of Tracks pertinent to this reconstructed shower.
541  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
542  ///< ND::TP0DReconModule::TP0DTrack objects which are equivalent to indicies
543  ///< of ND::TP0DReconModule::fTracks which hold Tracks related to this
544  ///< reconstructed shower.
545  std::vector<short> Showers;///< Holds internal Ids of Showers pertinent to this reconstructed shower.
546  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
547  ///< ND::TP0DReconModule::TP0DShower objects which are equivalent to indicies
548  ///< of ND::TP0DReconModule::fShowers which hold Showers related to this
549  ///< reconstructed shower.
550  std::vector<short> Clusters;///< Holds internal Ids of Clusters pertinent to this reconstructed shower.
551  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
552  ///< ND::TP0DReconModule::TP0DCluster objects which are equivalent to
553  ///< indicies of ND::TP0DReconModule::fClusters which hold Clusters related
554  ///< to this reconstructed shower.
555  std::vector<short> Nodes;///< Holds internal Ids of Nodes pertinent to this reconstructed shower.
556  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
557  ///< ND::TP0DReconModule::TP0DNode objects which are equivalent to indicies
558  ///< of ND::TP0DReconModule::fNodes which hold Nodes related to this
559  ///< reconstructed shower.
560  std::vector<short> Hits;///< Holds internal Ids of Hits pertinent to this reconstructed shower.
561  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
562  ///< ND::TP0DReconModule::TP0DHit objects which are equivalent to indicies
563  ///< of ND::TP0DReconModule::fHits which hold Hits related to this
564  ///< reconstructed shower.
565  short NHits; ///< A count of the Hits associated with this object.
566 
567  //###################################################
568 
569  UInt_t UniqueID;///< The Unique ID of the corresponding ND::TReconShower, used for global-subdetector matching.
570  ///<\details In ND::TP0DReconModule::FillBaseObject
571  ///<\dontinclude TP0DReconModule.cxx
572  ///<\skipline basePtr->UniqueID
573 
574  //###################################################
575  // Objects below here are unique to their individual classes.
576  //###################################################
577 
578  int Status;///< The reported Status of the corresponding ND::TReconShower.
579  ///<\dontinclude TP0DReconModule.cxx
580  ///<\skipline p0dShower->Status
581  ///< Use ND::TReconBase::StateBits to check the which status flags are set.
582  float Quality;///< The reported reconstruction 'quality' of the corresponding ND::TReconShower.
583  ///<\details Uses ND::TReconBase::GetQuality
584  ///<\dontinclude TP0DReconModule.cxx
585  ///<\skipline p0dShower->Quality
586  int NDOF;///< The Number of Degrees of Freedom in the reconstruction of the corresponding ND::TReconShower.
587  ///<\details Retreived from ND::TReconBase::GetNDOF
588  ///<\dontinclude TP0DReconModule.cxx
589  ///<\skipline p0dShower->NDOF
590 
591  // Truth level hit information. For the MC hits in an object we
592  // store: the true trajectory IDs, the number of hits contributed
593  // by each and the charge share.
594 
595  std::vector<int> Truth_PrimaryTrajIDs;///< The vector of primary true trajectory IDs which contribute to the ND::THits which are constituents of this shower.
596  ///<\details These are
597  ///< 'pseudo-primaries', which may or may not be primaries for a
598  ///< vertex. It is the 'interesting' primary that is defined by
599  ///< nd280Geant4Sim, and can include particles such as photons from pi0
600  ///< decay and michel electrons from muon decay. If you want to be
601  ///< sure of finding a vertex, use the TP0DShower::Truth_TrajIDs list and
602  ///< get primary ID from the trajectories.
603  ///< See ND::TP0DReconModule::HitTruthPrimaryInfo for how they are
604  ///< calculated.
605 
606  std::vector<int> Truth_TrajIDs;///< The vector of true trajectory IDs which contribute to the ND::THits which are constituents of this shower.
607  ///<\details The index of a given trajectory id within this vector is used
608  ///< as the index for the corresponding information held in
609  ///< TP0DShower::Truth_HitCount and TP0DShower::Truth_ChargeShare.
610  ///< See ND::TP0DReconModule::HitTruthInfo for how they are
611  ///< calculated.
612 
613  std::vector<short> Truth_HitCount;///< The number of THits that each truth trajectory contributed to.
614  ///<\details This doesn't have to equal the
615  ///< number of hits, hits can be shared and some hits may not have
616  ///< associated trajectories.
617  ///< Indexed by the position of the relevant trajectory ID in
618  ///< TP0DShower::Truth_TrajIDs.
619  ///< See ND::TP0DReconModule::HitTruthInfo for how they are
620  ///< calculated.
621 
622  std::vector<float> Truth_ChargeShare;///< The weighted reconstructed charge deposited by each truth trajectory.
623  ///<\details For each THit, a trajectory will
624  ///< receive a proportional share of the charge, based on the total
625  ///< true charge deposited by all contributing trajectories.
626  ///< Indexed by the position of the relevant trajectory ID in
627  ///< TP0DShower::Truth_TrajIDs.
628  ///< See ND::TP0DReconModule::HitTruthInfo for how they are
629  ///< calculated.
630 
631  float EDeposit;///< The total reconstructed energy deposit of the corresponding ND::TReconShower.
632  ///<\details
633  ///<\dontinclude TP0DReconModule.cxx
634  ///<\skipline p0dShower->EDeposit
635 
636  float SideDeposit;///< The deposited charge in the side bars.
637  ///<\dontinclude TP0DReconModule.cxx
638  ///<\skip p0dShower->SideDeposit
639  ///<\skipline ND::TGeometryId geomid = (*hit)->GetGeomId();
640  ///<\skip int layer = ND::TGeomInfo::P0D().GetBar(geomid).GetLayer();
641  ///<\until int bar
642  ///<\skip if(bar < 4 || (layer == 0 && bar > 121)
643  ///<\until }
644  float EndDeposit;///< The deposited charge in the end p0dules.
645  ///<\dontinclude TP0DReconModule.cxx
646  ///<\skip p0dShower->SideDeposit
647  ///<\skipline ND::TGeometryId geomid = (*hit)->GetGeomId();
648  ///<\skipline int p0dule = ND::TGeomInfo::P0D().GetBar(geomid).GetP0Dule();
649  ///<\skip if(p0dule > 38){
650  ///<\until }
651 
652  TLorentzVector Position;///< Position of the TShowerState of the corresponding ND::TReconShower.
653  ///<\dontinclude TP0DReconModule.cxx
654  ///<\skipline ND::THandle<ND::TShowerState> showerState
655  ///<\skipline p0dShower->Position
656  TLorentzVector PosVariance;///< Variance on the position of the TShowerState of the corresponding ND::TReconShower.
657  ///<\details
658  ///<\dontinclude TP0DReconModule.cxx
659  ///<\skipline ND::THandle<ND::TShowerState> showerState
660  ///<\skipline p0dShower->PosVariance
661 
662  short ValidDimensions;///< Bit flag demarkating valid dimensions for this shower's position.
663  ///< values(valid dimensions) : 1(x),2(y),4(z),3(xy),5(xz),6(yz),7(xyz)
664 
665  TVector3 Direction;///< Direction of the TShowerState of the corresponding ND::TReconShower.
666  ///<\dontinclude TP0DReconModule.cxx
667  ///<\skipline ND::THandle<ND::TShowerState> showerState
668  ///<\skipline p0dPShower->Direction
669  TVector3 DirVariance;///< Variance on the TP0DShower::Direction of the TShowerState of the corresponding ND::TReconShower.
670  ///<\details
671  ///<\dontinclude TP0DReconModule.cxx
672  ///<\skipline ND::THandle<ND::TShowerState> showerState
673  ///<\skipline p0dShower->DirVariance
674 
675  float Cone;///< The opening angle of the TShowerState cone of the corresponding TReconShower.
676  ///<\details
677  ///<\dontinclude TP0DReconModule.cxx
678  ///<\skipline ND::THandle<ND::TShowerState> showerState
679  ///<\skipline p0dShower->Cone
680 
681  float Width;///< The 'width' of the shower, the extent perpendicular to the direction.
682  ///< This is calculated here. Each of the THits, within the TReconShower,
683  ///< contributes to the width based on it's, charged weighted,
684  ///< perpendicular distance from the TReconShower's position. This is done
685  ///< in 2D.
686  ///<\dontinclude TP0DReconModule.cxx
687  ///<\skip for (hit = showerHits->begin();
688  ///<\until {
689  ///<\skipline - p0dShower->Position.Vect();
690  ///<\skipline TVector3 para
691  ///<\skipline TVector3 perp = diff - para;
692  ///<\skip if ((*hit)->IsXHit()) {
693  ///<\until p0dShower->Width
694  ///<\skip p0dShower->SideDeposit
695  ///<\skip }
696  ///<\skip }
697  ///<\skipline }
698  ///<\skipline p0dShower->Width /= std::max(totalCharge,1.0);
699 
700  float Length;///< The RMS length of the shower, the extent parallel to the direction.
701  ///< This is calculated here. Each of the THits, within the TReconShower,
702  ///< contributes to the width based on it's, charged weighted,
703  ///< perpendicular distance from the TReconShower's position. This is done
704  ///< in 2D.
705  ///<\dontinclude TP0DReconModule.cxx
706  ///<\skip for (hit = showerHits->begin();
707  ///<\until {
708  ///<\skipline - p0dShower->Position.Vect();
709  ///<\skipline TVector3 para
710  ///<\skip if ((*hit)->IsXHit()) {
711  ///<\until totalCharge += q;
712  ///<\skipline avgLen
713  ///<\skipline avgLen2
714  ///<\skip p0dShower->SideDeposit
715  ///<\skip }
716  ///<\skip }
717  ///<\skipline }
718  ///<\skip avgLen
719  ///<\until p0dShower->Length
720 
722  };
723 
724  /// Contains a summary of the reconstruction information in a TReconCluster.
725  class TP0DCluster : public TObject {
726  public:
727  virtual ~TP0DCluster();
728 
729  //###################################################
730  // These items are used by templated code, and must be the same
731  // for all of: P0DAlgoRes, P0DVertex, P0DParticle, P0DTrack,
732  // P0DShower and P0DCluster.
733  //###################################################
734 
735  std::string AlgorithmName;///< The name of the p0dRecon algorithm that created this object.
736 
737  //###################################################
738 
739  short Cycle; ///< The cycle number, based on the first hit.
740 
741  //###################################################
742 
743  std::vector<short> Vertices;///< Holds internal Ids of Vertices pertinent to this reconstructed cluster.
744  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
745  ///< ND::TP0DReconModule::TP0DVertex objects which are equivalent to indicies
746  ///< of ND::TP0DReconModule::fVertices which hold Vertices related to this
747  ///< reconstructed cluster.
748  std::vector<short> Particles;///< Holds internal Ids of Particles pertinent to this reconstructed cluster.
749  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
750  ///< ND::TP0DReconModule::TP0DParticle objects which are equivalent to
751  ///< indicies of ND::TP0DReconModule::fParticles which hold Particles related
752  ///< to this reconstructed cluster.
753  std::vector<short> Tracks;///< Holds internal Ids of Tracks pertinent to this reconstructed cluster.
754  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
755  ///< ND::TP0DReconModule::TP0DTrack objects which are equivalent to indicies
756  ///< of ND::TP0DReconModule::fTracks which hold Tracks related to this
757  ///< reconstructed cluster.
758  std::vector<short> Showers;///< Holds internal Ids of Showers pertinent to this reconstructed cluster.
759  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
760  ///< ND::TP0DReconModule::TP0DShower objects which are equivalent to indicies
761  ///< of ND::TP0DReconModule::fShowers which hold Showers related to this
762  ///< reconstructed cluster.
763  std::vector<short> Clusters;///< Holds internal Ids of Clusters pertinent to this reconstructed cluster.
764  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
765  ///< ND::TP0DReconModule::TP0DCluster objects which are equivalent to
766  ///< indicies of ND::TP0DReconModule::fClusters which hold Clusters related
767  ///< to this reconstructed cluster.
768  std::vector<short> Nodes;///< Holds internal Ids of Nodes pertinent to this reconstructed cluster.
769  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
770  ///< ND::TP0DReconModule::TP0DNode objects which are equivalent to indicies
771  ///< of ND::TP0DReconModule::fNodes which hold Nodes related to this
772  ///< reconstructed cluster.
773  std::vector<short> Hits;///< Holds internal Ids of Hits pertinent to this reconstructed cluster.
774  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
775  ///< ND::TP0DReconModule::TP0DHit objects which are equivalent to indicies
776  ///< of ND::TP0DReconModule::fHits which hold Hits related to this
777  ///< reconstructed cluster.
778  short NHits; ///< A count of the Hits associated with this object.
779 
780  //###################################################
781 
782  UInt_t UniqueID;///< The Unique ID of the corresponding ND::TReconCluster, used for global-subdetector matching.
783  ///<\details In ND::TP0DReconModule::FillBaseObject
784  ///<\dontinclude TP0DReconModule.cxx
785  ///<\skipline basePtr->UniqueID
786 
787  //###################################################
788  // Objects below here are unique to their individual classes.
789  //###################################################
790 
791  // Truth level hit information. For the MC hits in an object we
792  // store: the true trajectory IDs, the number of hits contributed
793  // by each and the charge share.
794 
795  std::vector<int> Truth_PrimaryTrajIDs;///< The vector of primary true trajectory IDs which contribute to the ND::THits which are constituents of this vertex.
796  ///<\details These are
797  ///< 'pseudo-primaries', which may or may not be primaries for a
798  ///< vertex. It is the 'interesting' primary that is defined by
799  ///< nd280Geant4Sim, and can include particles such as photons from pi0
800  ///< decay and michel electrons from muon decay. If you want to be
801  ///< sure of finding a vertex, use the TP0DCluster::Truth_TrajIDs list and
802  ///< get primary ID from the trajectories.
803  ///< See ND::TP0DReconModule::HitTruthPrimaryInfo for how they are
804  ///< calculated.
805 
806  std::vector<int> Truth_TrajIDs;///< The vector of true trajectory IDs which contribute to the ND::THits which are constituents of this vertex.
807  ///<\details The index of a given trajectory id within this vector is used
808  ///< as the index for the corresponding information held in
809  ///< TP0DCluster::Truth_HitCount and TP0DCluster::Truth_ChargeShare.
810  ///< See ND::TP0DReconModule::HitTruthInfo for how they are
811  ///< calculated.
812 
813  std::vector<short> Truth_HitCount;///< The number of THits that each truth trajectory contributed to.
814  ///<\details This doesn't have to equal the
815  ///< number of hits, hits can be shared and some hits may not have
816  ///< associated trajectories.
817  ///< Indexed by the position of the relevant trajectory ID in
818  ///< TP0DCluster::Truth_TrajIDs.
819  ///< See ND::TP0DReconModule::HitTruthInfo for how they are
820  ///< calculated.
821 
822  std::vector<float> Truth_ChargeShare;///< The weighted reconstructed charge deposited by each truth trajectory.
823  ///<\details For each THit, a trajectory will
824  ///< receive a proportional share of the charge, based on the total
825  ///< true charge deposited by all contributing trajectories.
826  ///< Indexed by the position of the relevant trajectory ID in
827  ///< TP0DCluster::Truth_TrajIDs.
828  ///< See ND::TP0DReconModule::HitTruthInfo for how they are
829  ///< calculated.
830 
831  short NFiducialHits;///< The number of THits in the cluster which are within the fiducial volume.
832  ///<\dontinclude TP0DReconModule.cxx
833  ///<\skip float fiducial
834  ///<\until ;
835  ///<\skipline p0dCluster->NFiducialHits
836 
837  float EDeposit;///< The total reconstructed energy deposit of the corresponding ND::TReconCluster.
838  ///<\details
839  ///<\dontinclude TP0DReconModule.cxx
840  ///<\skipline p0dCluster->EDeposit
841 
842  TLorentzVector Position;///< Position of the corresponding ND::TReconCluster.
843  ///<\dontinclude TP0DReconModule.cxx
844  ///<\skipline p0dCluster->Position
845  TLorentzVector PosVariance;///< Variance on the position of the corresponding ND::TReconCluster.
846  ///<\details
847  ///<\dontinclude TP0DReconModule.cxx
848  ///<\skipline p0dCluster->PosVariance
849 
850  short ValidDimensions;///< Bit flag demarkating valid dimensions for this cluster's positon.
851  ///< values(valid dimensions) : 1(x),2(y),4(z),3(xy),5(xz),6(yz),7(xyz)
852 
853  static const int arraySize = 9;///< Size of the TP0DCluster::Moments array.
854  float Moments[arraySize];///< Moments of the cluster stored as a flat 3x3 matrix.
855  ///<\dontinclude TP0DReconModule.cxx
856  ///<\skipline TMatrixF moments
857  ///<\skip std::copy
858  ///<\until ;
859 
861  };
862 
863  ///< Contains a summary of the reconstruction information in a TReconTrack.
864  class TP0DTrack : public TObject {
865  public:
866  virtual ~TP0DTrack();
867 
868  //###################################################
869  // These items are used by templated code, and must be the same
870  // for all of: P0DAlgoRes, P0DVertex, P0DParticle, P0DTrack,
871  // P0DShower and P0DCluster.
872  //###################################################
873 
874  std::string AlgorithmName;///< The name of the p0dRecon algorithm that created this object.
875 
876  //###################################################
877 
878  short Cycle; ///< The cycle number, based on the first hit.
879 
880  //###################################################
881 
882  std::vector<short> Vertices;///< Holds internal Ids of Vertices pertinent to this reconstructed track.
883  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
884  ///< ND::TP0DReconModule::TP0DVertex objects which are equivalent to indicies
885  ///< of ND::TP0DReconModule::fVertices which hold Vertices related to this
886  ///< reconstructed track.
887  std::vector<short> Particles;///< Holds internal Ids of Particles pertinent to this reconstructed track.
888  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
889  ///< ND::TP0DReconModule::TP0DParticle objects which are equivalent to
890  ///< indicies of ND::TP0DReconModule::fParticles which hold Particles related
891  ///< to this reconstructed track.
892  std::vector<short> Tracks;///< Holds internal Ids of Tracks pertinent to this reconstructed track.
893  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
894  ///< ND::TP0DReconModule::TP0DTrack objects which are equivalent to indicies
895  ///< of ND::TP0DReconModule::fTracks which hold Tracks related to this
896  ///< reconstructed track.
897  std::vector<short> Showers;///< Holds internal Ids of Showers pertinent to this reconstructed track.
898  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
899  ///< ND::TP0DReconModule::TP0DShower objects which are equivalent to indicies
900  ///< of ND::TP0DReconModule::fShowers which hold Showers related to this
901  ///< reconstructed track.
902  std::vector<short> Clusters;///< Holds internal Ids of Clusters pertinent to this reconstructed track.
903  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
904  ///< ND::TP0DReconModule::TP0DCluster objects which are equivalent to
905  ///< indicies of ND::TP0DReconModule::fClusters which hold Clusters related
906  ///< to this reconstructed track.
907  std::vector<short> Nodes;///< Holds internal Ids of Nodes pertinent to this reconstructed track.
908  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
909  ///< ND::TP0DReconModule::TP0DNode objects which are equivalent to indicies
910  ///< of ND::TP0DReconModule::fNodes which hold Nodes related to this
911  ///< reconstructed track.
912  std::vector<short> Hits;///< Holds internal Ids of Hits pertinent to this reconstructed track.
913  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
914  ///< ND::TP0DReconModule::TP0DHit objects which are equivalent to indicies
915  ///< of ND::TP0DReconModule::fHits which hold Hits related to this
916  ///< reconstructed track.
917  short NHits; ///< A count of the Hits associated with this object.
918 
919  //###################################################
920 
921  UInt_t UniqueID;///< The Unique ID of the corresponding ND::TReconTrack, used for global-subdetector matching.
922  ///<\details In ND::TP0DReconModule::FillBaseObject
923  ///<\dontinclude TP0DReconModule.cxx
924  ///<\skipline basePtr->UniqueID
925 
926  //###################################################
927  // Objects below here are unique to their individual classes.
928  //###################################################
929 
930  int Status;///< The reported Status of the corresponding ND::TReconTrack.
931  ///<\dontinclude TP0DReconModule.cxx
932  ///<\skipline p0dTrack->Status
933  ///< Use ND::TReconBase::StateBits to check the which status flags are set.
934  float Quality;///< The reported reconstruction 'quality' of the corresponding ND::TReconTrack.
935  ///<\details Uses ND::TReconBase::GetQuality
936  ///<\dontinclude TP0DReconModule.cxx
937  ///<\skipline p0dTrack->Quality
938  int NDOF;///< The Number of Degrees of Freedom in the reconstruction of the corresponding ND::TReconTrack.
939  ///<\details Retreived from ND::TReconBase::GetNDOF
940  ///<\dontinclude TP0DReconModule.cxx
941  ///<\skipline p0dTrack->NDOF
942 
943  // Truth level hit information. For the MC hits in an object we
944  // store: the true trajectory IDs, the number of hits contributed
945  // by each and the charge share.
946 
947  std::vector<int> Truth_PrimaryTrajIDs;///< The vector of primary true trajectory IDs which contribute to the ND::THits which are constituents of this track.
948  ///<\details These are
949  ///< 'pseudo-primaries', which may or may not be primaries for a
950  ///< vertex. It is the 'interesting' primary that is defined by
951  ///< nd280Geant4Sim, and can include particles such as photons from pi0
952  ///< decay and michel electrons from muon decay. If you want to be
953  ///< sure of finding a vertex, use the TP0DTrack::Truth_TrajIDs list and
954  ///< get primary ID from the trajectories.
955  ///< See ND::TP0DReconModule::HitTruthPrimaryInfo for how they are
956  ///< calculated.
957 
958  std::vector<int> Truth_TrajIDs;///< The vector of true trajectory IDs which contribute to the ND::THits which are constituents of this track.
959  ///<\details The index of a given trajectory id within this vector is used
960  ///< as the index for the corresponding information held in
961  ///< TP0DTrack::Truth_HitCount and TP0DTrack::Truth_ChargeShare.
962  ///< See ND::TP0DReconModule::HitTruthInfo for how they are
963  ///< calculated.
964 
965  std::vector<short> Truth_HitCount;///< The number of THits that each truth trajectory contributed to.
966  ///<\details This doesn't have to equal the
967  ///< number of hits, hits can be shared and some hits may not have
968  ///< associated trajectories.
969  ///< Indexed by the position of the relevant trajectory ID in
970  ///< TP0DTrack::Truth_TrajIDs.
971  ///< See ND::TP0DReconModule::HitTruthInfo for how they are
972  ///< calculated.
973 
974  std::vector<float> Truth_ChargeShare;///< The weighted reconstructed charge deposited by each truth trajectory.
975  ///<\details For each THit, a trajectory will
976  ///< receive a proportional share of the charge, based on the total
977  ///< true charge deposited by all contributing trajectories.
978  ///< Indexed by the position of the relevant trajectory ID in
979  ///< TP0DTrack::Truth_TrajIDs.
980  ///< See ND::TP0DReconModule::HitTruthInfo for how they are
981  ///< calculated.
982 
983  float EDeposit;///< The total reconstructed energy deposit of the corresponding ND::TReconTrack.
984  ///<\details
985  ///<\dontinclude TP0DReconModule.cxx
986  ///<\skipline p0dTrack->EDeposit
987 
988  float SideDeposit;///< The deposited charge in the side bars.
989  ///<\dontinclude TP0DReconModule.cxx
990  ///<\skip p0dTrack->SideDeposit
991  ///<\skipline ND::TGeometryId geomid = (*hit)->GetGeomId();
992  ///<\skip int layer = ND::TGeomInfo::P0D().GetBar(geomid).GetLayer();
993  ///<\until int bar
994  ///<\skip if(bar < 4 || (layer == 0 && bar > 121)
995  ///<\until }
996  float EndDeposit;///< The deposited charge in the end p0dules.
997  ///<\dontinclude TP0DReconModule.cxx
998  ///<\skip p0dTrack->SideDeposit
999  ///<\skipline ND::TGeometryId geomid = (*hit)->GetGeomId();
1000  ///<\skipline int p0dule = ND::TGeomInfo::P0D().GetBar(geomid).GetP0Dule();
1001  ///<\skip if(p0dule > 38){
1002  ///<\until }
1003 
1004  TLorentzVector Position;///< Position of the TTrackState of the corresponding ND::TReconTrack.
1005  ///<\dontinclude TP0DReconModule.cxx
1006  ///<\skipline ND::THandle<ND::TTrackState> trackState
1007  ///<\skipline p0dTrack->Position
1008  TLorentzVector PosVariance;///< Variance on the position of the TTrackState of the corresponding ND::TReconTrack.
1009  ///<\details
1010  ///<\dontinclude TP0DReconModule.cxx
1011  ///<\skipline ND::THandle<ND::TTrackState> trackState
1012  ///<\skipline p0dTrack->PosVariance
1013 
1014  short ValidDimensions;///< Bit flag demarkating valid dimensions for this track's position.
1015  ///< values(valid dimensions) : 1(x),2(y),4(z),3(xy),5(xz),6(yz),7(xyz)
1016 
1017  TVector3 Direction;///< Direction of the TTrackState of the corresponding ND::TReconTrack.
1018  ///<\dontinclude TP0DReconModule.cxx
1019  ///<\skipline ND::THandle<ND::TTrackState> trackState
1020  ///<\skipline p0dPTrack->Direction
1021  TVector3 DirVariance;///< Variance on the TP0DTrack::Direction of the TTrackState of the corresponding ND::TReconTrack.
1022  ///<\details
1023  ///<\dontinclude TP0DReconModule.cxx
1024  ///<\skipline ND::THandle<ND::TTrackState> trackState
1025  ///<\skipline p0dTrack->DirVariance
1026 
1027  float Length;///< The length of the track calculated by summing over the distances
1028  ///< between the constituent TReconNodes.
1029 
1031  };
1032 
1033  ///< Contains a summary of the reconstruction information in a TReconNode.
1034  class TP0DNode : public TObject {
1035  public:
1036  virtual ~TP0DNode();
1037  std::vector<short> Hits;///< Holds internal Ids of Hits pertinent to this reconstruction node.
1038  ///<\details Holds ND::TP0DReconModule::ObjectID::id of
1039  ///< ND::TP0DReconModule::TP0DHit objects which are equivalent to indicies
1040  ///< of ND::TP0DReconModule::fHits which hold Hits related to this
1041  ///< reconstruction node.
1042 
1043  // Truth level hit information. For the MC hits in an object we
1044  // store: the true trajectory IDs, the number of hits contributed
1045  // by each and the charge share.
1046 
1047  std::vector<int> Truth_PrimaryTrajIDs;///< The vector of primary true trajectory IDs which contribute to the ND::THits which are constituents of this vertex.
1048  ///<\details These are
1049  ///< 'pseudo-primaries', which may or may not be primaries for a
1050  ///< vertex. It is the 'interesting' primary that is defined by
1051  ///< nd280Geant4Sim, and can include particles such as photons from pi0
1052  ///< decay and michel electrons from muon decay. If you want to be
1053  ///< sure of finding a vertex, use the TP0DNode::Truth_TrajIDs list and
1054  ///< get primary ID from the trajectories.
1055  ///< See ND::TP0DReconModule::HitTruthPrimaryInfo for how they are
1056  ///< calculated.
1057 
1058  std::vector<int> Truth_TrajIDs;///< The vector of true trajectory IDs which contribute to the ND::THits which are constituents of this vertex.
1059  ///<\details The index of a given trajectory id within this vector is used
1060  ///< as the index for the corresponding information held in
1061  ///< TP0DNode::Truth_HitCount and TP0DNode::Truth_ChargeShare.
1062  ///< See ND::TP0DReconModule::HitTruthInfo for how they are
1063  ///< calculated.
1064 
1065  std::vector<short> Truth_HitCount;///< The number of THits that each truth trajectory contributed to.
1066  ///<\details This doesn't have to equal the
1067  ///< number of hits, hits can be shared and some hits may not have
1068  ///< associated trajectories.
1069  ///< Indexed by the position of the relevant trajectory ID in
1070  ///< TP0DNode::Truth_TrajIDs.
1071  ///< See ND::TP0DReconModule::HitTruthInfo for how they are
1072  ///< calculated.
1073 
1074  std::vector<float> Truth_ChargeShare;///< The weighted reconstructed charge deposited by each truth trajectory.
1075  ///<\details For each THit, a trajectory will
1076  ///< receive a proportional share of the charge, based on the total
1077  ///< true charge deposited by all contributing trajectories.
1078  ///< Indexed by the position of the relevant trajectory ID in
1079  ///< TP0DNode::Truth_TrajIDs.
1080  ///< See ND::TP0DReconModule::HitTruthInfo for how they are
1081  ///< calculated.
1082 
1083  float EDeposit;///< The total reconstructed energy deposit of the ND::TMEDepositState of the relevant ND::TReconNode.
1084  ///<\details
1085  ///<\dontinclude TP0DReconModule.cxx
1086  ///<\skip ND::THandle<ND::TReconBase> nodeObject = node->GetObject();
1087  ///<\until p0dNode->EDeposit
1088  ///<\skipline }
1089  ///<\skipline }
1090  ///<\skip p0dNode->Truth_PrimaryTrajIDs
1091  ///<\skip }
1092  ///<\skip }
1093  ///<\skipline }
1094 
1095  TLorentzVector Position;///< Position of the TMPositionDirectionState of the corresponding ND::TReconNode.
1096  ///<\details
1097  ///<\dontinclude TP0DReconModule.cxx
1098  ///<\skipline ND::THandle<ND::TReconState> s1 = node->GetState();
1099  ///<\skip posDirState =
1100  ///<\until ND::GetPointer(s1));
1101  ///<\skipline p0dNode->Position
1102  TLorentzVector PosVariance;///< Variance on the position of the TMPositionDirectionState of the corresponding ND::TReconPID.
1103  ///<\details
1104  ///<\dontinclude TP0DReconModule.cxx
1105  ///<\skipline ND::THandle<ND::TReconState> s1 = node->GetState();
1106  ///<\skip posDirState =
1107  ///<\until ND::GetPointer(s1));
1108  ///<\skipline p0dNode->PosVar
1109 
1110  short ValidDimensions;///< Bit flag demarkating valid dimensions for this node's position.
1111  ///< values(valid dimensions) : 1(x),2(y),4(z),3(xy),5(xz),6(yz),7(xyz)
1112 
1113  TVector3 Direction;///< Direction of the TMPositionDirectionState of the corresponding ND::TReconNode.
1114  ///<\details
1115  ///<\dontinclude TP0DReconModule.cxx
1116  ///<\skipline ND::THandle<ND::TReconState> s1 = node->GetState();
1117  ///<\skip posDirState =
1118  ///<\until );
1119  ///<\skipline p0dNode->Direction
1120  TVector3 DirVariance;///< Variance on the TP0DNode::Direction of the TMPositionDirectionState of the corresponding ND::TReconNode.
1121  ///<\details
1122  ///<\dontinclude TP0DReconModule.cxx
1123  ///<\skipline ND::THandle<ND::TReconState> s1 = node->GetState();
1124  ///<\skip posDirState =
1125  ///<\until );
1126  ///<\skipline p0dNode->DirVar
1127 
1129  };
1130 
1131  ///< Contains a summary of the reconstruction information in a TSingleHit.
1132  class TP0DHit : public TObject {
1133  public:
1134  virtual ~TP0DHit() {}
1135 
1136  UInt_t GeomID; ///< Geometry Id of the TSingleHit.
1137 
1138  UInt_t ChanID; ///< Channel Id of the TSingleHit.
1139 
1140  float Charge;///< Reconstructed hit charge without attenuation correction from the corresponding TSingleHit.
1141  ///<\dontinclude TP0DReconModule.cxx
1142  ///<\skipline ND::THandle<ND::TSingleHit> sh
1143  ///<\skipline p0dHit->Charge
1144 
1145  float Time;///< Reconstructed hit time from the corresponding TSingleHit.
1146  ///<\dontinclude TP0DReconModule.cxx
1147  ///<\skipline ND::THandle<ND::TSingleHit> sh
1148  ///<\skipline p0dHit->Time
1149 
1151  };
1152 
1153  public:
1154  TP0DReconModule(const char *name = "P0D",
1155  const char *title = "P0D Recon Module");
1156  virtual ~TP0DReconModule();
1157 
1158  virtual EType GetTreeType() const { return kRecon; }
1159 
1160  virtual Bool_t ProcessFirstEvent(ND::TND280Event &);
1161 
1162  protected:
1163  virtual void InitializeModule();
1164 
1165  virtual void InitializeBranches();
1166  virtual bool FillTree(ND::TND280Event &);
1167 
1168  virtual short FillAlgorithmResult(const ND::THandle<ND::TAlgorithmResult>,
1169  short);
1170 
1171  template <class T>
1172  void FillBaseObject(T basePtr, ND::THandle<ND::TReconBase> baseObject,
1173  bool saveHits);
1174 
1175  virtual ObjectID FillReconObject(const ND::THandle<ND::TReconBase>,
1176  bool saveHits);
1177 
1178  virtual ObjectID FillVertexObject(const ND::THandle<ND::TReconVertex>,
1179  bool saveHits);
1180 
1181  virtual ObjectID FillParticleObject(const ND::THandle<ND::TReconPID>,
1182  bool saveHits);
1183 
1184  virtual ObjectID FillTrackObject(const ND::THandle<ND::TReconTrack>,
1185  bool saveHits);
1186 
1187  virtual ObjectID FillShowerObject(const ND::THandle<ND::TReconShower>,
1188  bool saveHits);
1189 
1190  virtual ObjectID FillClusterObject(const ND::THandle<ND::TReconCluster>,
1191  bool saveHits);
1192 
1193  virtual std::map<int, std::pair<int, float> > HitTruthInfo(
1194  const ND::THandle<ND::THitSelection>);
1195  virtual std::vector<int> HitTruthPrimaryInfo(
1196  const ND::THandle<ND::THitSelection>);
1197 
1198  virtual short FillNode(const ND::THandle<ND::TReconNode>, bool saveHits);
1199 
1200  short FillHit(const ND::THandle<ND::THit>);
1201 
1202  short GetCycle(const ND::THandle<ND::THitSelection>);
1203 
1204  short CountValidDimensions(TVector3 posVar);
1205 
1206  public:
1207  // Tree Entries
1208  Short_t fNAlgoResults; ///< The number of Algorithm Results
1209  Short_t fNVertices; ///< The number of added vertices
1210  Short_t fNParticles; ///< The number of particles
1211  Short_t fNShowers; ///< The number of showers
1212  Short_t fNTracks; ///< The number of tracks
1213  Short_t fNNodes; ///< The number of track nodes
1214  Short_t fNClusters; ///< The number of clusters
1215  Short_t fNHits; ///< The number of hits that are saved
1216 
1217  TClonesArray
1218  *fAlgoResults; ///< The TP0DAlgoRes vector of Algorithm Results.
1219  TClonesArray *fVertices; ///< The TP0DVertex vector of vertices.
1220  TClonesArray *fParticles; ///< The TP0DParticle vector of particles.
1221  TClonesArray *fShowers; ///< The TP0DShower vector of showers.
1222  TClonesArray *fTracks; ///< The TP0DTrack vector of tracks.
1223  TClonesArray *fNodes; ///< The TP0DNode vector of nodes.
1224  TClonesArray *fHits; ///< The TP0DHit vector of hits.
1225  TClonesArray *fClusters; ///< The TP0DCluster vector of clusters
1226 
1227  private:
1228  ///\short If an incoming TAlgorithmResult's name matches a pattern within this
1229  /// vector it will not be summarised and stored.
1230  std::vector<TPRegexp> fRejectAlgoResultList;
1231 
1232  /// Scratch space to keep track of already summarised THits.
1233  std::map<UInt_t, short> fTempHitMap;
1234 
1235 };
1236 
1237 #endif
std::vector< short > Truth_HitCount
The number of THits that each truth trajectory contributed to.
virtual ObjectID FillTrackObject(const ND::THandle< ND::TReconTrack >, bool saveHits)
ClassDef(TP0DReconModule::TP0DHit, 1)
float Width
The &#39;width&#39; of the shower, the extent perpendicular to the direction.
std::vector< short > Clusters
Holds internal Ids of Clusters pertinent to this algorithm result.
UInt_t GeomID
Geometry Id of the TSingleHit.
short NHits
A count of the Hits associated with this object.
std::vector< short > Nodes
Holds internal Ids of Nodes pertinent to this algorithm result.
TClonesArray * fParticles
The TP0DParticle vector of particles.
float Moments[arraySize]
Moments of the cluster stored as a flat 3x3 matrix.
std::vector< float > Truth_ChargeShare
The weighted reconstructed charge deposited by each truth trajectory.
UInt_t UniqueID
The Unique ID of the corresponding ND::TReconTrack, used for global-subdetector matching.
std::vector< TPRegexp > fRejectAlgoResultList
If an incoming TAlgorithmResult&#39;s name matches a pattern within this vector it will not be summarised...
TLorentzVector Position
Position of the TMPositionDirectionState of the corresponding ND::TReconNode.
Contains a summary of the reconstruction information in a TSingleHit.
std::vector< short > Vertices
Holds internal Ids of Vertices pertinent to this reconstructed cluster.
std::vector< short > Hits
Holds internal Ids of Hits pertinent to this reconstructed particle.
short Parent
The internal Id of the parent algorithm result of this one.
virtual ObjectID FillShowerObject(const ND::THandle< ND::TReconShower >, bool saveHits)
short Cycle
The cycle number, based on the first hit.
std::vector< short > Tracks
Holds internal Ids of Tracks pertinent to this algorithm result.
std::vector< int > Truth_PrimaryTrajIDs
The vector of primary true trajectory IDs which contribute to the ND::THits which are constituents of...
int NDOF
The Number of Degrees of Freedom in the reconstruction of the.
std::vector< short > Showers
Holds internal Ids of Showers pertinent to this reconstructed vertex.
std::vector< short > Truth_HitCount
The number of THits that each truth trajectory contributed to.
float Fiducial
The distance to the outside of the fiducial volume.
std::vector< short > Vertices
Holds internal Ids of Vertices pertinent to this reconstructed particle.
std::string AlgorithmName
The name of the p0dRecon algorithm that created this object.
std::vector< short > Vertices
Holds internal Ids of Vertices pertinent to this algorithm result.
float Quality
The reported reconstruction &#39;quality&#39; of the corresponding ND::TReconShower.
short ValidDimensions
Bit flag demarkating valid dimensions for this cluster&#39;s positon.
TVector3 DirVariance
Variance on the TP0DParticle::Direction of the TPIDState of the corresponding ND::TReconPID.
short Cycle
The cycle number, based on the first hit.
std::vector< short > Particles
Holds internal Ids of Particles pertinent to this reconstructed shower.
virtual ObjectID FillParticleObject(const ND::THandle< ND::TReconPID >, bool saveHits)
short id
An internal Id for each Reconstruction object.
std::string AlgorithmName
The name of the p0dRecon algorithm that created this object.
std::vector< std::vector< float > > realPIDValues
Holds the PID variable values from ND::TRealDatum stored in the TReconPID.
float EndDeposit
The deposited charge in the end p0dules.
TVector3 Direction
Direction of the TPIDState of the corresponding ND::TReconPID.
std::vector< short > Truth_HitCount
The number of THits that each truth trajectory contributed to.
ClassDef(TP0DReconModule::TP0DAlgoRes, 5)
Contains a summary of the reconstruction information in a TReconShower.
std::vector< int > Truth_TrajIDs
The vector of true trajectory IDs which contribute to the ND::THits which are constituents of this sh...
short Cycle
The cycle number, based on the first hit.
UInt_t UniqueID
The Unique ID of the corresponding ND::TReconShower, used for global-subdetector matching.
TVector3 Direction
Direction of the TShowerState of the corresponding ND::TReconShower.
TClonesArray * fVertices
The TP0DVertex vector of vertices.
float EndDeposit
The deposited charge in the end p0dules.
std::vector< short > Particles
Holds internal Ids of Particles pertinent to this reconstructed particle.
TClonesArray * fAlgoResults
The TP0DAlgoRes vector of Algorithm Results.
float Charge
The reconstructed charge of the corresponding TReconPID.
TClonesArray * fShowers
The TP0DShower vector of showers.
TClonesArray * fHits
The TP0DHit vector of hits.
short NHits
A count of the Hits associated with this object.
std::vector< short > Tracks
Holds internal Ids of Tracks pertinent to this reconstructed cluster.
TLorentzVector PosVariance
Variance on the position of the TPIDState of the corresponding ND::TReconPID.
float Quality
The reported reconstruction &#39;quality&#39; of the corresponding ND::TReconPID.
std::vector< std::string > integerPIDNames
Holds the variable names of ND::TIntegerDatum stored in the TReconPID.
float SideDeposit
The deposited charge in the side bars.
TVector3 DirVariance
Variance on the TP0DShower::Direction of the TShowerState of the corresponding ND::TReconShower.
std::vector< short > Clusters
Holds internal Ids of Clusters pertinent to this reconstructed track.
std::vector< short > Particles
Holds internal Ids of Particles pertinent to this reconstructed track.
std::vector< short > Vertices
Holds internal Ids of Vertices pertinent to this reconstructed vertex.
TLorentzVector PosVariance
Variance on the position of the TTrackState of the corresponding ND::TReconTrack. ...
ClassDef(TP0DReconModule::TP0DTrack, 6)
std::vector< std::string > realPIDNames
Holds the variable names of ND::TRealDatum stored in the TReconPID.
TVector3 DirVariance
Variance on the TP0DTrack::Direction of the TTrackState of the corresponding ND::TReconTrack.
std::vector< short > Hits
Holds internal Ids of Hits pertinent to this reconstructed track.
std::vector< short > Hits
Holds internal Ids of Hits pertinent to this reconstructed vertex.
int NDOF
The Number of Degrees of Freedom in the reconstruction of the.
int NDOF
The Number of Degrees of Freedom in the reconstruction of the corresponding ND::TReconShower.
virtual void InitializeModule()
Initialize Module, override if necessary.
virtual std::map< int, std::pair< int, float > > HitTruthInfo(const ND::THandle< ND::THitSelection >)
std::vector< short > Hits
Holds internal Ids of Hits pertinent to this reconstructed cluster.
int Status
The reported Status of the corresponding ND::TReconPID.
std::vector< int > Truth_TrajIDs
The vector of true trajectory IDs which contribute to the ND::THits which are constituents of this ve...
std::vector< short > Hits
Holds internal Ids of Hits pertinent to this reconstructed shower.
TLorentzVector PosVariance
Variance on the position of the corresponding ND::TReconCluster.
std::vector< short > Hits
Holds internal Ids of Hits pertinent to this algorithm result.
std::vector< short > Tracks
Holds internal Ids of Tracks pertinent to this reconstructed particle.
std::vector< short > Tracks
Holds internal Ids of Tracks pertinent to this reconstructed track.
std::vector< int > Truth_TrajIDs
The vector of true trajectory IDs which contribute to the ND::THits which are constituents of this ve...
TLorentzVector PosVariance
Variance on the position of the TShowerState of the corresponding ND::TReconShower.
std::vector< float > PID_weight
PID weights for each PID in TP0DParticle::PID.
Used to summarise the various reconstruction algorithm results that p0dRecon employs.
TVector3 Direction
Direction of the TTrackState of the corresponding ND::TReconTrack.
std::vector< short > Showers
Holds internal Ids of Showers pertinent to this reconstructed shower.
Used to fill a TTree of summary information for the P0D reconstruction algorithms.
std::vector< short > Vertices
Holds internal Ids of Vertices pertinent to this reconstructed shower.
std::vector< short > Showers
Holds internal Ids of Showers pertinent to this reconstructed cluster.
A summary of the reconstruction information in a TReconPID.
float SideDeposit
The deposited charge in the side bars.
std::vector< short > Nodes
Holds internal Ids of Nodes pertinent to this reconstructed shower.
std::vector< short > Nodes
Holds internal Ids of Nodes pertinent to this reconstructed cluster.
TLorentzVector PosVariance
Variance on the position of the TMPositionDirectionState of the corresponding ND::TReconPID.
int Status
The reported Status of the corresponding ND::TReconShower.
short ValidDimensions
Bit flag demarkating valid dimensions for this track&#39;s position.
virtual ObjectID FillVertexObject(const ND::THandle< ND::TReconVertex >, bool saveHits)
float EDeposit
The total reconstructed energy deposit of the ND::TMEDepositState of the relevant ND::TReconNode...
virtual std::vector< int > HitTruthPrimaryInfo(const ND::THandle< ND::THitSelection >)
short NHits
A count of the Hits associated with this object.
Short_t fNAlgoResults
The number of Algorithm Results.
float Length
The length of the track calculated by summing over the distances.
TClonesArray * fClusters
The TP0DCluster vector of clusters.
std::vector< short > Truth_HitCount
The number of THits that each truth trajectory contributed to.
std::vector< int > Truth_PrimaryTrajIDs
The vector of primary true trajectory IDs which contribute to the ND::THits which are constituents of...
float SideDeposit
The deposited charge in the side bars.
virtual bool FillTree(ND::TND280Event &)
Fill all the stuff that goes in the output tree.
ClassDef(TP0DReconModule::TP0DNode, 5)
short NHits
A count of the Hits associated with this object.
std::vector< short > Particles
Holds internal Ids of Particles pertinent to this reconstructed vertex.
Contains a summary of the reconstruction information in a TReconVertex.
float Time
Reconstructed hit time from the corresponding TSingleHit.
Contains a summary of the reconstruction information in a TReconNode.
float Length
The RMS length of the shower, the extent parallel to the direction.
short ValidDimensions
Bit flag demarkating valid dimensions for this shower&#39;s position.
std::vector< short > Nodes
Holds internal Ids of Nodes pertinent to this reconstructed particle (probably not what you want for ...
std::vector< float > Truth_ChargeShare
The weighted reconstructed charge deposited by each truth trajectory.
short NHits
A count of the Hits associated with this object.
std::vector< short > Truth_HitCount
The number of THits that each truth trajectory contributed to.
static const int arraySize
Size of the TP0DCluster::Moments array.
ClassDef(TP0DReconModule::TP0DCluster, 7)
ClassDef(TP0DReconModule::TP0DParticle, 5)
short Cycle
The cycle number, based on the first hit.
Short_t fNNodes
The number of track nodes.
short Cycle
The cycle number, based on the first hit.
std::vector< int > Truth_PrimaryTrajIDs
The vector of primary true trajectory IDs which contribute to the ND::THits which are constituents of...
std::vector< short > Hits
Holds internal Ids of Hits pertinent to this reconstruction node.
std::vector< int > Truth_PrimaryTrajIDs
The vector of primary true trajectory IDs which contribute to the ND::THits which are constituents of...
std::vector< short > Showers
Holds internal Ids of Showers pertinent to this reconstructed track.
OType_t type
The reconstruction object type that this internal Id refers to.
Short_t fNShowers
The number of showers.
Short_t fNParticles
The number of particles.
UInt_t UniqueID
The Unique ID of the corresponding ND::TReconCluster, used for global-subdetector matching...
std::vector< int > Truth_PrimaryTrajIDs
The vector of primary true trajectory IDs which contribute to the ND::THits which are constituents of...
virtual ObjectID FillClusterObject(const ND::THandle< ND::TReconCluster >, bool saveHits)
virtual EType GetTreeType() const
Returns the type of tree, header, truth, or recon.
float EDeposit
The total reconstructed energy deposit of the corresponding ND::TReconTrack.
short ValidDimensions
Bit flag demarkating valid dimensions for this vertex&#39;s position.
float EndDeposit
The deposited charge in the end p0dules.
std::vector< short > Particles
Holds internal Ids of Particles pertinent to this algorithm result.
std::vector< short > Clusters
Holds internal Ids of Clusters pertinent to this reconstructed cluster.
int NDOF
The Number of Degrees of Freedom in the reconstruction of the corresponding ND::TReconTrack.
std::string FullName
The name of the p0dRecon algorithm that corresponds to this.
std::vector< short > Truth_HitCount
The number of THits that each truth trajectory contributed to.
int Status
The reported Status of the corresponding ND::TReconTrack.
short ValidDimensions
Bit flag demarkating valid dimensions for this particle&#39;s position.
std::string AlgorithmName
The name of the p0dRecon algorithm that created this object.
TLorentzVector PosVariance
Variance on the position of the TVertexState of the corresponding ND::TReconVertex.
Contains a summary of the reconstruction information in a TReconCluster. Contains a summary of the re...
std::vector< std::vector< short > > integerPIDValues
Holds the PID variable values from ND::TIntegerDatum stored in the TReconPID.
std::vector< short > Clusters
Holds internal Ids of Clusters pertinent to this reconstructed vertex.
virtual Bool_t ProcessFirstEvent(ND::TND280Event &)
Is called after the first event is loaded in.
TP0DReconModule(const char *name="P0D", const char *title="P0D Recon Module")
TLorentzVector Position
Position of the TPIDState of the corresponding ND::TReconPID.
short FillHit(const ND::THandle< ND::THit >)
void FillBaseObject(T basePtr, ND::THandle< ND::TReconBase > baseObject, bool saveHits)
float Charge
Reconstructed hit charge without attenuation correction from the corresponding TSingleHit.
TClonesArray * fNodes
The TP0DNode vector of nodes.
UInt_t UniqueID
The Unique ID of the corresponding ND::TReconPID, used for global-subdetector matching.
short NHits
A count of the Hits associated with this object.
std::vector< short > Clusters
Holds internal Ids of Clusters pertinent to this reconstructed shower.
float EDeposit
The total reconstructed energy deposit of the corresponding ND::TReconShower.
short GetCycle(const ND::THandle< ND::THitSelection >)
float Quality
The reported reconstruction &#39;quality&#39; of the corresponding ND::TReconTrack.
std::vector< int > Truth_TrajIDs
The vector of true trajectory IDs which contribute to the ND::THits which are constituents of this ve...
TLorentzVector Position
Position of the corresponding ND::TReconCluster.
std::string AlgorithmName
The name of the p0dRecon algorithm that created this object.
std::vector< short > Tracks
Holds internal Ids of Tracks pertinent to this reconstructed shower.
std::vector< float > Truth_ChargeShare
The weighted reconstructed charge deposited by each truth trajectory.
Short_t fNClusters
The number of clusters.
TVector3 DirVariance
Variance on the TP0DNode::Direction of the TMPositionDirectionState of the corresponding ND::TReconNo...
std::vector< float > Truth_ChargeShare
The weighted reconstructed charge deposited by each truth trajectory.
std::vector< float > Truth_ChargeShare
The weighted reconstructed charge deposited by each truth trajectory.
TClonesArray * fTracks
The TP0DTrack vector of tracks.
std::vector< short > Clusters
Holds internal Ids of Clusters pertinent to this reconstructed particle.
virtual ObjectID FillReconObject(const ND::THandle< ND::TReconBase >, bool saveHits)
std::vector< short > Vertices
Holds internal Ids of Vertices pertinent to this reconstructed track.
std::vector< int > Truth_TrajIDs
The vector of true trajectory IDs which contribute to the ND::THits which are constituents of this tr...
std::vector< short > Showers
Holds internal Ids of Showers pertinent to this reconstructed particle.
UInt_t UniqueID
The Unique ID of the corresponding ND::TReconVertex, used for global-subdetector matching.
short UsedHitCluster
The internal Id of the cluster of hits which were used in a.
UInt_t UniqueID
UNUSED: A unique ID used for reconstruction objects.
float Momentum
The reconstructed momentum of the corresponding TReconPID.
std::vector< short > Nodes
Holds internal Ids of Nodes pertinent to this reconstructed track.
float Cone
The opening angle of the TShowerState cone of the corresponding TReconShower.
short CountValidDimensions(TVector3 posVar)
short UnusedHitCluster
The internal Id of the cluster of hits which were not used in a.
virtual short FillNode(const ND::THandle< ND::TReconNode >, bool saveHits)
Short_t fNVertices
The number of added vertices.
TLorentzVector Position
Position of the TShowerState of the corresponding ND::TReconShower.
short NFiducialHits
The number of THits in the cluster which are within the fiducial volume.
std::string AlgorithmName
The name of the p0dRecon algorithm that created this object.
virtual short FillAlgorithmResult(const ND::THandle< ND::TAlgorithmResult >, short)
std::vector< short > Particles
Holds internal Ids of Particles pertinent to this reconstructed cluster.
short Cycle
The cycle number, based on the first hit.
std::map< UInt_t, short > fTempHitMap
Scratch space to keep track of already summarised THits.
std::vector< float > Truth_ChargeShare
The weighted reconstructed charge deposited by each truth trajectory.
TLorentzVector Position
Position of the TVertexState of the corresponding ND::TReconVertex.
float Quality
The reported reconstruction &#39;quality&#39; of the corresponding ND::TReconVertex.
TLorentzVector Position
Position of the TTrackState of the corresponding ND::TReconTrack.
UInt_t ChanID
Channel Id of the TSingleHit.
virtual void InitializeBranches()
Initialize Branches. Don&#39;t do anything else in this function.
std::vector< short > AlgoResults
Holds internal Ids of daughter algorithm results to this one.
int Status
The reported Status of the corresponding ND::TReconVertex.
std::vector< short > Tracks
Holds internal Ids of Tracks pertinent to this reconstructed vertex.
short ValidDimensions
Bit flag demarkating valid dimensions for this node&#39;s position.
ClassDef(TP0DReconModule::TP0DVertex, 4)
TVector3 Direction
Direction of the TMPositionDirectionState of the corresponding ND::TReconNode.
Short_t fNTracks
The number of tracks.
std::vector< short > PID
Potential PIDs (ND::TReconPID::ParticleId) matching with.
An internal Id and object type for each Reconstruction object.
Short_t fNHits
The number of hits that are saved.
std::vector< short > Showers
Holds internal Ids of Showers pertinent to this algorithm result.
ClassDef(TP0DReconModule::TP0DShower, 5)
std::string AlgorithmName
The name of the p0dRecon algorithm that created this object.
std::vector< int > Truth_PrimaryTrajIDs
The vector of primary true trajectory IDs which contribute to the ND::THits which are constituents of...
std::vector< int > Truth_TrajIDs
The vector of true trajectory IDs which contribute to the ND::THits which are constituents of this ve...
float EDeposit
The total reconstructed energy deposit of the corresponding ND::TReconCluster.
A base class for analysis output modules which contain reconstructed event information.
std::vector< short > Nodes
Holds internal Ids of Nodes pertinent to this reconstructed vertex.

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