In two-pair fctn, track pair must be also swapped if part-pair is.
[u/mrichter/AliRoot.git] / MUON / MUONrawclusters.C
... / ...
CommitLineData
1#include "iostream.h"
2
3void MUONrawclusters (char* filename, Int_t evNumber1=0,Int_t evNumber2=0)
4{
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 //__________________________________________________________________________
24
25// // Dynamically link some shared libs
26
27 //if (gClassTable->GetID("AliRun") < 0) {
28 // gROOT->LoadMacro("$ALICE_ROOT/macros/loadlibs.C");
29 // loadlibs();
30 // }
31
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 }
38
39 // Loading AliRun master
40 RunLoader->UnloadgAlice();
41 RunLoader->LoadgAlice();
42 gAlice = RunLoader->GetAliRun();
43
44 // Loading MUON subsystem
45 AliMUON * MUON = (AliMUON *) gAlice->GetDetector("MUON");
46 AliLoader * MUONLoader = RunLoader->GetLoader("MUONLoader");
47
48 Int_t ievent, nevents;
49 nevents = RunLoader->GetNumberOfEvents();
50
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 }
58//
59// Loop over events
60 //
61 Int_t Nh=0;
62 Int_t Nh1=0;
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
76}
77
78