]>
Commit | Line | Data |
---|---|---|
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 --- | |
7fb9892d | 30 | #include "TBranch.h" |
31 | #include "TClonesArray.h" | |
32 | #include "TTree.h" | |
e957fea8 | 33 | |
6ad0bfa0 | 34 | // --- Standard library --- |
6ad0bfa0 | 35 | |
6ad0bfa0 | 36 | // --- AliRoot header files --- |
e957fea8 | 37 | #include "AliConfig.h" |
7fb9892d | 38 | #include "AliLog.h" |
26d4b141 | 39 | #include "AliPHOSPID.h" |
6ad0bfa0 | 40 | |
26d4b141 | 41 | ClassImp(AliPHOSPID) |
6ad0bfa0 | 42 | |
43 | //____________________________________________________________________________ | |
0378398c | 44 | AliPHOSPID::AliPHOSPID(): |
9a2cdbdf | 45 | TObject(), |
46 | fGeom(NULL), | |
47 | fESD(0x0), | |
48 | fEMCRecPoints(NULL), | |
49 | fCPVRecPoints(NULL), | |
50 | fTrackSegments(NULL), | |
d76c31f4 | 51 | fRecParticles(NULL) |
6ad0bfa0 | 52 | { |
53 | // ctor | |
54 | } | |
7b7c1533 | 55 | |
8d0f3f77 | 56 | |
7acf6008 | 57 | //____________________________________________________________________________ |
9a2cdbdf | 58 | AliPHOSPID::AliPHOSPID(AliPHOSGeometry *geom): |
59 | TObject(), | |
60 | fGeom(geom), | |
61 | fESD(0x0), | |
62 | fEMCRecPoints(NULL), | |
63 | fCPVRecPoints(NULL), | |
64 | fTrackSegments(NULL), | |
d76c31f4 | 65 | fRecParticles(NULL) |
7acf6008 | 66 | { |
67 | // ctor | |
9a2cdbdf | 68 | fRecParticles = new TClonesArray("AliPHOSRecParticle",100) ; |
69 | fRecParticles->SetName("RECPARTICLES"); | |
70 | ||
b2820c13 | 71 | } |
72 | ||
e2429969 | 73 | //____________________________________________________________________________ |
74 | AliPHOSPID::AliPHOSPID(const AliPHOSPID & pid) : | |
9a2cdbdf | 75 | TObject(pid), |
76 | fGeom(pid.fGeom), | |
ddd1a39c | 77 | fESD(pid.fESD), |
9a2cdbdf | 78 | fEMCRecPoints(pid.fEMCRecPoints), |
79 | fCPVRecPoints(pid.fCPVRecPoints), | |
80 | fTrackSegments(pid.fTrackSegments), | |
d76c31f4 | 81 | fRecParticles(pid.fRecParticles) |
e2429969 | 82 | { |
83 | // Copy constructor | |
84 | } | |
9a2cdbdf | 85 | |
6ad0bfa0 | 86 | //____________________________________________________________________________ |
26d4b141 | 87 | AliPHOSPID::~AliPHOSPID() |
6ad0bfa0 | 88 | { |
89 | // dtor | |
9a2cdbdf | 90 | if (fEMCRecPoints) { |
91 | fEMCRecPoints->Delete(); | |
92 | delete fEMCRecPoints; | |
93 | } | |
94 | if (fCPVRecPoints) { | |
95 | fCPVRecPoints->Delete(); | |
96 | delete fCPVRecPoints; | |
97 | } | |
8d0f3f77 | 98 | } |
88cb7938 | 99 | |
9a2cdbdf | 100 | //____________________________________________________________________________ |
101 | void AliPHOSPID::SetInput(TTree *clustersTree, TClonesArray *trackSegments) | |
102 | { | |
103 | // Read the clusters tree and creates the | |
104 | // arrays with the EMC and CPV | |
105 | // clusters. | |
106 | // and set the corresponding branch addresses | |
107 | ||
108 | fTrackSegments = trackSegments; | |
109 | ||
110 | TBranch *emcbranch = clustersTree->GetBranch("PHOSEmcRP"); | |
111 | if (!emcbranch) { | |
112 | AliError("can't get the branch with the PHOS EMC clusters !"); | |
113 | return; | |
114 | } | |
115 | fEMCRecPoints = new TObjArray(100) ; | |
116 | emcbranch->SetAddress(&fEMCRecPoints); | |
117 | emcbranch->GetEntry(0); | |
118 | ||
119 | TBranch *cpvbranch = clustersTree->GetBranch("PHOSCpvRP"); | |
120 | if (!cpvbranch) { | |
121 | AliError("can't get the branch with the PHOS CPV clusters !"); | |
122 | return; | |
123 | } | |
124 | fCPVRecPoints = new TObjArray(100) ; | |
125 | cpvbranch->SetAddress(&fCPVRecPoints); | |
126 | cpvbranch->GetEntry(0); | |
127 | } |