StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StBTofHit.h
1 
5 /***************************************************************************
6  *
7  * $Id: StBTofHit.h,v 2.5 2016/02/25 17:10:19 ullrich Exp $
8  *
9  * Author: Xin Dong, Nov 2008
10  ***************************************************************************
11  *
12  * Description:
13  *
14  ***************************************************************************
15  *
16  * $Log: StBTofHit.h,v $
17  * Revision 2.5 2016/02/25 17:10:19 ullrich
18  * Implemented detector() which is now a pure abstract method in StHit.
19  *
20  * Revision 2.4 2012/05/07 14:42:57 fisyak
21  * Add handilings for Track to Fast Detectors Matching
22  *
23  * Revision 2.3 2009/02/13 22:29:03 ullrich
24  * Fixed typo in ostream<< operator.
25  *
26  * Revision 2.2 2009/01/15 00:46:26 ullrich
27  * tray() now returns int.
28  *
29  * Revision 2.1 2008/12/22 20:30:58 ullrich
30  * Initial Revision.
31  *
32  *
33  **************************************************************************/
34 #ifndef StBTofHit_hh
35 #define StBTofHit_hh
36 
37 #include <Stiostream.h>
38 #include "StHit.h"
39 #include "StContainers.h"
40 
41 class StTrack;
42 
43 class StBTofHit : public StHit {
44 public:
45  enum {
46  kNTray = 120,
47  kNModule = 32,
48  kNCell = 6
49  };
50  StBTofHit();
51  ~StBTofHit() {}
52  Int_t tray() const { return mTray; }
53  Int_t module() const { return mModule; }
54  Int_t cell() const { return mCell; }
55  Int_t ID() const { return kNModule*(tray()-1) + module() - 1;}
56  Double_t leadingEdgeTime() const { return mLeadingEdgeTime; }
57  Double_t trailingEdgeTime() const { return mTrailingEdgeTime; }
58  Double_t tot() const { return mTrailingEdgeTime - mLeadingEdgeTime; }
59  StTrack* associatedTrack();
60  const StTrack* associatedTrack() const;
61  void setTray(UChar_t trayId) { mTray = trayId; }
62  void setModule(UChar_t moduleId) { mModule = moduleId; }
63  void setCell(UChar_t cellId) { mCell = cellId; }
64  void setLeadingEdgeTime(Double_t time) { mLeadingEdgeTime = time; }
65  void setTrailingEdgeTime(Double_t time) { mTrailingEdgeTime = time; }
66  void setAssociatedTrack(StTrack*);
67  const StThreeVectorF& position() const;
68  static Float_t padWidth() { return mBTofPadWidth;}
69  StDetectorId detector() const;
70 
71 protected:
72  UChar_t mTray;
73  UChar_t mModule;
74  UChar_t mCell;
75  Double_t mLeadingEdgeTime;
76  Double_t mTrailingEdgeTime;
77  const static Float_t mBTofPadWidth;
78  // StTrack *mAssociatedTrack; //$LINK
79 #ifdef __CINT__
80  StObjLink mAssociatedTrack;
81 #else
82  StLink<StTrack> mAssociatedTrack;
83 #endif //__CINT__
84  ClassDef(StBTofHit,2)
85 };
86 
87 inline StDetectorId StBTofHit::detector() const {return kBTofId;}
88 
89 ostream& operator<<(ostream&, const StBTofHit&); // Printing operator
90 #endif
Definition: StHit.h:125
120 TOF trays
Definition: StBTofHit.h:47
32 modules per tray
Definition: StBTofHit.h:48