4 #include "TClonesArray.h"
6 #include "$(ALICE_ROOT)/STEER/AliRun.h"
7 #include "$(ALICE_ROOT)/ITS/AliITS.h"
8 #include "$(ALICE_ROOT)/ITS/AliITSgeom.h"
9 #include "$(ALICE_ROOT)/ITS/AliITSHit.h"
11 void AliITSPrintHits(TString hfn="galice.root",Int_t mod=-1,
13 // Macro to print out the recpoints for all or a specific module
15 // Dynamically link some shared libs
16 if (gClassTable->GetID("AliRun") < 0) {
17 gROOT->LoadMacro("loadlibs.C");
20 gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSstandard.C");
23 hf = AccessFile(hfn,"R"); // Set up to read in Data
24 AliITS *ITS = (AliITS*)gAlice->GetDetector("ITS");
26 cout << "Error: no ITS found. Aborting"<<endl;
31 Int_t evNumber2 = gAlice->GetEventsPerRun();
37 Int_t mod2 = ITS->GetITSgeom()->GetIndexMax();
42 TClonesArray *hpa = ITS->RecPoints();
45 Int_t nmodules,size=-1;
46 ITS->InitModules(size,nmodules);
47 Int_t event,m,i,i2,hit,trk;
48 for(event = evNumber1; event < evNumber2; event++){
49 gAlice->GetEvent(event);
50 ITS->FillModules(event,0,-1," "," ");
51 for(m=mod1;m<mod2;m++){
52 i2 = (ITS->GetModule(m))->GetNhits();
53 cout << "Event=" << event << " module=" << m <<
54 " Number of Hits=" << i2 <<endl;
56 trk = (ITS->GetModule(m))->GetHitTrackIndex(i);
57 hit = (ITS->GetModule(m))->GetHitHitIndex(i);
58 hp = (ITS->GetModule(m))->GetHit(i);
59 cout << i << " trk#="<<trk<<" hit#="<< hit << " ";
60 hp->Print((ostream*)cout);