7 #include "EemcHitList.h"
10 #include "StEEmcUtil/database/StEEmcDb.h"
11 #include "StEEmcUtil/database/EEmcDbItem.h"
12 #include "StEEmcUtil/EEmcGeom/EEmcGeomSimple.h"
15 #include "StEmcDetector.h"
16 #include "StEmcModule.h"
17 #include "StEmcRawHit.h"
27 ScintHitList(-M_PI/60.,M_PI/30,60, 999,999,8,(char *)
"Eemc",4,0.75) {
33 assert(nEta<=MaxEtaBins);
35 eeDb-> setThreshold( kSigPed);
37 etaHL= geomE->getEtaBinRangeArray();
38 gMessMgr->Message(
"",
"I")
39 <<
" EemcHitList::use kSigPed="<<kSigPed
47 EemcHitList::initRun(){
48 gMessMgr->Message(
"",
"D") <<
" EemcHitList::initRun()"<<endm;
49 ScintHitList::initRun();
53 for(sec=0;sec<MaxSectors;sec++)
54 for(sub=0;sub<MaxSubSec;sub++)
55 for(etaB=0;etaB<MaxEtaBins;etaB++)
56 name2bin[sec][sub][etaB]=-1;
60 for(sec=1;sec<=MaxSectors;sec++)
61 for(sub=
'A';sub<=
'E';sub++)
62 for(etaB=1;etaB<=MaxEtaBins;etaB++) {
67 if(x->fail )
continue;
68 if(x->stat & killStatEEmc)
continue;
71 int isec=x->sec-1, isub=x->sub-
'A';
74 if( phi<0) phi+=2*M_PI;
87 int iBin=iPhiEta2bin(iPhi,iEta);
88 assert(name2bin[isec][isub][ieta]==-1);
89 name2bin[isec][isub][ieta]=iBin;
94 assert( active[iBin]==0 );
101 LOG_INFO <<
" EemcHitList::initRun() done, active="<<nA<<
" of "<<nB<<
" ETOW towers (only 8 upper eta rings are used) " <<endm;
108 EemcHitList::clear(){
109 ScintHitList::clear();
115 EemcHitList::etaBin(
float eta){
119 if(eta <etaHL[12])
return -1;
121 for(i=0;i<nEta;i++) {
122 if(eta< etaHL[11-i])
return i;
129 EemcHitList::bin2EtaLeft(
int iEta){
132 float etaF= etaHL[11-iEta] ;
139 EemcHitList::~EemcHitList(){
147 for(
unsigned int mod=1;mod<=det->numberOfModules();mod++) {
150 StSPtrVecEmcRawHit&
hit= module->hits();
152 for(
unsigned int ih=0;ih<hit.size();ih++){
154 char sub=
'A'+h->sub()-1;
160 if(x->fail )
continue;
161 if(x->stat & killStatEEmc)
continue;
164 int iBin=name2bin[sec-1][sub-
'A'][eta-1];
165 if ( getActive(iBin)<0)
continue;
167 if(rawAdc< x->thr)
continue;
168 float adc=rawAdc - x->ped ;
169 if(adc < adcMin)
continue;
Float_t getPhiMean(UInt_t sec) const
Float_t getEtaMean(UInt_t eta) const