4 int rdEztMuSmdCal(
int run,
10 fileS+=run; fileS+=
".lis";
14 char* file=fileS.Data();
20 TString outF=
"iter5-pp/";
22 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
23 loadSharedLibraries();
24 cout <<
" loading done " << endl;
26 assert( !gSystem->Load(
"StEEmcUtil"));
27 assert( !gSystem->Load(
"StEzSmdCal"));
30 assert( !gSystem->Load(
"StDbBroker"));
31 assert( !gSystem->Load(
"St_db_Maker"));
32 assert( !gSystem->Load(
"StEEmcDbMaker"));
37 printf(
"adding muDst from '%s' ....\n",file);
40 muMk =
new StMuDstMaker(0,0,inDir,file,
"MuDst.root",nFiles);
41 TChain* tree=muMk->
chain(); assert(tree);
42 int nEntries=(int)tree->GetEntries();
43 printf(
"total eve in chain =%d\n",nEntries);
44 printf(
"in=%s%s=\n",inDir,file);
50 stDb->SetFlavor(
"slope2006",
"eemcPIXcal");
51 stDb->SetFlavor(
"sim",
"eemcPMTcal");
56 stDb->SetFlavor(
"sim",
"eemcPMTcal");
57 stDb->SetFlavor(
"sim",
"eemcPIXcal");
58 stDb->SetDateTime(20050505,0);
61 assert( !gSystem->Load(
"StEEmcSimulatorMaker"));
63 slowSim->setDropBad(0);
64 slowSim->setAddPed(1);
65 slowSim->setSmearPed(1);
66 slowSim->setOverwrite(1);
72 float thrMipSmdE=0.4/1000.;
74 int emptyStripCount=11;
77 float twMipRelEneLow=0.5, twMipRelEneHigh=2.;
83 for(
id=1;
id<=12;
id++) {
87 myMk3->setHList(HList);
88 myMk3->setSector(sectID);
89 myMk3->setTwCuts(twMipRelEneLow, twMipRelEneHigh,offCenter);
90 myMk3->setSmdCuts(thrMipSmdE,emptyStripCount);
91 myMk3->setPreCuts(thrMipPresAdc);
92 myMk3->setTrigIdFilter(trigID);
97 gMessMgr->SwitchOn(
"I");
98 gMessMgr->SwitchOff(
"W");
112 if (myDb) myDb->changeMask(
"iter4-pp/smdAllMaskDay89v1.dat");
116 printf(
"All Ezt-branches set\n");
125 if(eventCounter>=nEve)
break;
128 stat = chain->Make();
131 if(eventCounter%200!=0)
continue;
133 printf(
"====================%5d processing ==============\n", eventCounter);
136 if (myDb) myDb->print();
138 printf(
"sorting done, nEve=%d of %d\n",eventCounter, nEntries);
141 float rate=1.*eventCounter/(t2-t1);
142 float nMnts=(t2-t1)/60.;
143 printf(
"sorting done %d of nEve=%d, elapsed rate=%.1f Hz, tot %.1f minutes\n",eventCounter,nEntries,rate,nMnts);
146 cout <<
"CPU time/event= " << timer.elapsedTime()/eventCounter <<
" sec "
147 <<
" rate= " << eventCounter/timer.elapsedTime() <<
" Hz" << endl;
150 outF+=
"/R"; outF+=run;
153 myMk3->saveHisto(outF.Data());
156 sprintf(tt1,
"my%02dStat",sectID);
157 h=(TH1F *) HList->FindObject(tt1); assert(h);
158 float *my=h->GetArray();
159 printf(
"sec=%d nInp=%d -->UxV multi=%.1f one=%.1f, MIP any=%.1f tw=%.1f\n",sectID,eventCounter,my[2],my[3],my[4],my[5]);
160 printf(
" -->MIP cntr=%.1f w/post=%.1f \n",my[6],my[7]);
171 myDb->changeMask(
"/star/u/balewski/WWW-E/calibration/run5/absMipCal/iter1-inp/smdAllMaskDay49v1.dat");
172 myDb->changeMask(
"/star/u/balewski/WWW-E/calibration/run5/absMipCal/iter1-inp/tileAllMaskDay49v1.dat");
176 myDb->changeGains(
"/star/u/balewski/WWW-E/calibration/run5/absMipCal/iter2-inp/smdAllSec-absGain.dat");
177 myDb->changeGains(
"/star/u/balewski/WWW-E/calibration/run5/absMipCal/iter3-inp/gainsP-allSect.dat");
178 myDb->changeGains(
"/star/u/balewski/WWW-E/calibration/run5/absMipCal/iter3-inp/gainsQ-allSect.dat");
179 myDb->changeGains(
"/star/u/balewski/WWW-E/calibration/run5/absMipCal/iter3-inp/gainsR-allSect.dat");
186 myDb->changeGains(
"/star/u/balewski/WWW-E/calibration/run5/absMipCal/iter5-out/auxilGain.dat");
TChain * chain()
In read mode, returns pointer to the chain of .MuDst.root files that where selected.
void SetStatus(const char *arrType, int status)