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 **************************************************************************/
18 //_________________________________________________________________________
19 // Algorithm class for the identification of particles detected in PHOS
20 // base class of identified particle
21 // Why should I put meaningless comments
26 //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko
29 // --- ROOT system ---
31 #include "TClonesArray.h"
34 // --- Standard library ---
36 // --- AliRoot header files ---
37 #include "AliConfig.h"
39 #include "AliPHOSPID.h"
43 //____________________________________________________________________________
44 AliPHOSPID::AliPHOSPID():
52 fEnergyCorrectionOn(kTRUE)
58 //____________________________________________________________________________
59 AliPHOSPID::AliPHOSPID(AliPHOSGeometry *geom):
67 fEnergyCorrectionOn(kTRUE)
70 fEMCRecPoints = new TObjArray(100) ;
71 fCPVRecPoints = new TObjArray(100) ;
72 fRecParticles = new TClonesArray("AliPHOSRecParticle",100) ;
73 fRecParticles->SetName("RECPARTICLES");
77 //____________________________________________________________________________
78 AliPHOSPID::AliPHOSPID(const AliPHOSPID & pid) :
82 fEMCRecPoints(pid.fEMCRecPoints),
83 fCPVRecPoints(pid.fCPVRecPoints),
84 fTrackSegments(pid.fTrackSegments),
85 fRecParticles(pid.fRecParticles),
86 fEnergyCorrectionOn(pid.fEnergyCorrectionOn)
91 //____________________________________________________________________________
92 AliPHOSPID::~AliPHOSPID()
96 fEMCRecPoints->Delete();
100 fCPVRecPoints->Delete();
101 delete fCPVRecPoints;
104 fRecParticles->Delete();
105 delete fRecParticles;
109 //____________________________________________________________________________
110 void AliPHOSPID::SetInput(TTree *clustersTree, TClonesArray *trackSegments)
112 // Read the clusters tree and creates the
113 // arrays with the EMC and CPV
115 // and set the corresponding branch addresses
117 fTrackSegments = trackSegments;
119 TBranch *emcbranch = clustersTree->GetBranch("PHOSEmcRP");
121 AliError("can't get the branch with the PHOS EMC clusters !");
124 emcbranch->SetAddress(&fEMCRecPoints);
125 fEMCRecPoints->Delete();
126 emcbranch->GetEntry(0);
128 TBranch *cpvbranch = clustersTree->GetBranch("PHOSCpvRP");
130 AliError("can't get the branch with the PHOS CPV clusters !");
133 cpvbranch->SetAddress(&fCPVRecPoints);
134 fCPVRecPoints->Delete();
135 cpvbranch->GetEntry(0);