]>
Commit | Line | Data |
---|---|---|
fa86343a | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-2007, 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 | ||
16 | /* $Id$ */ | |
17 | ||
18 | //------------------------------------------------------------------------- | |
19 | // AOD calorimeter cluster class (for PHOS and EMCAL) | |
20 | // Author: Markus Oldenburg, CERN | |
21 | //------------------------------------------------------------------------- | |
22 | ||
23 | #include "AliAODCaloCluster.h" | |
24 | ||
25 | ClassImp(AliAODCaloCluster) | |
26 | ||
27 | //______________________________________________________________________________ | |
28 | AliAODCaloCluster::AliAODCaloCluster() : | |
29 | AliAODCluster(), | |
30 | fDistToBadChannel(-999.), | |
31 | fDispersion(-1), | |
32 | fM20(0.), | |
33 | fM01(0.), | |
34 | fM02(0.), | |
35 | fM11(0.), | |
36 | fEmcCpvDistance(-999.), | |
37 | fNExMax(0), | |
38 | fTracksMatched(), | |
39 | fCellNumber() | |
40 | { | |
41 | // default constructor | |
42 | ||
43 | } | |
44 | ||
45 | //______________________________________________________________________________ | |
46 | AliAODCaloCluster::AliAODCaloCluster(Int_t id, | |
47 | UInt_t nLabel, | |
48 | Int_t *label, | |
49 | Double_t energy, | |
50 | Double_t x[3], | |
51 | Double_t pid[9], | |
52 | Char_t ttype, | |
53 | UInt_t selectInfo) : | |
54 | AliAODCluster(id, nLabel, label, energy, x, pid, ttype, selectInfo), | |
55 | fDistToBadChannel(-999.), | |
56 | fDispersion(-1), | |
57 | fM20(0.), | |
58 | fM01(0.), | |
59 | fM02(0.), | |
60 | fM11(0.), | |
61 | fEmcCpvDistance(-999.), | |
62 | fNExMax(0), | |
63 | fTracksMatched(), | |
64 | fCellNumber() | |
65 | { | |
66 | // constructor | |
67 | ||
68 | } | |
69 | ||
70 | //______________________________________________________________________________ | |
71 | AliAODCaloCluster::AliAODCaloCluster(Int_t id, | |
72 | UInt_t nLabel, | |
73 | Int_t *label, | |
74 | Float_t energy, | |
75 | Float_t x[3], | |
76 | Float_t pid[9], | |
77 | Char_t ttype, | |
78 | UInt_t selectInfo) : | |
79 | AliAODCluster(id, nLabel, label, energy, x, pid, ttype, selectInfo), | |
80 | fDistToBadChannel(-999.), | |
81 | fDispersion(-1), | |
82 | fM20(0.), | |
83 | fM01(0.), | |
84 | fM02(0.), | |
85 | fM11(0.), | |
86 | fEmcCpvDistance(-999.), | |
87 | fNExMax(0), | |
88 | fTracksMatched(), | |
89 | fCellNumber() | |
90 | { | |
91 | // constructor | |
92 | } | |
93 | ||
94 | ||
95 | //______________________________________________________________________________ | |
96 | AliAODCaloCluster::~AliAODCaloCluster() | |
97 | { | |
98 | // destructor | |
99 | } | |
100 | ||
101 | ||
102 | //______________________________________________________________________________ | |
103 | AliAODCaloCluster::AliAODCaloCluster(const AliAODCaloCluster& clus) : | |
104 | AliAODCluster(clus), | |
105 | fDistToBadChannel(clus.fDistToBadChannel), | |
106 | fDispersion(clus.fDispersion), | |
107 | fM20(clus.fM20), | |
108 | fM01(clus.fM01), | |
109 | fM02(clus.fM02), | |
110 | fM11(clus.fM11), | |
111 | fEmcCpvDistance(clus.fEmcCpvDistance), | |
112 | fNExMax(clus.fNExMax), | |
113 | fTracksMatched(clus.fTracksMatched), | |
114 | fCellNumber(clus.fCellNumber) | |
115 | { | |
116 | // Copy constructor | |
117 | } | |
118 | ||
119 | //______________________________________________________________________________ | |
120 | AliAODCaloCluster& AliAODCaloCluster::operator=(const AliAODCaloCluster& clus) | |
121 | { | |
122 | // Assignment operator | |
123 | if(this!=&clus) { | |
124 | ||
125 | AliAODCluster::operator=(clus); | |
126 | ||
127 | fDistToBadChannel = clus.fDistToBadChannel; | |
128 | fDispersion = clus.fDispersion; | |
129 | fM20 = clus.fM20; | |
130 | fM01 = clus.fM01; | |
131 | fM02 = clus.fM02; | |
132 | fM11 = clus.fM11; | |
133 | fEmcCpvDistance = clus.fEmcCpvDistance; | |
134 | fNExMax = clus.fNExMax; | |
135 | fTracksMatched = clus.fTracksMatched; | |
136 | fCellNumber = clus.fCellNumber; | |
137 | } | |
138 | ||
139 | return *this; | |
140 | } | |
141 | ||
142 | //_______________________________________________________________________ | |
143 | Bool_t AliAODCaloCluster::HasTrackMatched(TObject *trk) const | |
144 | { | |
145 | // Checks if the given track contributed to this cluster. | |
146 | ||
147 | TRefArrayIter iter(&fTracksMatched); | |
148 | while (TObject *track = iter.Next()) { | |
149 | if (trk == track) return kTRUE; | |
150 | } | |
151 | return kFALSE; | |
152 | } |