3 void ITStrackingGeneral(Int_t evNumber1=0,Int_t evNumber2=0,Int_t min_t=-1,Int_t max_t=0,Bool_t flagvert=1) {
5 const char *filename="galice.root";
7 ///////////////// Dynamically link some shared libs ////////////////////////////////
9 if (gClassTable->GetID("AliRun") < 0) {
10 gROOT->LoadMacro("loadlibs.C");
17 // Connect the Root Galice file containing Geometry, Kine and Hits
18 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(filename);
19 if (!file) file = new TFile("galice.root","UPDATE");
20 //if (!file) file = new TFile(filename);
22 // Get AliRun object from file or create it if not on file
24 gAlice = (AliRun*)file->Get("gAlice");
25 if (gAlice) printf("AliRun object found on file\n");
26 if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
30 AliITS* ITS =(AliITS *)gAlice->GetDetector("ITS");
38 for (int nev=0; nev<= evNumber2; nev++) {
39 Int_t nparticles = gAlice->GetEvent(nev);
40 cout << "nev " << nev <<endl;
41 cout << "nparticles " << nparticles <<endl;
42 if (nev < evNumber1) continue;
43 if (nparticles <= 0) return;
45 TTree *TR=gAlice->TreeR();
46 Int_t nent=TR->GetEntries();
47 //printf("Found %d entries in the TreeR (must be one per module per event!)\n",nent);
49 ITS->DoTracking(nev,min_t,max_t,file,flagvert);