]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSReconstructioner.cxx
Default values for fPrimary equal -1
[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
32// --- AliRoot header files ---
33
34#include "AliPHOSReconstructioner.h"
35#include "AliPHOSClusterizer.h"
36
37ClassImp(AliPHOSReconstructioner)
38
d15a28e7 39//____________________________________________________________________________
6ad0bfa0 40AliPHOSReconstructioner::AliPHOSReconstructioner(AliPHOSClusterizer * Clusterizer,
41 AliPHOSTrackSegmentMaker * Tracker,
908558fc 42 AliPHOSPID * Pid)
d15a28e7 43{
b2a60966 44 // ctor
45
6ad0bfa0 46 fClusterizer = Clusterizer ;
47 fTrackSegmentMaker = Tracker ;
908558fc 48 fPID = Pid ;
d15a28e7 49}
50
d15a28e7 51
52//____________________________________________________________________________
6ad0bfa0 53 void AliPHOSReconstructioner::Init(AliPHOSClusterizer * Clusterizer,
54 AliPHOSTrackSegmentMaker * Tracker,
908558fc 55 AliPHOSPID * Pid)
6ad0bfa0 56{
57 fClusterizer = Clusterizer ;
58 fTrackSegmentMaker = Tracker ;
908558fc 59 fPID = Pid ;
6ad0bfa0 60}
61
6ad0bfa0 62//____________________________________________________________________________
83974468 63 void AliPHOSReconstructioner::Make(DigitsList * dl, RecPointsList * emccl, RecPointsList * ppsdl,
6ad0bfa0 64 TrackSegmentsList * trsl, RecParticlesList * rpl)
d15a28e7 65{
b2a60966 66 // Launches the Reconstruction process in the sequence: Make the reconstructed poins (clusterize)
67 // Make the track segments
68 // Make the reconstructed particles
6a3f1304 69
83974468 70 Int_t index ;
71
b2a60966 72 cout << "Start making reconstructed points (clusterizing)" << endl;
d15a28e7 73 fClusterizer->MakeClusters(dl, emccl, ppsdl);
6ad0bfa0 74
83974468 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 }
6ad0bfa0 87
83974468 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
b2a60966 98 cout << "Start making reconstructed particles" << endl;
0dd37dda 99 fPID->MakeParticles(trsl, rpl) ;
83974468 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 }
d15a28e7 107}