3 void ITSrecpointsBari (Int_t evNumber1=0,Int_t evNumber2=0)
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 // version to execute the Bari model
12 /////////////////////////////////////////////////////////////////////////
14 // Dynamically link some shared libs
16 if (gClassTable->GetID("AliRun") < 0) {
17 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 printf("file %p\n",file);
26 if (file) file->Close();
27 file = new TFile("galice.root","UPDATE");
30 printf ("I'm after Map \n");
32 // Get AliRun object from file or create it if not on file
35 gAlice = (AliRun*)file->Get("gAlice");
36 if (gAlice) printf("AliRun object found on file\n");
37 if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
39 printf ("I'm after gAlice \n");
41 AliITS *ITS = (AliITS*) gAlice->GetModule("ITS");
49 AliITSgeom *geom = ITS->GetITSgeom();
53 AliITSDetType *iDetType=ITS->DetType(0);
54 AliITSsegmentationSPD *seg0=(AliITSsegmentationSPD*)iDetType->GetSegmentationModel();
55 TClonesArray *dig0 = ITS->DigitsAddress(0);
56 TClonesArray *recp0 = ITS->ClustersAddress(0);
57 AliITSClusterFinderSPDbari *rec0=new AliITSClusterFinderSPDbari(seg0,dig0,recp0);
58 ITS->SetReconstructionModel(0,rec0);
61 printf("SPD dimensions %f %f \n",seg0->Dx(),seg0->Dz());
62 printf("SPD npixels %d %d \n",seg0->Npz(),seg0->Npx());
66 for (int nev=evNumber1; nev<= evNumber2; nev++) {
67 Int_t nparticles = gAlice->GetEvent(nev);
68 cout << "nev " <<nev<<endl;
69 cout << "nparticles " <<nparticles<<endl;
70 if (nev < evNumber1) continue;
71 if (nparticles <= 0) return;
73 TTree *TD = gAlice->TreeD();
74 Int_t nent=TD->GetEntries();
75 printf("Found %d entries in the tree (must be one per module per event!)\n",nent);
76 Int_t nmodules=geom->GetLastSSD();
78 // ITS->DigitsToRecPoints(nev,last_entry,"All");
79 ITS->DigitsToRecPoints(nev,last_entry,"SPD");