8 #ifndef ST_EMC_TRIGGER_SIMU_H
9 #define ST_EMC_TRIGGER_SIMU_H
22 #include "StTriggerUtilities/StVirtualTriggerSimu.h"
23 #include "StTriggerUtilities/StTriggerSimuResult.h"
30 bool isTrigger(
int trigId);
31 set<int> triggerIds()
const;
32 StTriggerSimuDecision triggerDecision(
int trigId);
35 int EM201output()
const;
61 int EEMCdijet()
const;
66 int BHT4()
const {
return btest(EM201output(), 4);}
67 int BHTUPC()
const {
return btest(EM201output(), 5);}
68 int BTP()
const {
return btest(EM201output(), 6);}
69 int BHTTP()
const {
return btest(EM201output(), 7);}
70 int BTPtopo()
const {
return btest(EM201output(), 8);}
71 int BHTTPtopo()
const {
return btest(EM201output(), 9);}
72 int BHT4topo()
const {
return btest(EM201output(), 10);}
73 int EHT0_2014()
const {
return btest(EM201output(), 13);}
74 int EHT1_2014()
const {
return btest(EM201output(), 14); }
75 int DAQ10k_2014()
const {
return btest(EM201output(), 15); }
77 int HTTP()
const {
return btest(EM201output(), 3);}
78 int EB2B()
const {
return btest(EM201output(), 14);}
80 int BHT1_2017()
const {
return btest(EM201output(), 0);}
81 int BHT2_2017()
const {
return btest(EM201output(), 1);}
82 int BHT3_2017()
const {
return btest(EM201output(), 2);}
83 int BJP1_2017()
const {
return btest(EM201output(), 6);}
84 int BJP2_2017()
const {
return btest(EM201output(), 7);}
85 int JP0_2017()
const {
return btest(EM201output(), 8);}
86 int JP1_2017()
const {
return btest(EM201output(), 9);}
87 int JP2_2017()
const {
return btest(EM201output(), 10);}
88 int EJP1_2017()
const {
return btest(EM201output(), 11);}
89 int EJP2_2017()
const {
return btest(EM201output(), 12);}
93 void InitRun(
int runNumber);
105 void defineTrigger(
int triggerIndex,
const char* name,
int triggerId,
unsigned int onbits,
unsigned int offbits,
unsigned int onbits1,
unsigned int onbits2,
unsigned int onbits3,
unsigned int offbits1,
unsigned int offbits2,
unsigned int offbits3);
107 int overlapJetPatchTh(
int i)
const;
108 void getOverlapJetPatchAdc(
int i,
int& jp,
int& adc)
const;
109 int overlapJetPatchAdc(
int jp)
const;
113 int btest(
int x,
int pos)
const {
return x >> pos & 1; }
116 int getbits(
int x,
int pos,
int n)
const {
return x >> pos & ~(~0 << n); }
119 void setbits(
int& x,
int pos,
int value)
const { x |= value << pos; }
131 inline DSMLayer_EM201_2009* StEmcTriggerSimu::get2009_DSMLayer2_Result() {
return mEM201; }
132 inline DSMLayer_LD301_2009* StEmcTriggerSimu::get2009_DSMLayer3_Result() {
return mLD301; }
134 inline int StEmcTriggerSimu::BHT()
const {
return getbits(EM201output(),0,4); }
135 inline int StEmcTriggerSimu::EHT()
const {
return getbits(EM201output(),4,2); }
136 inline int StEmcTriggerSimu::JP1()
const {
return btest(EM201output(),6); }
137 inline int StEmcTriggerSimu::JP2()
const {
return btest(EM201output(),7); }
138 inline int StEmcTriggerSimu::BJP1()
const {
return btest(EM201output(),8); }
139 inline int StEmcTriggerSimu::BJP2()
const {
return btest(EM201output(),9); }
140 inline int StEmcTriggerSimu::EJP1()
const {
return btest(EM201output(),10); }
141 inline int StEmcTriggerSimu::EJP2()
const {
return btest(EM201output(),11); }
142 inline int StEmcTriggerSimu::AJP()
const {
return btest(EM201output(),12); }
143 inline int StEmcTriggerSimu::BAJP()
const {
return btest(EM201output(),13); }
144 inline int StEmcTriggerSimu::EAJP()
const {
return btest(EM201output(),14); }
145 inline int StEmcTriggerSimu::JP0()
const {
return btest(EM201output(),15); }
147 inline int StEmcTriggerSimu::BHT0()
const {
return btest(EM201output(),0); }
148 inline int StEmcTriggerSimu::BHT1()
const {
return btest(EM201output(),1); }
149 inline int StEmcTriggerSimu::BHT2()
const {
return btest(EM201output(),2); }
150 inline int StEmcTriggerSimu::BHT3()
const {
return btest(EM201output(),3); }
152 inline int StEmcTriggerSimu::EHT0()
const {
return btest(EM201output(),4); }
153 inline int StEmcTriggerSimu::EHT1()
const {
return btest(EM201output(),5); }
156 inline int StEmcTriggerSimu::EEMCdijet()
const {
return btest(EM201output(),9); }
157 inline int StEmcTriggerSimu::JP1dijet()
const {
return btest(EM201output(),11); }
158 inline int StEmcTriggerSimu::JP0dijet()
const {
return btest(EM201output(),12); }
159 inline int StEmcTriggerSimu::DAQ10k()
const {
return btest(EM201output(),14); }
161 #endif // ST_EMC_TRIGGER_SIMU_H