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