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");
23 // Connect the Root Galice file containing Geometry, Kine and Hits
25 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root");
26 if (!file) file = new TFile("galice.root","UPDATE");
28 // Get AliRun object from file or create it if not on file
31 gAlice = (AliRun*)file->Get("gAlice");
32 if (gAlice) printf("AliRun object found on file\n");
33 if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
36 gAlice = (AliRun*)file->Get("gAlice");
37 if (gAlice) printf("AliRun object found on file\n");
38 if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
42 // Set reconstruction models
44 // Get pointers to Alice detectors and Digits containers
45 AliRICH *RICH = (AliRICH*) gAlice->GetModule("RICH");
47 RecModel1 = new AliRICHClusterFinder();
48 RecModel1->SetNperMax(90);
49 //RecModel1->SetClusterSize(12);
50 RecModel1->SetClusterSize(100);
51 RecModel1->SetDeclusterFlag(1);
52 RICH->SetReconstructionModel(0,RecModel1);
54 RecModel2 = new AliRICHClusterFinder();
55 RecModel2->SetNperMax(90);
56 //RecModel2->SetClusterSize(12);
57 RecModel2->SetClusterSize(100);
58 RecModel2->SetDeclusterFlag(1);
59 RICH->SetReconstructionModel(1,RecModel2);
61 RecModel3 = new AliRICHClusterFinder();
62 RecModel3->SetNperMax(90);
63 //RecModel3->SetClusterSize(12);
64 RecModel3->SetClusterSize(100);
65 RecModel3->SetDeclusterFlag(1);
66 RICH->SetReconstructionModel(2,RecModel3);
68 RecModel4 = new AliRICHClusterFinder();
69 RecModel4->SetNperMax(90);
70 //RecModel4->SetClusterSize(12);
71 RecModel4->SetClusterSize(100);
72 RecModel4->SetDeclusterFlag(1);
73 RICH->SetReconstructionModel(3,RecModel4);
75 //RecModel5 = new AliRICHClusterFinderv0();
76 RecModel5 = new AliRICHClusterFinder();
77 RecModel5->SetNperMax(90);
78 //RecModel5->SetClusterSize(15);
79 RecModel5->SetClusterSize(100);
80 RecModel5->SetDeclusterFlag(1);
81 RICH->SetReconstructionModel(4,RecModel5);
83 //RecModel6 = new AliRICHClusterFinderv0();
84 RecModel6 = new AliRICHClusterFinder();
85 RecModel6->SetNperMax(90);
86 //RecModel6->SetClusterSize(15);
87 RecModel6->SetClusterSize(100);
88 RecModel6->SetDeclusterFlag(1);
89 RICH->SetReconstructionModel(5,RecModel6);
91 RecModel7 = new AliRICHClusterFinder();
92 RecModel7->SetNperMax(90);
93 //RecModel7->SetClusterSize(9);
94 RecModel7->SetClusterSize(100);
95 RecModel7->SetDeclusterFlag(1);
96 RICH->SetReconstructionModel(6,RecModel7);
102 for (int nev=0; nev<= evNumber2; nev++) {
103 Int_t nparticles = gAlice->GetEvent(nev);
104 cout <<endl<< "Processing event:" << nev <<endl;
105 cout << "Particles :" << nparticles <<endl;
106 if (nev < evNumber1) continue;
107 if (nparticles <= 0) return;
109 TTree *TH = gAlice->TreeH();
110 Int_t ntracks = TH->GetEntries();
111 //cout<<"ntracks "<<ntracks<<endl;
116 TClonesArray *Particles = gAlice->Particles();
117 TTree *TD = gAlice->TreeD();
118 Int_t nent=TD->GetEntries();
119 //printf("Found %d entries in the tree (must be one per cathode per event!)\n",nent);
121 //printf("Finding clusters for event:%d",nev);
122 RICH->FindClusters(nev,nent-2);
130 printf("\nEnd of Macro *************************************\n");