3 void RICHrawclusters (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 /////////////////////////////////////////////////////////////////////////
12 // Dynamically link some shared libs
14 if (gClassTable->GetID("AliRun") < 0) {
15 gROOT->LoadMacro("loadlibs.C");
24 // Connect the Root Galice file containing Geometry, Kine and Hits
26 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root");
27 if (!file) file = new TFile("galice.root","UPDATE");
29 // Get AliRun object from file or create it if not on file
32 gAlice = (AliRun*)file->Get("gAlice");
33 if (gAlice) printf("AliRun object found on file\n");
34 if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
37 gAlice = (AliRun*)file->Get("gAlice");
38 if (gAlice) printf("AliRun object found on file\n");
39 if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
43 // Set reconstruction models
45 // Get pointers to Alice detectors and Digits containers
46 AliRICH *RICH = (AliRICH*) gAlice->GetModule("RICH");
48 RecModel1 = new AliRICHClusterFinder();
49 RecModel1->SetNperMax(90);
50 //RecModel1->SetClusterSize(12);
51 RecModel1->SetClusterSize(100);
52 RecModel1->SetDeclusterFlag(1);
53 RICH->SetReconstructionModel(0,RecModel1);
55 RecModel2 = new AliRICHClusterFinder();
56 RecModel2->SetNperMax(90);
57 //RecModel2->SetClusterSize(12);
58 RecModel2->SetClusterSize(100);
59 RecModel2->SetDeclusterFlag(1);
60 RICH->SetReconstructionModel(1,RecModel2);
62 RecModel3 = new AliRICHClusterFinder();
63 RecModel3->SetNperMax(90);
64 //RecModel3->SetClusterSize(12);
65 RecModel3->SetClusterSize(100);
66 RecModel3->SetDeclusterFlag(1);
67 RICH->SetReconstructionModel(2,RecModel3);
69 RecModel4 = new AliRICHClusterFinder();
70 RecModel4->SetNperMax(90);
71 //RecModel4->SetClusterSize(12);
72 RecModel4->SetClusterSize(100);
73 RecModel4->SetDeclusterFlag(1);
74 RICH->SetReconstructionModel(3,RecModel4);
76 //RecModel5 = new AliRICHClusterFinderv0();
77 RecModel5 = new AliRICHClusterFinder();
78 RecModel5->SetNperMax(90);
79 //RecModel5->SetClusterSize(15);
80 RecModel5->SetClusterSize(100);
81 RecModel5->SetDeclusterFlag(1);
82 RICH->SetReconstructionModel(4,RecModel5);
84 //RecModel6 = new AliRICHClusterFinderv0();
85 RecModel6 = new AliRICHClusterFinder();
86 RecModel6->SetNperMax(90);
87 //RecModel6->SetClusterSize(15);
88 RecModel6->SetClusterSize(100);
89 RecModel6->SetDeclusterFlag(1);
90 RICH->SetReconstructionModel(5,RecModel6);
92 RecModel7 = new AliRICHClusterFinder();
93 RecModel7->SetNperMax(90);
94 //RecModel7->SetClusterSize(9);
95 RecModel7->SetClusterSize(100);
96 RecModel7->SetDeclusterFlag(1);
97 RICH->SetReconstructionModel(6,RecModel7);
104 for (int nev=0; nev<= evNumber2; nev++) {
105 Int_t nparticles = gAlice->GetEvent(nev);
106 cout <<endl<< "Processing event:" << nev <<endl;
107 cout << "Particles :" << nparticles <<endl;
108 if (nev < evNumber1) continue;
109 if (nparticles <= 0) return;
111 TTree *TH = gAlice->TreeH();
112 Int_t ntracks = TH->GetEntries();
113 //cout<<"ntracks "<<ntracks<<endl;
118 TClonesArray *Particles = (TClonesArray*)gAlice->Particles();
119 TTree *TD = gAlice->TreeD();
120 Int_t nent=gAlice->TreeD()->GetEntries();
121 //printf("Found %d entries in the tree (must be one per cathode per event!)\n",nent);
123 //printf("Finding clusters for event:%d",nev);
124 gAlice->MakeTree("R");
125 RICH->MakeBranch("R");
126 RICH->FindClusters(nev,nent-2);
133 printf("\nEnd of Macro *************************************\n");