34 #include <sys/types.h>
36 #include <StMessMgr.h>
38 #include "StEEmcTrigSimuMaker.h"
39 #include "St_DataSetIter.h"
46 #include "StMcEventMaker/StMcEventMaker.h"
47 #include "StMcEventTypes.hh"
48 #include "StEventTypes.h"
49 #include "StMcEvent.hh"
59 StEEmcTrigSimuMaker::~StEEmcTrigSimuMaker(){
66 Int_t StEEmcTrigSimuMaker::Init(){
69 return StMaker::Init();
80 StEmcDetector* twB = emcCollection->detector(kBarrelEmcTowerId);
83 StEmcDetector* twE = emcCollection->detector(kEndcapEmcTowerId);
85 LOG_WARN <<Form(
"%s found no E-EMC tower data in StEvent, skip event\n",
GetName())<< endm;
93 LOG_DEBUG<< Form(
":: B_EMC Tower HITS ...\n");
94 for ( i = 1; i <= (int)twB->numberOfModules(); i++) {
95 StSPtrVecEmcRawHit& emcTowerHits = twB->module(i)->hits();
97 for ( j = 0; j < emcTowerHits.size(); j++) {
98 int adc= emcTowerHits[j]->adc();
99 int mod= emcTowerHits[j]->module();
100 int sub= emcTowerHits[j]->sub();
101 int eta= emcTowerHits[j]->eta();
102 float energy= emcTowerHits[j]->energy();
103 LOG_DEBUG<< Form(
"j=%d, mod=%d, sub=%d, eta=%d adc=%d ener=%f\n",j,mod,sub,eta,adc,energy);
110 LOG_DEBUG<< Form(
":: E_EMC Tower HITS ... %d\n",twE->numberOfModules());
111 for ( i = 0; i < (int)twE->numberOfModules(); i++) {
114 if(stmod==0)
continue;
115 StSPtrVecEmcRawHit& emcTowerHits = stmod->hits();
117 for ( j = 0; j < emcTowerHits.size(); j++) {
119 int adc= emcTowerHits[j]->adc();
120 int sec= emcTowerHits[j]->module()+1;
121 int sub= emcTowerHits[j]->sub()+
'A';
122 int eta= emcTowerHits[j]->eta()+1;
123 float energy= emcTowerHits[j]->energy();
124 LOG_DEBUG<< Form(
"j=%d, sec=%d, sub=%c, eta=%d adc=%d ener=%f\n",j,sec,sub,eta,adc,energy);
147 LOG_DEBUG<< Form(
"::printE() found EmcCollection\n")<<endm;
152 for(
int det = kEndcapEmcTowerId; det<= kEndcapSmdVStripId; det++){
154 StDetectorId
id = StDetectorId(det);
157 LOG_DEBUG<< Form(
"%s::printE() Found no sub-detector collection, skipping det=%d\n",
GetName(),det)<<endm;
161 str1=
" i sec sub ieta energy ADC";
164 case kEndcapEmcTowerId:
165 LOG_DEBUG<< Form(
"Endcap Tower hits \n")<<endm;
break;
166 case kEndcapEmcPreShowerId:
167 LOG_DEBUG<< Form(
"Endcap Preshower 1+2+post hits \n")<<endm;
break;
168 case kEndcapSmdUStripId:
169 LOG_DEBUG<< Form(
"Endcap SMD-U hits \n")<<endm;
170 str1=
" i sec strip energy ADC";
172 case kEndcapSmdVStripId:
173 LOG_DEBUG<< Form(
"Endcap SMD-V hits \n")<<endm;
174 str1=
" i sec strip energy ADC";
180 if(d->numberOfModules() < 1)
continue;
182 LOG_DEBUG<< Form(
"%s\n",str1.Data())<<endm;
184 for(
unsigned int isec=0; isec<d->numberOfModules(); isec++){
187 if(stmod==0)
continue;
189 StSPtrVecEmcRawHit & h = stmod->hits();
190 for(
unsigned int j=0; j<h.size() ;j++){
194 case kEndcapEmcTowerId:
195 case kEndcapEmcPreShowerId:
198 int sub=
'A'+h[j]->sub();
199 int keta=h[j]->eta()+1;
200 LOG_DEBUG<< Form(
"%3d %2.2d %c %2d %f %4d\n",nTot,secID,sub,keta,h[j]->energy(),h[j]->adc());
202 case kEndcapSmdUStripId:
203 case kEndcapSmdVStripId:
205 int strip=h[j]->eta()+1;
206 LOG_DEBUG<< Form(
"%3d %2.2d %3d %f %4d\n",nTot,secID,strip,h[j]->energy(),h[j]->adc());
virtual const char * GetName() const
special overload
void printE()
Endcap hits in StEvent.