]>
Commit | Line | Data |
---|---|---|
85c60a8e | 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 */ | |
85c60a8e | 5 | /* $Id$ */ |
6 | /* $Log $ */ | |
7 | ||
8 | //------------------------------------------------------------------------- | |
9 | // Class AliESDCaloCluster | |
10 | // This is the class to deal with during the physics analysis of data | |
11 | // | |
12 | // New container for calorimeter clusters, which are the effective | |
13 | // "tracks" for calorimeter detectors. Can be used by PHOS and EMCAL | |
14 | // | |
15 | // J.L. Klay (LLNL) | |
16 | //------------------------------------------------------------------------- | |
17 | ||
18 | #include <TObject.h> | |
19 | #include "AliPID.h" | |
5efdec54 | 20 | #include "TArrayS.h" |
4dd59c4a | 21 | #include "TArrayI.h" |
85c60a8e | 22 | |
bab0b5f0 | 23 | class TLorentzVector; |
85c60a8e | 24 | |
25 | class AliESDCaloCluster : public TObject { | |
26 | ||
27 | public: | |
28 | ||
29 | AliESDCaloCluster(); | |
30 | AliESDCaloCluster(const AliESDCaloCluster& clus); | |
fe12e09c | 31 | AliESDCaloCluster & operator=(const AliESDCaloCluster& source); |
85c60a8e | 32 | virtual ~AliESDCaloCluster(); |
33 | ||
34 | void SetID(Int_t id) {fID = id;} | |
35 | Int_t GetID() const {return fID;} | |
36 | ||
8ada0ffe | 37 | //similar to AliAODCluster but offset by one for |
38 | // backward comp. -1 was undefined, which only applied | |
39 | // for PHOS clusters before | |
40 | enum ESDClu_t {kUndef = -2, | |
41 | kPHOSCluster, | |
42 | kEMCALPseudoCluster, | |
43 | kEMCALClusterv1}; | |
85c60a8e | 44 | void SetClusterType(Int_t type) { fClusterType = type; } |
8ada0ffe | 45 | Char_t GetClusterType() const {return fClusterType; } |
85c60a8e | 46 | |
8ada0ffe | 47 | Bool_t IsEMCAL() const {return (fClusterType == kEMCALClusterv1||fClusterType == kEMCALPseudoCluster);} |
48 | Bool_t IsEMCALPseudo() {return (fClusterType == kEMCALPseudoCluster);} | |
49 | Bool_t IsPHOS() const {return (fClusterType == kPHOSCluster);} | |
85c60a8e | 50 | |
5efdec54 | 51 | void SetPosition(const Float_t *pos) { |
85c60a8e | 52 | fGlobalPos[0] = pos[0]; fGlobalPos[1] = pos[1]; fGlobalPos[2] = pos[2]; |
53 | } | |
5efdec54 | 54 | void GetPosition(Float_t *pos) const { |
85c60a8e | 55 | pos[0] = fGlobalPos[0]; pos[1] = fGlobalPos[1]; pos[2] = fGlobalPos[2]; |
56 | } | |
57 | ||
5efdec54 | 58 | void SetE(Float_t ene) { fEnergy = ene;} |
8ada0ffe | 59 | Double_t E() const { return fEnergy;} |
85c60a8e | 60 | |
61 | void SetClusterDisp(Float_t disp) { fDispersion = disp; } | |
8ada0ffe | 62 | Double_t GetClusterDisp() const { return fDispersion; } |
85c60a8e | 63 | |
64 | void SetClusterChi2(Float_t chi2) { fChi2 = chi2; } | |
8ada0ffe | 65 | Double_t GetClusterChi2() const { return fChi2; } |
85c60a8e | 66 | |
67 | void SetPid(const Float_t *p); | |
8ada0ffe | 68 | Double_t *GetPid() {return fPID;} |
85c60a8e | 69 | |
85c60a8e | 70 | void SetM20(Float_t m20) { fM20 = m20; } |
8ada0ffe | 71 | Double_t GetM20() const { return fM20; } |
85c60a8e | 72 | |
73 | void SetM02(Float_t m02) { fM02 = m02; } | |
8ada0ffe | 74 | Double_t GetM02() const { return fM02; } |
85c60a8e | 75 | |
76 | void SetM11(Float_t m11) { fM11 = m11; } | |
8ada0ffe | 77 | Double_t GetM11() const { return fM11; } |
85c60a8e | 78 | |
8ada0ffe | 79 | void SetNExMax(UChar_t nExMax) { fNExMax = nExMax; } |
80 | UChar_t GetNExMax() const { return fNExMax; } | |
85c60a8e | 81 | |
82 | void SetEmcCpvDistance(Float_t dEmcCpv) { fEmcCpvDistance = dEmcCpv; } | |
8ada0ffe | 83 | Double_t GetEmcCpvDistance() const { return fEmcCpvDistance; } |
85c60a8e | 84 | |
45636e1b | 85 | void SetDistanceToBadChannel(Float_t dist) {fDistToBadChannel=dist;} |
8ada0ffe | 86 | Double_t GetDistanceToBadChannel() const {return fDistToBadChannel;} |
45636e1b | 87 | |
4dd59c4a | 88 | void AddTracksMatched(TArrayI & array) { fTracksMatched = new TArrayI(array) ; } |
89 | void AddLabels(TArrayI & array) { fLabels = new TArrayI(array) ; } | |
5efdec54 | 90 | void AddDigitAmplitude(TArrayS & array) { fDigitAmplitude = new TArrayS(array) ; } |
91 | void AddDigitTime(TArrayS & array) { fDigitTime = new TArrayS(array) ; } | |
92 | void AddDigitIndex(TArrayS & array) { fDigitIndex = new TArrayS(array) ; } | |
93 | ||
4dd59c4a | 94 | TArrayI * GetTracksMatched() const {return fTracksMatched;} |
95 | TArrayI * GetLabels() const {return fLabels;} | |
5efdec54 | 96 | TArrayS * GetDigitAmplitude() const {return fDigitAmplitude;} |
97 | TArrayS * GetDigitTime() const {return fDigitTime;} | |
98 | TArrayS * GetDigitIndex() const {return fDigitIndex;} | |
99 | ||
100 | Int_t GetTrackMatched() const | |
101 | {if( fTracksMatched && fTracksMatched->GetSize() >0) return fTracksMatched->At(0); | |
102 | else return -1;} //Most likely the track associated to the cluster | |
103 | Int_t GetLabel() const | |
104 | {if( fLabels && fLabels->GetSize() >0) return fLabels->At(0); | |
105 | else return -1;} //Most likely the track associated to the cluster | |
106 | ||
107 | ||
108 | Int_t GetNTracksMatched() const {if (fTracksMatched) return fTracksMatched->GetSize(); | |
109 | else return -1;} | |
110 | Int_t GetNLabels() const { if (fLabels) return fLabels->GetSize(); | |
111 | else return -1;} | |
112 | Int_t GetNumberOfDigits() const { if (fDigitAmplitude) return fDigitAmplitude->GetSize(); | |
113 | else return -1;} | |
114 | ||
115 | void GetMomentum(TLorentzVector& p, Double_t * vertexPosition ); | |
cb8cf003 | 116 | // Sep 7, 2007 |
117 | Int_t GetTrueDigitAmplitude(Int_t i, Double_t cc); | |
118 | Double_t GetTrueDigitEnergy(Int_t i, Double_t cc); | |
119 | Double_t GetRecalibratedDigitEnergy(Int_t i, Double_t ccOld, Double_t ccNew); | |
bab0b5f0 | 120 | |
85c60a8e | 121 | protected: |
122 | ||
4dd59c4a | 123 | TArrayI * fTracksMatched; //Index of tracks close to cluster. First entry is the most likely match. |
124 | TArrayI * fLabels; //list of primaries that generated the cluster, ordered in deposited energy. | |
5efdec54 | 125 | TArrayS * fDigitAmplitude; //digit energy (integer units) |
126 | TArrayS * fDigitTime; //time of this digit (integer units) | |
127 | TArrayS * fDigitIndex; //calorimeter digit index | |
85c60a8e | 128 | |
8ada0ffe | 129 | |
130 | Double32_t fGlobalPos[3]; // position in global coordinate systemD | |
131 | Double32_t fEnergy; // energy measured by calorimeter | |
132 | Double32_t fDispersion; // cluster dispersion, for shape analysis | |
133 | Double32_t fChi2; // chi2 of cluster fi | |
134 | Double32_t fM20; // 2-nd moment along the main eigen axis | |
135 | Double32_t fM02; // 2-nd moment along the second eigen axis | |
136 | Double32_t fM11; // 2-nd mixed moment Mxy | |
137 | Double32_t fEmcCpvDistance; // the distance from PHOS EMC rec.point to the closest CPV rec.point | |
138 | Double32_t fDistToBadChannel; // Distance to nearest bad channel | |
139 | Double32_t fPID[AliPID::kSPECIESN]; //[0,1,8]"detector response probabilities" (for the PID) | |
140 | Int_t fID; // Unique Id of the cluster | |
141 | UChar_t fNExMax ; // number of (Ex-)maxima before unfolding | |
142 | Char_t fClusterType; // Flag for different cluster type/versions | |
143 | ||
4dd59c4a | 144 | ClassDef(AliESDCaloCluster,6) //ESDCaloCluster |
85c60a8e | 145 | }; |
146 | ||
147 | #endif | |
148 |