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
78 if (fDebugReconstruction)
80 cout << ">>>>>>>>>>>>>>>>>>>>>> DebugReconstruction <<<<<<<<<<<<<<<<<<<<<<<<<<" << endl ;
81 cout << "DebugReconstruction>>> Digit list entries is " << dl->GetEntries() << endl ;
85 cout << "DebugReconstruction>>> Vol Id " <<
93 for (index = 0 ; index < dl->GetEntries() ; index++) {
94 digit = (AliPHOSDigit * ) dl->At(index) ;
95 calorimeter = fClusterizer->IsInEmc(digit);
96 if (calorimeter) factor =1000. ; else factor=1000000.;
97 cout << "DebugReconstruction>>> " <<
98 setw(8) << digit->GetId() << " " <<
99 setw(3) << calorimeter <<
100 setw(10) << factor*fClusterizer->Calibrate(digit->GetAmp()) << " " <<
101 setw(6) << digit->GetIndexInList() << " " <<
102 setw(5) << digit->GetNprimary() <<" " <<
103 setw(5) << digit->GetPrimary(1) <<" " <<
104 setw(5) << digit->GetPrimary(2) <<" " <<
105 setw(5) << digit->GetPrimary(3) << endl;
113 if (fDebugReconstruction) cout << "DebugReconstruction>>> Start making reconstructed points (clusterizing)" << endl;
114 fClusterizer->MakeClusters(dl, emccl, ppsdl);
116 // mark the position of the RecPoints in the array
117 AliPHOSEmcRecPoint * emcrp ;
118 for (index = 0 ; index < emccl->GetEntries() ; index++) {
119 emcrp = (AliPHOSEmcRecPoint * )emccl->At(index) ;
120 emcrp->SetIndexInList(index) ;
122 AliPHOSPpsdRecPoint * ppsdrp ;
123 for (index = 0 ; index < ppsdl->GetEntries() ; index++) {
124 ppsdrp = (AliPHOSPpsdRecPoint * )ppsdl->At(index) ;
125 ppsdrp->SetIndexInList(index) ;
128 if (fDebugReconstruction)
130 cout << "DebugReconstruction>>> Cluster emc list entries is " << emccl->GetEntries() << endl ;
131 AliPHOSEmcRecPoint * recpoint;
132 cout << "DebugReconstruction>>> Module " <<
146 for (index = 0 ; index < emccl->GetEntries() ; index++) {
147 recpoint = (AliPHOSEmcRecPoint * )emccl->At(index) ;
148 TVector3 locpos; recpoint->GetLocalPosition(locpos);
149 Float_t lambda[2]; recpoint->GetElipsAxis(lambda);
152 primaries = recpoint->GetPrimaries(nprimaries);
153 cout << "DebugReconstruction>>> " <<
154 setw(2) <<recpoint->GetPHOSMod() << " " <<
155 setw(9) << 1000.*recpoint->GetTotalEnergy() << " " <<
156 setw(6) << recpoint->GetIndexInList() << " " <<
157 setw(5) << recpoint->GetMultiplicity() <<" " <<
158 setw(8) << locpos.X() <<" " <<
159 setw(8) << locpos.Y() <<" " <<
160 setw(8) << locpos.Z() << " " <<
161 setw(10) << lambda[0] << " " <<
162 setw(10) << lambda[1] << " " <<
163 setw(9) << 1000*recpoint->GetMaximalEnergy() << " " <<
164 setw(9) << nprimaries << " " <<
165 setw(4) << primaries[0] << " " <<
166 setw(4) << primaries[1] << " " <<
167 setw(4) << primaries[2] << " " << endl;
170 cout << "DebugReconstruction>>> Cluster ppsd list entries is " << ppsdl->GetEntries() << endl ;
171 AliPHOSPpsdRecPoint * ppsdrecpoint;
173 cout << "DebugReconstruction>>> Module " <<
185 for (index = 0 ; index < ppsdl->GetEntries() ; index++) {
186 ppsdrecpoint = (AliPHOSPpsdRecPoint * ) ppsdl->At(index) ;
187 TVector3 locpos; ppsdrecpoint->GetLocalPosition(locpos);
190 if (ppsdrecpoint->GetUp()) detector="CPV"; else detector="PC ";
191 primaries = ppsdrecpoint->GetPrimaries(nprimaries);
192 cout << "DebugReconstruction>>> " <<
193 setw(4) << ppsdrecpoint->GetPHOSMod() << " " <<
194 setw(4) << detector << " " <<
195 setw(9) << 1000000.*ppsdrecpoint->GetTotalEnergy() << " " <<
196 setw(6) << ppsdrecpoint->GetIndexInList() << " " <<
197 setw(5) << ppsdrecpoint->GetMultiplicity() <<" " <<
198 setw(8) << locpos.X() <<" " <<
199 setw(8) << locpos.Y() <<" " <<
200 setw(8) << locpos.Z() << " " <<
201 setw(9) << nprimaries << " " <<
202 setw(4) << primaries[0] << " " <<
203 setw(4) << primaries[1] << " " <<
204 setw(4) << primaries[2] << " " << endl;
209 if (fDebugReconstruction) cout << "DebugReconstruction>>>> Start making track segments(unfolding+tracksegments)" << endl;
210 fTrackSegmentMaker->MakeTrackSegments(dl, emccl, ppsdl, trsl) ;
212 // mark the position of the TrackSegments in the array
213 AliPHOSTrackSegment * trs ;
214 for (index = 0 ; index < trsl->GetEntries() ; index++) {
215 trs = (AliPHOSTrackSegment * )trsl->At(index) ;
216 trs->SetIndexInList(index) ;
218 if (fDebugReconstruction){
219 cout << "DebugReconstruction>>> Track segment list entries is " << trsl->GetEntries() << endl ;
220 cout << "DebugReconstruction>>> Module " <<
234 for (index = 0 ; index < trsl->GetEntries() ; index++) {
235 trs = (AliPHOSTrackSegment * )trsl->At(index) ;
236 TVector3 locpos; trs->GetPosition(locpos);
239 primaries = trs->GetPrimariesEmc(nprimaries);
240 cout << "DebugReconstruction>>> " <<
241 setw(4) << trs->GetPHOSMod() << " " <<
242 setw(9) << 1000.*trs->GetEnergy() << " " <<
243 setw(3) << trs->GetIndexInList() << " " <<
244 setw(9) << locpos.X() <<" " <<
245 setw(9) << locpos.Y() <<" " <<
246 setw(9) << locpos.Z() << " " <<
247 setw(10) << (trs->GetMomentumDirection()).X() << " " <<
248 setw(10) << (trs->GetMomentumDirection()).Y() << " " <<
249 setw(10) << (trs->GetMomentumDirection()).Z() << " " <<
250 setw(4) << nprimaries << " " <<
251 setw(4) << primaries[0] << " " <<
252 setw(4) << primaries[1] << " " <<
253 setw(4) << primaries[2] << " " << endl;
257 if (fDebugReconstruction) cout << "DebugReconstruction>>>> Start making particles" << endl;
259 fPID->MakeParticles(trsl, rpl) ;
261 // mark the position of the RecParticles in the array
262 AliPHOSRecParticle * rp ;
263 for (index = 0 ; index < rpl->GetEntries() ; index++) {
264 rp = (AliPHOSRecParticle * )rpl->At(index) ;
265 rp->SetIndexInList(index) ;