27 #include "StEmcTriggerDetector.h"
28 #include "tables/St_dst_TrgDet_Table.h"
29 #include "StTriggerData.h"
31 static const char rcsid[] =
"$Id: StEmcTriggerDetector.cxx,v 2.4 2007/07/11 23:06:45 perev Exp $";
37 memset(mBeg,0,mEnd-mBeg);
40 StEmcTriggerDetector::StEmcTriggerDetector(
const dst_TrgDet_st& t)
42 memset(mBeg,0,mEnd-mBeg);
43 for(
int i=0; i<mNPatch; i++) {
44 mHighTower[i]=
static_cast<char>(t.emcHiTower[i]);
45 mPatch[i]=
static_cast<char>(t.emcTrigPatch[i]);
49 StEmcTriggerDetector::StEmcTriggerDetector(
const StTriggerData &trg_dat)
51 memset(mBeg,0,mEnd-mBeg);
52 for(
int i=0; i<mNPatch; i++) {
53 mHighTower[i]=trg_dat.bemcHighTower(i);
54 mPatch[i]=trg_dat.bemcJetPatch(i);
56 for(
int i=0; i<mENPatch; i++) {
57 mEHighTower[i]=trg_dat.eemcHighTower(i);
58 mEPatch[i]=trg_dat.eemcJetPatch(i);
60 for(
int i=0; i<mNBemcLayer1; i++)
61 mBemcLayer1[i]=trg_dat.bemcLayer1DSM(i);
62 for(
int i=0; i<mNEemcLayer1; i++)
63 mEemcLayer1[i]=trg_dat.eemcLayer1DSM(i);
64 for(
int i=0; i<mNEmcLayer2; i++)
65 mEmcLayer2[i]=trg_dat.emcLayer2DSM(i);
68 StEmcTriggerDetector::~StEmcTriggerDetector() {}
71 StEmcTriggerDetector::numberOfTowers()
const {
return mNPatch;}
74 StEmcTriggerDetector::highTower(
unsigned int i)
const
77 return static_cast<int>(mHighTower[i]);
83 StEmcTriggerDetector::patch(
unsigned int i)
const
86 return static_cast<int>(mPatch[i]);
92 StEmcTriggerDetector::highTowerEndcap(
unsigned int i)
const
95 return static_cast<int>(mEHighTower[i]);
101 StEmcTriggerDetector::patchEndcap(
unsigned int i)
const
104 return static_cast<int>(mEPatch[i]);
109 unsigned short StEmcTriggerDetector::bemcLayer1(
int idx)
const {
110 if (idx>=0 && idx<mNBemcLayer1)
111 return mBemcLayer1[idx];
115 unsigned short StEmcTriggerDetector::eemcLayer1(
int idx)
const {
116 if (idx>=0 && idx<mNEemcLayer1)
117 return mEemcLayer1[idx];
121 unsigned short StEmcTriggerDetector::emcLayer2(
int idx)
const {
122 if (idx>=0 && idx<mNEmcLayer2)
123 return mEmcLayer2[idx];
128 StEmcTriggerDetector::setHighTower(
unsigned int i,
int val)
131 mHighTower[i] =
static_cast<char>(val);
135 StEmcTriggerDetector::setPatch(
unsigned int i,
int val)
138 mPatch[i] =
static_cast<char>(val);
142 StEmcTriggerDetector::setHighTowerEndcap(
unsigned int i,
int val)
145 mEHighTower[i] =
static_cast<char>(val);
149 StEmcTriggerDetector::setPatchEndcap(
unsigned int i,
int val)
152 mEPatch[i] =
static_cast<char>(val);