1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 //_________________________________________________________________________
19 // Algorithm class for the reconstruction: clusterizer
20 // track segment maker
21 // particle identifier
23 //*-- Author: Gines Martinez & Yves Schutz (SUBATECH)
26 // --- ROOT system ---
28 #include "TClonesArray.h"
30 // --- Standard library ---
34 // --- AliRoot header files ---
36 #include "AliPHOSReconstructioner.h"
37 #include "AliPHOSClusterizer.h"
39 ClassImp(AliPHOSReconstructioner)
41 //____________________________________________________________________________
42 AliPHOSReconstructioner::AliPHOSReconstructioner(AliPHOSClusterizer * Clusterizer,
43 AliPHOSTrackSegmentMaker * Tracker,
48 fClusterizer = Clusterizer ;
49 fTrackSegmentMaker = Tracker ;
51 fDebugReconstruction = kFALSE ;
55 //____________________________________________________________________________
56 void AliPHOSReconstructioner::Init(AliPHOSClusterizer * Clusterizer,
57 AliPHOSTrackSegmentMaker * Tracker,
60 fClusterizer = Clusterizer ;
61 fTrackSegmentMaker = Tracker ;
63 fDebugReconstruction = kFALSE ;
66 //____________________________________________________________________________
67 void AliPHOSReconstructioner::Make(DigitsList * dl, RecPointsList * emccl, RecPointsList * ppsdl,
68 TrackSegmentsList * trsl, RecParticlesList * rpl)
70 // Launches the Reconstruction process in the sequence: Make the reconstructed poins (clusterize)
71 // Make the track segments
72 // Make the reconstructed particles
75 if (fDebugReconstruction) {
76 cout << ">>>>>>>>>>>>>>>>>>>>>> DebugReconstruction <<<<<<<<<<<<<<<<<<<<<<<<<<" << endl ;
77 cout << "DebugReconstruction>>> Digit list entries is " << dl->GetEntries() << endl ;
81 cout << "DebugReconstruction>>> Vol Id " <<
88 for (index = 0 ; index < dl->GetEntries() ; index++) {
89 digit = (AliPHOSDigit * ) dl->At(index) ;
90 calorimeter = fClusterizer->IsInEmc(digit);
91 if (calorimeter) factor =1000. ; else factor=1000000.;
92 cout << "DebugReconstruction>>> " <<
93 setw(8) << digit->GetId() << " " <<
94 setw(3) << calorimeter <<
95 setw(10) << factor*fClusterizer->Calibrate(digit->GetAmp()) << " " <<
96 setw(6) << digit->GetIndexInList() << " " <<
97 setw(5) << digit->GetNprimary() <<" " <<
98 setw(5) << digit->GetPrimary(1) <<" " <<
99 setw(5) << digit->GetPrimary(2) <<" " <<
100 setw(5) << digit->GetPrimary(3) << endl;
108 if (fDebugReconstruction) cout << "DebugReconstruction>>> Start making reconstructed points (clusterizing)" << endl;
109 fClusterizer->MakeClusters(dl, emccl, ppsdl);
111 // mark the position of the RecPoints in the array
112 AliPHOSEmcRecPoint * emcrp ;
113 for (index = 0 ; index < emccl->GetEntries() ; index++) {
114 emcrp = (AliPHOSEmcRecPoint * )emccl->At(index) ;
115 emcrp->SetIndexInList(index) ;
117 AliPHOSPpsdRecPoint * ppsdrp ;
118 for (index = 0 ; index < ppsdl->GetEntries() ; index++) {
119 ppsdrp = (AliPHOSPpsdRecPoint * )ppsdl->At(index) ;
120 ppsdrp->SetIndexInList(index) ;
123 if (fDebugReconstruction)
125 cout << "DebugReconstruction>>> Cluster emc list entries is " << emccl->GetEntries() << endl ;
126 AliPHOSEmcRecPoint * recpoint;
127 cout << "DebugReconstruction>>> Module " <<
141 for (index = 0 ; index < emccl->GetEntries() ; index++) {
142 recpoint = (AliPHOSEmcRecPoint * )emccl->At(index) ;
143 TVector3 locpos; recpoint->GetLocalPosition(locpos);
144 Float_t lambda[2]; recpoint->GetElipsAxis(lambda);
147 primaries = recpoint->GetPrimaries(nprimaries);
148 cout << "DebugReconstruction>>> " <<
149 setw(2) <<recpoint->GetPHOSMod() << " " <<
150 setw(9) << 1000.*recpoint->GetTotalEnergy() << " " <<
151 setw(6) << recpoint->GetIndexInList() << " " <<
152 setw(5) << recpoint->GetMultiplicity() <<" " <<
153 setw(8) << locpos.X() <<" " <<
154 setw(8) << locpos.Y() <<" " <<
155 setw(8) << locpos.Z() << " " <<
156 setw(10) << lambda[0] << " " <<
157 setw(10) << lambda[1] << " " <<
158 setw(9) << 1000*recpoint->GetMaximalEnergy() << " " <<
159 setw(9) << nprimaries << " " <<
160 setw(4) << primaries[0] << " " <<
161 setw(4) << primaries[1] << " " <<
162 setw(4) << primaries[2] << " " << endl;
165 cout << "DebugReconstruction>>> Cluster ppsd list entries is " << ppsdl->GetEntries() << endl ;
166 AliPHOSPpsdRecPoint * ppsdrecpoint;
168 cout << "DebugReconstruction>>> Module " <<
180 for (index = 0 ; index < ppsdl->GetEntries() ; index++) {
181 ppsdrecpoint = (AliPHOSPpsdRecPoint * ) ppsdl->At(index) ;
182 TVector3 locpos; ppsdrecpoint->GetLocalPosition(locpos);
185 if (ppsdrecpoint->GetUp()) detector="CPV"; else detector="PC ";
186 primaries = ppsdrecpoint->GetPrimaries(nprimaries);
187 cout << "DebugReconstruction>>> " <<
188 setw(4) << ppsdrecpoint->GetPHOSMod() << " " <<
189 setw(4) << detector << " " <<
190 setw(9) << 1000000.*ppsdrecpoint->GetTotalEnergy() << " " <<
191 setw(6) << ppsdrecpoint->GetIndexInList() << " " <<
192 setw(5) << ppsdrecpoint->GetMultiplicity() <<" " <<
193 setw(8) << locpos.X() <<" " <<
194 setw(8) << locpos.Y() <<" " <<
195 setw(8) << locpos.Z() << " " <<
196 setw(9) << nprimaries << " " <<
197 setw(4) << primaries[0] << " " <<
198 setw(4) << primaries[1] << " " <<
199 setw(4) << primaries[2] << " " << endl;
204 if (fDebugReconstruction) cout << "DebugReconstruction>>>> Start making track segments(unfolding+tracksegments)" << endl;
205 fTrackSegmentMaker->MakeTrackSegments(dl, emccl, ppsdl, trsl) ;
207 // mark the position of the TrackSegments in the array
208 AliPHOSTrackSegment * trs ;
209 for (index = 0 ; index < trsl->GetEntries() ; index++) {
210 trs = (AliPHOSTrackSegment * )trsl->At(index) ;
211 trs->SetIndexInList(index) ;
213 if (fDebugReconstruction){
214 cout << "DebugReconstruction>>> Track segment list entries is " << trsl->GetEntries() << endl ;
215 cout << "DebugReconstruction>>> Module " <<
229 for (index = 0 ; index < trsl->GetEntries() ; index++) {
230 trs = (AliPHOSTrackSegment * )trsl->At(index) ;
231 TVector3 locpos; trs->GetPosition(locpos);
234 primaries = trs->GetPrimariesEmc(nprimaries);
235 cout << "DebugReconstruction>>> " <<
236 setw(4) << trs->GetPHOSMod() << " " <<
237 setw(9) << 1000.*trs->GetEnergy() << " " <<
238 setw(3) << trs->GetIndexInList() << " " <<
239 setw(9) << locpos.X() <<" " <<
240 setw(9) << locpos.Y() <<" " <<
241 setw(9) << locpos.Z() << " " <<
242 setw(10) << (trs->GetMomentumDirection()).X() << " " <<
243 setw(10) << (trs->GetMomentumDirection()).Y() << " " <<
244 setw(10) << (trs->GetMomentumDirection()).Z() << " " <<
245 setw(4) << nprimaries << " " <<
246 setw(4) << primaries[0] << " " <<
247 setw(4) << primaries[1] << " " <<
248 setw(4) << primaries[2] << " " << endl;
252 if (fDebugReconstruction) cout << "DebugReconstruction>>>> Start making reconstructed particles" << endl;
254 fPID->MakeParticles(trsl, rpl) ;
256 // mark the position of the RecParticles in the array
257 AliPHOSRecParticle * rp ;
258 for (index = 0 ; index < rpl->GetEntries() ; index++) {
259 rp = (AliPHOSRecParticle * )rpl->At(index) ;
260 rp->SetIndexInList(index) ;
262 //Debugger of RecParticles
263 if (fDebugReconstruction){
264 cout << "DebugReconstruction>>> Reconstructed particle list entries is " << rpl->GetEntries() << endl ;
265 cout << "DebugReconstruction>>> Module " <<
276 for (index = 0 ; index < rpl->GetEntries() ; index++) {
277 rp = (AliPHOSRecParticle * ) rpl->At(index) ;
278 TVector3 locpos; (rp->GetPHOSTrackSegment())->GetPosition(locpos);
282 primaries = (rp->GetPHOSTrackSegment())->GetPrimariesEmc(nprimaries);
283 switch(rp->GetType())
286 particle = "NEUTRAL_EM";
289 particle = "NEUTRAL_HA";
295 particle = "GAMMA_HA ";
298 particle = "ABSURD_EM " ;
301 particle = "ABSURD_HA " ;
304 particle = "ELECTRON " ;
307 particle = "CHARGED_HA" ;
311 cout << "DebugReconstruction>>> " <<
312 setw(4) << (rp->GetPHOSTrackSegment())->GetPHOSMod() << " " <<
313 setw(15) << particle << " " <<
314 setw(9) << 1000.*(rp->GetPHOSTrackSegment())->GetEnergy() << " " <<
315 setw(3) << rp->GetIndexInList() << " " <<
316 setw(9) << locpos.X() <<" " <<
317 setw(9) << locpos.Y() <<" " <<
318 setw(9) << locpos.Z() << " " <<
319 setw(4) << nprimaries << " " <<
320 setw(4) << primaries[0] << " " <<
321 setw(4) << primaries[1] << " " <<
322 setw(4) << primaries[2] << " " << endl;