1 #include <StEEmcUtil/database/EEmcDbItem.h>
14 char* file =
"R50530.MuDst.root",
19 inDir =
"/star/data39/reco/production62GeV/ReversedFullField/P04id/2004/089//";
20 file=
"st_physics_5089006_raw_4040002.MuDst.root";
24 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
25 loadSharedLibraries();
26 cout <<
" loading done " << endl;
27 gSystem->Load(
"StDbLib");
28 gSystem->Load(
"StDbBroker");
29 gSystem->Load(
"St_db_Maker");
30 gSystem->Load(
"StEEmcUtil");
31 gSystem->Load(
"StEEmcDbMaker");
39 muMk =
new StMuDstMaker(0,0,inDir,file,
"MuDst.root",nFiles);
51 myDb = (
StEEmcDb*)chain->GetDataSet(
"StEEmcDb");
59 if(eventCounter>=nEve)
break;
70 printf(
"\n\n ====================%d processing eventID %d nPrim=%d ==============\n", eventCounter,info.id(),nPrim);
75 printf(
" No EMC data for this event\n");
94 printf(
"\Total %d hits in Tower (only ADC>0)\n",emc->getNEndcapTowerADC());
96 for (i=0; i< emc->getNEndcapTowerADC(); i++) {
97 emc->getEndcapTowerADC(i,adc,sec,sub,eta);
105 int irad=sub -1 + 5*(sec-1) +60 *(eta-1);
106 EEmcDbItem *x=myDb->getTile(sec,
'A'+sub-1,eta,
'T');
108 if(x->fail)
continue;
110 if(adc<x->thr)
continue;
113 if(adc>20) hr[0]->Fill(irad);
114 ((TH2F*) hd[0])->Fill(irad,adc);
116 printf(
" Total %d towers with ADC>Thr & !fail \n",nh);
123 int sec,eta,sub,pre,adc;
127 nh= emc->getNEndcapPrsHits();
128 printf(
"\nTotal %d hits in pre1+2+post\n",nh);
129 for (i=0; i<nh; i++) {
130 hit=emc->getEndcapPrsHit(i,sec,sub,eta,pre);
131 int ss=sub + 5*(pre-1);
136 EEmcDbItem *x=myDb->getTile(sec,
'A'+sub-1,eta,
'P'+pre-1);
138 if(x->fail)
continue;
139 if(adc<x->thr)
continue;
141 int irad=sub -1 + 5*(sec-1) +60 *(eta-1);
142 if(adc>20) hr[pre]->Fill(irad);
153 for(uv=
'U'; uv<=
'V'; uv++) {
154 int nh= emc->getNEndcapSmdHits(uv);
155 printf(
"\nTotal %d hits in SMD-%c\n",nh,uv);
156 for (
int i=0; i<nh; i++) {
157 hit=emc->getEndcapSmdHit(uv,i,sec,strip);
164 if(x->fail)
continue;
165 if(adc<x->thr)
continue;
168 int ip=2*(sec-1) +uv -
'U';
169 if(adc>20) hs[ip]->Fill(strip);
178 hx[0]=
new TH1F(
"nPrim",
"no of prim tracks per event",200,0.,2000);
180 hr[0]=
new TH1F(
"adcT",
"ADC-ped>20 vs Tower ID, spiral mode; X=iphi+60*ieta",720,-0.5,719.5);
181 hr[1]=
new TH1F(
"adcP",
"ADC-ped>20 vs pres-1 ID, spiral mode; X=iphi+60*ieta",720,-0.5,719.5);
182 hr[2]=
new TH1F(
"adcQ",
"ADC-ped>20 vs pres-2 ID, spiral mode; X=iphi+60*ieta",720,-0.5,719.5);
183 hr[3]=
new TH1F(
"adcR",
"ADC-ped>20 vs post ID, spiral mode; X=iphi+60*ieta",720,-0.5,719.5);
186 for(ip=0;ip<24;ip++) {
189 char tt1[100], tt2[100];
190 sprintf(tt1,
"adc%c%02d",uv,sec);
191 sprintf(tt2,
"ADC-ped>20 smd-%c%02d ; strip ID",uv,sec);
192 hs[ip]=
new TH1F(tt1,tt2,288,0.5,288.5);
196 TH2F *h2=
new TH2F(
"adc2T",
"ADC-ped vs Tower ID, spiral mode; X=iphi+60*ieta",720,-0.5,719.5,50,0,300);
virtual void Clear(Option_t *option="")
User defined functions.
int getAdc() const
Return ADC value.
virtual void ls(Option_t *option="") const
static TObjArray * primaryTracks()
returns pointer to a list of tracks belonging to the selected primary vertex
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)
static StEmcCollection * emcCollection()
returns pointer to current StEmcCollection