]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSReconstructioner.cxx
fDebugReconstruction and SetDebugReconstruction for AliPHOSReconstructioner. Debug...
[u/mrichter/AliRoot.git] / PHOS / AliPHOSReconstructioner.cxx
CommitLineData
d15a28e7 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
b2a60966 16/* $Id$ */
17
d15a28e7 18//_________________________________________________________________________
b2a60966 19// Algorithm class for the reconstruction: clusterizer
20// track segment maker
21// particle identifier
22//
23//*-- Author: Gines Martinez & Yves Schutz (SUBATECH)
24
d15a28e7 25
26// --- ROOT system ---
27
28#include "TClonesArray.h"
29
30// --- Standard library ---
31
364de5c6 32#include <iomanip>
33
d15a28e7 34// --- AliRoot header files ---
35
36#include "AliPHOSReconstructioner.h"
37#include "AliPHOSClusterizer.h"
38
39ClassImp(AliPHOSReconstructioner)
40
d15a28e7 41//____________________________________________________________________________
6ad0bfa0 42AliPHOSReconstructioner::AliPHOSReconstructioner(AliPHOSClusterizer * Clusterizer,
43 AliPHOSTrackSegmentMaker * Tracker,
908558fc 44 AliPHOSPID * Pid)
d15a28e7 45{
b2a60966 46 // ctor
47
6ad0bfa0 48 fClusterizer = Clusterizer ;
49 fTrackSegmentMaker = Tracker ;
908558fc 50 fPID = Pid ;
364de5c6 51 fDebugReconstruction = kFALSE ;
d15a28e7 52}
53
d15a28e7 54
55//____________________________________________________________________________
6ad0bfa0 56 void AliPHOSReconstructioner::Init(AliPHOSClusterizer * Clusterizer,
57 AliPHOSTrackSegmentMaker * Tracker,
908558fc 58 AliPHOSPID * Pid)
6ad0bfa0 59{
60 fClusterizer = Clusterizer ;
61 fTrackSegmentMaker = Tracker ;
908558fc 62 fPID = Pid ;
364de5c6 63 fDebugReconstruction = kFALSE ;
6ad0bfa0 64}
65
6ad0bfa0 66//____________________________________________________________________________
83974468 67 void AliPHOSReconstructioner::Make(DigitsList * dl, RecPointsList * emccl, RecPointsList * ppsdl,
6ad0bfa0 68 TrackSegmentsList * trsl, RecParticlesList * rpl)
d15a28e7 69{
b2a60966 70 // Launches the Reconstruction process in the sequence: Make the reconstructed poins (clusterize)
71 // Make the track segments
72 // Make the reconstructed particles
6a3f1304 73
83974468 74 Int_t index ;
364de5c6 75 // Digit Debuging
76
77
78 if (fDebugReconstruction)
79 {
80 cout << ">>>>>>>>>>>>>>>>>>>>>> DebugReconstruction <<<<<<<<<<<<<<<<<<<<<<<<<<" << endl ;
81 cout << "DebugReconstruction>>> Digit list entries is " << dl->GetEntries() << endl ;
2885696f 82 AliPHOSDigit * digit;
364de5c6 83 cout << "DebugReconstruction>>> Vol Id " <<
84 " Energy (MeV) " <<
85 " Index " <<
86 " Nprim " <<
87 " Prim1 " <<
88 " Prim2 " <<
89 " Prim3 " << endl;
90
91 for (index = 0 ; index < dl->GetEntries() ; index++) {
2885696f 92 digit = (AliPHOSDigit * ) dl->At(index) ;
364de5c6 93 cout << "DebugReconstruction>>> " <<
2885696f 94 setw(8) << digit->GetId() << " " <<
95 setw(10) << 1000.*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;
101 }
364de5c6 102
103 }
104
105
2885696f 106
107 // Making Clusters
108 if (fDebugReconstruction) cout << "DebugReconstruction>>>> Start making reconstructed points (clusterizing)" << endl;
d15a28e7 109 fClusterizer->MakeClusters(dl, emccl, ppsdl);
6ad0bfa0 110
2885696f 111
112 if (fDebugReconstruction)
113 {
114 cout << ">>>>>>>>>>>>>>>>>>>>>> DebugReconstruction <<<<<<<<<<<<<<<<<<<<<<<<<<" << endl ;
115 cout << "DebugReconstruction>>> Cluster list entries is " << emccl->GetEntries() << endl ;
116 AliPHOSEmcRecPoint * recpoint;
117 cout << "DebugReconstruction>>> Module" <<
118 "Energy(MeV)" <<
119 "Index " <<
120 "Multi " <<
121 " X " <<
122 " Y " <<
123 " Z " <<
124 " Lambda 1 " <<
125 " Lambda 2 " <<
126 "MaxEnergy(MeV) " <<
127 "Nprim " <<
128 "Prim1 " <<
129 "Prim2 " <<
130 "Prim3 " <<
131endl;
132 for (index = 0 ; index < emccl->GetEntries() ; index++) {
133 recpoint = (AliPHOSEmcRecPoint * )emccl->At(index) ;
134 TVector3 locpos; recpoint->GetLocalPosition(locpos);
135 Float_t lambda[2]; recpoint->GetElipsAxis(lambda);
136 Int_t * primaries;
137 Int_t nprimaries;
138 primaries = recpoint->GetPrimaries(nprimaries);
139 cout << "DebugReconstruction>>> " <<
140 setw(2) <<recpoint->GetPHOSMod() << " " <<
141 setw(9) << 1000.*recpoint->GetTotalEnergy() << " " <<
142 setw(6) << recpoint->GetIndexInList() << " " <<
143 setw(5) << recpoint->GetMultiplicity() <<" " <<
144 setw(8) << locpos.X() <<" " <<
145 setw(8) << locpos.Y() <<" " <<
146 setw(8) << locpos.Z() << " " <<
147 setw(10) << lambda[0] << " " <<
148 setw(10) << lambda[1] << " " <<
149 setw(9) << 1000*recpoint->GetMaximalEnergy() << " " <<
150 setw(9) << nprimaries << " " <<
151 setw(4) << primaries[0] << " " <<
152 setw(4) << primaries[1] << " " <<
153 setw(4) << primaries[2] << " " << endl;
154
155 }
156
157 }
158
364de5c6 159 cout << "Ppsdl list entries is " << emccl->GetEntries() << endl ;
160
161
162
163
83974468 164 // mark the position of the RecPoints in the array
165 AliPHOSEmcRecPoint * emcrp ;
166 for (index = 0 ; index < emccl->GetEntries() ; index++) {
167 emcrp = (AliPHOSEmcRecPoint * )emccl->At(index) ;
168 emcrp->SetIndexInList(index) ;
169 }
170
171 AliPHOSPpsdRecPoint * ppsdrp ;
172 for (index = 0 ; index < ppsdl->GetEntries() ; index++) {
173 ppsdrp = (AliPHOSPpsdRecPoint * )ppsdl->At(index) ;
174 ppsdrp->SetIndexInList(index) ;
175 }
6ad0bfa0 176
83974468 177 cout << "Start making track segments" << endl;
178 fTrackSegmentMaker->MakeTrackSegments(dl, emccl, ppsdl, trsl) ;
179
180 // mark the position of the TrackSegments in the array
181 AliPHOSTrackSegment * trs ;
182 for (index = 0 ; index < trsl->GetEntries() ; index++) {
183 trs = (AliPHOSTrackSegment * )trsl->At(index) ;
184 trs->SetIndexInList(index) ;
185 }
186
b2a60966 187 cout << "Start making reconstructed particles" << endl;
0dd37dda 188 fPID->MakeParticles(trsl, rpl) ;
83974468 189
190 // mark the position of the RecParticles in the array
191 AliPHOSRecParticle * rp ;
192 for (index = 0 ; index < rpl->GetEntries() ; index++) {
193 rp = (AliPHOSRecParticle * )rpl->At(index) ;
194 rp->SetIndexInList(index) ;
195 }
d15a28e7 196}