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())
186 strcpy(detector, "CPV");
188 strcpy(detector, "PC ");
189 primaries = ppsdrecpoint->GetPrimaries(nprimaries);
190 cout << "DebugReconstruction>>> " <<
191 setw(4) << ppsdrecpoint->GetPHOSMod() << " " <<
192 setw(4) << detector << " " <<
193 setw(9) << 1000000.*ppsdrecpoint->GetTotalEnergy() << " " <<
194 setw(6) << ppsdrecpoint->GetIndexInList() << " " <<
195 setw(5) << ppsdrecpoint->GetMultiplicity() <<" " <<
196 setw(8) << locpos.X() <<" " <<
197 setw(8) << locpos.Y() <<" " <<
198 setw(8) << locpos.Z() << " " <<
199 setw(9) << nprimaries << " " <<
200 setw(4) << primaries[0] << " " <<
201 setw(4) << primaries[1] << " " <<
202 setw(4) << primaries[2] << " " << endl;
207 if (fDebugReconstruction) cout << "DebugReconstruction>>>> Start making track segments(unfolding+tracksegments)" << endl;
208 fTrackSegmentMaker->MakeTrackSegments(dl, emccl, ppsdl, trsl) ;
210 // mark the position of the TrackSegments in the array
211 AliPHOSTrackSegment * trs ;
212 for (index = 0 ; index < trsl->GetEntries() ; index++) {
213 trs = (AliPHOSTrackSegment * )trsl->At(index) ;
214 trs->SetIndexInList(index) ;
216 if (fDebugReconstruction){
217 cout << "DebugReconstruction>>> Track segment list entries is " << trsl->GetEntries() << endl ;
218 cout << "DebugReconstruction>>> Module " <<
232 for (index = 0 ; index < trsl->GetEntries() ; index++) {
233 trs = (AliPHOSTrackSegment * )trsl->At(index) ;
234 TVector3 locpos; trs->GetPosition(locpos);
237 primaries = trs->GetPrimariesEmc(nprimaries);
238 cout << "DebugReconstruction>>> " <<
239 setw(4) << trs->GetPHOSMod() << " " <<
240 setw(9) << 1000.*trs->GetEnergy() << " " <<
241 setw(3) << trs->GetIndexInList() << " " <<
242 setw(9) << locpos.X() <<" " <<
243 setw(9) << locpos.Y() <<" " <<
244 setw(9) << locpos.Z() << " " <<
245 setw(10) << (trs->GetMomentumDirection()).X() << " " <<
246 setw(10) << (trs->GetMomentumDirection()).Y() << " " <<
247 setw(10) << (trs->GetMomentumDirection()).Z() << " " <<
248 setw(4) << nprimaries << " " <<
249 setw(4) << primaries[0] << " " <<
250 setw(4) << primaries[1] << " " <<
251 setw(4) << primaries[2] << " " << endl;
255 if (fDebugReconstruction) cout << "DebugReconstruction>>>> Start making reconstructed particles" << endl;
257 fPID->MakeParticles(trsl, rpl) ;
259 // mark the position of the RecParticles in the array
260 AliPHOSRecParticle * rp ;
261 for (index = 0 ; index < rpl->GetEntries() ; index++) {
262 rp = (AliPHOSRecParticle * )rpl->At(index) ;
263 rp->SetIndexInList(index) ;
265 //Debugger of RecParticles
266 if (fDebugReconstruction){
267 cout << "DebugReconstruction>>> Reconstructed particle list entries is " << rpl->GetEntries() << endl ;
268 cout << "DebugReconstruction>>> Module " <<
279 for (index = 0 ; index < rpl->GetEntries() ; index++) {
280 rp = (AliPHOSRecParticle * ) rpl->At(index) ;
281 TVector3 locpos; (rp->GetPHOSTrackSegment())->GetPosition(locpos);
285 primaries = (rp->GetPHOSTrackSegment())->GetPrimariesEmc(nprimaries);
286 switch(rp->GetType())
289 strcpy( particle, "NEUTRAL_EM");
292 strcpy(particle, "NEUTRAL_HA");
295 strcpy(particle, "GAMMA");
298 strcpy(particle, "GAMMA_H");
301 strcpy(particle, "ABSURD_EM") ;
304 strcpy(particle, "ABSURD_HA") ;
307 strcpy(particle, "ELECTRON") ;
310 strcpy(particle, "CHARGED_HA") ;
314 cout << "DebugReconstruction>>> " <<
315 setw(4) << (rp->GetPHOSTrackSegment())->GetPHOSMod() << " " <<
316 setw(15) << particle << " " <<
317 setw(9) << 1000.*(rp->GetPHOSTrackSegment())->GetEnergy() << " " <<
318 setw(3) << rp->GetIndexInList() << " " <<
319 setw(9) << locpos.X() <<" " <<
320 setw(9) << locpos.Y() <<" " <<
321 setw(9) << locpos.Z() << " " <<
322 setw(4) << nprimaries << " " <<
323 setw(4) << primaries[0] << " " <<
324 setw(4) << primaries[1] << " " <<
325 setw(4) << primaries[2] << " " << endl;