1 void AliITSHits2FastRecPoints (Int_t evNumber1=0,Int_t evNumber2=0, TString inFile = "galice.root", Int_t nsignal=25, Int_t size=-1)
3 /////////////////////////////////////////////////////////////////////////
5 // This macro creates fast recpoints, optionally on a separate file
7 /////////////////////////////////////////////////////////////////////////
10 // Dynamically link some shared libs
12 if (gClassTable->GetID("AliRun") < 0) {
13 gROOT->LoadMacro("loadlibs.C");
16 delete gAlice->GetRunLoader();
21 // Connect the Root Galice file containing Geometry, Kine and Hits
22 AliRunLoader* rl = AliRunLoader::Open("galice.root");
25 ::Error("AliITSHits2FastRecPoints.C","Can not open session RL=NULL");
29 Int_t retval = rl->LoadgAlice();
32 ::Error("AliITSHits2FastRecPoints.C","LoadgAlice returned error");
36 gAlice=rl->GetAliRun();
38 retval = rl->LoadKinematics();
41 ::Error("AliITSHits2FastRecPoints.C","LoadKinematics returned error");
46 AliITSLoader* gime = (AliITSLoader*)rl->GetLoader("ITSLoader");
49 ::Error("AliITSHits2FastRecPoints.C","can not get ITS loader");
53 retval = gime->LoadHits("read");
56 ::Error("AliITSHits2FastRecPoints.C","LoadHits returned error");
60 gime->SetRecPointsFileName("ITS.FastRecPoints.root");
61 retval = gime->LoadRecPoints("update");
64 ::Error("AliITSHits2FastRecPoints.C","LoadRecPoints returned error");
69 AliITS *ITS = (AliITS*) gAlice->GetModule("ITS");
72 // Set the simulation model
74 for (Int_t i=0;i<3;i++) {
75 ITS->SetSimulationModel(i,new AliITSsimulationFastPoints());
86 cout << "Creating fast reconstructed points from hits for the ITS..." << endl;
88 for (int ev=evNumber1; ev<= evNumber2; ev++) {
89 cout << "...working on event "<< ev << " ..." << endl;
90 Int_t nparticles = gAlice->GetEvent(ev);
91 cout << "event " <<ev<<endl;
92 cout << "nparticles " <<nparticles<<endl;
94 if(gime->TreeR() == 0x0) gime->MakeTree("R");
96 ITS->MakeBranch("RF");
97 if (ev < evNumber1) continue;
98 if (nparticles <= 0) return;
100 Int_t bgr_ev=Int_t(ev/nsignal);
102 ITS->HitsToFastRecPoints(ev,bgr_ev,size," ","All"," ");
103 timer.Stop(); timer.Print();