5 void ITStracking(Int_t evNumber1=0,Int_t evNumber2=0,int min_t=-1, int max_t=0,Bool_t flagvert=1, Bool_t realmass=0) {
7 const char *filename="galice.root";
9 ///////////////// Dynamically link some shared libs ////////////////////////////////
11 if (gClassTable->GetID("AliRun") < 0) {
12 gROOT->LoadMacro("loadlibs.C");
19 // Connect the Root Galice file containing Geometry, Kine and Hits
20 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(filename);
21 if (!file) file = new TFile("galice.root","UPDATE");
22 //if (!file) file = new TFile(filename);
24 // Get AliRun object from file or create it if not on file
26 gAlice = (AliRun*)file->Get("gAlice");
27 if (gAlice) printf("AliRun object found on file\n");
28 if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
31 AliITS* IITTSS =(AliITS *)gAlice->GetDetector("ITS");
33 AliITSTrackerV1* ITStracker = new AliITSTrackerV1(IITTSS,flagvert);
40 for (int nev=0; nev<= evNumber2; nev++) {
41 Int_t nparticles = gAlice->GetEvent(nev);
42 cout << "nev " << nev <<endl;
43 cout << "nparticles " << nparticles <<endl;
44 if (nev < evNumber1) continue;
45 if (nparticles <= 0) return;
47 TTree *TR=gAlice->TreeR();
48 Int_t nent=TR->GetEntries();
49 //printf("Found %d entries in the TreeR (must be one per module per event!)\n",nent);
55 ITStracker->DoTracking(nev,min_t,max_t,file,realmass); // nuova
56 timer.Stop(); timer.Print();