]>
Commit | Line | Data |
---|---|---|
a897a37a | 1 | #include "iostream.h" |
2 | ||
88cb7938 | 3 | void MUONrawclusters (char* filename, Int_t evNumber1=0,Int_t evNumber2=0) |
a897a37a | 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 | |
88cb7938 | 25 | // // Dynamically link some shared libs |
a897a37a | 26 | |
88cb7938 | 27 | //if (gClassTable->GetID("AliRun") < 0) { |
28 | // gROOT->LoadMacro("$ALICE_ROOT/macros/loadlibs.C"); | |
29 | // loadlibs(); | |
30 | // } | |
a897a37a | 31 | |
88cb7938 | 32 | // Creating Run Loader and openning file containing Hits |
33 | AliRunLoader * RunLoader = AliRunLoader::Open(filename,"MUONFolder","UPDATE"); | |
34 | if (RunLoader ==0x0) { | |
35 | printf(">>> Error : Error Opening %s file \n",filename); | |
36 | return; | |
37 | } | |
a897a37a | 38 | |
88cb7938 | 39 | // Loading AliRun master |
40 | RunLoader->UnloadgAlice(); | |
41 | RunLoader->LoadgAlice(); | |
42 | gAlice = RunLoader->GetAliRun(); | |
a897a37a | 43 | |
88cb7938 | 44 | // Loading MUON subsystem |
45 | AliMUON * MUON = (AliMUON *) gAlice->GetDetector("MUON"); | |
46 | AliLoader * MUONLoader = RunLoader->GetLoader("MUONLoader"); | |
a897a37a | 47 | |
88cb7938 | 48 | Int_t ievent, nevents; |
49 | nevents = RunLoader->GetNumberOfEvents(); | |
a9e2aefa | 50 | |
88cb7938 | 51 | for (Int_t i=0; i<10; i++) { |
52 | RecModel = new AliMUONClusterFinderVS(); | |
53 | // RecModel->SetTracks(16,17); | |
54 | // RecModel->SetTracks(266,267); | |
55 | RecModel->SetGhostChi2Cut(10); | |
56 | MUON->SetReconstructionModel(i,RecModel); | |
57 | } | |
a897a37a | 58 | // |
59 | // Loop over events | |
88cb7938 | 60 | // |
a897a37a | 61 | Int_t Nh=0; |
62 | Int_t Nh1=0; | |
88cb7938 | 63 | // gAlice->RunReco("MUON", evNumber1, evNumber2); |
64 | for(Int_t ievent=evNumber1; ievent<evNumber2; ievent++) { | |
65 | printf("event %d\n",ievent); | |
66 | RunLoader->GetEvent(ievent); | |
67 | MUONLoader->LoadDigits("read"); | |
68 | if (MUONLoader->TreeR() == 0x0) MUONLoader->MakeTree("R"); | |
69 | MUON->MakeBranch("R"); | |
70 | MUON->SetTreeAddress(); | |
71 | MUON->Digits2Reco(); | |
72 | MUONLoader->UnloadDigits(); | |
73 | MUONLoader->UnloadRecPoints(); | |
74 | } | |
75 | ||
a897a37a | 76 | } |
77 | ||
88cb7938 | 78 |