]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSReconstructioner.cxx
Removing cout from AliPHOSv0hits::AddHit(Int_t, Int_t, Float_t *)
[u/mrichter/AliRoot.git] / PHOS / AliPHOSReconstructioner.cxx
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
16 /* $Id$ */
17
18 //_________________________________________________________________________
19 //  Algorithm class for the reconstruction: clusterizer
20 //                                          track segment maker
21 //                                          particle identifier   
22 //                  
23 //*-- Author: Gines Martinez & Yves Schutz (SUBATECH)
24
25
26 // --- ROOT system ---
27
28 #include "TClonesArray.h"
29
30 // --- Standard library ---
31
32 // --- AliRoot header files ---
33
34 #include "AliPHOSReconstructioner.h"
35 #include "AliPHOSClusterizer.h"
36
37 ClassImp(AliPHOSReconstructioner)
38
39 //____________________________________________________________________________
40 AliPHOSReconstructioner::AliPHOSReconstructioner(AliPHOSClusterizer * Clusterizer, 
41                                                  AliPHOSTrackSegmentMaker * Tracker,
42                                                  AliPHOSPID * Pid)
43 {
44   // ctor
45   
46   fClusterizer        = Clusterizer ;
47   fTrackSegmentMaker  = Tracker ;
48   fPID                = Pid ; 
49
50
51
52 //____________________________________________________________________________
53  void AliPHOSReconstructioner::Init(AliPHOSClusterizer * Clusterizer, 
54                                                  AliPHOSTrackSegmentMaker * Tracker,
55                                                  AliPHOSPID * Pid)
56 {
57   fClusterizer        = Clusterizer ;
58   fTrackSegmentMaker  = Tracker ;
59   fPID                = Pid ; 
60
61
62 //____________________________________________________________________________
63  void AliPHOSReconstructioner::Make(DigitsList * dl, RecPointsList * emccl, RecPointsList * ppsdl, 
64                                      TrackSegmentsList * trsl, RecParticlesList * rpl)
65 {
66   // Launches the Reconstruction process in the sequence: Make the reconstructed poins (clusterize)
67   //                                                      Make the track segments 
68   //                                                      Make the reconstructed particles
69
70   Int_t index ; 
71   
72   cout << "Start making reconstructed points (clusterizing)" << endl;
73   fClusterizer->MakeClusters(dl, emccl, ppsdl);
74
75   // mark the position of the RecPoints in the array
76   AliPHOSEmcRecPoint * emcrp ; 
77   for (index = 0 ; index < emccl->GetEntries() ; index++) {
78     emcrp = (AliPHOSEmcRecPoint * )emccl->At(index) ; 
79     emcrp->SetIndexInList(index) ; 
80   }
81
82   AliPHOSPpsdRecPoint * ppsdrp ; 
83   for (index = 0 ; index < ppsdl->GetEntries() ; index++) {
84     ppsdrp = (AliPHOSPpsdRecPoint * )ppsdl->At(index) ; 
85     ppsdrp->SetIndexInList(index) ; 
86   }
87
88   cout << "Start making track segments" << endl;
89   fTrackSegmentMaker->MakeTrackSegments(dl, emccl, ppsdl, trsl) ;   
90
91   // mark the position of the TrackSegments in the array
92   AliPHOSTrackSegment * trs ; 
93   for (index = 0 ; index < trsl->GetEntries() ; index++) {
94     trs = (AliPHOSTrackSegment * )trsl->At(index) ; 
95     trs->SetIndexInList(index) ; 
96   }
97   
98   cout << "Start making reconstructed particles" << endl;
99   fPID->MakeParticles(trsl, rpl) ; 
100   
101   // mark the position of the RecParticles in the array
102   AliPHOSRecParticle * rp ; 
103   for (index = 0 ; index < rpl->GetEntries() ; index++) {
104     rp = (AliPHOSRecParticle * )rpl->At(index) ; 
105     rp->SetIndexInList(index) ; 
106   }
107 }