]>
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 | |
e649177a | 25 | class AliESDCaloCluster : public TObject |
26 | { | |
85c60a8e | 27 | |
28 | public: | |
29 | ||
30 | AliESDCaloCluster(); | |
31 | AliESDCaloCluster(const AliESDCaloCluster& clus); | |
fe12e09c | 32 | AliESDCaloCluster & operator=(const AliESDCaloCluster& source); |
85c60a8e | 33 | virtual ~AliESDCaloCluster(); |
732a24fe | 34 | virtual void Copy(TObject &) const; |
85c60a8e | 35 | |
36 | void SetID(Int_t id) {fID = id;} | |
37 | Int_t GetID() const {return fID;} | |
38 | ||
8ada0ffe | 39 | //similar to AliAODCluster but offset by one for |
40 | // backward comp. -1 was undefined, which only applied | |
41 | // for PHOS clusters before | |
42 | enum ESDClu_t {kUndef = -2, | |
e649177a | 43 | kPHOSCluster, |
44 | kEMCALPseudoCluster, //Not any more in use, keep for backward comp. | |
8ada0ffe | 45 | kEMCALClusterv1}; |
e649177a | 46 | |
85c60a8e | 47 | void SetClusterType(Int_t type) { fClusterType = type; } |
8ada0ffe | 48 | Char_t GetClusterType() const {return fClusterType; } |
85c60a8e | 49 | |
e649177a | 50 | Bool_t IsEMCAL() const {return (fClusterType == kEMCALClusterv1);} |
8ada0ffe | 51 | Bool_t IsPHOS() const {return (fClusterType == kPHOSCluster);} |
85c60a8e | 52 | |
5efdec54 | 53 | void SetPosition(const Float_t *pos) { |
85c60a8e | 54 | fGlobalPos[0] = pos[0]; fGlobalPos[1] = pos[1]; fGlobalPos[2] = pos[2]; |
55 | } | |
5efdec54 | 56 | void GetPosition(Float_t *pos) const { |
85c60a8e | 57 | pos[0] = fGlobalPos[0]; pos[1] = fGlobalPos[1]; pos[2] = fGlobalPos[2]; |
58 | } | |
59 | ||
5efdec54 | 60 | void SetE(Float_t ene) { fEnergy = ene;} |
8ada0ffe | 61 | Double_t E() const { return fEnergy;} |
85c60a8e | 62 | |
63 | void SetClusterDisp(Float_t disp) { fDispersion = disp; } | |
8ada0ffe | 64 | Double_t GetClusterDisp() const { return fDispersion; } |
85c60a8e | 65 | |
66 | void SetClusterChi2(Float_t chi2) { fChi2 = chi2; } | |
8ada0ffe | 67 | Double_t GetClusterChi2() const { return fChi2; } |
85c60a8e | 68 | |
69 | void SetPid(const Float_t *p); | |
8ada0ffe | 70 | Double_t *GetPid() {return fPID;} |
85c60a8e | 71 | |
85c60a8e | 72 | void SetM20(Float_t m20) { fM20 = m20; } |
8ada0ffe | 73 | Double_t GetM20() const { return fM20; } |
85c60a8e | 74 | |
75 | void SetM02(Float_t m02) { fM02 = m02; } | |
8ada0ffe | 76 | Double_t GetM02() const { return fM02; } |
85c60a8e | 77 | |
8ada0ffe | 78 | void SetNExMax(UChar_t nExMax) { fNExMax = nExMax; } |
79 | UChar_t GetNExMax() const { return fNExMax; } | |
85c60a8e | 80 | |
81 | void SetEmcCpvDistance(Float_t dEmcCpv) { fEmcCpvDistance = dEmcCpv; } | |
8ada0ffe | 82 | Double_t GetEmcCpvDistance() const { return fEmcCpvDistance; } |
f1cedef3 | 83 | void SetTrackDistance(Double_t dx, Double_t dz){fTrackDx=dx; fTrackDz=dz;} |
84 | Double_t GetTrackDx(void)const {return fTrackDx;} | |
85 | Double_t GetTrackDz(void)const {return fTrackDz;} | |
85c60a8e | 86 | |
45636e1b | 87 | void SetDistanceToBadChannel(Float_t dist) {fDistToBadChannel=dist;} |
8ada0ffe | 88 | Double_t GetDistanceToBadChannel() const {return fDistToBadChannel;} |
45636e1b | 89 | |
78902954 | 90 | void SetTOF(Double_t tof) { fTOF = tof; } |
91 | Double_t GetTOF() const { return fTOF; } | |
92 | ||
85005d58 | 93 | void AddTracksMatched(TArrayI & array) { |
94 | if(!fTracksMatched)fTracksMatched = new TArrayI(array); | |
95 | else *fTracksMatched = array; | |
96 | } | |
97 | void AddLabels(TArrayI & array) { | |
98 | if(!fLabels)fLabels = new TArrayI(array) ; | |
99 | else *fLabels = array; | |
100 | } | |
78902954 | 101 | |
4dd59c4a | 102 | TArrayI * GetTracksMatched() const {return fTracksMatched;} |
103 | TArrayI * GetLabels() const {return fLabels;} | |
78902954 | 104 | |
5efdec54 | 105 | Int_t GetTrackMatched() const |
106 | {if( fTracksMatched && fTracksMatched->GetSize() >0) return fTracksMatched->At(0); | |
107 | else return -1;} //Most likely the track associated to the cluster | |
108 | Int_t GetLabel() const | |
109 | {if( fLabels && fLabels->GetSize() >0) return fLabels->At(0); | |
110 | else return -1;} //Most likely the track associated to the cluster | |
78902954 | 111 | |
5efdec54 | 112 | Int_t GetNTracksMatched() const {if (fTracksMatched) return fTracksMatched->GetSize(); |
113 | else return -1;} | |
114 | Int_t GetNLabels() const { if (fLabels) return fLabels->GetSize(); | |
115 | else return -1;} | |
e649177a | 116 | |
5efdec54 | 117 | void GetMomentum(TLorentzVector& p, Double_t * vertexPosition ); |
e649177a | 118 | |
119 | // --- NEW --- | |
120 | void SetNCells(Int_t n) { fNCells = n;} | |
0fdeb120 | 121 | Int_t GetNCells() const { return fNCells;} |
e649177a | 122 | |
ed712271 | 123 | void SetCellsAbsId(UShort_t *array) ; |
e649177a | 124 | UShort_t *GetCellsAbsId() {return fCellsAbsId;} |
125 | ||
ed712271 | 126 | void SetCellsAmplitudeFraction(Double32_t *array) ; |
e649177a | 127 | Double32_t *GetCellsAmplitudeFraction() {return fCellsAmpFraction;} |
128 | ||
129 | Int_t GetCellAbsId(Int_t i) const { | |
130 | if (fCellsAbsId && i >=0 && i < fNCells ) return fCellsAbsId[i]; | |
131 | else return -1;} | |
132 | ||
133 | Double_t GetCellAmplitudeFraction(Int_t i) const { | |
134 | if (fCellsAmpFraction && i >=0 && i < fNCells ) return fCellsAmpFraction[i]; | |
135 | else return -1;} | |
136 | ||
85c60a8e | 137 | protected: |
138 | ||
4dd59c4a | 139 | TArrayI * fTracksMatched; //Index of tracks close to cluster. First entry is the most likely match. |
140 | TArrayI * fLabels; //list of primaries that generated the cluster, ordered in deposited energy. | |
e649177a | 141 | |
142 | //NEW | |
143 | Int_t fNCells ; | |
144 | UShort_t *fCellsAbsId; //[fNCells] array of cell absId numbers | |
145 | Double32_t *fCellsAmpFraction; //[fNCells][0.,1.,16] array with cell amplitudes fraction. | |
146 | ||
8ada0ffe | 147 | |
148 | Double32_t fGlobalPos[3]; // position in global coordinate systemD | |
149 | Double32_t fEnergy; // energy measured by calorimeter | |
150 | Double32_t fDispersion; // cluster dispersion, for shape analysis | |
151 | Double32_t fChi2; // chi2 of cluster fi | |
152 | Double32_t fM20; // 2-nd moment along the main eigen axis | |
153 | Double32_t fM02; // 2-nd moment along the second eigen axis | |
78902954 | 154 | |
8ada0ffe | 155 | Double32_t fEmcCpvDistance; // the distance from PHOS EMC rec.point to the closest CPV rec.point |
f1cedef3 | 156 | Double32_t fTrackDx ; // Distance to closest track in phi |
157 | Double32_t fTrackDz ; // Distance to closest track in z | |
158 | ||
8ada0ffe | 159 | Double32_t fDistToBadChannel; // Distance to nearest bad channel |
160 | Double32_t fPID[AliPID::kSPECIESN]; //[0,1,8]"detector response probabilities" (for the PID) | |
161 | Int_t fID; // Unique Id of the cluster | |
162 | UChar_t fNExMax ; // number of (Ex-)maxima before unfolding | |
163 | Char_t fClusterType; // Flag for different cluster type/versions | |
78902954 | 164 | Double32_t fTOF; //[0,0,12] time-of-flight |
8ada0ffe | 165 | |
7a54a755 | 166 | ClassDef(AliESDCaloCluster,10) //ESDCaloCluster |
85c60a8e | 167 | }; |
168 | ||
169 | #endif | |
170 |