StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StBTofHeader.h
1 
5 /***************************************************************************
6  *
7  * $Id: StBTofHeader.h,v 2.5 2021/05/28 19:00:21 ullrich Exp $
8  *
9  * Author: Xin Dong, Nov 2008
10  ***************************************************************************
11  *
12  * Description:
13  * Barrel TOF header data, contains the TOF data header, vpd summary and
14  * other event-wise information.
15  *
16  ***************************************************************************
17  *
18  * $Log: StBTofHeader.h,v $
19  * Revision 2.5 2021/05/28 19:00:21 ullrich
20  * Added 3 member plus access fct: mTCanFirst, mTCanLast, mNTzeroCan (Frank)
21  *
22  * Revision 2.4 2010/05/17 17:47:16 ullrich
23  * Increase version number to 2.
24  *
25  * Revision 2.3 2010/05/12 15:12:03 ullrich
26  * Added member mNTzero and access methods.
27  *
28  * Revision 2.2 2009/01/15 00:45:27 ullrich
29  * mTriggerTime becomes array, setVpdVz() gets default argument.
30  *
31  * Revision 2.1 2008/12/22 20:30:57 ullrich
32  * Initial Revision.
33  *
34  *
35  **************************************************************************/
36 #ifndef StBTofHeader_hh
37 #define StBTofHeader_hh
38 
39 #include <Stiostream.h>
40 #include "StObject.h"
41 #include "StEnumerations.h"
42 
43 class StBTofHeader : public StObject {
44 public:
45  enum {MAXFIBER=4, MAXVPD=19, MAXVPDVZ=20};
46 
47  StBTofHeader();
48  ~StBTofHeader();
49 
50  short fiberHeader(int fiberId) const;
51  unsigned int fiberTriggerWord(int fiberId) const;
52  unsigned int vpdHitPattern(StBeamDirection eastwest) const;
53  unsigned short numberOfVpdHits(StBeamDirection eastwest) const;
54  bool isVpdHit(StBeamDirection eastwest, int tubeId) const;
55  float vpdVz(int rank=0) const;
56  double tStart() const;
57  double tStartError() const;
58  double tDiff() const;
59  double vpdTime(StBeamDirection eastwest, int tubeId) const;
60  unsigned int triggerTime(int fiberId) const;
61  int nTzero() const;
62 
63  int nTzeroCan() const;
64  double tCanFirst() const;
65  double tCanLast() const;
66  int vpdEHits() const;
67  int vpdWHits() const;
68  int vpdEGoodHits() const;
69  int vpdWGoodHits() const;
70  double earliestVpdEHit() const;
71  double earliestVpdWHit() const;
72  double closestVpdEHit() const;
73  double closestVpdWHit() const;
74  double latestVpdEHit() const;
75  double latestVpdWHit() const;
76 
77  void setFiberHeader(int fiberId, short val);
78  void setFiberTriggerWord(int fiberId, unsigned int val);
79  void setVpdHit(StBeamDirection eastwest, int tubeId);
80  void removeVpdHit(StBeamDirection eastwest, int tubeId);
81  void setVpdHitPattern(StBeamDirection eastwest, unsigned int val);
82  void setVpdVz(float vz, int rank=0);
83  void setTStart(double t);
84  void setTStartError(double t_err);
85  void setTDiff(double tdiff);
86  void setVpdTime(StBeamDirection eastwest, int tubeId, double t);
87  void setTriggerTime(unsigned int tdc, int fiberId);
88  void setNTzero(short n);
89 
90  void setNTzeroCan(short nCan);
91  void setTCanFirst(double tFirst);
92  void setTCanLast(double tLast);
93  void setVpdEHits(short vpdEHits);
94  void setVpdWHits(short vpdWHits);
95  void setVpdEGoodHits(short vpdEGoodHits);
96  void setVpdWGoodHits(short vpdWGoodHits);
97  void setEarliestVpdEHit(double earliestVpdEHit);
98  void setEarliestVpdWHit(double earliestVpdWHit);
99  void setClosestVpdEHit(double closestVpdEHit);
100  void setClosestVpdWHit(double closestVpdWHit);
101  void setLatestVpdEHit(double latestVpdEHit);
102  void setLatestVpdWHit(double latestVpdWHit);
103 
104 protected:
105  Short_t mFiberHeader[MAXFIBER];
106  UInt_t mFiberTriggerWord[MAXFIBER];
107  UInt_t mVpdHitPattern[2];
108  Float_t mVpdVz[MAXVPDVZ];
109  Double_t mTStart;
110  Double_t mTStartErr;
111  Double_t mTDiff;
112  Double_t mVpdTime[2][MAXVPD];
113  UInt_t mTriggerTime[MAXFIBER];
114  Short_t mNTzero;
115  Short_t mNTzeroCan;
116  Double_t mTCanFirst;
117  Double_t mTCanLast;
118  Double_t mVpdEHits;
119  Double_t mVpdWHits;
120  Double_t mVpdEGoodHits;
121  Double_t mVpdWGoodHits;
122  Double_t mEarliestVpdEHit;
123  Double_t mEarliestVpdWHit;
124  Double_t mClosestVpdEHit;
125  Double_t mClosestVpdWHit;
126  Double_t mLatestVpdEHit;
127  Double_t mLatestVpdWHit;
128 
129  ClassDef(StBTofHeader,3)
130 };
131 
132 #endif