]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSPID.cxx
TPCNoiseMapComponent included into build (Kelly)
[u/mrichter/AliRoot.git] / PHOS / AliPHOSPID.cxx
CommitLineData
6ad0bfa0 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
6ad0bfa0 18//_________________________________________________________________________
b2a60966 19// Algorithm class for the identification of particles detected in PHOS
2f04ed65 20// base class of identified particle
21// Why should I put meaningless comments
22// just to satisfy
23// the code checker
24
b2a60966 25//
7acf6008 26//*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko
b2a60966 27
6ad0bfa0 28
29// --- ROOT system ---
e957fea8 30
6ad0bfa0 31// --- Standard library ---
6ad0bfa0 32
6ad0bfa0 33// --- AliRoot header files ---
e957fea8 34#include "AliConfig.h"
26d4b141 35#include "AliPHOSPID.h"
b135d5f2 36#include "AliPHOSGetter.h"
6ad0bfa0 37
26d4b141 38ClassImp(AliPHOSPID)
6ad0bfa0 39
40//____________________________________________________________________________
0378398c 41AliPHOSPID::AliPHOSPID():
9a2cdbdf 42 TObject(),
43 fGeom(NULL),
44 fESD(0x0),
45 fEMCRecPoints(NULL),
46 fCPVRecPoints(NULL),
47 fTrackSegments(NULL),
d76c31f4 48 fRecParticles(NULL)
6ad0bfa0 49{
50 // ctor
51}
7b7c1533 52
8d0f3f77 53
7acf6008 54//____________________________________________________________________________
9a2cdbdf 55AliPHOSPID::AliPHOSPID(AliPHOSGeometry *geom):
56 TObject(),
57 fGeom(geom),
58 fESD(0x0),
59 fEMCRecPoints(NULL),
60 fCPVRecPoints(NULL),
61 fTrackSegments(NULL),
d76c31f4 62 fRecParticles(NULL)
7acf6008 63{
64 // ctor
9a2cdbdf 65 fRecParticles = new TClonesArray("AliPHOSRecParticle",100) ;
66 fRecParticles->SetName("RECPARTICLES");
67
b2820c13 68}
69
e2429969 70//____________________________________________________________________________
71AliPHOSPID::AliPHOSPID(const AliPHOSPID & pid) :
9a2cdbdf 72 TObject(pid),
73 fGeom(pid.fGeom),
ddd1a39c 74 fESD(pid.fESD),
9a2cdbdf 75 fEMCRecPoints(pid.fEMCRecPoints),
76 fCPVRecPoints(pid.fCPVRecPoints),
77 fTrackSegments(pid.fTrackSegments),
d76c31f4 78 fRecParticles(pid.fRecParticles)
e2429969 79{
80 // Copy constructor
81}
9a2cdbdf 82
6ad0bfa0 83//____________________________________________________________________________
26d4b141 84AliPHOSPID::~AliPHOSPID()
6ad0bfa0 85{
86 // dtor
9a2cdbdf 87 if (fEMCRecPoints) {
88 fEMCRecPoints->Delete();
89 delete fEMCRecPoints;
90 }
91 if (fCPVRecPoints) {
92 fCPVRecPoints->Delete();
93 delete fCPVRecPoints;
94 }
8d0f3f77 95}
88cb7938 96
9a2cdbdf 97//____________________________________________________________________________
98void AliPHOSPID::SetInput(TTree *clustersTree, TClonesArray *trackSegments)
99{
100 // Read the clusters tree and creates the
101 // arrays with the EMC and CPV
102 // clusters.
103 // and set the corresponding branch addresses
104
105 fTrackSegments = trackSegments;
106
107 TBranch *emcbranch = clustersTree->GetBranch("PHOSEmcRP");
108 if (!emcbranch) {
109 AliError("can't get the branch with the PHOS EMC clusters !");
110 return;
111 }
112 fEMCRecPoints = new TObjArray(100) ;
113 emcbranch->SetAddress(&fEMCRecPoints);
114 emcbranch->GetEntry(0);
115
116 TBranch *cpvbranch = clustersTree->GetBranch("PHOSCpvRP");
117 if (!cpvbranch) {
118 AliError("can't get the branch with the PHOS CPV clusters !");
119 return;
120 }
121 fCPVRecPoints = new TObjArray(100) ;
122 cpvbranch->SetAddress(&fCPVRecPoints);
123 cpvbranch->GetEntry(0);
124}