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 // --- Standard library ---
33 // --- AliRoot header files ---
34 #include "AliConfig.h"
35 #include "AliPHOSPID.h"
36 #include "AliPHOSGetter.h"
37 #include "AliPHOSQualAssDataMaker.h"
41 //____________________________________________________________________________
42 AliPHOSPID::AliPHOSPID():
56 //____________________________________________________________________________
57 AliPHOSPID::AliPHOSPID(AliPHOSGeometry *geom):
68 fRecParticles = new TClonesArray("AliPHOSRecParticle",100) ;
69 fRecParticles->SetName("RECPARTICLES");
71 fQADM = new AliPHOSQualAssDataMaker() ; //!Quality Assurance Data Maker
72 GetQualAssDataMaker()->Init(AliQualAss::kRECPARTICLES) ;
75 //____________________________________________________________________________
76 AliPHOSPID::AliPHOSPID(const AliPHOSPID & pid) :
80 fEMCRecPoints(pid.fEMCRecPoints),
81 fCPVRecPoints(pid.fCPVRecPoints),
82 fTrackSegments(pid.fTrackSegments),
83 fRecParticles(pid.fRecParticles),
89 //____________________________________________________________________________
90 AliPHOSPID::~AliPHOSPID()
94 fEMCRecPoints->Delete();
98 fCPVRecPoints->Delete();
104 //____________________________________________________________________________
105 void AliPHOSPID::SetInput(TTree *clustersTree, TClonesArray *trackSegments)
107 // Read the clusters tree and creates the
108 // arrays with the EMC and CPV
110 // and set the corresponding branch addresses
112 fTrackSegments = trackSegments;
114 TBranch *emcbranch = clustersTree->GetBranch("PHOSEmcRP");
116 AliError("can't get the branch with the PHOS EMC clusters !");
119 fEMCRecPoints = new TObjArray(100) ;
120 emcbranch->SetAddress(&fEMCRecPoints);
121 emcbranch->GetEntry(0);
123 TBranch *cpvbranch = clustersTree->GetBranch("PHOSCpvRP");
125 AliError("can't get the branch with the PHOS CPV clusters !");
128 fCPVRecPoints = new TObjArray(100) ;
129 cpvbranch->SetAddress(&fCPVRecPoints);
130 cpvbranch->GetEntry(0);