5 #include <St_base/StMessMgr.h>
6 #include "St_db_Maker/St_db_Maker.h"
8 #include "StGenericVertexMaker/StiPPVertex/EemcHitList.h"
10 #include "StChain/StMaker.h"
11 #include "StEEmcUtil/database/StEEmcDb.h"
12 #include "StEEmcUtil/database/EEmcDbItem.h"
13 #include "StEEmcUtil/EEmcGeom/EEmcGeomSimple.h"
16 #include "StEvent/StEmcDetector.h"
17 #include "StEvent/StEmcModule.h"
18 #include "StEvent/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
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;
62 for(sec=1;sec<=MaxSectors;sec++)
63 for(sub=
'A';sub<=
'E';sub++)
64 for(etaB=1;etaB<=MaxEtaBins;etaB++) {
69 if(x->fail )
continue;
70 if(x->stat & killStatEEmc)
continue;
73 int isec=x->sec-1, isub=x->sub-
'A';
76 if( phi<0) phi+=2*M_PI;
89 int iBin=iPhiEta2bin(iPhi,iEta);
90 assert(name2bin[isec][isub][ieta]==-1);
91 name2bin[isec][isub][ieta]=iBin;
96 assert( active[iBin]==0 );
103 LOG_INFO <<
" EemcHitList::initRun() done, active="<<nA<<
" of "<<nB<<
" ETOW towers (only 8 upper eta rings are used) " <<endm;
110 EemcHitList::clear(){
111 ScintHitList::clear();
117 EemcHitList::etaBin(
float eta){
121 if(eta <etaHL[12])
return -1;
123 for(i=0;i<nEta;i++) {
124 if(eta< etaHL[11-i])
return i;
131 EemcHitList::bin2EtaLeft(
int iEta){
134 float etaF= etaHL[11-iEta] ;
141 EemcHitList::~EemcHitList(){
149 for(
unsigned int mod=1;mod<=det->numberOfModules();mod++) {
152 StSPtrVecEmcRawHit&
hit= module->hits();
154 for(
unsigned int ih=0;ih<hit.size();ih++){
156 char sub=
'A'+h->sub()-1;
162 if(x->fail )
continue;
163 if(x->stat & killStatEEmc)
continue;
166 int iBin=name2bin[sec-1][sub-
'A'][eta-1];
167 if ( getActive(iBin)<0)
continue;
169 if(rawAdc< x->thr)
continue;
170 float adc=rawAdc - x->ped ;
171 if(adc < adcMin)
continue;
Float_t getPhiMean(UInt_t sec) const
void loadTables(StMaker *anyMaker)
to access STAR-DB
Float_t getEtaMean(UInt_t eta) const