8 #include "StEEtowerExampleMaker.h"
10 #include "StMuDSTMaker/COMMON/StMuEvent.h"
11 #include "StMuDSTMaker/COMMON/StMuDst.h"
12 #include "StMuDSTMaker/COMMON/StMuDstMaker.h"
14 #include <StMessMgr.h>
16 #include "StEEmcUtil/database/EEmcDbItem.h"
17 #include "StEEmcUtil/database/StEEmcDb.h"
32 StEEtowerExampleMaker::~StEEtowerExampleMaker(){
38 Int_t StEEtowerExampleMaker::Init(){
39 eeDb = (
StEEmcDb*)this->GetDataSet(
"StEEmcDb");
41 return StMaker::Init();
61 if(unpackMuDst()<0)
return kStOK;
72 Int_t StEEtowerExampleMaker::unpackMuDst(){
74 gMessMgr->Message(
"",
"D") <<
GetName()<<
"::::getAdc() is called "<<endm;
79 gMessMgr->Message(
"",
"W") <<
"No EMC data for this event"<<endm;
return kStOK;
85 for (i=0; i< emc->getNEndcapTowerADC(); i++) {
86 emc->getEndcapTowerADC(i,adc,sec,sub,eta);
89 const EEmcDbItem *x=eeDb->getTile(sec,
'A'+sub-1,eta,
'T');
91 if(x->fail )
continue;
92 if(adc <x->thr)
continue;
93 if(x->gain<=0 )
continue;
96 float value=(adc-x->ped)/x->gain;
97 int iphi=(x->sec-1)*5+(x->sub-
'A');
99 assert(iphi>=0 && iphi<MaxPhiBins);
100 assert(ieta>=0 && ieta<MaxEtaBins);
106 gMessMgr->Message(
"",
"I") <<
GetName()<<
"::::getAdc() found "<<n1<<
" ADC>thres "<<endm;
Axample to access EEMC data & DB from muDst in StRoot-framework Only muDst data are decoded by this c...
float towerE[MaxEtaBins][MaxPhiBins]
no. of input events
static StMuEmcCollection * muEmcCollection()
returns pointer to current StMuEmcCollection
virtual const char * GetName() const
special overload