StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMcTrack.hh
1 
131 #ifndef StMcTrack_hh
132 #define StMcTrack_hh
133 #include "Stiostream.h"
134 #include "StLorentzVectorF.hh"
135 #include "StMcContainers.hh"
136 #include "StObject.h"
137 #include "StEnumerations.h"
139 class g2t_track_st;
140 class particle_st;
141 class StMcTrack;
142 ostream& operator<<(ostream& os, const StMcTrack&);
143 
144 class StMcTrack : public StObject {
145 public:
146  StMcTrack();
147  virtual ~StMcTrack();
148  StMcTrack(g2t_track_st* trk);
149  StMcTrack(particle_st* trk);
150 
151  // StMcTrack(const StMcTrack&); use default
152  // const StMcTrack & operator=(const StMcTrack&); use default
153 
154  int operator==(const StMcTrack&) const;
155  int operator!=(const StMcTrack&) const;
156 
157  void initToZero();
158  // "Get" Methods
159  const StLorentzVectorF& fourMomentum() const { return mFourMomentum; }
160  const StThreeVectorF& momentum() const { return mFourMomentum.vect(); }
161  float energy() const { return mFourMomentum.e(); }
162  float pt() const { return mFourMomentum.perp(); }
163  float rapidity() const { return mFourMomentum.rapidity(); }
164  float pseudoRapidity() const { return mFourMomentum.pseudoRapidity(); }
165  StMcVertex* startVertex() { return mStartVertex; }
166  const StMcVertex* startVertex() const { return mStartVertex; }
167  StMcVertex* stopVertex() { return mStopVertex; }
168  const StMcVertex* stopVertex() const { return mStopVertex; }
169  StMcTrack* parent() { return mParent; }
170  const StMcTrack* parent() const { return mParent; }
171  StPtrVecMcVertex& intermediateVertices() { return mIntermediateVertices; }
172  const StPtrVecMcVertex& intermediateVertices() const { return mIntermediateVertices; }
173  StPtrVecMcTpcHit& tpcHits() { return mTpcHits; }
174  const StPtrVecMcTpcHit& tpcHits() const { return mTpcHits; }
175  StPtrVecMcSvtHit& svtHits() { return mSvtHits; }
176  const StPtrVecMcSvtHit& svtHits() const { return mSvtHits; }
177  StPtrVecMcSsdHit& ssdHits() { return mSsdHits; }
178  const StPtrVecMcSsdHit& ssdHits() const { return mSsdHits; }
179  StPtrVecMcFtpcHit& ftpcHits() { return mFtpcHits; }
180  const StPtrVecMcFtpcHit& ftpcHits() const { return mFtpcHits; }
181  StPtrVecMcRichHit& richHits() { return mRichHits; }
182  const StPtrVecMcRichHit& richHits() const { return mRichHits; }
183  StPtrVecMcCtbHit& ctbHits() { return mCtbHits; }
184  const StPtrVecMcCtbHit& ctbHits() const { return mCtbHits; }
185  StPtrVecMcCalorimeterHit& bemcHits() { return mBemcHits; }
186  const StPtrVecMcCalorimeterHit& bemcHits() const { return mBemcHits; }
187  StPtrVecMcCalorimeterHit& bprsHits() { return mBprsHits; }
188  const StPtrVecMcCalorimeterHit& bprsHits() const { return mBprsHits; }
189  StPtrVecMcCalorimeterHit& bsmdeHits() { return mBsmdeHits; }
190  const StPtrVecMcCalorimeterHit& bsmdeHits() const { return mBsmdeHits; }
191  StPtrVecMcCalorimeterHit& bsmdpHits() { return mBsmdpHits; }
192  const StPtrVecMcCalorimeterHit& bsmdpHits() const { return mBsmdpHits; }
193  StPtrVecMcTofHit& tofHits() { return mTofHits; }
194  const StPtrVecMcTofHit& tofHits() const { return mTofHits; }
195  StPtrVecMcMtdHit& mtdHits() { return mMtdHits; }
196  const StPtrVecMcMtdHit& mtdHits() const { return mMtdHits; }
197  StPtrVecMcCalorimeterHit& eemcHits() { return mEemcHits; }
198  const StPtrVecMcCalorimeterHit& eemcHits() const { return mEemcHits; }
199  StPtrVecMcCalorimeterHit& eprsHits() { return mEprsHits; }
200  const StPtrVecMcCalorimeterHit& eprsHits() const { return mEprsHits; }
201  StPtrVecMcCalorimeterHit& esmduHits() { return mEsmduHits; }
202  const StPtrVecMcCalorimeterHit& esmduHits() const { return mEsmduHits; }
203  StPtrVecMcCalorimeterHit& esmdvHits() { return mEsmdvHits; }
204  const StPtrVecMcCalorimeterHit& esmdvHits() const { return mEsmdvHits; }
205  StPtrVecMcCalorimeterHit& fpdHits() { return mFpdHits; }
206  const StPtrVecMcCalorimeterHit& fpdHits() const { return mFpdHits; }
207  StPtrVecMcCalorimeterHit& fscHits() { return mFscHits; }
208  const StPtrVecMcCalorimeterHit& fscHits() const { return mFscHits; }
209  StPtrVecMcPxlHit& pxlHits() { return mPxlHits; }
210  const StPtrVecMcPxlHit& pxlHits() const { return mPxlHits; }
211  StPtrVecMcIstHit& istHits() { return mIstHits; }
212  const StPtrVecMcIstHit& istHits() const { return mIstHits; }
213  StPtrVecMcFgtHit& fgtHits() { return mFgtHits; }
214  const StPtrVecMcFgtHit& fgtHits() const { return mFgtHits; }
215  StPtrVecMcEtrHit& etrHits() { return mEtrHits; }
216  const StPtrVecMcEtrHit& etrHits() const { return mEtrHits; }
217  StParticleDefinition* particleDefinition();
218  const StParticleDefinition* particleDefinition() const { return mParticleDefinition; }
219  const StPtrVecMcHit *Hits(StDetectorId Id) const;
220  const StPtrVecMcCalorimeterHit *CalorimeterHits(StDetectorId Id) const;
221  int isShower() const { return mIsShower; }
222  long geantId() const { return mGeantId; }
223  long pdgId() const { return mPdgId; }
224  long key() const { return mKey; }
225  long eventGenLabel() const { return mEventGenLabel; }
226 
227  // "Set" Methods
228  void setFourMomentum(const StLorentzVectorF&);
229  void setStartVertex(StMcVertex*);
230  void setStopVertex(StMcVertex*);
231  void setIntermediateVertices(StPtrVecMcVertex&);
232  void setTpcHits(StPtrVecMcTpcHit&);
233  void setSvtHits(StPtrVecMcSvtHit&);
234  void setSsdHits(StPtrVecMcSsdHit&);
235  void setFtpcHits(StPtrVecMcFtpcHit&);
236  void setRichHits(StPtrVecMcRichHit&);
237  void setCtbHits(StPtrVecMcCtbHit&);
238  void setBemcHits(StPtrVecMcCalorimeterHit&);
239  void setBprsHits(StPtrVecMcCalorimeterHit&);
240  void setBsmdeHits(StPtrVecMcCalorimeterHit&);
241  void setBsmdpHits(StPtrVecMcCalorimeterHit&);
242  void setTofHits(StPtrVecMcTofHit&);
243  void setMtdHits(StPtrVecMcMtdHit&);
244  void setEemcHits(StPtrVecMcCalorimeterHit&);
245  void setEprsHits(StPtrVecMcCalorimeterHit&);
246  void setEsmduHits(StPtrVecMcCalorimeterHit&);
247  void setEsmdvHits(StPtrVecMcCalorimeterHit&);
248  void setFscHits(StPtrVecMcCalorimeterHit&);
249  void setPxlHits(StPtrVecMcPxlHit&);
250  void setIstHits(StPtrVecMcIstHit&);
251  void setFgtHits(StPtrVecMcFgtHit&);
252  void setEtrHits(StPtrVecMcEtrHit&);
253 
254  void setShower(char);
255  void setGeantId(long);
256  void setPdgId(long);
257  void setKey(long);
258  void setEventGenLabel(long);
259  void setParent(StMcTrack*);
260  void setPrimary(Bool_t val) {mIsPrimary = val;}
261 
262  void addTpcHit(StMcTpcHit*);
263  void addSvtHit(StMcSvtHit*);
264  void addSsdHit(StMcSsdHit*);
265  void addFtpcHit(StMcFtpcHit*);
266  void addRichHit(StMcRichHit*);
267  void addCtbHit(StMcCtbHit*);
268  void addBemcHit(StMcCalorimeterHit*);
269  void addBprsHit(StMcCalorimeterHit*);
270  void addBsmdeHit(StMcCalorimeterHit*);
271  void addBsmdpHit(StMcCalorimeterHit*);
272  void addTofHit(StMcTofHit*);
273  void addMtdHit(StMcMtdHit*);
274  void addEemcHit(StMcCalorimeterHit*);
275  void addEprsHit(StMcCalorimeterHit*);
276  void addEsmduHit(StMcCalorimeterHit*);
277  void addEsmdvHit(StMcCalorimeterHit*);
278  void addFpdHit(StMcCalorimeterHit*);
279  void addFscHit(StMcCalorimeterHit*);
280  void addPxlHit(StMcPxlHit*);
281  void addIstHit(StMcIstHit*);
282  void addFgtHit(StMcFgtHit*);
283  void addEtrHit(StMcEtrHit*);
284  void removeTpcHit(StMcTpcHit*);
285  void removeSvtHit(StMcSvtHit*);
286  void removeSsdHit(StMcSsdHit*);
287  void removeFtpcHit(StMcFtpcHit*);
288  void removeRichHit(StMcRichHit*);
289  void removeCtbHit(StMcCtbHit*);
290  void removeCalorimeterHit(StPtrVecMcCalorimeterHit&, StMcCalorimeterHit*);
291  void removeBemcHit(StMcCalorimeterHit*);
292  void removeBprsHit(StMcCalorimeterHit*);
293  void removeBsmdeHit(StMcCalorimeterHit*);
294  void removeBsmdpHit(StMcCalorimeterHit*);
295  void removeTofHit(StMcTofHit*);
296  void removeMtdHit(StMcMtdHit*);
297  void removeEemcHit(StMcCalorimeterHit*);
298  void removeEprsHit(StMcCalorimeterHit*);
299  void removeEsmduHit(StMcCalorimeterHit*);
300  void removeEsmdvHit(StMcCalorimeterHit*);
301  void removePxlHit(StMcPxlHit*);
302  void removeIstHit(StMcIstHit*);
303  void removeFgtHit(StMcFgtHit*);
304  void removeEtrHit(StMcEtrHit*);
305  void Print(Option_t *option="") const;
306  Bool_t IsPrimary() const {return mIsPrimary;}
307  // void setTopologyMap(StTrackTopologyMap&);
308 
309 protected:
310  StLorentzVectorF mFourMomentum;
311  StMcVertex* mStartVertex;
312  StMcVertex* mStopVertex;
313  StPtrVecMcVertex mIntermediateVertices;
314  StPtrVecMcTpcHit mTpcHits;
315  StPtrVecMcSvtHit mSvtHits;
316  StPtrVecMcSsdHit mSsdHits;
317  StPtrVecMcFtpcHit mFtpcHits;
318  StPtrVecMcRichHit mRichHits;
319  StPtrVecMcCtbHit mCtbHits;
320  StPtrVecMcCalorimeterHit mBemcHits;
321  StPtrVecMcCalorimeterHit mBprsHits;
322  StPtrVecMcCalorimeterHit mBsmdeHits;
323  StPtrVecMcCalorimeterHit mBsmdpHits;
324  StPtrVecMcTofHit mTofHits;
325  StPtrVecMcMtdHit mMtdHits;
326  StPtrVecMcCalorimeterHit mEemcHits;
327  StPtrVecMcCalorimeterHit mEprsHits;
328  StPtrVecMcCalorimeterHit mEsmduHits;
329  StPtrVecMcCalorimeterHit mEsmdvHits;
330  StPtrVecMcCalorimeterHit mFpdHits;
331  StPtrVecMcCalorimeterHit mFscHits;
332  StPtrVecMcPxlHit mPxlHits;
333  StPtrVecMcIstHit mIstHits;
334  StPtrVecMcFgtHit mFgtHits;
335  StPtrVecMcEtrHit mEtrHits;
336  StParticleDefinition* mParticleDefinition;
337  StMcTrack* mParent;
338  char mIsShower;
339  long mGeantId;
340  long mPdgId;
341  long mKey;
342  long mEventGenLabel;
343  Bool_t mIsPrimary;
344  ClassDef(StMcTrack,2)
345 };
346 #endif
347 
348 
349 
350 
Monte Carlo Track class All information on a simulated track is stored in this class: kinematics...
Definition: StMcTrack.hh:144