StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPicoMtdTrigger.h
1 
8 #ifndef StPicoMtdTrigger_h
9 #define StPicoMtdTrigger_h
10 
11 // ROOT headers
12 #include "TObject.h"
13 
14 //_________________
15 class StPicoMtdTrigger : public TObject {
16 
17  public:
21  StPicoMtdTrigger(const StPicoMtdTrigger &trigger);
23  virtual ~StPicoMtdTrigger();
25  virtual void Print(const Char_t *option = "") const;
26 
27  //
28  // Getters
29  //
30 
32  UShort_t getVpdTacSum() const { return mVpdTacSum; }
34  UShort_t vpdTacSum() const { return getVpdTacSum(); }
37  UInt_t getTHUBtime(const Int_t thub) const { return mTHUBtime[thub - 1]; }
40  UInt_t thubTime(const Int_t thub) const { return getTHUBtime(thub); }
44  UShort_t getQTtacSum(const Int_t qt, const Int_t pos) const { return mQTtacSum[qt - 1][pos - 1]; }
48  UShort_t qtTacSum(const Int_t qt, const Int_t pos) const { return getQTtacSum(qt,pos); }
53  UShort_t getMT101Tac(const Int_t qt, const Int_t index) const { return mMT101Tac[qt - 1][index]; }
58  UShort_t mt101Tac(const Int_t qt, const Int_t index) const { return getMT101Tac(qt,index); }
65  UShort_t getMT101Id(const Int_t qt, const Int_t index) const { return mMT101Id[qt - 1][index]; }
72  UShort_t mt101Id(const Int_t qt, const Int_t index) const { return getMT101Id(qt,index); }
75  UInt_t getTF201TriggerBit() const { return mTF201TriggerBit; }
78  UInt_t tf201TriggerBit() const { return getTF201TriggerBit(); }
83  void getMaximumQTtac(const Int_t qt, Int_t& pos1, Int_t& pos2);
84  Char_t shouldHaveRejectEvent() { return mShouldHaveRejectEvent; }
85 
86  //
87  // Getters
88  //
89 
91  void setVpdTacSum(UShort_t tacSum) { mVpdTacSum = (UShort_t)tacSum; }
93  void setVpdTacSum(UShort_t tdcHighThrEast, UShort_t tdcHighThrWest)
94  { mVpdTacSum = (UShort_t)tdcHighThrEast + (UShort_t)tdcHighThrWest; }
96  void setTHUBtime(Int_t thubID, UInt_t word) { mTHUBtime[thubID] = (UInt_t)word;}
98  void setShouldHaveRejectEvent(Int_t val) { mShouldHaveRejectEvent = (Char_t)val; }
100  void setShouldHaveRejectEvent(Char_t val) { mShouldHaveRejectEvent = val; }
102  void setQTtacSum(Int_t runnumber, UShort_t mtdQTadc[8][16], UShort_t mtdQTtac[8][16],
103  const Int_t QTtoModule[8][8], const Int_t QTSlewBinEdge[8][16][8],
104  const Int_t QTSlewCorr[8][16][8]);
106  void setMT101(UShort_t mt101Tac[8][2], UShort_t mt101Id[8][2]);
108  void setTF201TriggerBit(Int_t year, UInt_t dsmBit1, UInt_t dsmBit2);
109 
110  protected:
111  static const UShort_t mtd_qt_tac_max = 4095;
112  static const UShort_t kNQTboard = 8;
113 
114  private:
115 
117  UShort_t mVpdTacSum;
119  UInt_t mTHUBtime[2];
121  UShort_t mQTtacSum[kNQTboard][8];
123  UShort_t mMT101Tac[kNQTboard][2];
125  UChar_t mMT101Id[kNQTboard][2];
128  UInt_t mTF201TriggerBit;
133  Char_t mShouldHaveRejectEvent;
134 
135  ClassDef(StPicoMtdTrigger, 1);
136 };
137 
138 #endif
UShort_t qtTacSum(const Int_t qt, const Int_t pos) const
UShort_t mt101Tac(const Int_t qt, const Int_t index) const
void setVpdTacSum(UShort_t tdcHighThrEast, UShort_t tdcHighThrWest)
Set VPD TAC sum.
virtual void Print(const Char_t *option="") const
Print MTD trigger information.
void setShouldHaveRejectEvent(Int_t val)
Set should have reject event (retrieve from mtdHeader)
Class storing MTD trigger information including VPD, QT, MT101, TF201.
void setQTtacSum(Int_t runnumber, UShort_t mtdQTadc[8][16], UShort_t mtdQTtac[8][16], const Int_t QTtoModule[8][8], const Int_t QTSlewBinEdge[8][16][8], const Int_t QTSlewCorr[8][16][8])
Set TAC sum (j2+j3) for each position in each QT board.
void setShouldHaveRejectEvent(Char_t val)
Set should have reject event (retrieve from mtdHeader)
StPicoMtdTrigger()
Default constructor.
UShort_t vpdTacSum() const
VPD tag sum.
void getMaximumQTtac(const Int_t qt, Int_t &pos1, Int_t &pos2)
UInt_t getTHUBtime(const Int_t thub) const
virtual ~StPicoMtdTrigger()
Destructor.
void setMT101(UShort_t mt101Tac[8][2], UShort_t mt101Id[8][2])
Set two largest TACsum for all QT boards.
UShort_t getMT101Tac(const Int_t qt, const Int_t index) const
UInt_t getTF201TriggerBit() const
UInt_t thubTime(const Int_t thub) const
void setTHUBtime(Int_t thubID, UInt_t word)
Set THUB time.
void setTF201TriggerBit(Int_t year, UInt_t dsmBit1, UInt_t dsmBit2)
Set trigger bit in TCU that used for online trigger.
UShort_t getMT101Id(const Int_t qt, const Int_t index) const
UShort_t getQTtacSum(const Int_t qt, const Int_t pos) const
void setVpdTacSum(UShort_t tacSum)
Set VPD TAC sum.
UInt_t tf201TriggerBit() const
UShort_t mt101Id(const Int_t qt, const Int_t index) const
UShort_t getVpdTacSum() const
VPD tag sum.