StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuBTofHit.h
1 /***************************************************************************
2  *
3  * $Id: StMuBTofHit.h,v 1.1 2009/02/20 17:05:59 tone421 Exp $
4  *
5  * Author: Xin Dong, Feb. 2009
6  *
7  ***************************************************************************
8  *
9  * Description: Tof Hit structure in MuDst
10  *
11  ***************************************************************************
12  *
13  * $Log: StMuBTofHit.h,v $
14  * Revision 1.1 2009/02/20 17:05:59 tone421
15  * *** empty log message ***
16  *
17  *
18  ***************************************************************************/
19 
20 #ifndef StMuBTofHit_hh
21 #define StMuBTofHit_hh
22 
23 #include <sstream>
24 #include "StObject.h"
25 #include "StThreeVectorF.hh"
26 
27 class StBTofHit;
28 #include "StMuDst.h"
29 #include "StMuTrack.h"
30 
31 class StMuBTofHit : public StObject {
32 public:
33  StMuBTofHit();
34  StMuBTofHit(const StBTofHit* );
35  ~StMuBTofHit();
36 
37  int tray() const;
38  int module() const;
39  int cell() const;
40  double leadingEdgeTime() const;
41  double trailingEdgeTime() const;
42  double tot() const;
43 
44  int associatedTrackId() const;
45  int index2Primary() const;
46  int index2Global() const;
47 
48  StMuTrack *primaryTrack() const;
49  StMuTrack *globalTrack() const;
50 
51  int idTruth() const;
52  int qaTruth() const;
53 
54  void setTrayIndex(unsigned char);
55  void setModuleIndex(unsigned char);
56  void setCellIndex(unsigned char);
57  void setLeadingEdgeTime(double);
58  void setTrailingEdgeTime(double);
59 
60  void setAssociatedTrackId(short);
61  void setIndex2Primary(int);
62  void setIndex2Global(int);
63 
64  void setIdTruth(Int_t idtru, Int_t qatru=0);
65 
66  protected:
67  UChar_t mTray;
68  UChar_t mModule;
69  UChar_t mCell;
70  Double_t mLeadingEdgeTime;
71  Double_t mTrailingEdgeTime;
72  Short_t mAssociatedTrackId;
73  Int_t mIndex2Primary;
74  Int_t mIndex2Global;
75  UShort_t mIdTruth;
76  UShort_t mQuality;
77 
78  friend class StMuDst;
79 
80  ClassDef(StMuBTofHit,1)
81 };
82 
83 inline int StMuBTofHit::tray() const { return mTray; }
84 inline int StMuBTofHit::module() const { return mModule; }
85 inline int StMuBTofHit::cell() const { return mCell; }
86 inline double StMuBTofHit::leadingEdgeTime() const { return mLeadingEdgeTime; }
87 inline double StMuBTofHit::trailingEdgeTime() const { return mTrailingEdgeTime; }
88 inline double StMuBTofHit::tot() const { return mTrailingEdgeTime-mLeadingEdgeTime; }
89 inline int StMuBTofHit::associatedTrackId() const { return mAssociatedTrackId; }
90 inline int StMuBTofHit::index2Primary() const { return mIndex2Primary; }
91 inline int StMuBTofHit::index2Global() const { return mIndex2Global; }
92 inline int StMuBTofHit::idTruth() const { return mIdTruth; }
93 inline int StMuBTofHit::qaTruth() const { return mQuality; }
94 
95 inline StMuTrack* StMuBTofHit::primaryTrack() const { return (mIndex2Primary>=0) ? (StMuTrack*)StMuDst::array(muPrimary)->UncheckedAt(mIndex2Primary) : 0; }
96 inline StMuTrack* StMuBTofHit::globalTrack() const { return (mIndex2Global>=0) ? (StMuTrack*)StMuDst::array(muGlobal)->UncheckedAt(mIndex2Global) : 0; }
97 
98 inline void StMuBTofHit::setTrayIndex(unsigned char tray) { mTray=tray; }
99 inline void StMuBTofHit::setModuleIndex(unsigned char module) { mModule=module; }
100 inline void StMuBTofHit::setCellIndex(unsigned char cell) { mCell=cell; }
101 inline void StMuBTofHit::setLeadingEdgeTime(double time) { mLeadingEdgeTime=time; }
102 inline void StMuBTofHit::setTrailingEdgeTime(double time) { mTrailingEdgeTime=time; }
103 inline void StMuBTofHit::setAssociatedTrackId(short id) { mAssociatedTrackId=id; }
104 inline void StMuBTofHit::setIndex2Primary(int index) { mIndex2Primary=index; }
105 inline void StMuBTofHit::setIndex2Global(int index) { mIndex2Global=index; }
106 
107 #endif
StMuBTofHit()
constructor
Definition: StMuBTofHit.cxx:26
static TClonesArray * array(int type)
returns pointer to the n-th TClonesArray
Definition: StMuDst.h:262