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 */
9 //-------------------------------------------------------------------------
10 // Class AliESDCaloCluster
11 // This is the class to deal with during the physics analysis of data
13 // New container for calorimeter clusters, which are the effective
14 // "tracks" for calorimeter detectors. Can be used by PHOS and EMCAL
17 //-------------------------------------------------------------------------
25 class AliESDCaloCluster : public TObject {
30 AliESDCaloCluster(const AliESDCaloCluster& clus);
31 AliESDCaloCluster & operator=(const AliESDCaloCluster& source);
32 virtual ~AliESDCaloCluster();
34 void SetID(Int_t id) {fID = id;}
35 Int_t GetID() const {return fID;}
37 enum ClusterType {kPseudoCluster, kClusterv1};//Two types of clusters stored
39 void SetClusterType(Int_t type) { fClusterType = type; }
40 Int_t GetClusterType() const {return fClusterType; }
42 void SetEMCAL(Bool_t emc) { fEMCALCluster = emc;}
43 Bool_t IsEMCAL() const {return fEMCALCluster;}
45 void SetPHOS(Bool_t phos) { fPHOSCluster = phos;}
46 Bool_t IsPHOS() const {return fPHOSCluster;}
48 void SetPosition(const Float_t *pos) {
49 fGlobalPos[0] = pos[0]; fGlobalPos[1] = pos[1]; fGlobalPos[2] = pos[2];
51 void GetPosition(Float_t *pos) const {
52 pos[0] = fGlobalPos[0]; pos[1] = fGlobalPos[1]; pos[2] = fGlobalPos[2];
55 void SetE(Float_t ene) { fEnergy = ene;}
56 Float_t E() const { return fEnergy;}
58 void SetClusterDisp(Float_t disp) { fDispersion = disp; }
59 Float_t GetClusterDisp() const { return fDispersion; }
61 void SetClusterChi2(Float_t chi2) { fChi2 = chi2; }
62 Float_t GetClusterChi2() const { return fChi2; }
64 void SetPid(const Float_t *p);
65 Float_t *GetPid() {return fPID;}
67 void SetM20(Float_t m20) { fM20 = m20; }
68 Float_t GetM20() const { return fM20; }
70 void SetM02(Float_t m02) { fM02 = m02; }
71 Float_t GetM02() const { return fM02; }
73 void SetM11(Float_t m11) { fM11 = m11; }
74 Float_t GetM11() const { return fM11; }
76 void SetNExMax(UShort_t nExMax) { fNExMax = nExMax; }
77 UShort_t GetNExMax() const { return fNExMax; }
79 void SetEmcCpvDistance(Float_t dEmcCpv) { fEmcCpvDistance = dEmcCpv; }
80 Float_t GetEmcCpvDistance() const { return fEmcCpvDistance; }
82 void SetDistanceToBadChannel(Float_t dist) {fDistToBadChannel=dist;}
83 Float_t GetDistanceToBadChannel() const {return fDistToBadChannel;}
85 void AddTracksMatched(TArrayS & array) { fTracksMatched = new TArrayS(array) ; }
86 void AddLabels(TArrayS & array) { fLabels = new TArrayS(array) ; }
87 void AddDigitAmplitude(TArrayS & array) { fDigitAmplitude = new TArrayS(array) ; }
88 void AddDigitTime(TArrayS & array) { fDigitTime = new TArrayS(array) ; }
89 void AddDigitIndex(TArrayS & array) { fDigitIndex = new TArrayS(array) ; }
91 TArrayS * GetTracksMatched() const {return fTracksMatched;}
92 TArrayS * GetLabels() const {return fLabels;}
93 TArrayS * GetDigitAmplitude() const {return fDigitAmplitude;}
94 TArrayS * GetDigitTime() const {return fDigitTime;}
95 TArrayS * GetDigitIndex() const {return fDigitIndex;}
97 Int_t GetTrackMatched() const
98 {if( fTracksMatched && fTracksMatched->GetSize() >0) return fTracksMatched->At(0);
99 else return -1;} //Most likely the track associated to the cluster
100 Int_t GetLabel() const
101 {if( fLabels && fLabels->GetSize() >0) return fLabels->At(0);
102 else return -1;} //Most likely the track associated to the cluster
105 Int_t GetNTracksMatched() const {if (fTracksMatched) return fTracksMatched->GetSize();
107 Int_t GetNLabels() const { if (fLabels) return fLabels->GetSize();
109 Int_t GetNumberOfDigits() const { if (fDigitAmplitude) return fDigitAmplitude->GetSize();
112 void GetMomentum(TLorentzVector& p, Double_t * vertexPosition );
116 Int_t fID; // Unique Id of the cluster
117 Int_t fClusterType; // Flag for different clustering versions
118 Bool_t fEMCALCluster; // Is this is an EMCAL cluster?
119 Bool_t fPHOSCluster; // Is this is a PHOS cluster?
120 Float_t fGlobalPos[3]; // position in global coordinate system
121 Float_t fEnergy; // energy measured by calorimeter
122 Float_t fDispersion; // cluster dispersion, for shape analysis
123 Float_t fChi2; // chi2 of cluster fit
124 Float_t fPID[AliPID::kSPECIESN]; //"detector response probabilities" (for the PID)
125 Float_t fM20; // 2-nd moment along the main eigen axis
126 Float_t fM02; // 2-nd moment along the second eigen axis
127 Float_t fM11; // 2-nd mixed moment Mxy
128 UShort_t fNExMax ; // number of (Ex-)maxima before unfolding
129 Float_t fEmcCpvDistance; // the distance from PHOS EMC rec.point to the closest CPV rec.point
130 Float_t fDistToBadChannel; // Distance to nearest bad channel
132 TArrayS * fTracksMatched; //Index of tracks close to cluster. First entry is the most likely match.
133 TArrayS * fLabels; //list of primaries that generated the cluster, ordered in deposited energy.
134 TArrayS * fDigitAmplitude; //digit energy (integer units)
135 TArrayS * fDigitTime; //time of this digit (integer units)
136 TArrayS * fDigitIndex; //calorimeter digit index
138 ClassDef(AliESDCaloCluster,4) //ESDCaloCluster