4 void AliITSFindPrimaryVertex(Int_t evNumber1=0,Int_t evNumber2=0, 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(filename,"UPDATE");
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");
33 for (int nev=0; nev<= evNumber2; nev++) {
34 gAlice->SetEvent(nev);
35 Int_t nparticles = gAlice->GetEvent(nev);
36 cout << "nev " << nev <<endl;
37 cout << "nparticles " << nparticles <<endl;
38 if (nev < evNumber1) continue;
39 if (nparticles <= 0) return;
45 AliITSVertex *V = new AliITSVertex();
51 cout << endl << "Xv = " << V->GetXv() << " cm" << endl;
52 cout << "X resolution = " << V->GetXRes()*10000 << " microns" << endl;
53 cout << "Signal/Noise for X = " << V->GetXSNR() << endl;
54 cout << endl << "Yv = " << V->GetYv() << " cm" << endl;
55 cout << "Y resolution = " << V->GetYRes()*10000 << " microns" << endl;
56 cout << "Signal/Noise for Y = " << V->GetYSNR() << endl;
57 cout << endl << "Zv = " << V->GetZv() << " cm" << endl;
58 cout << "Z Resolution = " << V->GetZRes()*10000 << " microns" << endl;
59 cout << "Signal/Noise for Z = " << V->GetZSNR() <<endl;