00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef StMuBTofHit_hh
00021 #define StMuBTofHit_hh
00022
00023 #include <sstream>
00024 #include "StObject.h"
00025 #include "StThreeVectorF.hh"
00026
00027 class StBTofHit;
00028 #include "StMuDst.h"
00029 #include "StMuTrack.h"
00030
00031 class StMuBTofHit : public StObject {
00032 public:
00033 StMuBTofHit();
00034 StMuBTofHit(const StBTofHit* );
00035 ~StMuBTofHit();
00036
00037 int tray() const;
00038 int module() const;
00039 int cell() const;
00040 double leadingEdgeTime() const;
00041 double trailingEdgeTime() const;
00042 double tot() const;
00043
00044 int associatedTrackId() const;
00045 int index2Primary() const;
00046 int index2Global() const;
00047
00048 StMuTrack *primaryTrack() const;
00049 StMuTrack *globalTrack() const;
00050
00051 int idTruth() const;
00052 int qaTruth() const;
00053
00054 void setTrayIndex(unsigned char);
00055 void setModuleIndex(unsigned char);
00056 void setCellIndex(unsigned char);
00057 void setLeadingEdgeTime(double);
00058 void setTrailingEdgeTime(double);
00059
00060 void setAssociatedTrackId(short);
00061 void setIndex2Primary(int);
00062 void setIndex2Global(int);
00063
00064 void setIdTruth(Int_t idtru, Int_t qatru=0);
00065
00066 protected:
00067 UChar_t mTray;
00068 UChar_t mModule;
00069 UChar_t mCell;
00070 Double_t mLeadingEdgeTime;
00071 Double_t mTrailingEdgeTime;
00072 Short_t mAssociatedTrackId;
00073 Int_t mIndex2Primary;
00074 Int_t mIndex2Global;
00075 UShort_t mIdTruth;
00076 UShort_t mQuality;
00077
00078 friend class StMuDst;
00079
00080 ClassDef(StMuBTofHit,1)
00081 };
00082
00083 inline int StMuBTofHit::tray() const { return mTray; }
00084 inline int StMuBTofHit::module() const { return mModule; }
00085 inline int StMuBTofHit::cell() const { return mCell; }
00086 inline double StMuBTofHit::leadingEdgeTime() const { return mLeadingEdgeTime; }
00087 inline double StMuBTofHit::trailingEdgeTime() const { return mTrailingEdgeTime; }
00088 inline double StMuBTofHit::tot() const { return mTrailingEdgeTime-mLeadingEdgeTime; }
00089 inline int StMuBTofHit::associatedTrackId() const { return mAssociatedTrackId; }
00090 inline int StMuBTofHit::index2Primary() const { return mIndex2Primary; }
00091 inline int StMuBTofHit::index2Global() const { return mIndex2Global; }
00092 inline int StMuBTofHit::idTruth() const { return mIdTruth; }
00093 inline int StMuBTofHit::qaTruth() const { return mQuality; }
00094
00095 inline StMuTrack* StMuBTofHit::primaryTrack() const { return (mIndex2Primary>=0) ? (StMuTrack*)StMuDst::array(muPrimary)->UncheckedAt(mIndex2Primary) : 0; }
00096 inline StMuTrack* StMuBTofHit::globalTrack() const { return (mIndex2Global>=0) ? (StMuTrack*)StMuDst::array(muGlobal)->UncheckedAt(mIndex2Global) : 0; }
00097
00098 inline void StMuBTofHit::setTrayIndex(unsigned char tray) { mTray=tray; }
00099 inline void StMuBTofHit::setModuleIndex(unsigned char module) { mModule=module; }
00100 inline void StMuBTofHit::setCellIndex(unsigned char cell) { mCell=cell; }
00101 inline void StMuBTofHit::setLeadingEdgeTime(double time) { mLeadingEdgeTime=time; }
00102 inline void StMuBTofHit::setTrailingEdgeTime(double time) { mTrailingEdgeTime=time; }
00103 inline void StMuBTofHit::setAssociatedTrackId(short id) { mAssociatedTrackId=id; }
00104 inline void StMuBTofHit::setIndex2Primary(int index) { mIndex2Primary=index; }
00105 inline void StMuBTofHit::setIndex2Global(int index) { mIndex2Global=index; }
00106
00107 #endif