AliRoot Core  3dc7879 (3dc7879)
AliESDCaloCluster.h
Go to the documentation of this file.
1 #ifndef ALIESDCALOCLUSTER_H
2 #define ALIESDCALOCLUSTER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 //-------------------------------------------------------------------------
17 //-------------------------------------------------------------------------
18 
19 #include <AliVCluster.h>
20 #include "AliPID.h"
21 #include "TArrayS.h"
22 #include "TArrayI.h"
23 #include "AliLog.h"
24 
25 class TLorentzVector;
26 
28 {
29 
30  public:
31 
35  virtual ~AliESDCaloCluster();
36  virtual void Copy(TObject &) const;
37  void Clear(const Option_t*);
38 
39  void SetID(Int_t id) {fID = id;}
40  Int_t GetID() const {return fID;}
41 
42  void SetType(Char_t type) { fClusterType = type; }
43  Char_t GetType() const {return fClusterType; }
44 
45  Bool_t IsEMCAL() const {if(fClusterType == kEMCALClusterv1) return kTRUE; else return kFALSE;}
46  Bool_t IsPHOS() const {if(fClusterType == kPHOSNeutral || fClusterType == kPHOSCharged) return kTRUE;
47  else return kFALSE;}
48 
49  void GetPosition (Float_t *x) const {
50  x[0]=fGlobalPos[0]; x[1]=fGlobalPos[1]; x[2]=fGlobalPos[2];}
51  void SetPosition (Float_t *x);
52  void SetPositionAt(Float_t pos, Int_t ipos) {if(ipos>=0 && ipos<3) fGlobalPos[ipos] = pos ;
53  else AliInfo(Form("Bad index for position array, i = %d\n",ipos));}
54 
55  void SetE(Double_t ene) { fEnergy = ene;}
56  Double_t E() const { return fEnergy;}
57 
58  void SetDispersion(Double_t disp) { fDispersion = disp; }
59  Double_t GetDispersion() const { return fDispersion; }
60 
61  void SetChi2(Double_t chi2) { fChi2 = chi2; }
62  Double_t Chi2() const { return fChi2; }
63 
64  const Double_t *GetPID() const { return fPID; }
65  //for(Int_t i=0; i<AliPID::kSPECIESCN; ++i) pid[i]=fPID[i];}
66  void SetPID (const Float_t *pid) ;
67  void SetPIDAt(Float_t p, Int_t i) {if(i>=0 && i<AliPID::kSPECIESCN) fPID[i] = p ;
68  else AliInfo(Form("Bad index for PID array, i = %d \n",i));}
69 
70  void SetM20(Double_t m20) { fM20 = m20; }
71  Double_t GetM20() const { return fM20; }
72 
73  void SetM02(Double_t m02) { fM02 = m02; }
74  Double_t GetM02() const { return fM02; }
75 
76  void SetNExMax(UChar_t nExMax) { fNExMax = nExMax; }
77  UChar_t GetNExMax() const { return fNExMax; }
78 
79  void SetEmcCpvDistance(Double_t dEmcCpv) { fEmcCpvDistance = dEmcCpv; }
80  Double_t GetEmcCpvDistance() const { return fEmcCpvDistance; }
81  void SetTrackDistance(Double_t dx, Double_t dz){fTrackDx=dx; fTrackDz=dz;}
82  Double_t GetTrackDx(void)const {return fTrackDx;}
83  Double_t GetTrackDz(void)const {return fTrackDz;}
84 
85  void SetDistanceToBadChannel(Double_t dist) {fDistToBadChannel=dist;}
86  Double_t GetDistanceToBadChannel() const {return fDistToBadChannel;}
87 
88  void SetTOF(Double_t tof) { fTOF = tof; }
89  Double_t GetTOF() const { return fTOF; }
90 
91  void AddTracksMatched(TArrayI & array) {
92  if(!fTracksMatched)fTracksMatched = new TArrayI(array);
93  else *fTracksMatched = array;
94  }
95 
96  void AddLabels(TArrayI & array) {
97  if(!fLabels)fLabels = new TArrayI(array) ;
98  else *fLabels = array;
99  fNLabel = fLabels->GetSize();
100  }
101 
102  void SetLabel(Int_t *array, UInt_t size){
103  if(fLabels) delete fLabels ;
104  fLabels = new TArrayI(size,array);
105  fNLabel = size;
106  }
107 
108  TArrayI * GetTracksMatched() const {return fTracksMatched;}
109  TArrayI * GetLabelsArray() const {return fLabels;}
110  Int_t * GetLabels() const {if (fLabels) return fLabels->GetArray(); else return 0;}
111 
112  Int_t GetTrackMatchedIndex(Int_t i = 0) const;
113 
115  Int_t GetLabel() const {
116  if( fLabels && fLabels->GetSize() >0) return fLabels->At(0);
117  else return -1;}
118 
119  Int_t GetLabelAt(UInt_t i) const {
120  if (fLabels && i < (UInt_t)fLabels->GetSize()) return fLabels->At(i);
121  else return -999; }
122 
123  Int_t GetNTracksMatched() const { if (fTracksMatched) return fTracksMatched->GetSize();
124  else return -1;}
125 
126  UInt_t GetNLabels() const { if (fLabels) return fLabels->GetSize();
127  else return (0);}
128 
129  void GetMomentum(TLorentzVector& p, const Double_t * vertexPosition ) const;
130  void GetMomentum(TLorentzVector& p, const Double_t * vertexPosition, VCluUserDefEnergy_t t ) const;
131 
132  void SetNCells(Int_t n) { fNCells = n;}
133  Int_t GetNCells() const { return fNCells;}
134 
135  void SetCellsAbsId(UShort_t *array) ;
136  UShort_t *GetCellsAbsId() {return fCellsAbsId;}
137 
138  void SetCellsAmplitudeFraction(Double32_t *array) ;
140 
141  Int_t GetCellAbsId(Int_t i) const {
142  if (fCellsAbsId && i >=0 && i < fNCells ) return fCellsAbsId[i];
143  else return -1;}
144 
145  Double_t GetCellAmplitudeFraction(Int_t i) const {
146  if (fCellsAmpFraction && i >=0 && i < fNCells ) return fCellsAmpFraction[i];
147  else return -1;}
148 
149  Double_t GetCoreEnergy() const { return fCoreEnergy ; }
150  void SetCoreEnergy(Double_t e) { fCoreEnergy = e ; }
151 
152  Double_t GetMCEnergyFraction() const { return fMCEnergyFraction ; }
153  void SetMCEnergyFraction(Double_t e) { fMCEnergyFraction = e ; }
154 
155  Bool_t GetIsExotic() const { return fIsExotic ; }
156  void SetIsExotic(Bool_t b) { fIsExotic = b ; }
157 
158  Double_t GetUserDefEnergy(Int_t t) const { return AliVCluster::GetUserDefEnergy(t); }
159  Double_t GetUserDefEnergy(VCluUserDefEnergy_t t) const { return E()*fUserDefEnergy[t] ; }
160  void SetUserDefEnergy(Int_t t, Double_t e) { AliVCluster::SetUserDefEnergy(t,e);}
161  void SetUserDefEnergy(VCluUserDefEnergy_t t, Double_t e) { fUserDefEnergy[t] = E() > 1e-6 ? e / E() : 1. ; }
163 
164  void SetCellsMCEdepFractionMap(UInt_t *array) ;
166 
167  void GetCellMCEdepFractionArray(Int_t cellIndex, Float_t * eDep) const ;
168  UInt_t PackMCEdepFraction(Float_t * eDep) const ;
169 
170  void SetClusterMCEdepFractionFromEdepArray(Float_t *array) ;
171  void SetClusterMCEdepFraction (UShort_t *array) ;
172  UShort_t * GetClusterMCEdepFraction() const { return fClusterMCEdepFraction ; }
173  Float_t GetClusterMCEdepFraction(Int_t mcIndex) const ;
174 
175  protected:
176 
177  TArrayI * fTracksMatched;
178  TArrayI * fLabels;
179 
180  Int_t fNCells ;
181 
183  UShort_t * fCellsAbsId; //[fNCells]
184 
187  Double32_t * fCellsAmpFraction; //[fNCells][0.,1.,16]
188 
189  Double32_t fGlobalPos[3];
190  Double32_t fEnergy;
191  Double32_t fDispersion;
192  Double32_t fChi2;
193  Double32_t fM20;
194  Double32_t fM02;
195 
196  Double32_t fEmcCpvDistance;
197 
198  Double32_t fTrackDx ;
199  Double32_t fTrackDz ;
200 
201  Double32_t fDistToBadChannel;
202 
204  Double32_t fPID[AliPID::kSPECIESCN]; //[0,1,8]
205 
206  Int_t fID;
207  UChar_t fNExMax ;
208  Char_t fClusterType;
209 
211  Double_t fTOF; //[0,0,12]
212 
213  Double32_t fCoreEnergy;
214 
215  Double_t fMCEnergyFraction;
216  Bool_t fIsExotic;
218 
219  UInt_t fNLabel;
220 
222  UShort_t * fClusterMCEdepFraction; //[fNLabel]
223 
226  UInt_t * fCellsMCEdepFractionMap; //[fNCells]
227 
229  ClassDef(AliESDCaloCluster,13) ;
231 
232 };
233 
234 #endif
235 
236 
Int_t GetTrackMatchedIndex(Int_t i=0) const
Double_t GetTrackDx(void) const
TBrowser b
Definition: RunAnaESD.C:12
Double_t GetDispersion() const
AliTPCcalibPID * pid
Definition: CalibPID.C:69
Double_t GetUserDefEnergy(Int_t t) const
Double32_t fCoreEnergy
Energy of the core of cluster. Used by PHOS.
void SetM02(Double_t m02)
UShort_t * GetClusterMCEdepFraction() const
Int_t GetCellAbsId(Int_t i) const
void AddTracksMatched(TArrayI &array)
TArrayI * GetLabelsArray() const
Bool_t fIsExotic
! Cluster marked as "exotic" (high energy deposition concentrated in a single cell) ...
Double_t GetCoreEnergy() const
void SetPositionAt(Float_t pos, Int_t ipos)
TArrayI * GetTracksMatched() const
void AddLabels(TArrayI &array)
void GetCellMCEdepFractionArray(Int_t cellIndex, Float_t *eDep) const
Bool_t GetIsExotic() const
Double_t fUserDefEnergy[kLastUserDefEnergy+1]
!energy of the cluster after other higher level corrections (e.g. non-linearity, hadronic correction...
void SetE(Double_t ene)
AliESDCaloCluster & operator=(const AliESDCaloCluster &source)
Double_t GetM02() const
void SetCoreEnergy(Double_t e)
void SetClusterMCEdepFraction(UShort_t *array)
void SetID(Int_t id)
Float_t p[]
Definition: kNNTest.C:133
void SetCellsAbsId(UShort_t *array)
Int_t GetID() const
void SetUserDefEnergyCorrFactor(VCluUserDefEnergy_t t, Double_t f)
void SetType(Char_t type)
TArrayI * fTracksMatched
Index of tracks close to cluster. First entry is the most likely match.
Double32_t fChi2
Chi2 of cluster fit (unfolded clusters)
Double32_t fTrackDx
Distance to closest track in phi.
Virtual class for calorimeter cluster data handling.
Definition: AliVCluster.h:20
void SetIsExotic(Bool_t b)
Double_t GetDistanceToBadChannel() const
Int_t GetLabelAt(UInt_t i) const
Double32_t fTrackDz
Distance to closest track in z.
TObjArray * array
Definition: AnalyzeLaser.C:12
UShort_t * GetCellsAbsId()
Double32_t fDistToBadChannel
Distance to nearest bad channel.
Double_t fTOF
Cluster time-of-flight.
void GetMomentum(TLorentzVector &p, const Double_t *vertexPosition) const
UChar_t fNExMax
Number of Local (Ex-)maxima before unfolding.
Double32_t fEnergy
Energy measured by calorimeter in GeV.
Double_t chi2
Definition: AnalyzeLaser.C:7
Bool_t IsPHOS() const
void SetDispersion(Double_t disp)
Double32_t fM02
2-nd moment along the main eigen axis.
void SetEmcCpvDistance(Double_t dEmcCpv)
void SetChi2(Double_t chi2)
void SetUserDefEnergy(Int_t t, Double_t e)
Double32_t * fCellsAmpFraction
void SetPIDAt(Float_t p, Int_t i)
Int_t GetNTracksMatched() const
#define AliInfo(message)
Definition: AliLog.h:484
void SetM20(Double_t m20)
Char_t fClusterType
Flag for different cluster type/versions. See enum VClu_t in AliVCluster.
void SetTrackDistance(Double_t dx, Double_t dz)
void SetMCEnergyFraction(Double_t e)
Double_t GetTrackDz(void) const
VCluUserDefEnergy_t
Define the correction types.
Definition: AliVCluster.h:58
void SetClusterMCEdepFractionFromEdepArray(Float_t *array)
UInt_t GetNLabels() const
Int_t * GetLabels() const
TArrayI * fLabels
List of MC particles that generated the cluster, ordered in deposited energy.
UInt_t fNLabel
Number of MC particles associated to the cluster.
UChar_t GetNExMax() const
Char_t GetType() const
Double_t GetTOF() const
Double_t GetCellAmplitudeFraction(Int_t i) const
Calorimeter cluster data container.
TF1 * f
Definition: interpolTest.C:21
void SetNExMax(UChar_t nExMax)
Double_t GetUserDefEnergy(VCluUserDefEnergy_t t) const
UShort_t * fClusterMCEdepFraction
Array with fraction of deposited energy per MC particle contributing to the cluster.
Bool_t IsEMCAL() const
UShort_t * fCellsAbsId
Array of cell absolute Id numbers.
void Clear(const Option_t *)
Double_t E() const
Int_t GetNCells() const
virtual Double_t GetUserDefEnergy(VCluUserDefEnergy_t) const
Definition: AliVCluster.h:159
virtual void Copy(TObject &) const
Double_t GetEmcCpvDistance() const
virtual void SetUserDefEnergy(VCluUserDefEnergy_t, Double_t)
Definition: AliVCluster.h:160
Double32_t fM20
2-nd moment along the second eigen axis.
Int_t fID
Unique Id of the cluster.
Double_t fMCEnergyFraction
! MC energy (embedding)
void SetLabel(Int_t *array, UInt_t size)
Double32_t fGlobalPos[3]
Position in global coordinate system (cm).
UInt_t PackMCEdepFraction(Float_t *eDep) const
Int_t fNCells
Number of cells in cluster.
UInt_t * fCellsMCEdepFractionMap
Double_t Chi2() const
Double32_t fDispersion
Cluster shape dispersion.
void SetCellsAmplitudeFraction(Double32_t *array)
UInt_t * GetCellsMCEdepFractionMap() const
void SetNCells(Int_t n)
Int_t GetLabel() const
Double32_t * GetCellsAmplitudeFraction()
void GetPosition(Float_t *x) const
void SetCellsMCEdepFractionMap(UInt_t *array)
Double_t GetMCEnergyFraction() const
void SetPosition(Float_t *x)
Double_t GetM20() const
void SetDistanceToBadChannel(Double_t dist)
Double32_t fEmcCpvDistance
the distance from PHOS EMC rec.point to the closest CPV rec.point.
void SetUserDefEnergy(VCluUserDefEnergy_t t, Double_t e)
const Double_t * GetPID() const
Double32_t fPID[AliPID::kSPECIESCN]
Detector response probabilities for the PID.
void SetPID(const Float_t *pid)
void SetTOF(Double_t tof)