StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StBTofHitMaker.h
1 #ifndef STAR_StBTofHitMaker_H
2 #define STAR_StBTofHitMaker_H
3 
4 /***************************************************************************
5  *
6  * $Id: StBTofHitMaker.h,v 1.12 2017/10/20 17:50:32 smirnovd Exp $
7  * StBTofHitMaker - class to fille the StEvent from DAQ reader
8  *--------------------------------------------------------------------------
9  *
10  ***************************************************************************/
11 #include "StRTSBaseMaker.h"
12 
13 #include <vector>
14 
15 #define VHRBIN2PS 24.4140625 // Very High resolution mode, pico-second per bin
16  // 1000*25/1024 (ps/chn)
17 #define HRBIN2PS 97.65625 // High resolution mode, pico-second per bin
18  // 97.65625= 1000*100/1024 (ps/chn)
19 
20 struct tof_t;
21 
22 class StEvent;
23 class StBTofCollection;
24 class StBTofRawHit;
26 class StBTofHit;
28 #include "StBTofUtil/StBTofSortRawHit.h"
29 class StBTofINLCorr;
30 class StBTofDaqMap;
31 
32 struct TofRawHit {
33  unsigned int tdc;
34  unsigned int dataword;
35  unsigned char fiberid;
36  unsigned char trayID;
37  unsigned char globaltdcchan;
38 };
39 
40 typedef std::vector<Int_t> IntVec;
41 typedef std::vector<UInt_t> UIntVec;
42 
43 
50 {
51  private:
52  StEvent *mStEvent;
53  tof_t *fTof;
54  Int_t mYear;
55 
56  Int_t UnpackTofRawData();
57  void fillBTofHeader();
58  void fillBTofRawHitCollection();
59  void fillBTofHitCollection();
60  void fillStEvent();
61  std::vector<TofRawHit> TofLeadingHits;
64  std::vector<TofRawHit> TofTrailingHits;
65 
66  Int_t mNValidTrays;
67  unsigned int mTriggerTimeStamp[4];
68  StBTofCollection* mBTofCollection;
69  StBTofRawHitCollection* mRawHitCollection;
70  StBTofHitCollection* mHitCollection;
71  StBTofDaqMap* mBTofDaqMap;
72  StBTofINLCorr* mBTofINLCorr;
73  StBTofSortRawHit* mBTofSortRawHit;
74  enum {
75  mNVPD = 19
76  , mWestVpdTrayId = 121
77  , mEastVpdTrayId = 122
78  };
79 
80  protected:
82  StRtsTable *GetNextRaw(int sec);
83 
85 
86  public:
87 
89  StBTofHitMaker(const char *name="tof_raw");
90 
91  ~StBTofHitMaker() ;
92 
93  void Clear(Option_t* option="");
94  Int_t Init();
95  Int_t InitRun(Int_t);
96  Int_t FinishRun(Int_t);
97  Int_t Finish();
98  Int_t Make();
99 
101  std::vector<TofRawHit> getLeadingHits();
103  std::vector<TofRawHit> getTrailingHits();
104 
106  virtual const char *GetCVS() const
107  {
108  static const char cvs[]="Tag $Name: $Id: built " __DATE__ " " __TIME__ ; return cvs;
109  }
110 
111  ClassDef(StBTofHitMaker, 1)
112 };
113 
114 inline std::vector<TofRawHit> StBTofHitMaker::getLeadingHits() { return TofLeadingHits; }
115 inline std::vector<TofRawHit> StBTofHitMaker::getTrailingHits() { return TofTrailingHits; }
116 
117 #endif
std::vector< TofRawHit > getTrailingHits()
obtain the whole list of trainling edge hits
unsigned char globaltdcchan
1,2,......,120,for tray, 121, 122 for upvpd
void Clear(Option_t *option="")
User defined functions.
Class StRTSBaseMaker - is an abstract StMaker to define the interface to access the DAQ data from the...
StBTofHitMaker(const char *name="tof_raw")
Default constructor.
Definition: daq_tof.h:7
unsigned char fiberid
data word before unpack
unsigned int dataword
tdc time (in bin) per hit.
std::vector< TofRawHit > getLeadingHits()
obtain the whole list of leading edge hits
StBTofCollection * GetBTofCollection()
StRtsTable * GetNextRaw()
This is an overloaded member function, provided for convenience.
unsigned char trayID
0 1 2,3
virtual const char * GetCVS() const
cvs