10 #include "StEEmcPrint.h"
11 #include "StEventTypes.h"
17 StEEmcPrint::~StEEmcPrint(){ }
23 LOG_DEBUG <<
"mPrint = " << mPrint << endm;
24 int detBit[4] = {1, 2, 4, 8};
27 for(
int iDet = kEndcapEmcTowerId; iDet<= kEndcapSmdVStripId; iDet++){
28 if(!(mPrint & detBit[iDet - kEndcapEmcTowerId]))
continue;
29 if(iDet == kEndcapSmdVStripId) uv++;
30 if(iDet == kEndcapEmcTowerId) {
31 LOG_DEBUG <<
"EEmc Tower" << endm;
33 else if(iDet == kEndcapEmcPreShowerId) {
34 LOG_DEBUG <<
"EEmc Pre/Post" << endm;
37 LOG_DEBUG <<
"EEmc SMD-" << uv << endm;
40 StDetectorId detId = StDetectorId(iDet);
44 for(
unsigned int sec = 1; sec <= StEEmcDet->numberOfModules(); sec++){
46 LOG_DEBUG <<
"Sector = " << sec << endm;
49 StSPtrVecEmcRawHit & EEmcRawHits = StEEmcMod->hits();
50 LOG_DEBUG <<
"Number of Hits = " << EEmcRawHits.size() << endm;
52 for(
unsigned int i=0; i<EEmcRawHits.size() ;i++){
53 int sub = EEmcRawHits[i]->sub();
54 int eta = EEmcRawHits[i]->eta();
55 float e = EEmcRawHits[i]->energy();
56 int adc = EEmcRawHits[i]->adc();
58 if(iDet == kEndcapEmcTowerId) {
59 LOG_DEBUG <<Form(
"i=%d Tower %2.2dT%c%2.2d: energy=%f adc=%d",i,sec,sub+
'A'-1,eta,e,adc )<< endm;
61 else if(iDet == kEndcapEmcPreShowerId) {
62 int psub = (sub%5 == 0) ? 5:sub%5;
63 int pre = (sub-1)/5 + 1;
64 LOG_DEBUG <<Form(
"i=%d pre/post(%d) %2.2d%c%c%2.2d : energy=%f adc=%d",i,pre,sec,pre+
'P'-1,psub+
'A'-1,eta,e,adc)<< endm;
67 LOG_DEBUG <<Form(
"SMD-%c %2.2d%c%3.3d : energy=%f adc=%d",uv,sec,uv,eta,e,adc)<< endm;
84 LOG_DEBUG << comm<<
" mPrint mode= " << mPrint << endm;
85 int detBit[4] = {1, 2, 4, 8};
88 for(
int iDet = kEndcapEmcTowerId; iDet<= kEndcapSmdVStripId; iDet++){
89 if(!(mPrint & detBit[iDet - kEndcapEmcTowerId]))
continue;
90 if(iDet == kEndcapSmdVStripId) uv++;
91 if(iDet == kEndcapEmcTowerId) {
92 LOG_DEBUG <<
"EEmc Tower" << endm;
94 else if(iDet == kEndcapEmcPreShowerId) {
95 LOG_DEBUG <<
"EEmc Pre/Post" << endm;
98 LOG_DEBUG <<
"EEmc SMD-" << uv << endm;
101 StDetectorId detId = StDetectorId(iDet);
105 if(StEEmcDet ==0)
continue;
107 LOG_DEBUG <<
" colB has no data for above sub-detector"<<endm;
111 for(
unsigned int sec = 1; sec <= StEEmcDet->numberOfModules(); sec++){
113 if(StEEmcMod == 0)
continue;
116 LOG_DEBUG <<
"Sector = " << sec <<endm ;
120 StSPtrVecEmcRawHit & EEmcRawHits = StEEmcMod->hits();
121 StSPtrVecEmcRawHit & EEmcRawHitsB = StEEmcModB->hits();
122 LOG_DEBUG <<
" Number of HitsA = " << EEmcRawHits.size() <<
", HitsB="<<EEmcRawHitsB.size()<<endm;
124 for(
unsigned int i=0; i<EEmcRawHits.size() ;i++){
125 int sub = EEmcRawHits[i]->sub();
126 uint eta = EEmcRawHits[i]->eta();
127 float e = EEmcRawHits[i]->energy();
128 int adc = EEmcRawHits[i]->adc();
132 for(
unsigned int j=0; j<EEmcRawHitsB.size() ;j++){
133 if(sub != EEmcRawHitsB[j]->sub())
continue;
134 if(eta != EEmcRawHitsB[j]->eta())
continue;
135 adcB= EEmcRawHitsB[j]->adc();
136 if(iDet == kEndcapEmcTowerId && adcB==0)
continue;
143 if(iDet == kEndcapEmcTowerId) {
144 LOG_DEBUG << Form(
"\ti=%d ecolA: Tower %2.2dT%c%2.2d: energy=%f adc=%d <--> %d=adc old in ecolB",i,sec,sub+
'A'-1,eta,e,adc, adcB)<<endm;
145 }
else if(iDet == kEndcapEmcPreShowerId) {
146 int psub = (sub%5 == 0) ? 5:sub%5;
147 int pre = (sub-1)/5 + 1;
148 LOG_DEBUG << Form(
"\ti=%d ecolA: pre/post(%d) %2.2d%c%c%2.2d : energy=%f adc=%d<--> %d=adc old in ecolB",i,pre,sec,pre+
'P'-1,psub+
'A'-1,eta,e,adc,adcB)<<endm;
151 LOG_DEBUG << Form(
"\tSMD-%c %2.2d%c%3.3d : energy=%f adc=%d <--> %d=adc old in ecolB",uv,sec,uv,eta,e,adc, adcB)<<endm;