void AliITSPrintRecPoints(Int_t outtype=1,TString rfn="galice.root", Int_t mod=-1,Int_t evnt=-1){ // Macro to print out the recpoints for all or a specific module // Dynamically link some shared libs if (gClassTable->GetID("AliRun") < 0) { gROOT->LoadMacro("loadlibs.C"); loadlibs(); } else { if(gAlice){ delete gAlice->GetRunLoader(); delete gAlice; gAlice=0; } } gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSstandard.C"); AliRunLoader *rl = AccessFile(rfn); // Set up to read in Data Int_t retval = rl->LoadHeader(); if (retval){ cerr<<"AliITSPrintRecPoints.C : LoadHeader returned error"<GetLoader("ITSLoader"); if(!ITSloader){ cerr<<"AliITSPrintRecPoints.C : ITS loader not found"<Import("geometry.root",""); } // end if ITSloader->LoadHits("read"); ITSloader->LoadDigits("read"); ITSloader->LoadRecPoints("read"); cout << "loaded hits, digits, and RecPoints"<< endl; AliITS *ITS = 0; ITS = (AliITS*)(gAlice->GetDetector("ITS")); if(!ITS){ cout << "Error: no ITS found. Aborting"<GetITSgeom(); if(!gm){ cout <<"No AliITSgeom object found in ITS"<UpdateInternalGeometry(gGeoManager); } // end if } // end if !AliITSgeom Int_t evNumber1 = 0; Int_t evNumber2 = gAlice->GetEventsPerRun(); if(evnt>=0){ evNumber1 = evnt; evNumber2 = evnt+1; } // end if evnt>=0 Int_t mod1 = 0; Int_t mod2 = gm->GetIndexMax(); if(mod>=0){ mod1 = mod; mod2 = mod+1; } // end if mod>=0 TClonesArray *rpa; AliITSRecPoint *rp = 0; AliITSDetTypeRec* rec = new AliITSDetTypeRec(ITSloader); //rec->SetITSgeom(gm); rec->SetDefaults(); Int_t event,m,i,i2; Float_t xyz[3]; for(event = evNumber1; event < evNumber2; event++){ rl->GetEvent(event); rec->SetTreeAddress(); for(m=mod1;mResetRecPoints(); TTree *TR = ITSloader->TreeR(); TR->GetEvent(m); rpa = rec->RecPoints(); i2 = rpa->GetEntriesFast(); cout << "Event=" << event << " module=" << m << " Number of Recpoints=" << i2 <At(i)); switch(outtype){ case 1: rp->GetGlobalXYZ(xyz); cout << i << " lx=" << rp->GetDetLocalX() << " lz=" << rp->GetDetLocalZ() << " x=" << rp->GetX() << " y=" << rp->GetY()<< " z=" << rp->GetZ() <<" gx=" << xyz[0] << " gy="<< xyz[1] <<" gz="<Print((ostream*)cout); cout << endl; break; } // end switch } // end for i } // end for m } // end for event }