StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StSortTofRawData.h
1 #ifndef StSortTofRawData_h
2 #define StSortTofRawData_h
3 
4 class StEvent;
5 class StTofRawData;
6 class StTofCollection;
8 class StTofrDaqMap;
9 
10 #include "StObject.h"
11 #include "TDataSet.h"
12 #include "TDataSetIter.h"
13 #include "TObjectSet.h"
14 
15 #include <vector>
16 #ifndef ST_NO_NAMESPACES
17 using std::vector;
18 #endif
19 
20 #if !defined(ST_NO_TEMPLATE_DEF_ARGS) || defined(__CINT__)
21 //#ifndef ST_NO_TEMPLATE_DEF_ARGS
22 typedef vector<Int_t> IntVec;
23 #else
24 typedef vector<Int_t, allocator<Int_t>> IntVec;
25 #endif
26 
27 struct TOFRawHit {
28  int tray;
29  int channel;
30  int triggertime;
31  IntVec leadingTdc;
32  IntVec trailingTdc;
33 };
34 
35 #ifndef ST_NO_TEMPLATE_DEF_ARGS
36  typedef vector<TOFRawHit> tofRawHitVector;
37 #else
38  typedef vector<TOFRawHit,allocator<TOFRawHit>> tofRawHitVector;
39 #endif
40  typedef vector<TOFRawHit>::iterator tofRawHitVectorIter;
41 
42 class StSortTofRawData : public StObject {
43  private:
44  static const UInt_t mNTRAY = 122;
45  tofRawHitVector mRawHitVec[mNTRAY];
46 
47  static const Int_t mNTOF = 192;
48  Int_t mTDIGLeChan2WestPMT[mNTOF], mTDIGTeChan2WestPMT[mNTOF]; //
49  Int_t mTDIGLeChan2EastPMT[mNTOF], mTDIGTeChan2EastPMT[mNTOF]; //
50 
51  //--added by Zebo
52  Float_t mTimeWindow[mNTRAY][2];
53  //--end
54  public:
59 
60  void Init(StTofCollection*);
61  void InitRun8(StTofCollection*);
62  void Reset();
63 
64  IntVec GetValidChannel();
65  IntVec GetLeadingTdc(int channel);
66  IntVec GetTrailingTdc(int channel);
67 
68  IntVec GetValidChannel(int tray);
69  IntVec GetLeadingTdc(int tray, int channel);
70  IntVec GetTrailingTdc(int tray, int channel);
71  //--added by Zebo
72  IntVec GetLeadingTdc(int tray, int channel, bool triggerevent);
73  IntVec GetTrailingTdc(int tray, int channel, bool triggerevent);
74  //--end
75  Int_t GetTriggerTime(int tray, int channel);
76 
77  void SetVPDMap(StTofrDaqMap* daqMap);
78 
79  ClassDef(StSortTofRawData,4)
80 };
81 #endif
82 
83 
void Init(StTofCollection *)