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 ;
82 AliPHOSDigit * Digit;
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++) {
92 Digit = (AliPHOSDigit * ) dl->At(index) ;
93 cout << "DebugReconstruction>>> " <<
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 }
102
103 }
104
105
106 if (fDebugReconstruction) cout << "DebugReconstruction > Start making reconstructed points (clusterizing)" << endl;
d15a28e7 107 fClusterizer->MakeClusters(dl, emccl, ppsdl);
6ad0bfa0 108
364de5c6 109 cout << "Emccl list entries is " << emccl->GetEntries() << endl ;
110 cout << "Ppsdl list entries is " << emccl->GetEntries() << endl ;
111
112
113
114
83974468 115 // mark the position of the RecPoints in the array
116 AliPHOSEmcRecPoint * emcrp ;
117 for (index = 0 ; index < emccl->GetEntries() ; index++) {
118 emcrp = (AliPHOSEmcRecPoint * )emccl->At(index) ;
119 emcrp->SetIndexInList(index) ;
120 }
121
122 AliPHOSPpsdRecPoint * ppsdrp ;
123 for (index = 0 ; index < ppsdl->GetEntries() ; index++) {
124 ppsdrp = (AliPHOSPpsdRecPoint * )ppsdl->At(index) ;
125 ppsdrp->SetIndexInList(index) ;
126 }
6ad0bfa0 127
83974468 128 cout << "Start making track segments" << endl;
129 fTrackSegmentMaker->MakeTrackSegments(dl, emccl, ppsdl, trsl) ;
130
131 // mark the position of the TrackSegments in the array
132 AliPHOSTrackSegment * trs ;
133 for (index = 0 ; index < trsl->GetEntries() ; index++) {
134 trs = (AliPHOSTrackSegment * )trsl->At(index) ;
135 trs->SetIndexInList(index) ;
136 }
137
b2a60966 138 cout << "Start making reconstructed particles" << endl;
0dd37dda 139 fPID->MakeParticles(trsl, rpl) ;
83974468 140
141 // mark the position of the RecParticles in the array
142 AliPHOSRecParticle * rp ;
143 for (index = 0 ; index < rpl->GetEntries() ; index++) {
144 rp = (AliPHOSRecParticle * )rpl->At(index) ;
145 rp->SetIndexInList(index) ;
146 }
d15a28e7 147}