4 #ifndef STAR_StEemcTriggerSimu
5 #define STAR_StEemcTriggerSimu
14 #include "StTriggerUtilities/StVirtualTriggerSimu.h"
35 enum {kOnlyAdc=0,kAdcAndTrig, kAdcCompareTrig};
36 void setConfig(
int x) {mConfig=x;}
41 int * mExternDsmSetup;
48 int mHTthr[nThr], mTPthr[nThr],mHTTPthrSelc;
54 static int computePed4(
float ped);
55 void getDsm0123inputs();
63 enum {mxCr=6, mxChan=128};
64 int getRdo(
int crate,
int chan)
const {
return (crate-1)*mxChan+chan; }
65 int getCrate(
int rdo)
const {
return rdo/mxChan+1; }
66 int getChannel(
int rdo)
const {
return rdo%mxChan; }
67 int rawAdc [mxCr*mxChan];
68 int feePed [mxCr*mxChan];
69 int feeMask[mxCr*mxChan];
70 int highTowerMask[90];
72 float ped[mxCr*mxChan];
73 float gain[mxCr*mxChan];
77 enum { kOnline, kOffline, kLocal };
78 void setPedMode(
int pedmode) { mPedMode = pedmode; }
79 void setPedFile(
const char* pedfile) { mPedFile = pedfile; }
93 void get2009_DSMLayer0();
94 void get2009_DSMLayer1();
103 vector<int> mTriggerIds;
114 void compareTRG0_TRG1();
115 void compareTRG1_TRG2();
116 void compareTRG2_TRG3();
118 void compareADCfee_TRG0();
119 void compareADC0_TRG1();
120 void compareADC1_TRG2();
121 void compareADC2_TRG3();
123 void DSM2EsumSpectra();
130 void InitRun(
int runnumber);
131 void setDsmSetup(
int *x){ mExternDsmSetup=x;}
132 void setSetupPath(
char *x) { mSetupPath=x;}
135 bool isCorrupted()
const;
136 void getEemcFeeMask();
137 void setHList(TObjArray * x){mHList=x;}
138 void addTriggerList(vector<int>& trgList);
140 const vector<int>& triggerIds()
const {
return mTriggerIds; }
141 void connectBemcL0(
int *x) { mBemcEsum5bit=x;};
144 int endcapJetPatchTh(
int i)
const;
145 int endcapHighTowerTh(
int i)
const;
147 int endcapJetPatchAdc(
int jp)
const;
148 int endcapHighTowerAdc(
int towerId)
const {
return 0; }
149 int endcapPartialJetPatchAdc(
int jp)
const;
151 int getOutHT(
int tp)
const;
152 int getOutTPsum(
int tp)
const;
153 int getEndcapHighTower(
int tp)
const {
return getOutHT(tp); }
154 int getEndcapPatchSum(
int tp)
const {
return getOutTPsum(tp); }
157 void fillStEmcTriggerDetector();
StTriggerSimuDecision triggerDecision(int trigId)
like isTrigger(), but returns kDoNotCare if detector isn't a part of the given trigId ...