]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/MUONrawclusters.C
Code introduced to remove ghosts with the charge correlation between the 2
[u/mrichter/AliRoot.git] / MUON / MUONrawclusters.C
CommitLineData
a897a37a 1#include "iostream.h"
2
3void MUONrawclusters (Int_t evNumber1=0,Int_t evNumber2=0)
4{
a9e2aefa 5 //////////////////////////////////////
6 // //
7 // ROOT macro for ALICE Dimuon Arm: //
8 // Clusterization of digits //
9 // //
10 //////////////////////////////////////
11 //
12 // Adds the tree TR for raw clusters
13 // to the ROOT file "galice.root"
14 // containing the digits (tree TD).
15 //
16 // Arguments:
17 // evNumber1 = first event number to act on in file "galice.root"
18 // evNumber2 = last event number to act on in file "galice.root"
19 //
20 // Input/output file:
21 // "galice.root"
22 //
23 //__________________________________________________________________________
a897a37a 24
25// Dynamically link some shared libs
26
27 if (gClassTable->GetID("AliRun") < 0) {
28 gROOT->LoadMacro("loadlibs.C");
29 loadlibs();
30 }
31
32// Connect the Root Galice file containing Geometry, Kine and Hits
33
34 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root");
35 if (!file) file = new TFile("galice.root","UPDATE");
36
37// Get AliRun object from file or create it if not on file
38
39 if (!gAlice) {
40 gAlice = (AliRun*)file->Get("gAlice");
41 if (gAlice) printf("AliRun object found on file\n");
42 if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
43 }
a9e2aefa 44
a897a37a 45// Set reconstruction models
46//
47// Get pointers to Alice detectors and Digits containers
48 AliMUON *MUON = (AliMUON*) gAlice->GetModule("MUON");
a9e2aefa 49 for (Int_t i=0; i<10; i++) {
a9e2aefa 50 RecModel = new AliMUONClusterFinderVS();
a9e2aefa 51// RecModel->SetTracks(16,17);
52// RecModel->SetTracks(266,267);
07cfabcf 53 RecModel->SetGhostChi2Cut(10);
a9e2aefa 54 MUON->SetReconstructionModel(i,RecModel);
55 }
a897a37a 56//
57// Loop over events
58//
59 Int_t Nh=0;
60 Int_t Nh1=0;
a9e2aefa 61 for (int nev=evNumber1; nev<= evNumber2; nev++) {
a897a37a 62 Int_t nparticles = gAlice->GetEvent(nev);
63 cout << "nev " << nev <<endl;
64 cout << "nparticles " << nparticles <<endl;
65 if (nev < evNumber1) continue;
66 if (nparticles <= 0) return;
3f2e2671 67 gAlice->SetEvent(nev);
68 gAlice->RunReco("MUON");
69 gAlice->TreeR()->Fill();
70 char hname[30];
71 sprintf(hname,"TreeR%d", nev);
72 gAlice->TreeR()->Write(hname);
73 gAlice->TreeR()->Reset();
74 MUON->ResetRawClusters();
75 printf("\n End of cluster finding for event %d", 0);
a897a37a 76 } // event loop
a897a37a 77}
78