]>
Commit | Line | Data |
---|---|---|
52639e17 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | /* $Id$ */ | |
17 | ||
d8d3b5b8 | 18 | #if !defined(__CINT__) || defined(__MAKECINT__) |
52c9bc11 | 19 | //#include "iostream.h" |
a897a37a | 20 | |
fb76e306 | 21 | #include <TClassTable.h> |
22 | #include <TClonesArray.h> | |
23 | #include <TFile.h> | |
24 | #include <TParticle.h> | |
25 | #include <TROOT.h> | |
26 | #include <TTree.h> | |
27 | ||
28 | #include "AliHeader.h" | |
29 | #include "AliRun.h" | |
30 | ||
31 | #include "AliMUON.h" | |
32 | ||
33 | #include "AliMUONClusterFinderVS.h" | |
52c9bc11 | 34 | //#include "AliMUONClusterFinderAZ.h" |
35 | #include "AliMUONClusterReconstructor.h" | |
d8d3b5b8 | 36 | #endif |
fb76e306 | 37 | |
bf17dbfd | 38 | void MUONrawclusters (char* filename="galice.root", Int_t evNumber1=0,Int_t evNumber2=9999) |
a897a37a | 39 | { |
88cb7938 | 40 | // Creating Run Loader and openning file containing Hits |
52c9bc11 | 41 | AliRunLoader* RunLoader = AliRunLoader::Open(filename,"MUONLoader","UPDATE"); |
88cb7938 | 42 | if (RunLoader ==0x0) { |
43 | printf(">>> Error : Error Opening %s file \n",filename); | |
44 | return; | |
45 | } | |
52c9bc11 | 46 | if (RunLoader->GetAliRun() == 0x0) RunLoader->LoadgAlice(); |
c6cd5030 | 47 | |
88cb7938 | 48 | // Loading MUON subsystem |
52c9bc11 | 49 | AliLoader* MUONLoader = RunLoader->GetLoader("MUONLoader"); |
c6cd5030 | 50 | |
52c9bc11 | 51 | MUONLoader->LoadDigits("READ"); |
52 | MUONLoader->LoadRecPoints("UPDATE"); | |
53 | ||
88cb7938 | 54 | Int_t ievent, nevents; |
55 | nevents = RunLoader->GetNumberOfEvents(); | |
52c9bc11 | 56 | |
57 | AliMUONClusterReconstructor* Reco = new AliMUONClusterReconstructor(MUONLoader); | |
58 | AliMUONData* muondata = Reco->GetMUONData(); | |
59 | ||
88cb7938 | 60 | for (Int_t i=0; i<10; i++) { |
52c9bc11 | 61 | AliMUONClusterFinderVS* RecModel = new AliMUONClusterFinderVS(); |
88cb7938 | 62 | // RecModel->SetTracks(16,17); |
63 | // RecModel->SetTracks(266,267); | |
64 | RecModel->SetGhostChi2Cut(10); | |
52c9bc11 | 65 | Reco->SetReconstructionModel(i,RecModel); |
346357f4 | 66 | } |
52c9bc11 | 67 | |
1391e633 | 68 | // Testing if RawClusterisation has already been done |
69 | RunLoader->GetEvent(0); | |
70 | if (MUONLoader->TreeR()) { | |
71 | if (muondata->IsRawClusterBranchesInTree()) { | |
72 | MUONLoader->UnloadRecPoints(); | |
73 | MUONLoader->LoadRecPoints("RECREATE"); | |
74 | printf("Recreating RecPoints files\n"); | |
75 | } | |
76 | } | |
c6cd5030 | 77 | |
52c9bc11 | 78 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
79 | if (evNumber2 > nevents) evNumber2 = nevents; | |
80 | ||
81 | for(ievent = evNumber1; ievent < evNumber2; ievent++) { | |
82 | printf("event %d\n",ievent); | |
83 | RunLoader->GetEvent(ievent); | |
84 | ||
85 | // Test if rawcluster has already been done before | |
86 | if (MUONLoader->TreeR() == 0x0) | |
87 | MUONLoader->MakeRecPointsContainer(); | |
88 | else { | |
89 | if (muondata->IsRawClusterBranchesInTree()){ | |
90 | // Test if rawcluster has already been done before | |
91 | if (ievent == evNumber1) MUONLoader->UnloadRecPoints(); | |
92 | MUONLoader->MakeRecPointsContainer(); // Redoing clusterisation | |
93 | Info("RecPointsContainer", | |
94 | "Recreating RecPointsContainer and deleting previous ones"); | |
95 | } | |
96 | } | |
97 | muondata->MakeBranch("RC"); | |
98 | muondata->SetTreeAddress("D,RC"); | |
99 | ||
100 | Reco->Digits2Clusters(); | |
101 | ||
102 | muondata->Fill("RC"); //Filling Reconstructed Cluster | |
103 | MUONLoader->WriteRecPoints("OVERWRITE"); | |
104 | muondata->ResetRawClusters(); | |
105 | muondata->ResetDigits(); | |
88cb7938 | 106 | } |
346357f4 | 107 | MUONLoader->UnloadDigits(); |
108 | MUONLoader->UnloadRecPoints(); | |
a897a37a | 109 | } |
110 | ||
88cb7938 | 111 |