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