7 class StSPtrVecTrackNodeIterator ;
12 int trigB[5]={96211,96233,96201,96222,0};
13 int trigE[5]={96261,96282,96251,96272,0};
14 int trigZ[2]={96300,0};
15 int trigM[2]={96011,0};
18 void rdSt2print(
char * fname=
"aa.event.root", Int_t nevents=10){
20 fname=
"outPPV-G/st_physics_6151011_raw_2020001.event.root";
21 char * fname=
"/star/institutions/iucf/balewski/2006-ppv-eval/test10/st_physics_adc_7118049_raw_1070001.event.root";
24 FILE *fd=fopen(outF,
"w"); assert(fd);
26 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
27 loadSharedLibraries();
28 assert( !gSystem->Load(
"StEEmcUtil.so"));
30 cout <<
" loading done " << endl;
43 ioMaker->SetFile(fname);
46 ioMaker->SetBranch(
"*",0,
"0");
47 ioMaker->SetBranch(
"geantBranch",0,
"r");
48 ioMaker->SetBranch(
"eventBranch",0,
"r");
60 Int_t initStat = chain->Init();
61 if (initStat) chain->Fatal(initStat,
"during Init()");
67 if (iev>=nevents)
break;
69 istat = chain->
Make();
72 cout <<
"---------------------- Processing Event : " << iev <<
" ---------------------- " << istat<<endl;
89 int nV=mEvent->numberOfPrimaryVertices();
91 if(nV>1) printf(
"######\n");
92 printf(
"eveID=%d nPrimVert=%d\n", mEvent->id(),nV);
93 fprintf(fd,
"%5d %5d %d%d%d%d%d %2d ",iev,mEvent->id(),
94 isTrig(tic,trigB),isTrig(tic,trigE),isTrig(tic,trigZ),
95 isTrig(tic,trigM), isTrig(tic,trigJ), nV);
97 for(iv=0;iv<nV;iv++) {
102 printf(
"iv=%d Vz=%.2f +/-%.2f \n",iv,r.z(),er.z() );
103 fprintf(fd,
"%.1f %d ",r.z(),V->numberOfDaughters());
104 printf(
" nPrimTr=%d , VFid=%d:: ntrVF=%d nCtb=%d nBemc=%d nEEmc=%d nTpc=%d sumPt=%.1f rank=%g\n"
105 ,V->numberOfDaughters(), V->vertexFinderId() ,V->numTracksUsedInFinder() ,
106 V->numMatchesWithCTB() ,V-> numMatchesWithBEMC() ,V->numMatchesWithEEMC() ,
107 V->numTracksCrossingCentralMembrane() ,V->sumOfTrackPt() ,V->ranking());
113 for(itr=0; itr<V->numberOfDaughters(); itr++) {
115 if(track==0)
continue;
116 if (track->flag() <0 )
continue;
117 printf(
"itr=%d pT=%.1f eta=%.2f nFitP=%d DCA=%.1f\n",itr,
118 track->geometry()->momentum().mag(),
119 track->geometry()->momentum().pseudoRapidity(),
120 track->fitTraits().numberOfFitPoints(),
121 track->geometry()->helix().
distance(V->position()));
125 printf(
" counted nPrimTr=%d \n",nPrTr);
135 printRaw(emcC->eemcRawData());
137 printRawBEMC(emcC->bemcRawData());
167 for(
int i = 0; i<NBANK;i++) {
169 int size = raw->sizeHeader(i);
170 printf(
"======BTOW BANK=%d size: head=%d, data=%d\n",i,size,raw->sizeData(i));
172 for(
int j = 0;j<size;j++) {
173 if(j%16==0) printf(
"\n");
174 printf(
"0x%04x ",raw->header(i,j));
179 int size = raw->sizeData(i);
180 printf(
"\nBANK=%d data size=%d",i,size);
181 for(
int j = 0;j<size;j++) {
182 if(j%16==0) printf(
"\n");
183 printf(
"0x%04x ",raw->data(i,j));
187 printf(
"\n bank=%d tot=%d\n",i,tot);
199 printf(
"printRaw(%p)\n",raw);
203 printf(
"nBlocks=%d\n",raw->getNBlocks());
205 for(icr=0; icr<raw->getNBlocks();icr++) {
206 if(raw->sizeData(icr)<=0)
continue;
208 const UShort_t* head=raw->header(icr);
209 const UShort_t*
data=raw->data(icr);
211 printf(
"icr=%d, size: head=%d data=%d\n",icr,raw->sizeHeader(icr),raw->sizeData(icr));
215 block.setHead(raw->header(icr));
216 block.setDataArray(raw->data(icr),raw->sizeData(icr));
230 printf(
"printTw(%p)\n",det);
232 printf(
"towers nHit=%d nMod=%d\n",det->numberOfHits(),det->numberOfModules());
234 for(
int mod=1;mod<=det->numberOfModules();mod++) {
236 printf(
"ETOW sector=%d nHit=%d\n",mod,module->numberOfHits());
237 StSPtrVecEmcRawHit&
hit= module->hits();
239 for(ih=0;ih<hit.size();ih++){
242 char sub=
'A'+x->sub()-1;
246 printf(
"ih=%d %02dT%c%02d -->adc=%d ener=%f\n",ih,sec,sub,eta,adc, x->energy());
248 int adcX=1000+ (eta-1) + (sub-
'A')*12 +(sec-1)*60;
253 printf(
"nPos=%d\n",nPos);
255 printf(
"total nPos=%d\n",nPos);
256 printf(
"nPos=%d of %d \n",nPos,det->numberOfHits());
267 printf(
"printPre/post(%p)\n",det);
269 printf(
"pre/post nHit=%d nMod=%d\n",det->numberOfHits(),det->numberOfModules());
271 for(
int imod=1;imod<=det->numberOfModules();imod++) {
273 printf(
"EPRE sect=%d nHit=%d\n",imod, module->numberOfHits());
274 StSPtrVecEmcRawHit& hit= module->hits();
276 for(ih=0;ih<hit.size();ih++){
284 printf(
"ih=%d %02d%c%c%02d ss=%d -->adc=%d ener=%f ss=%d\n",ih,sec,preL,sub,eta,ss,adc, x->energy(),ss);
286 int adcX= (eta-1) + (sub-
'A')*12 +(sec-1)*60 + 1000*(preL-
'P'+1);
289 printf(
"nPos=%d\n",nPos);
292 printf(
"nPos=%d of %d \n",nPos,det->numberOfHits());
304 printf(
"printSMD/post(%p)\n",det);
306 printf(
"U-SMD nHit=%d nMod=%d\n",det->numberOfHits(),det->numberOfModules());
308 for(
int imod=1;imod<=det->numberOfModules();imod++) {
310 printf(
"ESMD sector=%d nHit=%d\n",imod, module->numberOfHits());
311 StSPtrVecEmcRawHit& hit= module->hits();
313 for(ih=0;ih<hit.size();ih++){
318 printf(
"ih=%d %02dU%03d -->adc=%d ener=%f\n",ih,sec,strip,adc, x->energy());
320 int adcX= 1000+(strip -1) +(sec-1)*300;
323 printf(
" nPos=%d\n",nPos);
325 printf(
"nPos=%d of %d \n",nPos,det->numberOfHits());
335 for(i=0;trigL[i]>0;i++) {
337 if(l1->isTrigger(trigL[i]))
return true;
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
virtual void Clear(Option_t *option="")
User defined functions.
double distance(const StThreeVector< double > &p, bool scanPeriods=true) const
minimal distance between point and helix
Collection of trigger ids as stored in StEvent.
virtual void ls(Option_t *option="") const