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 **************************************************************************/
17 /* History of cvs commits:
20 * Revision 1.29 2007/08/28 12:55:08 policheh
21 * Loaders removed from the reconstruction code (C.Cheshkov)
23 * Revision 1.28 2007/08/07 14:12:03 kharlov
24 * Quality assurance added (Yves Schutz)
26 * Revision 1.27 2006/08/25 16:56:30 kharlov
27 * Compliance with Effective C++
29 * Revision 1.26 2006/08/25 16:00:53 kharlov
30 * Compliance with Effective C++AliPHOSHit.cxx
32 * Revision 1.25 2005/05/28 14:19:05 schutz
33 * Compilation warnings fixed by T.P.
37 //_________________________________________________________________________
38 // Algorithm Base class to construct PHOS track segments
39 // Associates EMC and PPSD clusters
40 // Unfolds the EMC cluster
42 //*-- Author: Dmitri Peressounko (RRC Ki & SUBATECH)
45 // --- ROOT system ---
48 // --- Standard library ---
50 // --- AliRoot header files ---
51 #include "AliPHOSTrackSegmentMaker.h"
54 ClassImp( AliPHOSTrackSegmentMaker)
57 //____________________________________________________________________________
58 AliPHOSTrackSegmentMaker:: AliPHOSTrackSegmentMaker() :
66 fEMCRecPoints = new TObjArray(100) ;
67 fCPVRecPoints = new TObjArray(100) ;
70 //____________________________________________________________________________
71 AliPHOSTrackSegmentMaker::AliPHOSTrackSegmentMaker(AliPHOSGeometry *geom):
79 fEMCRecPoints = new TObjArray(100) ;
80 fCPVRecPoints = new TObjArray(100) ;
83 //____________________________________________________________________________
84 AliPHOSTrackSegmentMaker::AliPHOSTrackSegmentMaker(const AliPHOSTrackSegmentMaker & tsmaker) :
86 fESD(tsmaker.GetESD()),
88 fEMCRecPoints(tsmaker.fEMCRecPoints),
89 fCPVRecPoints(tsmaker.fCPVRecPoints)
94 //____________________________________________________________________________
95 AliPHOSTrackSegmentMaker::~AliPHOSTrackSegmentMaker()
97 //Remove this from the parental task before destroying
99 fEMCRecPoints->Delete();
100 delete fEMCRecPoints;
103 fCPVRecPoints->Delete();
104 delete fCPVRecPoints;
108 //____________________________________________________________________________
109 void AliPHOSTrackSegmentMaker::SetInput(TTree *clustersTree)
111 // Read the clusters tree and set addresses to the
112 // arrays with the EMC and CPV clusters
114 TBranch *emcbranch = clustersTree->GetBranch("PHOSEmcRP");
116 AliError("can't get the branch with the PHOS EMC clusters !");
119 emcbranch->SetAddress(&fEMCRecPoints);
120 fEMCRecPoints->Delete();
121 emcbranch->GetEntry(0);
123 TBranch *cpvbranch = clustersTree->GetBranch("PHOSCpvRP");
125 AliError("can't get the branch with the PHOS CPV clusters !");
128 cpvbranch->SetAddress(&fCPVRecPoints);
129 fCPVRecPoints->Delete();
130 cpvbranch->GetEntry(0);