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