3 void ITSmixedpoints (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");
20 // Connect the Root Galice file containing Geometry, Kine and Hits
22 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root");
23 printf("file %p\n",file);
24 if (file) file->Close();
25 file = new TFile("galice.root","UPDATE");
28 printf ("I'm after Map \n");
30 // Get AliRun object from file or create it if not on file
33 gAlice = (AliRun*)file->Get("gAlice");
34 if (gAlice) printf("AliRun object found on file\n");
35 if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
37 printf ("I'm after gAlice \n");
39 AliITS *ITS = (AliITS*) gAlice->GetModule("ITS");
42 // set the simulation models
43 AliITSgeom *geom = ITS->GetITSgeom();
45 // SPD - simulation slow points
47 AliITSDetType *iDetType=ITS->DetType(0);
48 AliITSsegmentationSPD *seg0=(AliITSsegmentationSPD*)iDetType->GetSegmentationModel();
49 AliITSresponseSPD *res0 = (AliITSresponseSPD*)iDetType->GetResponseModel();
50 AliITSsimulationSPD *sim0=new AliITSsimulationSPD(seg0,res0);
51 ITS->SetSimulationModel(0,sim0);
53 // SPD - cluster finder
54 AliITSDetType *iDetType=ITS->DetType(0);
55 AliITSsegmentationSPD *seg0=(AliITSsegmentationSPD*)iDetType->GetSegmentationModel();
56 TClonesArray *dig0 = ITS->DigitsAddress(0);
57 TClonesArray *recp0 = ITS->ClustersAddress(0);
58 AliITSClusterFinderSPD *rec0=new AliITSClusterFinderSPD(seg0,dig0,recp0);
59 ITS->SetReconstructionModel(0,rec0);
61 // SDD+SSD - fast poinst
63 AliITSsimulationFastPoints *sim = new AliITSsimulationFastPoints();
65 for (Int_t i=1;i<3;i++) {
66 ITS->SetSimulationModel(i,sim);
74 for (int ev=evNumber1; ev<= evNumber2; ev++) {
75 Int_t nparticles = gAlice->GetEvent(ev);
76 cout << "event " <<ev<<endl;
77 cout << "nparticles " <<nparticles<<endl;
78 if (ev < evNumber1) continue;
79 if (nparticles <= 0) return;
80 Int_t bgr_ev=Int_t(ev/nsignal);
82 ITS->DigitsToRecPoints(ev,last_entry,"SPD");
83 ITS->HitsToFastRecPoints(ev,bgr_ev,size," ","SDD"," ");
84 ITS->HitsToFastRecPoints(ev,bgr_ev,size," ","SSD"," ");