1 /**************************************************************************
2 * Copyright(c) 1998-2007, 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 // AOD calorimeter cluster class (for PHOS and EMCAL)
20 // Author: Markus Oldenburg, CERN
21 //-------------------------------------------------------------------------
23 #include "AliAODCaloCluster.h"
25 ClassImp(AliAODCaloCluster)
27 //______________________________________________________________________________
28 AliAODCaloCluster::AliAODCaloCluster() :
30 fDistToBadChannel(-999.),
36 fEmcCpvDistance(-999.),
41 // default constructor
45 //______________________________________________________________________________
46 AliAODCaloCluster::AliAODCaloCluster(Int_t id,
54 AliAODCluster(id, nLabel, label, energy, x, pid, ttype, selectInfo),
55 fDistToBadChannel(-999.),
61 fEmcCpvDistance(-999.),
70 //______________________________________________________________________________
71 AliAODCaloCluster::AliAODCaloCluster(Int_t id,
79 AliAODCluster(id, nLabel, label, energy, x, pid, ttype, selectInfo),
80 fDistToBadChannel(-999.),
86 fEmcCpvDistance(-999.),
95 //______________________________________________________________________________
96 AliAODCaloCluster::~AliAODCaloCluster()
102 //______________________________________________________________________________
103 AliAODCaloCluster::AliAODCaloCluster(const AliAODCaloCluster& clus) :
105 fDistToBadChannel(clus.fDistToBadChannel),
106 fDispersion(clus.fDispersion),
111 fEmcCpvDistance(clus.fEmcCpvDistance),
112 fNExMax(clus.fNExMax),
113 fTracksMatched(clus.fTracksMatched),
114 fCellNumber(clus.fCellNumber)
119 //______________________________________________________________________________
120 AliAODCaloCluster& AliAODCaloCluster::operator=(const AliAODCaloCluster& clus)
122 // Assignment operator
125 AliAODCluster::operator=(clus);
127 fDistToBadChannel = clus.fDistToBadChannel;
128 fDispersion = clus.fDispersion;
133 fEmcCpvDistance = clus.fEmcCpvDistance;
134 fNExMax = clus.fNExMax;
135 fTracksMatched = clus.fTracksMatched;
136 fCellNumber = clus.fCellNumber;
142 //_______________________________________________________________________
143 Bool_t AliAODCaloCluster::HasTrackMatched(TObject *trk) const
145 // Checks if the given track contributed to this cluster.
147 TRefArrayIter iter(&fTracksMatched);
148 while (TObject *track = iter.Next()) {
149 if (trk == track) return kTRUE;