00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef StBTofHit_hh
00032 #define StBTofHit_hh
00033
00034 #include <Stiostream.h>
00035 #include "StHit.h"
00036 #include "StContainers.h"
00037
00038 class StTrack;
00039
00040 class StBTofHit : public StHit {
00041 public:
00042 enum {
00043 kNTray = 120,
00044 kNModule = 32,
00045 kNCell = 6
00046 };
00047 StBTofHit();
00048 ~StBTofHit() {}
00049 Int_t tray() const { return mTray; }
00050 Int_t module() const { return mModule; }
00051 Int_t cell() const { return mCell; }
00052 Int_t ID() const { return kNModule*(tray()-1) + module() - 1;}
00053 Double_t leadingEdgeTime() const { return mLeadingEdgeTime; }
00054 Double_t trailingEdgeTime() const { return mTrailingEdgeTime; }
00055 Double_t tot() const { return mTrailingEdgeTime - mLeadingEdgeTime; }
00056 StTrack* associatedTrack();
00057 const StTrack* associatedTrack() const;
00058 void setTray(UChar_t trayId) { mTray = trayId; }
00059 void setModule(UChar_t moduleId) { mModule = moduleId; }
00060 void setCell(UChar_t cellId) { mCell = cellId; }
00061 void setLeadingEdgeTime(Double_t time) { mLeadingEdgeTime = time; }
00062 void setTrailingEdgeTime(Double_t time) { mTrailingEdgeTime = time; }
00063 void setAssociatedTrack(StTrack*);
00064 const StThreeVectorF& position() const;
00065 static Float_t padWidth() { return mBTofPadWidth;}
00066 protected:
00067 UChar_t mTray;
00068 UChar_t mModule;
00069 UChar_t mCell;
00070 Double_t mLeadingEdgeTime;
00071 Double_t mTrailingEdgeTime;
00072 const static Float_t mBTofPadWidth;
00073
00074 #ifdef __CINT__
00075 StObjLink mAssociatedTrack;
00076 #else
00077 StLink<StTrack> mAssociatedTrack;
00078 #endif //__CINT__
00079 ClassDef(StBTofHit,2)
00080 };
00081 ostream& operator<<(ostream&, const StBTofHit&);
00082 #endif