7 class StSPtrVecTrackNodeIterator ;
13 void rdSt2print(
char * fname=
"aa.event.root", Int_t nevents=4){
15 fname=
"m1.event.root";
17 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
18 loadSharedLibraries();
21 cout <<
" loading done " << endl;
33 ioMaker->SetFile(fname);
36 ioMaker->SetBranch(
"*",0,
"0");
37 ioMaker->SetBranch(
"geantBranch",0,
"r");
38 ioMaker->SetBranch(
"eventBranch",0,
"r");
49 Int_t initStat = chain->Init();
50 if (initStat) chain->Fatal(initStat,
"during Init()");
56 if (iev>=nevents)
break;
58 istat = chain->
Make();
61 cout <<
"---------------------- Processing Event : " << iev <<
" ---------------------- " << istat<<endl;
73 int nV=mEvent->numberOfPrimaryVertices();
75 if(nV>1) printf(
"######\n");
76 printf(
"eveID=%d nPrimVert=%d\n", mEvent->id(),nV);
79 for(iv=0;iv<nV;iv++) {
84 printf(
"iv=%d Vz=%.2f +/-%.2f \n",iv,r.z(),er.z() );
85 printf(
" nPrimTr=%d , VFid=%d:: ntrVF=%d nCtb=%d nBemc=%d nEEmc=%d nTpc=%d sumPt=%.1f rank=%g\n"
86 ,V->numberOfDaughters(), V->vertexFinderId() ,V->numTracksUsedInFinder() ,
87 V->numMatchesWithCTB() ,V-> numMatchesWithBEMC() ,V->numMatchesWithEEMC() ,
88 V->numTracksCrossingCentralMembrane() ,V->sumOfTrackPt() ,V->ranking());
95 for(itr=0; itr<V->numberOfDaughters(); itr++) {
97 if(track==0)
continue;
98 if (track->flag() <0 )
continue;
99 printf(
"itr=%d pT=%.1f eta=%.2f nFitP=%d DCA=%.1f\n",itr,
100 track->geometry()->momentum().mag(),
101 track->geometry()->momentum().pseudoRapidity(),
102 track->fitTraits().numberOfFitPoints(),
103 track->geometry()->helix().
distance(V->position()));
106 printf(
" counted nPrimTr=%d \n",nPrTr);
118 printETOW(emcC->detector(13));
153 for(
int i = 0; i<NBANK;i++) {
155 int size = raw->sizeHeader(i);
156 printf(
"======BTOW BANK=%d size: head=%d, data=%d\n",i,size,raw->sizeData(i));
158 for(
int j = 0;j<size;j++) {
159 if(j%16==0) printf(
"\n");
160 printf(
"0x%04x ",raw->header(i,j));
165 int size = raw->sizeData(i);
166 printf(
"\nBANK=%d data size=%d",i,size);
167 for(
int j = 0;j<size;j++) {
168 if(j%16==0) printf(
"\n");
169 printf(
"0x%04x ",raw->data(i,j));
173 printf(
"\n bank=%d tot=%d\n",i,tot);
185 printf(
"printRaw(%p)\n",raw);
189 printf(
"nBlocks=%d\n",raw->getNBlocks());
191 for(icr=0; icr<raw->getNBlocks();icr++) {
192 if(raw->sizeData(icr)<=0)
continue;
194 const UShort_t* head=raw->header(icr);
195 const UShort_t*
data=raw->data(icr);
197 printf(
"icr=%d, size: head=%d data=%d\n",icr,raw->sizeHeader(icr),raw->sizeData(icr));
201 block.setHead(raw->header(icr));
202 block.setDataArray(raw->data(icr),raw->sizeData(icr));
216 printf(
"print ETOW Tw(%p)\n",det);
217 if(det==0) { printf(
"NULL ETOW pointer, skip\n");
return;}
220 printf(
"towers nHit=%d nMod=%d\n",det->numberOfHits(),det->numberOfModules());
222 for(
int mod=1;mod<=det->numberOfModules();mod++) {
225 StSPtrVecEmcRawHit&
hit= module->hits();
227 for(ih=0;ih<hit.size();ih++){
230 char sub=
'A'+x->sub()-1;
234 printf(
"ih=%d %02dT%c%02d -->adc=%d ener=%f\n",ih,sec,sub,eta,adc, x->energy());
236 int adcX=1000+ (eta-1) + (sub-
'A')*12 +(sec-1)*60;
242 printf(
"total nPos=%d\n",nPos);
243 printf(
"nPos=%d of %d \n",nPos,det->numberOfHits());
254 printf(
"printPre/post(%p)\n",det);
256 printf(
"pre/post nHit=%d nMod=%d\n",det->numberOfHits(),det->numberOfModules());
258 for(
int imod=1;imod<=det->numberOfModules();imod++) {
260 printf(
"EPRE sect=%d nHit=%d\n",imod, module->numberOfHits());
261 StSPtrVecEmcRawHit& hit= module->hits();
263 for(ih=0;ih<hit.size();ih++){
271 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);
273 int adcX= (eta-1) + (sub-
'A')*12 +(sec-1)*60 + 1000*(preL-
'P'+1);
276 printf(
"nPos=%d\n",nPos);
279 printf(
"nPos=%d of %d \n",nPos,det->numberOfHits());
291 printf(
"printSMD/post(%p)\n",det);
293 printf(
"U-SMD nHit=%d nMod=%d\n",det->numberOfHits(),det->numberOfModules());
295 for(
int imod=1;imod<=det->numberOfModules();imod++) {
297 printf(
"ESMD sector=%d nHit=%d\n",imod, module->numberOfHits());
298 StSPtrVecEmcRawHit& hit= module->hits();
300 for(ih=0;ih<hit.size();ih++){
305 printf(
"ih=%d %02dU%03d -->adc=%d ener=%f\n",ih,sec,strip,adc, x->energy());
307 int adcX= 1000+(strip -1) +(sec-1)*300;
310 printf(
" nPos=%d\n",nPos);
312 printf(
"nPos=%d of %d \n",nPos,det->numberOfHits());
322 for(i=0;trigL[i]>0;i++) {
324 if(l1->isTrigger(trigL[i]))
return true;
338 printf(
"print FGT (%p)\n",fgtColl );
339 if(fgtColl==0) { printf(
"NULL FGT pointer, skip\n");
return;}
341 printf(
"FgtEvent: numDisk=%d\n",fgtColl->getNumDiscs());
342 for(
int iDisc=0; iDisc <fgtColl->getNumDiscs(); iDisc++) {
343 printf(
" content: ID=%d # of : strips=%d hits=%d \n" ,iDisc ,fgtColl ->getNumStrips(iDisc) ,fgtColl -> getNumHits( iDisc));
345 StSPtrVecFgtStrip &stripVec = stripCollectionPtr->getStripVec();
348 for(
int ih=0;ih<stripVec.size();ih++) {
351 printf(
"iDisc=%d ih=%d geoId=%d ADC=%d\n",iDisc,ih,strip->getGeoId(),strip->getAdc());
354 for(
int ih=0;ih<pDisc->getNumClusters();ih++) {
355 StFgtCluster *cl=pDisc->getClusterArray().getClusterPtr(ih);
356 printf(
"iDisc=%d ic=%d layer=%c, pos/cm=%.2f charge=%f numStirp=%d\n",iDisc,ih,cl->getLayer(),cl->getPosition(), cl->getCharge(),cl->getNumStrips());
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