3 #ifndef STAR_StTriggerSimuResult
4 #define STAR_StTriggerSimuResult
29 #include "StVirtualTriggerSimu.h"
46 enum L2ResultType {kPed, kJet, kGammaBemc, kGammaEemc, kUpsilon};
53 unsigned int triggerId()
const;
54 StTriggerSimuDecision bbcDecision()
const;
55 StTriggerSimuDecision bemcDecision()
const;
56 StTriggerSimuDecision eemcDecision()
const;
57 StTriggerSimuDecision l2Decision()
const;
59 const vector<short>& highTowerIds()
const;
60 const vector<short>& triggerPatchIds()
const;
61 const vector<short>& jetPatchIds()
const;
85 const unsigned int*
l2Result(L2ResultType algo,
int year=2006)
const;
86 const unsigned int* l2Result()
const;
88 void setTriggerId(
unsigned int);
89 void setBbcDecision(StTriggerSimuDecision);
90 void setBemcDecision(StTriggerSimuDecision);
91 void setEemcDecision(StTriggerSimuDecision);
92 void setL2Decision(StTriggerSimuDecision);
94 void addHighTower(
int towerId,
int dsmAdc);
95 void addTriggerPatch(
int patchId,
int dsmAdc);
96 void addJetPatch(
int jetPatchId,
int dsmAdc);
99 void addBarrelJetPatchAdc(
int jp,
int adc);
100 void addEndcapJetPatchAdc(
int jp,
int adc);
101 void addOverlapJetPatchAdc(
int jp,
int adc);
103 const map<int,int>& barrelJetPatches()
const;
104 const map<int,int>& endcapJetPatches()
const;
105 const map<int,int>& overlapJetPatches()
const;
107 void setL2Result(
const unsigned int* result);
111 UChar_t mBbcDecision;
112 UChar_t mBemcDecision;
113 UChar_t mEemcDecision;
116 vector<short> mHighTowerIds;
117 vector<short> mHighTowerAdcs;
119 vector<short> mTriggerPatchIds;
120 vector<short> mTriggerPatchAdcs;
122 vector<short> mJetPatchIds;
123 vector<short> mJetPatchAdcs;
126 map<int,int> mBarrelJetPatches;
127 map<int,int> mEndcapJetPatches;
128 map<int,int> mOverlapJetPatches;
130 unsigned int mL2Result[64];
136 inline unsigned int StTriggerSimuResult::triggerId()
const {
return mTriggerId; }
137 inline StTriggerSimuDecision StTriggerSimuResult::bbcDecision()
const {
return (StTriggerSimuDecision)mBbcDecision; }
138 inline StTriggerSimuDecision StTriggerSimuResult::bemcDecision()
const {
return (StTriggerSimuDecision)mBemcDecision; }
139 inline StTriggerSimuDecision StTriggerSimuResult::eemcDecision()
const {
return (StTriggerSimuDecision)mEemcDecision; }
140 inline StTriggerSimuDecision StTriggerSimuResult::l2Decision()
const {
return (StTriggerSimuDecision)mL2Decision; }
142 inline const vector<short>& StTriggerSimuResult::highTowerIds()
const {
return mHighTowerIds; }
143 inline const vector<short>& StTriggerSimuResult::triggerPatchIds()
const {
return mTriggerPatchIds; }
144 inline const vector<short>& StTriggerSimuResult::jetPatchIds()
const {
return mJetPatchIds; }
146 inline void StTriggerSimuResult::setTriggerId(
unsigned int tid) { mTriggerId = tid; }
147 inline void StTriggerSimuResult::setBbcDecision(StTriggerSimuDecision d) { mBbcDecision = d; }
148 inline void StTriggerSimuResult::setBemcDecision(StTriggerSimuDecision d) { mBemcDecision = d; }
149 inline void StTriggerSimuResult::setEemcDecision(StTriggerSimuDecision d) { mEemcDecision = d; }
150 inline void StTriggerSimuResult::setL2Decision(StTriggerSimuDecision d) { mL2Decision = d; }
153 inline void StTriggerSimuResult::addBarrelJetPatchAdc(
int jp,
int adc) { mBarrelJetPatches.insert(make_pair(jp,adc)); }
154 inline void StTriggerSimuResult::addEndcapJetPatchAdc(
int jp,
int adc) { mEndcapJetPatches.insert(make_pair(jp,adc)); }
155 inline void StTriggerSimuResult::addOverlapJetPatchAdc(
int jp,
int adc) { mOverlapJetPatches.insert(make_pair(jp,adc)); }
157 inline const map<int,int>& StTriggerSimuResult::barrelJetPatches()
const {
return mBarrelJetPatches; }
158 inline const map<int,int>& StTriggerSimuResult::endcapJetPatches()
const {
return mEndcapJetPatches; }
159 inline const map<int,int>& StTriggerSimuResult::overlapJetPatches()
const {
return mOverlapJetPatches; }
simple struct to return HHTP tower - trigger patch pairs
int jetPatchAdc(short jetPatchId) const
returns DSM ADC if above trigger threshold, otherwise -1
int highTowerAdc(short towerId) const
returns DSM ADC if above trigger threshold, otherwise -1
HttpResult httpPair(short towerId) const
returns simple struct encapsulating (id,adc) of HT and TP pair
int triggerPatchAdc(short patchId) const
returns DSM ADC if above trigger threshold, otherwise -1
const unsigned int * l2Result(L2ResultType algo, int year=2006) const
returns address of specific L2 result struct – cast it yourself