]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSReconstruct.C
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PHOS / AliPHOSReconstruct.C
CommitLineData
f51fdb38 1// YS Subatech Mai 2002
2// YK Subatech 6 Aug 2002
3
6abf6c3e 4// PHOS Reconstruction chain:
f51fdb38 5// Hits -> SDigits -> Digits -> RecPoints -> TrackSegments -> RecParticles
6
7//Root
d8d3b5b8 8#if !defined(__CINT__) || defined(__MAKECINT__)
f51fdb38 9#include "TString.h"
10
11//AliRoot
12#include "STEER/AliRun.h"
13#include "PHOS/AliPHOSSDigitizer.h"
14#include "PHOS/AliPHOSDigitizer.h"
15#include "PHOS/AliPHOSClusterizerv1.h"
16#include "PHOS/AliPHOSTrackSegmentMakerv1.h"
17#include "PHOS/AliPHOSPIDv1.h"
18#include "EMCAL/AliEMCALSDigitizer.h"
19#include "EMCAL/AliEMCALDigitizer.h"
20#include "EMCAL/AliEMCALClusterizerv1.h"
d8d3b5b8 21#endif
f51fdb38 22
6abf6c3e 23void PHOSHits2SDigits( Bool_t split=kFALSE, TString fileName = "galice.root") {
f51fdb38 24
25 // usage :
26 // 1. write SDigits in the same file as Hits --------------- (OK)
27 //root [0] .L Reconstruct.C++
28 //root [1] SDigits2Digits()
29 // 2. write SDigits in a separate file, one per detector, from Hits --------------- (OK)
30 //root [0] .L Reconstruct.C++
31 //root [1] SDigits2Digits(kTRUE) // SDigits saved in [DET}.SDigits.root (DET=PHOS, EMCAL)
32
33 delete gAlice ;
34 gAlice = 0 ;
35
36 AliPHOSSDigitizer * sdp = new AliPHOSSDigitizer(fileName) ;
37 if (split)
38 sdp->SetSplitFile() ;
39 sdp->ExecuteTask("deb") ;
40
41 delete sdp ;
f51fdb38 42}
43
44//________________________________________________________________________
6abf6c3e 45void PHOSSDigits2Digits( Bool_t split=kFALSE, TString fileName = "galice.root") {
f51fdb38 46
47 // usage :
48 // 1. write SDigits in the same file as SDigits --------------- (OK)
49 //root [0] .L Reconstruct.C++
50 //root [1] SDigits2Digits()
51 // 2. write SDigits in a separate file, one per detector, from SDigits --------------- (OK)
52 //root [0] .L Reconstruct.C++
53 //root [1] SDigitsDigits(kTRUE) // Digits saved in [DET}.Digits.root (DET=PHOS, EMCAL)
54
55 delete gAlice ;
56 gAlice = 0 ;
57
58 // PHOS
59 AliPHOSDigitizer * dp = 0 ;
60
61 if (split) {
62 dp = new AliPHOSDigitizer("PHOS.SDigits.root") ;
63 dp->SetSplitFile() ; }
64 else
65 dp = new AliPHOSDigitizer(fileName) ;
66
67 dp->ExecuteTask("deb") ;
68
69 delete dp ;
f51fdb38 70}
71
72//________________________________________________________________________
6abf6c3e 73void PHOSDigits2RecPoints( Bool_t split=kFALSE, TString fileName = "galice.root") {
f51fdb38 74
75 // usage :
76 // 1. write RecPoints in the same file as Digits --------------- OK
77 //root [0] .L Reconstruct.C++
78 //root [1] Digits2RecPoints()
79 // 2. write RecPoints in a separate file, one per detector, from Digits --------------- OK
80 //root [0] .L Reconstruct.C++
81 //root [1] Digits2RecPoints(kTRUE) // RecPoints saved in [DET}.RecPoints.root (DET=PHOS, EMCAL)
82
83 delete gAlice ;
84 gAlice = 0 ;
85
f51fdb38 86 AliPHOSClusterizer * cp = 0 ;
87
88 if (split) {
89 cp = new AliPHOSClusterizerv1("PHOS.Digits.root") ;
90 cp->SetSplitFile() ; }
91 else
92 cp = new AliPHOSClusterizerv1(fileName) ;
93
94 cp->ExecuteTask("deb") ;
95
96 delete cp ;
f51fdb38 97}
98
99//________________________________________________________________________
6abf6c3e 100void PHOSRecPoints2TrackSegments( Bool_t split=kFALSE, TString fileName = "galice.root") {
f51fdb38 101
102 // usage :
103 // 1. write TrackSegments in the same file as RecPoints --------------- (OK)
104 //root [0] .L Reconstruct.C++
105 //root [1] RecPoints2TrackSegments()
106 // 2. write TrackSegments in a separate file, one per detector, from RecPoints --------------- (Not needed)
107 //root [0] .L Reconstruct.C++
108 //root [1] RecPoints2TrackSegments(kTRUE) // TrackSegments saved in [DET}.RecData.root (DET=PHOS, EMCAL)
109
110 delete gAlice ;
111 gAlice = 0 ;
112
113 AliPHOSTrackSegmentMaker * tmp = 0 ;
114
115 if (split)
116 tmp = new AliPHOSTrackSegmentMakerv1("PHOS.RecData.root") ;
117 else
118 tmp = new AliPHOSTrackSegmentMakerv1(fileName) ;
119
120 tmp->ExecuteTask("deb") ;
121
122 delete tmp ;
123}
124
125//________________________________________________________________________
6abf6c3e 126void PHOSTrackSegments2RecParticles( Bool_t split=kFALSE, TString fileName = "galice.root") {
f51fdb38 127
128 // usage :
129 // 1. write RecParticles in the same file as TrackSegments --------------- (OK)
130 //root [0] .L Reconstruct.C++
131 //root [1] TrackSegments2RecParticles()
132 // 2. write RecParticles in a separate file, one per detector, from TrackSegments --------------- (Not needed)
133 //root [0] .L Reconstruct.C++
134 //root [1] TrackSegments2RecParticles(kTRUE) // RecParticles saved in [DET}.RecData.root (DET=PHOS, EMCAL)
135
136 delete gAlice ;
137 gAlice = 0 ;
138
139 AliPHOSPID * pp = 0 ;
140
141 if (split)
142 pp = new AliPHOSPIDv1("PHOS.RecData.root") ;
143 else
144 pp = new AliPHOSPIDv1(fileName) ;
145
146 pp->ExecuteTask("deb") ;
147
148 delete pp ;
149}
150
151//________________________________________________________________________
6abf6c3e 152void PHOSDigits2RecParticles( Bool_t split=kFALSE, TString fileName = "galice.root") {
f51fdb38 153
154 // usage :
155 // 1. write RecPoints, TrackSegments and RecParticles in the same file as Digits --------------- (OK)
156 //root [0] .L Reconstruct.C++
157 //root [1] Digits2RecParticles()
158 // 2. write RecPoints , TrackSegments and RecParticles in a separate file, one per detector, from Digits --------------- (OK)
159 //root [0] .L Reconstruct.C++
160 //root [1] Digits2RecParticles(kTRUE) // TrackSegments saved in [DET}.RecData.root (DET=PHOS, EMCAL)
161
162
163 delete gAlice ;
164 gAlice = 0 ;
165
166 // PHOS
167 AliPHOSClusterizer * cp = 0 ;
168
169 if (split) {
170 cp = new AliPHOSClusterizerv1("PHOS.Digits.root") ;
171 cp->SetSplitFile() ; }
172 else
173 cp = new AliPHOSClusterizerv1(fileName) ;
174
175 cp->ExecuteTask("deb") ;
176
177 if (split)
178 delete cp ;
179
180 AliPHOSTrackSegmentMaker * tmp = 0 ;
181
182 if (split)
183 tmp = new AliPHOSTrackSegmentMakerv1("PHOS.RecData.root") ;
184 else
185 tmp = new AliPHOSTrackSegmentMakerv1(fileName) ;
186
187 tmp->ExecuteTask("deb") ;
188
189 AliPHOSPID * pp = 0 ;
190
191 if (split)
192 pp = new AliPHOSPIDv1("PHOS.RecData.root") ;
193 else
194 pp = new AliPHOSPIDv1(fileName) ;
195
196 pp->ExecuteTask("deb") ;
197
198 delete tmp;
199 delete pp ;
200}
201
202//________________________________________________________________________
6abf6c3e 203void PHOSHits2Digits (Bool_t split=kFALSE, TString fileName = "galice.root") {
f51fdb38 204 // usage :
205 // 1. write (S)Digits in the same file as Hits --------------- (OK)
206 //root [0] .L Reconstruct.C++
207 //root [1] Hits2Digits()
208 // 2. write (S)Digits in a separate file, one per detector, from Hits --------------- (OK)
209 //root [0] .L Reconstruct.C++
210 //root [1] Hits2Digits(kTRUE) // SDigits saved in [DET}.SDigits.root (DET=PHOS, EMCAL)
211 // Digits saved in [DET}.Digits.root (DET=PHOS, EMCAL)
212
213 delete gAlice ;
214 gAlice = 0 ;
215
216 //PHOS
217 AliPHOSSDigitizer * sdp = new AliPHOSSDigitizer(fileName) ;
218 if (split)
219 sdp->SetSplitFile() ;
220 sdp->ExecuteTask("deb") ;
221
222 if (split)
223 delete sdp ;
224
225 AliPHOSDigitizer * dp = 0 ;
226
227 if (split) {
228 dp = new AliPHOSDigitizer("PHOS.SDigits.root") ;
229 dp->SetSplitFile() ; }
230 else
231 dp = new AliPHOSDigitizer(fileName) ;
232
233 dp->ExecuteTask("deb") ;
234
235 if (split)
236 delete dp ;
237
238 if (!split) {
239 delete sdp ;
240 delete dp ;
241 }
f51fdb38 242}
243
244
245