5 void AliITSTrackingV1(Int_t evNumber1=0,Int_t evNumber2=0, Int_t min_t=-1, Int_t max_t=0,Bool_t flagvert=1, Bool_t realmass=0, const char *filename="galice.root") {
8 ///////////////// Dynamically link some shared libs ////////////////////////////////
10 if (gClassTable->GetID("AliRun") < 0) {
11 gROOT->LoadMacro("loadlibs.C");
18 // Connect the Root Galice file containing Geometry, Kine and Hits
19 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(filename);
20 if (!file) file = new TFile("galice.root","UPDATE");
21 //if (!file) file = new TFile(filename);
23 // Get AliRun object from file or create it if not on file
25 gAlice = (AliRun*)file->Get("gAlice");
26 if (gAlice) printf("AliRun object found on file\n");
27 if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
30 AliITS* IITTSS =(AliITS *)gAlice->GetDetector("ITS");
38 for (Int_t nev=0; nev<= evNumber2; nev++) {
39 AliITSTrackerV1 *ITStracker = new AliITSTrackerV1(IITTSS,nev,flagvert);
40 Int_t nparticles = gAlice->GetEvent(nev);
41 cout << "nev " << nev <<endl;
42 cout << "nparticles " << nparticles <<endl;
43 if (nev < evNumber1) continue;
44 if (nparticles <= 0) return;
46 TTree *TR=gAlice->TreeR();
47 Int_t nent=TR->GetEntries();
48 //printf("Found %d entries in the TreeR (must be one per module per event!)\n",nent);
54 ITStracker->DoTracking(nev,min_t,max_t,file,realmass);
55 timer.Stop(); timer.Print();
56 AliITSgeom *g1 = IITTSS->GetITSgeom();
57 Int_t NumOfModules = g1->GetIndexMax();
58 ITStracker->DelMatrix(NumOfModules);