eventAnalysis  7.0-49-g0ac7482
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TSmrdReconModule.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 /// current manager is
6 /// Alexander Izmaylov (izmaylov [*a*t*] inr.ru)
7 
8 #ifndef _TSmrdReconModule_hxx_seen
9 #define _TSmrdReconModule_hxx_seen
10 
11 #include <TClonesArray.h>
12 
14 #include "eventAnalysisEnums.hxx"
15 
16 namespace ND {
17 class TSmrdReconModule;
18 }
19 
20 /// Summary information from smrdRecon output.
21 // [TW]
23  public:
24  enum ESMRDWall { kTop = 0, kBottom, kRight, kLeft };
25 
26  /// Both-sided SMRD TReconHit that isn't included in any reconstructed track.
27  /// It contains Z position calculated according to the time difference
28  /// between two sides.
29  class TSmrdReconHit : public TObject {
30  public:
31  virtual ~TSmrdReconHit();
32 
33  TLorentzVector Position; ///< The reconstructed 4-position of the corresponding double ended ND::THit.
34 
35  TLorentzVector PositionUncertainty; ///<\brief The uncertainty on the reconstructed 4-position of the corresponding double ended ND::THit.
36 
37  double Charge;///< The reconstructed charge of the corresponding double ended ND::THit.
38 
39 
40  double dZ; ///<\short The difference in Z between the combined ND::THit(double ended bars) and the first contributor ND::THit.
41  ///<\details
42  ///<\dontinclude TSmrdReconModule.cxx
43  ///<\skipline contrhit1 =
44  ///<\skipline reconHit->dZ
45 
46  double dT; ///<\short The difference between the reconstructed ND::THit times between the two contributors.
47  ///<\details
48  ///<\dontinclude TSmrdReconModule.cxx
49  ///<\skipline contrhit1 =
50  ///<\skipline contrhit2 =
51  ///<\skipline reconHit->dT
52 
53  double ContribCharge[2]; ///< The reconstructed charges from each contributor of the double ended bar.
54  ///<\dontinclude TSmrdReconModule.cxx
55  ///<\skipline ContribCharge[0] =
56  ///<\skipline ContribCharge[1] =
57 
58  int Wall;///< The SMRD wall in which this the corresponding ND::THit resides. Is assigned a value from TSmrdReconModule::ESMRDWall. Uses ND::TSMRDGeom::IsSMRDTopWall, ND::TSMRDGeom::IsSMRDBotoomWall, ND::TSMRDGeom::IsSMRDLeftWall and ND::TSMRDGeom::IsSMRDRightWall.
59 
60  int Yoke; ///< The SMRD yoke number. ranges from 1(most upstream) to 8(most downstream).
61  ///<\dontinclude TSmrdReconModule.cxx
62  ///<\skipline reconHit->Yoke
63 
64 
65  int Layer; ///< The SMRD ring number. ranges from 1(most inner) to 6(most outer).
66  ///<\dontinclude TSmrdReconModule.cxx
67  ///<\skipline reconHit->Layer
68 
69  int Tower; ///< The SMRD tower number. Tower 1 is left-top and numbers are assigned clockwise.
70  ///<\dontinclude TSmrdReconModule.cxx
71  ///<\skipline reconHit->Tower
72 
73 
74  int Counter; ///< The SMRD scintillator number. Each yoke has either 20-for vertical(SMRD Left/Right) walls, or 16 for horizontal walls.
75  ///<\dontinclude TSmrdReconModule.cxx
76  ///<\skipline reconHit->Counter
77 
78  UInt_t RMM; ///< The RMM Id of the channel corresponding to the first contributor hit.
79  ///<\dontinclude TSmrdReconModule.cxx
80  ///<\skip ND::TChannelId chan
81  ///<\until reconHit->RMM
82 
83  UInt_t TFB; ///< The TFB Id of the channel corresponding to the first contributor hit.
84  ///<\dontinclude TSmrdReconModule.cxx
85  ///<\skip ND::TChannelId chan
86  ///<\until ND::TTFBChannelId tfbid(chan);
87  ///<\skipline reconHit->TFB
88 
89  bool IsInnerMatched; ///< Designates if the corresponding ND::THit was matched
90 
91  bool IsUsed; ///<Designates if the corresponding ND::THit was used in a reconstructed object.
92 
94  };
95 
96  /// SMRD isolated track.
97  class TSmrdIsoTrack : public TObject {
98  public:
99  virtual ~TSmrdIsoTrack();
100 
101  UInt_t UniqueID; ///< The Unique ID of the corresponding ND::TReconTrack, used for global-subdetector matching.
102 
103  std::string AlgorithmName; ///<Name of the reconstruction algorithm.
104 
105  TLorentzVector FrontPos; ///< Position of the 'first' TTrackState of the corresponding ND::TReconTrack.
106  ///<\dontinclude TSmrdReconModule.cxx
107  ///<\skip frontState =
108  ///<\until ;
109  ///<\skipline isoTrack->FrontPos
110  ///< where the 'first' state is found by ND::TrackingUtils::GetFirstState
111 
112  TLorentzVector FrontPosVariance;///<Variance on the position of the 'first' TTrackState of the corresponding ND::TReconTrack.
113  ///<\dontinclude TSmrdReconModule.cxx
114  ///<\skip frontState =
115  ///<\until ;
116  ///<\skipline isoTrack->FrontPosVariance
117  ///< where the 'first' state is found by ND::TrackingUtils::GetFirstState
118 
119  TLorentzVector BackPos; ///< Position of the 'last' TTrackState of the corresponding ND::TReconTrack.
120  ///<\dontinclude TSmrdReconModule.cxx
121  ///<\skip backState =
122  ///<\until ;
123  ///<\skipline isoTrack->BackPos
124  ///< where the 'last' state is found by ND::TrackingUtils::GetLastState
125 
126  TLorentzVector BackPosVariance; ///<Variance on the position of the 'last' TTrackState of the corresponding ND::TReconTrack.
127  ///<\dontinclude TSmrdReconModule.cxx
128  ///<\skip backState =
129  ///<\until ;
130  ///<\skipline isoTrack->BackPosVariance
131  ///< where the 'last' state is found by ND::TrackingUtils::GetLastState
132 
133  TVector3 Direction; ///<Direction of the TTrackState which is the state of the corresponding ND::TReconTrack.
134  ///<\dontinclude TSmrdReconModule.cxx
135  ///<\skipline trackState->GetDirection()
136 
137 
138  TVector3 DirectionVariance; ///<Variance on the direction the TTrackState which is the state of the corresponding ND::TReconTrack.
139  ///<\dontinclude TSmrdReconModule.cxx
140  ///<\skipline isoTrack->DirectionVariance
141 
142  int NHits; ///<Number of ND::THits which are associated with the corresponding ND::TReconTrack.
143  ///<\dontinclude TSmrdReconModule.cxx
144  ///<\skipline ND::TReconNodeContainer& nodes
145  ///<\skipline isoTrack->NHits
146 
147  int NNodes; ///<Number of TReconNodes which are constituents of the corresponding ND::TReconTrack.
148  ///<\details
149  ///<\dontinclude TSmrdReconModule.cxx
150  ///<\skipline ND::THandle<ND::ND::THitSelection> hits = track->GeND::tHits();
151  ///<\skipline isoTrack->NNode
152 
153  int Status; ///< The reported Status of the corresponding ND::TReconTrack. Holds kSuccess if the ND::TReconTrack::fStatus has the kSuccess bit set. Uses ND::TReconBase::CheckStatus to check this.
154  ///<\dontinclude TSmrdReconModule.cxx
155  ///<\skipline isoTrack->Status
156 
157  int KalmanStatus; ///< Kalman filter refit result for the corresponding ND::TReconTrack. Holds '1' if the algorithm was run and has Status kSuccess, otherwise '0'
158  ///<\dontinclude TSmrdReconModule.cxx
159  ///<\skip std::string name("RECPACK_KalmanFilter");
160  ///<\until }
161  ///<\until }
162 
163  int NDOF; ///<The Number of Degrees of Freedom in the reconstruction of the corresponding ND::TReconTrack.
164  ///<\details Retreived from ND::TReconBase::GetNDOF
165  ///<\dontinclude TSmrdReconModule.cxx
166  ///<\skipline isoTrack->NDOF
167 
168  double EDeposit; ///< The total reconstructed charge of the corresponding ND::TReconTrack. Defaults to '-9999.0' if no ND::TRealDatum named 'totalCharge' is found on the corresponding ND::TReconTrack.
169  ///<\dontinclude TSmrdReconModule.cxx
170  ///<\skip isoTrack->EDeposit
171  ///<\until }
172 
173  double avgtime; ///< Average hit time of the corresponding ND::TReconTrack. Defaults to '-9999.0' if no ND::TRealDatum named 'averageHitTime' is found on the corresponding ND::TReconTrack.
174  ///<\dontinclude TSmrdReconModule.cxx
175  ///<\skip isoTrack->avgtime
176  ///<\until }
177 
178  double Range; ///<The spacial distance between TSmrdIsoTrack::FrontPos and TSmrdIsoTrack::BackPos.
179 
180  double Chi2; ///<The reported reconstruction 'quality' of the corresponding ND::TReconTrack.
181  ///<\details Uses ND::TReconBase::GetQuality
182  ///<\dontinclude TSmrdReconModule.cxx
183  ///<\skipline isoTrack->Chi2
184 
185  double ThetaAngle; ///< Polar coordinate theta of the TSmrdIsoTrack::Direction.
186  ///<\dontinclude TSmrdReconModule.cxx
187  ///<\skipline isoTrack->ThetaAngle
188 
189  double PhiAngle; ///< Polar coordinate phi of the TSmrdIsoTrack::Direction.
190  ///<\dontinclude TSmrdReconModule.cxx
191  ///<\skipline isoTrack->PhiAngle
192  // std::vector<TVector3*> HitPositions;
193 
194  // MC Truth information.
195  TLorentzVector TrueInitPos; ///<For MC events: The true initial position of the corresponding ND::TG4Trajectory.
196  ///\details Uses TSmrdIsoTrack::TrueId to obtain the corresponding
197  ///< ND::TG4Trajectory.
198  ///<\dontinclude TSmrdReconModule.cxx
199  ///<\skipline trueInitPos =
200  ///<\skipline TrueInitPos
201  ///< In some cases a given ND::TG4Trajectory may not have been saved in which
202  ///< case this will hold a default value of '{-9999,-9999,-9999,-9999}'.
203 
204  int TrueInitDet; ///<For MC events: The subdetector in which TSmrdIsoTrack::TrueInitPos lies
205  ///<\details
206  ///<\dontinclude TSmrdReconModule.cxx
207  ///<\skipline gGeoManager->FindNode(trueInitPos.X()
208 
209  TLorentzVector TrueFinalPos; ///<For MC events: The true final position of the corresponding ND::TG4Trajectory.
210  ///<\details Uses TSmrdIsoTrack::TrueId to obtain the corresponding
211  ///< ND::TG4Trajectory.
212  ///<\dontinclude TSmrdReconModule.cxx
213  ///<\skipline trueFinalPos =
214  ///<\skipline TrueFinalPos
215  ///< In some cases a given ND::TG4Trajectory may not have been saved in which
216  ///< case this will hold a default value of '{-9999,-9999,-9999,-9999}'.
217 
218  int TrueFinalDet; ///<For MC events: The subdetector in which TSmrdIsoTrack::TrueFinalPos lies
219  ///<\details
220  ///<\dontinclude TSmrdReconModule.cxx
221  ///<\skipline isoTrack->TrueFinalDet =
222  ///<\until ;
223 
224  TLorentzVector TrueInitMom; ///<For MC events: The true initial momentum of the corresponding ND::TG4Trajectory.
225  ///<\details Uses TSmrdIsoTrack::TrueId to obtain the corresponding
226  ///< ND::TG4Trajectory.
227  ///<\dontinclude TSmrdReconModule.cxx
228  ///<\skipline trueInitMom =
229  ///<\skipline TrueInitMom
230  ///< In some cases a given ND::TG4Trajectory may not have been saved in which
231  ///< case this will hold a default value of '{-9999,-9999,-9999,-9999}'.
232 
233  int TrueId; ///<For MC events: The Id of the corresponding ND::TG4Trajectory.
234  ///<\details Uses the corresponding ND::TReconTrack's ND::THitSelection and
235  ///< TrackTruthInfo::GetG4TrajIDHits to obtain the corresponding
236  ///< ND::TG4Trajectory.
237  ///<\dontinclude TSmrdReconModule.cxx
238  ///<\skipline trueId = TrackTruthInfo::GetG4TrajIDHits
239  ///< In some cases a given ND::TG4Trajectory may not have been saved in which
240  ///< case this will not correspond to the correct ND::TG4Trajectory but may
241  ///< correspond to a parent ND::TG4Trajectory.
242 
243  int TruePDG; ///<For MC events: The PDG code of the true particle.
244  ///<\details Uses TSmrdIsoTrack::TrueId to obtain the corresponding
245  ///< ND::TG4Trajectory.
246  ///<\dontinclude TSmrdReconModule.cxx
247  ///<\skipline truePDG =
248  ///<\skipline TruePDG
249  ///< In some cases a given ND::TG4Trajectory may not have been saved in which
250  ///< case this will hold a default value of '0'.
251 
252  int TrueParentId; ///<For MC events: The Id of the true trajectory's parent ND::TG4Trajectory
253  ///<\details Uses TSmrdIsoTrack::TrueId to obtain the corresponding
254  ///< ND::TG4Trajectory.
255  ///<\dontinclude TSmrdReconModule.cxx
256  ///<\skipline truePDG =
257  ///<\skipline TruePDG
258  ///< In some cases a given ND::TG4Trajectory may not have been saved in which
259  ///< case this will hold a default value of '-999'.
260 
261  double TrueHitPurity; ///<For MC events: The 'cleanliness' of the ND::THits which make up the corresponding ND::TReconTrack.
262  ///<\details Compares to the ND::TG4Trajectory with Id =
263  ///< TSmrdIsoTrack::TrueId via TrackTruthInfo::GetG4TrajIDHits
264  ///<\dontinclude TSmrdReconModule.cxx
265  ///<\skipline trueId = TrackTruthInfo::GetG4TrajIDHits
266  ///<\skipline isoTrack->TrueHitPurity
267 
268  double TrueHitEff; ///<For MC events: The 'completeness' of the ND::THits which make up the corresponding ND::TReconTrack.
269  ///<\details Compares to the ND::TG4Trajectory with Id =
270  ///< TSmrdIsoTrack::TrueId via TrackTruthInfo::GetG4TrajIDHits
271  ///<\dontinclude TSmrdReconModule.cxx
272  ///<\skipline trueId = TrackTruthInfo::GetG4TrajIDHits
273  ///<\skipline isoTrack->TrueHitEff
274 
276  };
277 
278  public:
279  TSmrdReconModule(const char *name = "SMRD",
280  const char *title = "SMRD Recon Module");
281  virtual ~TSmrdReconModule();
282 
283  virtual Bool_t ProcessFirstEvent(ND::TND280Event &event);
284  virtual Bool_t IsEnabledByDefault() const { return kTRUE; }
285 
286  protected:
287  virtual void InitializeModule();
288  virtual void InitializeBranches();
289  virtual bool FillTree(ND::TND280Event &);
290 
291  public:
292  Int_t fNSmrdReconHits; ///< The number of SMRD TReconHits.
293  TClonesArray *fSmrdReconHits; ///< The SMRD TReconHits.
294 
295  Int_t fNSmrdIsoTracks; ///< The number of SMRD isolated tracks.
296  TClonesArray *fSmrdIsoTracks; ///< The SMRD isolated tracks.
297 
298  private:
299 };
300 
301 #endif
TLorentzVector FrontPosVariance
Variance on the position of the &#39;first&#39; TTrackState of the corresponding ND::TReconTrack.
double dT
The difference between the reconstructed ND::THit times between the two contributors.
double avgtime
Average hit time of the corresponding ND::TReconTrack.
virtual void InitializeModule()
Initialize Module, override if necessary.
UInt_t UniqueID
The Unique ID of the corresponding ND::TReconTrack, used for global-subdetector matching.
int NHits
Number of ND::THits which are associated with the corresponding ND::TReconTrack.
int Status
The reported Status of the corresponding ND::TReconTrack.
double EDeposit
The total reconstructed charge of the corresponding ND::TReconTrack.
TLorentzVector PositionUncertainty
The uncertainty on the reconstructed 4-position of the corresponding double ended ND::THit...
ClassDef(TSmrdReconModule::TSmrdIsoTrack, 1)
Int_t fNSmrdReconHits
The number of SMRD TReconHits.
ClassDef(TSmrdReconModule::TSmrdReconHit, 1)
Both-sided SMRD TReconHit that isn&#39;t included in any reconstructed track.
virtual bool FillTree(ND::TND280Event &)
Fill all the stuff that goes in the output tree.
TVector3 DirectionVariance
Variance on the direction the TTrackState which is the state of the corresponding ND::TReconTrack...
virtual Bool_t ProcessFirstEvent(ND::TND280Event &event)
Is called after the first event is loaded in.
TLorentzVector TrueInitMom
For MC events: The true initial momentum of the corresponding ND::TG4Trajectory.
double PhiAngle
Polar coordinate phi of the TSmrdIsoTrack::Direction.
double TrueHitPurity
For MC events: The &#39;cleanliness&#39; of the ND::THits which make up the corresponding ND::TReconTrack...
double dZ
The difference in Z between the combined ND::THit(double ended bars) and the first contributor ND::T...
TLorentzVector TrueFinalPos
For MC events: The true final position of the corresponding ND::TG4Trajectory.
int TrueInitDet
For MC events: The subdetector in which TSmrdIsoTrack::TrueInitPos lies.
bool IsUsed
Designates if the corresponding ND::THit was used in a reconstructed object.
TLorentzVector TrueInitPos
For MC events: The true initial position of the corresponding ND::TG4Trajectory.
int Tower
The SMRD tower number.
int TrueFinalDet
For MC events: The subdetector in which TSmrdIsoTrack::TrueFinalPos lies.
int KalmanStatus
Kalman filter refit result for the corresponding ND::TReconTrack.
Int_t fNSmrdIsoTracks
The number of SMRD isolated tracks.
TClonesArray * fSmrdReconHits
The SMRD TReconHits.
TLorentzVector BackPosVariance
Variance on the position of the &#39;last&#39; TTrackState of the corresponding ND::TReconTrack.
int NNodes
Number of TReconNodes which are constituents of the corresponding ND::TReconTrack.
UInt_t RMM
The RMM Id of the channel corresponding to the first contributor hit.
double Range
The spacial distance between TSmrdIsoTrack::FrontPos and TSmrdIsoTrack::BackPos.
double ThetaAngle
Polar coordinate theta of the TSmrdIsoTrack::Direction.
UInt_t TFB
The TFB Id of the channel corresponding to the first contributor hit.
TLorentzVector Position
The reconstructed 4-position of the corresponding double ended ND::THit.
Summary information from smrdRecon output.
double TrueHitEff
For MC events: The &#39;completeness&#39; of the ND::THits which make up the corresponding ND::TReconTrack...
int NDOF
The Number of Degrees of Freedom in the reconstruction of the corresponding ND::TReconTrack.
double Chi2
The reported reconstruction &#39;quality&#39; of the corresponding ND::TReconTrack.
TLorentzVector FrontPos
Position of the &#39;first&#39; TTrackState of the corresponding ND::TReconTrack.
double ContribCharge[2]
The reconstructed charges from each contributor of the double ended bar.
virtual Bool_t IsEnabledByDefault() const
Is the module is enabled by default.
TSmrdReconModule(const char *name="SMRD", const char *title="SMRD Recon Module")
int Wall
The SMRD wall in which this the corresponding ND::THit resides. Is assigned a value from TSmrdReconMo...
std::string AlgorithmName
Name of the reconstruction algorithm.
int TrueId
For MC events: The Id of the corresponding ND::TG4Trajectory.
int TruePDG
For MC events: The PDG code of the true particle.
double Charge
The reconstructed charge of the corresponding double ended ND::THit.
int Counter
The SMRD scintillator number.
TVector3 Direction
Direction of the TTrackState which is the state of the corresponding ND::TReconTrack.
bool IsInnerMatched
Designates if the corresponding ND::THit was matched.
int TrueParentId
For MC events: The Id of the true trajectory&#39;s parent ND::TG4Trajectory.
TLorentzVector BackPos
Position of the &#39;last&#39; TTrackState of the corresponding ND::TReconTrack.
virtual void InitializeBranches()
Initialize Branches. Don&#39;t do anything else in this function.
A base class for analysis output modules which contain reconstructed event information.
TClonesArray * fSmrdIsoTracks
The SMRD isolated tracks.

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