3 void ITSHitsToFastPoints (Int_t evNumber1=0,Int_t evNumber2=0,Int_t nsignal=25, Int_t size=-1)
5 /////////////////////////////////////////////////////////////////////////
6 // This macro is a small example of a ROOT macro
7 // illustrating how to read the output of GALICE
8 // and do some analysis.
10 /////////////////////////////////////////////////////////////////////////
12 // Dynamically link some shared libs
14 if (gClassTable->GetID("AliRun") < 0) {
15 gROOT->LoadMacro("loadlibs.C");
22 // Connect the Root Galice file containing Geometry, Kine and Hits
24 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root");
25 if (file) file->Close();
26 file = new TFile("galice.root","UPDATE");
29 printf ("I'm after Map \n");
31 // Get AliRun object from file or create it if not on file
34 gAlice = (AliRun*)file->Get("gAlice");
35 if (gAlice) printf("AliRun object found on file\n");
36 if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
38 printf ("I'm after gAlice \n");
40 AliITS *ITS = (AliITS*) gAlice->GetModule("ITS");
43 // Set the simulation model
44 AliITSsimulationFastPoints *sim = new AliITSsimulationFastPoints();
46 for (Int_t i=0;i<3;i++) {
47 ITS->SetSimulationModel(i,sim);
56 for (int ev=evNumber1; ev<= evNumber2; ev++) {
57 Int_t nparticles = gAlice->GetEvent(ev);
58 cout << "event " <<ev<<endl;
59 cout << "nparticles " <<nparticles<<endl;
60 if (ev < evNumber1) continue;
61 if (nparticles <= 0) return;
63 Int_t bgr_ev=Int_t(ev/nsignal);
64 //printf("bgr_ev %d\n",bgr_ev);
65 ITS->HitsToFastRecPoints(ev,bgr_ev,size," ","All"," ");