eventAnalysis  7.0-49-g0ac7482
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TP0DECALReconModule.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 /// 2014-12-12: Currently responsible for this module is,
6 /// Luke Pickering (lp208 [*a*t*] ic.ac.uk)
7 
8 #ifndef TP0DECALReconModule_hxx_seen
9 #define TP0DECALReconModule_hxx_seen
10 
11 #include <TNamed.h>
12 #include <TTree.h>
13 #include <TIntegerDatum.hxx>
14 #include <TND280Event.hxx>
15 #include <TReconCluster.hxx>
16 #include <string>
17 #include "TReconPID.hxx"
18 #include "TReconShower.hxx"
19 #include "TReconTrack.hxx"
20 
21 #include "TClonesArray.h"
22 
24 
25 namespace ND {
26 class TP0DECALReconModule;
27 };
28 
29 /// Used to summarise the reconstruction of an event in the P0DECal.
30 /// The primary level store the RunNo, EventID, number of tracks and showers
31 /// and TCloneArray of TP0DECALTracks and TP0DECALShowers.
33  public:
34  /// Summary of reconstruction information held within a TReconTrack
35  class TP0DECALReconTrack : public TObject {
36  public:
37  virtual ~TP0DECALReconTrack();
38  UInt_t UniqueID;///< The object UniqueID which can be used to match this object to the Global Recon object.
39 
40  // std::string AlgorithmName;// The name of the algorithm that created this reconstruction object.
41  double Curvature;///< The curvature around the x axis of the corresponding TReconTrack.
42  ///<\dontinclude TP0DECALReconModule.cxx
43  ///<\skipline ecalReconTrack->Curvature
44  TVector3 Direction;///< The Direction of the corresponding TReconTrack.
45  ///<\dontinclude TP0DECALReconModule.cxx
46  ///<\skipline ecalReconTrack->Direction
47  double EDeposit;///< The reconstructed energy deposited by the corresponding TReconTrack.
48  ///<\dontinclude TP0DECALReconModule.cxx
49  ///<\skipline ecalReconTrack->EDeposit
50 
51  // the full name of this datum. The full name places the datum in the
52  // data tree and has the syntax //xxxx/yyyy/zzzz.
53  // TString FullName;
54 
55  int NDOF;///<\short The Number of Degrees of Freedom in the reconstruction of the
56  ///<\skipline ecalReconTrack->NDOF
57  ///< corresponding ND::TReconTrack.
58  ///<\details Retreived from ND::TReconBase::GetNDOF
59  ///<\dontinclude TP0DECALReconModule.cxx
60  TLorentzVector Position; ///< The reconstructed starting 4-position of the TReconTrack. Uses ND::TReconTrack::GetPosition.
61  ///<\dontinclude TP0DECALReconModule.cxx
62  ///<\skipline ecalReconTrack->Position
63  double Quality;///< The 'quality' of the reconstruction according to the relevant TReconTrack, from ND::TReconBase::GetQuality.
64  ///<\details
65  ///<\dontinclude TP0DECALReconModule.cxx
66  ///<\skipline ecalReconTrack->Quality
67  TVector3 Width;///< The 'width' of the corresponding TReconTrack.
68  ///<\dontinclude TP0DECALReconModule.cxx
69  ///<\skipline ecalReconTrack->Width
70  double AMR;///< PID Variable: Axis Max Ratio - the ratio of primary and secondary components of a 2D PCA.
71  double CWTrackWidth;///<\short PID Variable: Width of the track in bars, weighted by the charge in each bar.
72  double Max_Ratio;///<\short PID Variable: The ratio between highest and lowest hit charges in the reconstruction cluster.
73  double NormChargeSD;///<\short PID Variable: Normalised standard deviation of the contributing reconstructed hit charges.
74  double PathChargeRatio;///<\short The ratio of total hit charges between the front half and back half of the TReconTrack.
75  double TrShval;///<\short PID Variable: The output of the ANN using the other PID Variables as input. Track-like events have a TrShval close to '1'.
76  int NHits;///< The number of THits which contributed to this reconstruction cluster.
77  TVector3 BenCWPosition;///< Ben Smith's charge weighted reconstruction position.
78  int StackNo;///< The stack in which the TReconTrack resides. Uses TReconBase::GetDetector.
79  ///<\dontinclude TP0DECALReconModule.cxx
80  ///<\skipline ecalReconTrack->StackNo
81  std::string Module;///< The name of the module in which the TReconTrack resides.
82  int TrueID;///< For MC events: The Id of the corresponding ND::TG4Trajectory.
83  ///<\details Uses the corresponding ND::TReconTrack's ND::THitSelection and
84  ///< TrackTruthInfo::GetG4TrajIDHits to obtain the corresponding
85  ///< ND::TG4Trajectory.
86  ///<\dontinclude TP0DECALReconModule.cxx
87  ///<\skip if (isMC){
88  ///<\skipline trueID
89  ///<\until ;
90  ///< In some cases a given ND::TG4Trajectory may not have been saved in which
91  ///< case this will not correspond to the correct ND::TG4Trajectory but may
92  ///< correspond to a parent ND::TG4Trajectory.
93  int TruePDG;///< For MC events: The PDG code of the true particle.
94  ///<\details Uses TP0DECALReconTrack::TrueID to obtain the corresponding
95  ///< ND::TG4Trajectory.
96  ///<\dontinclude TP0DECALReconModule.cxx
97  ///<\skipline g4traj->GetPDGEncoding();
98  ///<\skipline TruePDG
99  ///< In some cases a given ND::TG4Trajectory may not have been saved in which
100  ///< case this will hold a default value of '0'.
101  int TrueParentID;///< For MC events: The Id of the true trajectory's parent ND::TG4Trajectory
102  ///<\details Uses TP0DECALReconTrack::TrueID to obtain the corresponding
103  ///< ND::TG4Trajectory.
104  ///<\dontinclude TP0DECALReconModule.cxx
105  ///<\skipline g4traj->GetParentId();
106  ///<\skipline TrueParentID
107  ///< In some cases a given ND::TG4Trajectory may not have been saved in which
108  ///< case this will hold a default value of '-999'.
109  double TrueHitPurity;///< For MC events: The 'cleanliness' of the ND::THits which make up the corresponding ND::TReconTrack.
110  ///<\details Compares to the ND::TG4Trajectory with Id =
111  ///< TP0DECALReconTrack::TrueID via TrackTruthInfo::GetG4TrajIDHits
112  ///<\dontinclude TP0DECALReconModule.cxx
113  ///<\skip if (isMC){
114  ///<\skipline trueID
115  ///<\until ;
116  ///<\skipline ->TrueHitPurity
117  double TrueHitEfficiency;///< For MC events: The 'completeness' of the ND::THits which make up the corresponding ND::TReconTrack.
118  ///<\details Compares to the ND::TG4Trajectory with Id =
119  ///< TP0DECALReconTrack::TrueID via TrackTruthInfo::GetG4TrajIDHits
120  ///<\dontinclude TP0DECALReconModule.cxx
121  ///<\skip if (isMC){
122  ///<\skipline trueID
123  ///<\until ;
124  ///<\skipline ->TrueHitEff
125  TLorentzVector TrueInitPos; ///< For MC events: The true initial position of the corresponding ND::TG4Trajectory.
126  ///<\details Uses TP0DECALReconTrack::TrueID to obtain the corresponding
127  ///< ND::TG4Trajectory.
128  ///<\dontinclude TP0DECALReconModule.cxx
129  ///<\skipline g4traj->GetInitialPosition();
130  ///<\skipline TrueInitPos
131  ///< In some cases a given ND::TG4Trajectory may not have been saved in which
132  ///< case this will hold a default value of '{-9999,-9999,-9999,-9999}'.
133  TLorentzVector TrueFinalPos;///< For MC events: The true final position of the corresponding ND::TG4Trajectory.
134  ///<\details Uses TP0DECALReconTrack::TrueID to obtain the corresponding
135  ///< ND::TG4Trajectory.
136  ///<\dontinclude TP0DECALReconModule.cxx
137  ///<\skipline g4traj->GetFinalPosition();
138  ///<\skipline TrueFinalPos
139  ///< In some cases a given ND::TG4Trajectory may not have been saved in which
140  ///< case this will hold a default value of '{-9999,-9999,-9999,-9999}'.
141 
142  TLorentzVector TrueInitMom;///< For MC events: The true initial momentum of the corresponding ND::TG4Trajectory.
143  ///<\details Uses TP0DECALReconTrack::TrueID to obtain the corresponding
144  ///< ND::TG4Trajectory.
145  ///<\dontinclude TP0DECALReconModule.cxx
146  ///<\skipline g4traj->GetInitialMomentum();
147  ///<\skipline TrueInitMom
148  ///< In some cases a given ND::TG4Trajectory may not have been saved in which
149  ///< case this will hold a default value of '{-9999,-9999,-9999,-9999}'.
150 
152  };
153 
154  public:
155  /// Summary of reconstruction information held within a TReconShower
156  class TP0DECALReconShower : public TObject {
157  public:
158  virtual ~TP0DECALReconShower();
159 
160  UInt_t UniqueID; ///< The object UniqueID which can be used to match this object to the Global Recon object.
161 
162  // The name of the algorithm that created this reconstruction object.
163  // std::string AlgorithmName;
164 
165  TVector3 ConeAngle; ///< The opening angle of the corresponding TReconShower.
166  ///<\dontinclude TP0DECALReconModule.cxx
167  ///<\skipline ecalReconShower->ConeAngle
168  TVector3 Direction; ///< The Direction of the corresponding TReconShower.
169  ///<\dontinclude TP0DECALReconModule.cxx
170  ///<\skipline ecalReconShower->Direction
171  double EDeposit; ///< The reconstructed energy deposited by the corresponding TReconTrack.
172  ///<\dontinclude TP0DECALReconModule.cxx
173  ///<\skipline ecalReconShower->EDeposit
174 
175  // The full name of this datum. The full name places the datum in the
176  // data tree and has the syntax //xxxx/yyyy/zzzz.
177  // TString FullName;
178 
179  int NDOF; ///<\short The Number of Degrees of Freedom in the reconstruction of the
180  ///< corresponding ND::TReconTrack.
181  ///<\details Retreived from ND::TReconBase::GetNDOF
182  ///<\dontinclude TP0DECALReconModule.cxx
183  ///<\skipline ecalReconShower->NDOF
184 
185  TLorentzVector Position; ///< The reconstructed starting 4-position of the TReconTrack.
186  ///< Uses ND::TReconShower::GetPosition.
187  ///<\dontinclude TP0DECALReconModule.cxx
188  ///<\skipline ecalReconShower->Position
189 
190  double Quality; ///<\short The 'quality' of the reconstruction according to the relevant
191  ///< TReconTrack, from ND::TReconBase::GetQuality.
192  ///<\details
193  ///<\dontinclude TP0DECALReconModule.cxx
194  ///<\skipline ecalReconShower->Quality
195 
196  double AMR; ///< PID Variable: Axis Max Ratio - the ratio of primary and secondary components of a 2D PCA.
197  double CWTrackWidth; ///< PID Variable: Width of the track in bars, weighted by the charge in each bar.
198  double Max_Ratio; ///< PID Variable: The ratio between highest and lowest hit charges in the reconstruction cluster.
199  double NormChargeSD; ///< PID Variable: Normalised standard deviation of the contributing reconstructed hit charges.
200  double PathChargeRatio; ///< The ratio of total hit charges between the front half and back half of the TReconShower.
201  double TrShval; ///< PID Variable: The output of the ANN using the other PID Variables as input. Shower-like events have a TrShval close to '0'.
202  int NHits; ///< The number of THits which contributed to this reconstruction cluster.
203  TVector3 BenCWPosition; ///< Ben's charge weighted reconstruction position.
204  int StackNo; ///< The stack in which the TReconTrack resides. Uses
205  ///< TReconBase::GetDetector.
206  ///<\dontinclude TP0DECALReconModule.cxx
207  ///<\skipline ecalReconShower->StackNo
208  int TrueID; ///< For MC events: The Id of the primary corresponding ND::TG4Trajectory.
209  ///< Uses the corresponding ND::TReconShower's ND::THitSelection and
210  ///< ND::TShowerTruthInfo to obtain the corresponding primary
211  ///< ND::TG4Trajectory.
212  ///<\dontinclude TP0DECALReconModule.cxx
213  ///<\skip Truth matching info - SHOWERS
214  ///<\skip if (isMC){
215  ///<\until ecalReconShower->TrueID
216  ///< In some cases a given ND::TG4Trajectory may not have been saved in which
217  ///< case this will not correspond to the correct ND::TG4Trajectory but may
218  ///< correspond to a parent ND::TG4Trajectory.
219 
220  std::string Module; ///< The name of the module in which the TReconTrack resides.
221 
222 
224  };
225 
226  class TP0DECALLayerCharge : public TObject {
227  public:
228  virtual ~TP0DECALLayerCharge();
229 
230  double FirstTime; ///< The earliest hit time of the relevant cluster.
231 
232  double LastTime; ///< The latest hit time of the relevant cluster.
233 
234 
235  double Charge[6]; ///< The total charge deposited in each of 6layers. Index 0 corresponds the innermost layer
236 
237  TString module_name; ///< The name of the module.
238 
239 
241  };
242 
243  public:
244  TP0DECALReconModule(const char *name = "P0DECal",
245  const char *title = "P0D ECal Recon Module");
246  virtual Bool_t ProcessFirstEvent(ND::TND280Event &event);
247  virtual ~TP0DECALReconModule();
248 
249  protected:
250  virtual void InitializeModule();
251  virtual void InitializeBranches();
252  virtual bool FillTree(ND::TND280Event &);
253 
254  public:
255  // Tree Entries
256  Int_t fNReconTracks; ///< Number of objects in clones array.
257  Int_t fNReconShowers; ///< Number of objects in clones array.
258  Int_t fNLayerCharge; ///< Number of objects in clones array.
259 
260  TClonesArray *fReconTracks; ///< TClonesArray of TP0DECALReconTrack Objects
261  TClonesArray *fReconShowers; ///< TClonesArray of TP0DECALReconShower Objects
262  TClonesArray *fLayerCharge; ///< TClonesArray of TP0DECALLayerCharge Objects
263 
264  private:
265 };
266 #endif
double AMR
PID Variable: Axis Max Ratio - the ratio of primary and secondary components of a 2D PCA...
int NHits
The number of THits which contributed to this reconstruction cluster.
double AMR
PID Variable: Axis Max Ratio - the ratio of primary and secondary components of a 2D PCA...
TVector3 BenCWPosition
Ben Smith&#39;s charge weighted reconstruction position.
UInt_t UniqueID
The object UniqueID which can be used to match this object to the Global Recon object.
double Quality
The &#39;quality&#39; of the reconstruction according to the relevant TReconTrack, from ND::TReconBase::GetQu...
Int_t fNReconShowers
Number of objects in clones array.
virtual bool FillTree(ND::TND280Event &)
Fill all the stuff that goes in the output tree.
Used to summarise the reconstruction of an event in the P0DECal.
double LastTime
The latest hit time of the relevant cluster.
UInt_t UniqueID
The object UniqueID which can be used to match this object to the Global Recon object.
Summary of reconstruction information held within a TReconShower.
double EDeposit
The reconstructed energy deposited by the corresponding TReconTrack.
TClonesArray * fLayerCharge
TClonesArray of TP0DECALLayerCharge Objects.
virtual void InitializeModule()
Initialize Module, override if necessary.
double PathChargeRatio
The ratio of total hit charges between the front half and back half of the TReconTrack.
double NormChargeSD
PID Variable: Normalised standard deviation of the contributing reconstructed hit charges...
TVector3 Direction
The Direction of the corresponding TReconTrack.
double TrueHitEfficiency
For MC events: The &#39;completeness&#39; of the ND::THits which make up the corresponding ND::TReconTrack...
double TrShval
PID Variable: The output of the ANN using the other PID Variables as input. Shower-like events have a...
int TrueID
For MC events: The Id of the corresponding ND::TG4Trajectory.
int TrueParentID
For MC events: The Id of the true trajectory&#39;s parent ND::TG4Trajectory.
double NormChargeSD
PID Variable: Normalised standard deviation of the contributing reconstructed hit charges...
double Max_Ratio
PID Variable: The ratio between highest and lowest hit charges in the reconstruction cluster...
int TruePDG
For MC events: The PDG code of the true particle.
int StackNo
The stack in which the TReconTrack resides.
TVector3 Direction
The Direction of the corresponding TReconShower.
int NHits
The number of THits which contributed to this reconstruction cluster.
virtual Bool_t ProcessFirstEvent(ND::TND280Event &event)
Is called after the first event is loaded in.
TLorentzVector TrueFinalPos
For MC events: The true final position of the corresponding ND::TG4Trajectory.
TLorentzVector Position
The reconstructed starting 4-position of the TReconTrack.
TLorentzVector Position
The reconstructed starting 4-position of the TReconTrack.
double FirstTime
The earliest hit time of the relevant cluster.
double TrueHitPurity
For MC events: The &#39;cleanliness&#39; of the ND::THits which make up the corresponding ND::TReconTrack...
TLorentzVector TrueInitPos
For MC events: The true initial position of the corresponding ND::TG4Trajectory.
Int_t fNLayerCharge
Number of objects in clones array.
double Max_Ratio
PID Variable: The ratio between highest and lowest hit charges in the reconstruction cluster...
std::string Module
The name of the module in which the TReconTrack resides.
TClonesArray * fReconShowers
TClonesArray of TP0DECALReconShower Objects.
int StackNo
The stack in which the TReconTrack resides.
virtual void InitializeBranches()
Initialize Branches. Don&#39;t do anything else in this function.
TClonesArray * fReconTracks
TClonesArray of TP0DECALReconTrack Objects.
int NDOF
The Number of Degrees of Freedom in the reconstruction of the.
TLorentzVector TrueInitMom
For MC events: The true initial momentum of the corresponding ND::TG4Trajectory.
TVector3 ConeAngle
The opening angle of the corresponding TReconShower.
double Charge[6]
The total charge deposited in each of 6layers. Index 0 corresponds the innermost layer.
ClassDef(TP0DECALReconModule::TP0DECALLayerCharge, 1)
TVector3 Width
The &#39;width&#39; of the corresponding TReconTrack.
Int_t fNReconTracks
Number of objects in clones array.
TP0DECALReconModule(const char *name="P0DECal", const char *title="P0D ECal Recon Module")
double TrShval
PID Variable: The output of the ANN using the other PID Variables as input. Track-like events have a ...
std::string Module
The name of the module in which the TReconTrack resides.
ClassDef(TP0DECALReconModule::TP0DECALReconTrack, 1)
ClassDef(TP0DECALReconModule::TP0DECALReconShower, 1)
int NDOF
The Number of Degrees of Freedom in the reconstruction of the.
double EDeposit
The reconstructed energy deposited by the corresponding TReconTrack.
TVector3 BenCWPosition
Ben&#39;s charge weighted reconstruction position.
double PathChargeRatio
The ratio of total hit charges between the front half and back half of the TReconShower.
Summary of reconstruction information held within a TReconTrack.
double CWTrackWidth
PID Variable: Width of the track in bars, weighted by the charge in each bar.
double Curvature
The curvature around the x axis of the corresponding TReconTrack.
double CWTrackWidth
PID Variable: Width of the track in bars, weighted by the charge in each bar.
int TrueID
For MC events: The Id of the primary corresponding ND::TG4Trajectory.
A base class for analysis output modules which contain reconstructed event information.
double Quality
The &#39;quality&#39; of the reconstruction according to the relevant.

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