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