]>
Commit | Line | Data |
---|---|---|
d9b3567c | 1 | #ifndef ALIEMCALRECOUTILS_H |
2 | #define ALIEMCALRECOUTILS_H | |
3 | ||
40891fa2 | 4 | /* $Id: AliEMCALRecoUtils.h | Tue Jul 23 09:11:15 2013 +0000 | gconesab $ */ |
d9b3567c | 5 | |
6 | /////////////////////////////////////////////////////////////////////////////// | |
7 | // | |
8 | // Class AliEMCALRecoUtils | |
9 | // Some utilities to recalculate the cluster position or energy linearity | |
10 | // | |
11 | // | |
12 | // Author: Gustavo Conesa (LPSC- Grenoble) | |
b540d03f | 13 | // Track matching part: Rongrong Ma (Yale) |
d9b3567c | 14 | /////////////////////////////////////////////////////////////////////////////// |
15 | ||
16 | //Root includes | |
01d44f1f | 17 | #include <TNamed.h> |
18 | #include <TMath.h> | |
7cdec71f | 19 | class TObjArray; |
20 | class TArrayI; | |
21 | class TArrayF; | |
01d44f1f | 22 | #include <TH2I.h> |
7cdec71f | 23 | class TH2F; |
01d44f1f | 24 | #include <TRandom3.h> |
d9b3567c | 25 | |
26 | //AliRoot includes | |
27 | class AliVCluster; | |
28 | class AliVCaloCells; | |
bd8c7aef | 29 | class AliVEvent; |
88b96ad8 | 30 | #include "AliLog.h" |
b540d03f | 31 | |
32 | // EMCAL includes | |
094786cc | 33 | class AliEMCALGeometry; |
83bfd77a | 34 | class AliEMCALPIDUtils; |
bd8c7aef | 35 | class AliESDtrack; |
bb6f5f0b | 36 | class AliExternalTrackParam; |
40891fa2 | 37 | class AliVTrack; |
3b4a4334 | 38 | |
d9b3567c | 39 | class AliEMCALRecoUtils : public TNamed { |
40 | ||
41 | public: | |
42 | ||
43 | AliEMCALRecoUtils(); | |
44 | AliEMCALRecoUtils(const AliEMCALRecoUtils&); | |
45 | AliEMCALRecoUtils& operator=(const AliEMCALRecoUtils&); | |
b540d03f | 46 | virtual ~AliEMCALRecoUtils() ; |
88b96ad8 | 47 | |
48 | void InitParameters(); | |
01d44f1f | 49 | void Print(const Option_t*) const; |
b540d03f | 50 | |
51 | //enums | |
4c489e4e | 52 | enum NonlinearityFunctions{ kPi0MC = 0, kPi0GammaGamma = 1, |
53 | kPi0GammaConversion = 2, kNoCorrection = 3, | |
54 | kBeamTest= 4, kBeamTestCorrected = 5, | |
55 | kPi0MCv2 = 6, kPi0MCv3 = 7, | |
56 | kBeamTestCorrectedv2 = 8, | |
57 | kSDMv5 = 9, kPi0MCv5 = 10, | |
58 | kSDMv6 =11, kPi0MCv6 = 12}; | |
59 | ||
01d44f1f | 60 | enum PositionAlgorithms{kUnchanged=-1,kPosTowerIndex=0, kPosTowerGlobal=1}; |
61 | enum ParticleType{kPhoton=0, kElectron=1,kHadron =2, kUnknown=-1}; | |
42ceff04 | 62 | enum { kNCuts = 12 }; //track matching Marcel |
63 | enum TrackCutsType{kTPCOnlyCut=0, kGlobalCut=1, kLooseCut=2, kITSStandAlone=3}; //Marcel | |
b540d03f | 64 | |
65 | //----------------------------------------------------- | |
d9b3567c | 66 | //Position recalculation |
b540d03f | 67 | //----------------------------------------------------- |
a520bcd0 | 68 | void RecalculateClusterPosition (const AliEMCALGeometry *geom, AliVCaloCells* cells, AliVCluster* clu); |
69 | void RecalculateClusterPositionFromTowerIndex (const AliEMCALGeometry *geom, AliVCaloCells* cells, AliVCluster* clu); | |
70 | void RecalculateClusterPositionFromTowerGlobal(const AliEMCALGeometry *geom, AliVCaloCells* cells, AliVCluster* clu); | |
fb8eab96 | 71 | Float_t GetCellWeight(Float_t eCell, Float_t eCluster) const { if (eCell > 0 && eCluster > 0) return TMath::Max( 0., fW0 + TMath::Log( eCell / eCluster )) ; |
c8fcffd3 | 72 | else return 0. ; } |
73 | Float_t GetDepth(Float_t eCluster, Int_t iParticle, Int_t iSM) const; | |
88b96ad8 | 74 | void GetMaxEnergyCell(const AliEMCALGeometry *geom, AliVCaloCells* cells, const AliVCluster* clu, |
cb231979 | 75 | Int_t & absId, Int_t& iSupMod, Int_t& ieta, Int_t& iphi, Bool_t &shared); |
d9b3567c | 76 | |
fb8eab96 | 77 | Float_t GetMisalTransShift(Int_t i) const { if(i < 15 ) { return fMisalTransShift[i] ; } |
c8fcffd3 | 78 | else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)) ; |
79 | return 0. ; } } | |
80 | Float_t* GetMisalTransShiftArray() { return fMisalTransShift ; } | |
81 | void SetMisalTransShift(Int_t i, Float_t shift) { if(i < 15 ) { fMisalTransShift[i] = shift ; } | |
82 | else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)) ; } } | |
83 | void SetMisalTransShiftArray(Float_t * misal) { for(Int_t i = 0; i < 15; i++) fMisalTransShift[i] = misal[i] ; } | |
84 | Float_t GetMisalRotShift(Int_t i) const { if(i < 15 ) { return fMisalRotShift[i] ; } | |
85 | else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)) ; | |
86 | return 0. ; } } | |
87 | Float_t* GetMisalRotShiftArray() { return fMisalRotShift ; } | |
88 | void SetMisalRotShift(Int_t i, Float_t shift) { if(i < 15 ) { fMisalRotShift[i] = shift ; } | |
89 | else { AliInfo(Form("Index %d larger than 15, do nothing\n",i)) ; } } | |
90 | void SetMisalRotShiftArray(Float_t * misal) { for(Int_t i = 0; i < 15; i++)fMisalRotShift[i] = misal[i] ; } | |
01d44f1f | 91 | Int_t GetParticleType() const { return fParticleType ; } |
92 | void SetParticleType(Int_t particle) { fParticleType = particle ; } | |
01d44f1f | 93 | Int_t GetPositionAlgorithm() const { return fPosAlgo ; } |
94 | void SetPositionAlgorithm(Int_t alg) { fPosAlgo = alg ; } | |
01d44f1f | 95 | Float_t GetW0() const { return fW0 ; } |
96 | void SetW0(Float_t w0) { fW0 = w0 ; } | |
094786cc | 97 | |
b540d03f | 98 | //----------------------------------------------------- |
a7e5a381 | 99 | // Non Linearity |
b540d03f | 100 | //----------------------------------------------------- |
01d44f1f | 101 | Float_t CorrectClusterEnergyLinearity(AliVCluster* clu) ; |
fb8eab96 | 102 | Float_t GetNonLinearityParam(Int_t i) const { if(i < 7 && i >=0 ){ return fNonLinearityParams[i] ; } |
c8fcffd3 | 103 | else { AliInfo(Form("Index %d larger than 6 or negative, do nothing\n",i)) ; |
104 | return 0. ; } } | |
105 | void SetNonLinearityParam(Int_t i, Float_t param) { if(i < 7 && i >=0 ){ fNonLinearityParams[i] = param ; } | |
6aad3c6a | 106 | else { AliInfo(Form("Index %d larger than 6 or negative, do nothing\n",i)) ; } } |
01d44f1f | 107 | void InitNonLinearityParam(); |
01d44f1f | 108 | Int_t GetNonLinearityFunction() const { return fNonLinearityFunction ; } |
109 | void SetNonLinearityFunction(Int_t fun) { fNonLinearityFunction = fun ; InitNonLinearityParam() ; } | |
01d44f1f | 110 | void SetNonLinearityThreshold(Int_t threshold) { fNonLinearThreshold = threshold ; } //only for Alexie's non linearity correction |
111 | Int_t GetNonLinearityThreshold() const { return fNonLinearThreshold ; } | |
c8fcffd3 | 112 | |
01d44f1f | 113 | //----------------------------------------------------- |
114 | // MC clusters energy smearing | |
115 | //----------------------------------------------------- | |
88b96ad8 | 116 | Float_t SmearClusterEnergy(const AliVCluster* clu) ; |
01d44f1f | 117 | void SwitchOnClusterEnergySmearing() { fSmearClusterEnergy = kTRUE ; } |
118 | void SwitchOffClusterEnergySmearing() { fSmearClusterEnergy = kFALSE ; } | |
119 | Bool_t IsClusterEnergySmeared() const { return fSmearClusterEnergy ; } | |
120 | void SetSmearingParameters(Int_t i, Float_t param) { if(i < 3){ fSmearClusterParam[i] = param ; } | |
121 | else { AliInfo(Form("Index %d larger than 2, do nothing\n",i)) ; } } | |
b540d03f | 122 | //----------------------------------------------------- |
a7e5a381 | 123 | // Recalibration |
b540d03f | 124 | //----------------------------------------------------- |
fb8eab96 | 125 | Bool_t AcceptCalibrateCell(Int_t absId, Int_t bc, |
a7e5a381 | 126 | Float_t & amp, Double_t & time, AliVCaloCells* cells) ; // Energy and Time |
127 | void RecalibrateCells(AliVCaloCells * cells, Int_t bc) ; // Energy and Time | |
fb8eab96 | 128 | void RecalibrateClusterEnergy(const AliEMCALGeometry* geom, AliVCluster* cluster, AliVCaloCells * cells, Int_t bc=-1) ; // Energy and time |
841dbf60 | 129 | void ResetCellsCalibrated() { fCellsRecalibrated = kFALSE; } |
094786cc | 130 | |
a7e5a381 | 131 | // Energy recalibration |
01d44f1f | 132 | Bool_t IsRecalibrationOn() const { return fRecalibration ; } |
133 | void SwitchOffRecalibration() { fRecalibration = kFALSE ; } | |
134 | void SwitchOnRecalibration() { fRecalibration = kTRUE ; | |
135 | if(!fEMCALRecalibrationFactors)InitEMCALRecalibrationFactors() ; } | |
136 | void InitEMCALRecalibrationFactors() ; | |
50b7a951 | 137 | TObjArray* GetEMCALRecalibrationFactorsArray() const { return fEMCALRecalibrationFactors ; } |
3bfc4732 | 138 | TH2F * GetEMCALChannelRecalibrationFactors(Int_t iSM) const { return (TH2F*)fEMCALRecalibrationFactors->At(iSM) ; } |
139 | void SetEMCALChannelRecalibrationFactors(TObjArray *map) { fEMCALRecalibrationFactors = map ; } | |
140 | void SetEMCALChannelRecalibrationFactors(Int_t iSM , TH2F* h) { fEMCALRecalibrationFactors->AddAt(h,iSM) ; } | |
01d44f1f | 141 | Float_t GetEMCALChannelRecalibrationFactor(Int_t iSM , Int_t iCol, Int_t iRow) const { |
3bfc4732 | 142 | if(fEMCALRecalibrationFactors) |
143 | return (Float_t) ((TH2F*)fEMCALRecalibrationFactors->At(iSM))->GetBinContent(iCol,iRow); | |
144 | else return 1 ; } | |
01d44f1f | 145 | void SetEMCALChannelRecalibrationFactor(Int_t iSM , Int_t iCol, Int_t iRow, Double_t c = 1) { |
3bfc4732 | 146 | if(!fEMCALRecalibrationFactors) InitEMCALRecalibrationFactors() ; |
147 | ((TH2F*)fEMCALRecalibrationFactors->At(iSM))->SetBinContent(iCol,iRow,c) ; } | |
148 | ||
149 | //Recalibrate channels energy with run dependent corrections | |
7bf608c9 | 150 | Bool_t IsRunDepRecalibrationOn() const { return fUseRunCorrectionFactors ; } |
3bfc4732 | 151 | void SwitchOffRunDepCorrection() { fUseRunCorrectionFactors = kFALSE ; } |
152 | void SwitchOnRunDepCorrection() { fUseRunCorrectionFactors = kTRUE ; | |
7bf608c9 | 153 | SwitchOnRecalibration() ; } |
a7e5a381 | 154 | // Time Recalibration |
fb8eab96 | 155 | void RecalibrateCellTime(Int_t absId, Int_t bc, Double_t & time) const; |
3bfc4732 | 156 | |
157 | Bool_t IsTimeRecalibrationOn() const { return fTimeRecalibration ; } | |
158 | void SwitchOffTimeRecalibration() { fTimeRecalibration = kFALSE ; } | |
159 | void SwitchOnTimeRecalibration() { fTimeRecalibration = kTRUE ; | |
c8fcffd3 | 160 | if(!fEMCALTimeRecalibrationFactors)InitEMCALTimeRecalibrationFactors() ; } |
3bfc4732 | 161 | void InitEMCALTimeRecalibrationFactors() ; |
50b7a951 | 162 | TObjArray* GetEMCALTimeRecalibrationFactorsArray() const { return fEMCALTimeRecalibrationFactors ; } |
163 | ||
fb8eab96 | 164 | Float_t GetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID) const { |
3bfc4732 | 165 | if(fEMCALTimeRecalibrationFactors) |
166 | return (Float_t) ((TH1F*)fEMCALTimeRecalibrationFactors->At(bc))->GetBinContent(absID); | |
a7e5a381 | 167 | else return 0 ; } |
fb8eab96 | 168 | void SetEMCALChannelTimeRecalibrationFactor(Int_t bc, Int_t absID, Double_t c = 0) { |
3bfc4732 | 169 | if(!fEMCALTimeRecalibrationFactors) InitEMCALTimeRecalibrationFactors() ; |
170 | ((TH1F*)fEMCALTimeRecalibrationFactors->At(bc))->SetBinContent(absID,c) ; } | |
171 | ||
fb8eab96 | 172 | TH1F * GetEMCALChannelTimeRecalibrationFactors(Int_t bc)const { return (TH1F*)fEMCALTimeRecalibrationFactors->At(bc) ; } |
a7e5a381 | 173 | void SetEMCALChannelTimeRecalibrationFactors(TObjArray *map) { fEMCALTimeRecalibrationFactors = map ; } |
fb8eab96 | 174 | void SetEMCALChannelTimeRecalibrationFactors(Int_t bc , TH1F* h) { fEMCALTimeRecalibrationFactors->AddAt(h,bc) ; } |
094786cc | 175 | |
b540d03f | 176 | //----------------------------------------------------- |
3bfc4732 | 177 | // Modules fiducial region, remove clusters in borders |
b540d03f | 178 | //----------------------------------------------------- |
a520bcd0 | 179 | Bool_t CheckCellFiducialRegion(const AliEMCALGeometry* geom, |
180 | const AliVCluster* cluster, | |
181 | AliVCaloCells* cells) ; | |
fb8eab96 | 182 | void SetNumberOfCellsFromEMCALBorder(Int_t n){ fNCellsFromEMCALBorder = n ; } |
01d44f1f | 183 | Int_t GetNumberOfCellsFromEMCALBorder() const { return fNCellsFromEMCALBorder ; } |
fd6df01c | 184 | |
01d44f1f | 185 | void SwitchOnNoFiducialBorderInEMCALEta0() { fNoEMCALBorderAtEta0 = kTRUE ; } |
186 | void SwitchOffNoFiducialBorderInEMCALEta0() { fNoEMCALBorderAtEta0 = kFALSE ; } | |
187 | Bool_t IsEMCALNoBorderAtEta0() const { return fNoEMCALBorderAtEta0 ; } | |
fd6df01c | 188 | |
b540d03f | 189 | //----------------------------------------------------- |
fd6df01c | 190 | // Bad channels |
b540d03f | 191 | //----------------------------------------------------- |
01d44f1f | 192 | Bool_t IsBadChannelsRemovalSwitchedOn() const { return fRemoveBadChannels ; } |
193 | void SwitchOffBadChannelsRemoval() { fRemoveBadChannels = kFALSE ; } | |
194 | void SwitchOnBadChannelsRemoval () { fRemoveBadChannels = kTRUE ; | |
195 | if(!fEMCALBadChannelMap)InitEMCALBadChannelStatusMap() ; } | |
01d44f1f | 196 | Bool_t IsDistanceToBadChannelRecalculated() const { return fRecalDistToBadChannels ; } |
197 | void SwitchOffDistToBadChannelRecalculation() { fRecalDistToBadChannels = kFALSE ; } | |
198 | void SwitchOnDistToBadChannelRecalculation() { fRecalDistToBadChannels = kTRUE ; | |
199 | if(!fEMCALBadChannelMap)InitEMCALBadChannelStatusMap() ; } | |
c8fcffd3 | 200 | TObjArray* GetEMCALBadChannelStatusMapArray() const { return fEMCALBadChannelMap ; } |
01d44f1f | 201 | void InitEMCALBadChannelStatusMap() ; |
01d44f1f | 202 | Int_t GetEMCALChannelStatus(Int_t iSM , Int_t iCol, Int_t iRow) const { |
fd6df01c | 203 | if(fEMCALBadChannelMap) return (Int_t) ((TH2I*)fEMCALBadChannelMap->At(iSM))->GetBinContent(iCol,iRow); |
204 | else return 0;}//Channel is ok by default | |
01d44f1f | 205 | void SetEMCALChannelStatus(Int_t iSM , Int_t iCol, Int_t iRow, Double_t c = 1) { |
c8fcffd3 | 206 | if(!fEMCALBadChannelMap)InitEMCALBadChannelStatusMap() ; |
207 | ((TH2I*)fEMCALBadChannelMap->At(iSM))->SetBinContent(iCol,iRow,c) ; } | |
01d44f1f | 208 | TH2I * GetEMCALChannelStatusMap(Int_t iSM) const { return (TH2I*)fEMCALBadChannelMap->At(iSM) ; } |
209 | void SetEMCALChannelStatusMap(TObjArray *map) { fEMCALBadChannelMap = map ; } | |
210 | void SetEMCALChannelStatusMap(Int_t iSM , TH2I* h) { fEMCALBadChannelMap->AddAt(h,iSM) ; } | |
fb8eab96 | 211 | Bool_t ClusterContainsBadChannel(const AliEMCALGeometry* geom, const UShort_t* cellList, Int_t nCells); |
fd6df01c | 212 | |
b540d03f | 213 | //----------------------------------------------------- |
214 | // Recalculate other cluster parameters | |
215 | //----------------------------------------------------- | |
a520bcd0 | 216 | void RecalculateClusterDistanceToBadChannel (const AliEMCALGeometry * geom, AliVCaloCells* cells, AliVCluster * cluster); |
217 | void RecalculateClusterShowerShapeParameters(const AliEMCALGeometry * geom, AliVCaloCells* cells, AliVCluster * cluster); | |
f0e9e976 | 218 | void RecalculateClusterShowerShapeParameters(const AliEMCALGeometry * geom, AliVCaloCells* cells, AliVCluster * cluster, |
219 | Float_t & l0, Float_t & l1, | |
220 | Float_t & disp, Float_t & dEta, Float_t & dPhi, | |
221 | Float_t & sEta, Float_t & sPhi, Float_t & sEtaPhi); | |
01d44f1f | 222 | void RecalculateClusterPID(AliVCluster * cluster); |
83bfd77a | 223 | AliEMCALPIDUtils * GetPIDUtils() { return fPIDUtils;} |
224 | ||
b540d03f | 225 | //---------------------------------------------------- |
226 | // Track matching | |
227 | //---------------------------------------------------- | |
a520bcd0 | 228 | void FindMatches(AliVEvent *event, TObjArray * clusterArr=0x0, const AliEMCALGeometry *geom=0x0); |
229 | Int_t FindMatchedClusterInEvent(const AliESDtrack *track, const AliVEvent *event, | |
230 | const AliEMCALGeometry *geom, Float_t &dEta, Float_t &dPhi); | |
7f5392da | 231 | Int_t FindMatchedClusterInClusterArr(const AliExternalTrackParam *emcalParam, |
232 | AliExternalTrackParam *trkParam, | |
233 | const TObjArray * clusterArr, | |
234 | Float_t &dEta, Float_t &dPhi); | |
40891fa2 | 235 | static Bool_t ExtrapolateTrackToEMCalSurface(AliVTrack *track, /*note, on success the call will change the track*/ |
18a566cc | 236 | Double_t emcalR=440, Double_t mass=0.1396, |
237 | Double_t step=20, Double_t minpT=0.35, | |
238 | Bool_t useMassForTracking = kFALSE); | |
a520bcd0 | 239 | static Bool_t ExtrapolateTrackToEMCalSurface(AliExternalTrackParam *trkParam, |
fb8eab96 | 240 | Double_t emcalR, Double_t mass, Double_t step, |
a29b2a8a | 241 | Float_t &eta, Float_t &phi, Float_t &pt); |
88b96ad8 | 242 | static Bool_t ExtrapolateTrackToPosition(AliExternalTrackParam *trkParam, const Float_t *clsPos, |
fb8eab96 | 243 | Double_t mass, Double_t step, |
a520bcd0 | 244 | Float_t &tmpEta, Float_t &tmpPhi); |
7f5392da | 245 | static Bool_t ExtrapolateTrackToCluster (AliExternalTrackParam *trkParam, const AliVCluster *cluster, |
fb8eab96 | 246 | Double_t mass, Double_t step, |
a520bcd0 | 247 | Float_t &tmpEta, Float_t &tmpPhi); |
7f5392da | 248 | Bool_t ExtrapolateTrackToCluster (AliExternalTrackParam *trkParam, const AliVCluster *cluster, |
88b96ad8 | 249 | Float_t &tmpEta, Float_t &tmpPhi); |
fb8eab96 | 250 | UInt_t FindMatchedPosForCluster(Int_t clsIndex) const; |
251 | UInt_t FindMatchedPosForTrack (Int_t trkIndex) const; | |
fb8eab96 | 252 | void GetMatchedResiduals (Int_t clsIndex, Float_t &dEta, Float_t &dPhi); |
253 | void GetMatchedClusterResiduals(Int_t trkIndex, Float_t &dEta, Float_t &dPhi); | |
01d44f1f | 254 | Int_t GetMatchedTrackIndex(Int_t clsIndex); |
255 | Int_t GetMatchedClusterIndex(Int_t trkIndex); | |
fb8eab96 | 256 | Bool_t IsClusterMatched(Int_t clsIndex) const; |
257 | Bool_t IsTrackMatched (Int_t trkIndex) const; | |
dda65b42 | 258 | void SetClusterMatchedToTrack (const AliVEvent *event); |
259 | void SetTracksMatchedToCluster(const AliVEvent *event); | |
01d44f1f | 260 | void SwitchOnCutEtaPhiSum() { fCutEtaPhiSum = kTRUE ; |
261 | fCutEtaPhiSeparate = kFALSE ; } | |
262 | void SwitchOnCutEtaPhiSeparate() { fCutEtaPhiSeparate = kTRUE ; | |
263 | fCutEtaPhiSum = kFALSE ; } | |
01d44f1f | 264 | Float_t GetCutR() const { return fCutR ; } |
265 | Float_t GetCutEta() const { return fCutEta ; } | |
266 | Float_t GetCutPhi() const { return fCutPhi ; } | |
8fc351e3 | 267 | Double_t GetClusterWindow() const { return fClusterWindow ; } |
01d44f1f | 268 | void SetCutR(Float_t cutR) { fCutR = cutR ; } |
269 | void SetCutEta(Float_t cutEta) { fCutEta = cutEta ; } | |
270 | void SetCutPhi(Float_t cutPhi) { fCutPhi = cutPhi ; } | |
8fc351e3 | 271 | void SetClusterWindow(Double_t window) { fClusterWindow = window ; } |
01d44f1f | 272 | void SetCutZ(Float_t cutZ) { printf("Obsolete fucntion of cutZ=%1.1f\n",cutZ) ; } //Obsolete |
a29b2a8a | 273 | void SetEMCalSurfaceDistance(Double_t d) { fEMCalSurfaceDistance = d ; } |
01d44f1f | 274 | Double_t GetMass() const { return fMass ; } |
8fc351e3 | 275 | Double_t GetStep() const { return fStepCluster ; } |
276 | Double_t GetStepSurface() const { return fStepSurface ; } | |
01d44f1f | 277 | void SetMass(Double_t mass) { fMass = mass ; } |
da34fafe | 278 | void SetStep(Double_t step) { fStepSurface = step ; } |
279 | void SetStepCluster(Double_t step) { fStepCluster = step ; } | |
42ceff04 | 280 | void SetITSTrackSA(Bool_t isITS) { fITSTrackSA = isITS ; } //Special Handle of AliExternTrackParam |
18a566cc | 281 | |
a7e5a381 | 282 | // Exotic cells / clusters |
fb8eab96 | 283 | Bool_t IsExoticCell(Int_t absId, AliVCaloCells* cells, Int_t bc =-1) ; |
a7e5a381 | 284 | void SwitchOnRejectExoticCell() { fRejectExoticCells = kTRUE ; } |
285 | void SwitchOffRejectExoticCell() { fRejectExoticCells = kFALSE ; } | |
ba19aaf1 | 286 | Bool_t IsRejectExoticCell() const { return fRejectExoticCells ; } |
fb8eab96 | 287 | Float_t GetECross(Int_t absID, Double_t tcell, |
288 | AliVCaloCells* cells, Int_t bc); | |
ba19aaf1 | 289 | Float_t GetExoticCellFractionCut() const { return fExoticCellFraction ; } |
290 | Float_t GetExoticCellDiffTimeCut() const { return fExoticCellDiffTime ; } | |
291 | Float_t GetExoticCellMinAmplitudeCut() const { return fExoticCellMinAmplitude ; } | |
a7e5a381 | 292 | void SetExoticCellFractionCut(Float_t f) { fExoticCellFraction = f ; } |
293 | void SetExoticCellDiffTimeCut(Float_t dt) { fExoticCellDiffTime = dt ; } | |
294 | void SetExoticCellMinAmplitudeCut(Float_t ma) { fExoticCellMinAmplitude = ma ; } | |
fb8eab96 | 295 | Bool_t IsExoticCluster(const AliVCluster *cluster, AliVCaloCells* cells, Int_t bc=0) ; |
a7e5a381 | 296 | void SwitchOnRejectExoticCluster() { fRejectExoticCluster = kTRUE ; |
297 | fRejectExoticCells = kTRUE ; } | |
298 | void SwitchOffRejectExoticCluster() { fRejectExoticCluster = kFALSE ; } | |
01d44f1f | 299 | Bool_t IsRejectExoticCluster() const { return fRejectExoticCluster ; } |
c8fcffd3 | 300 | |
a7e5a381 | 301 | //Cluster cut |
a520bcd0 | 302 | Bool_t IsGoodCluster(AliVCluster *cluster, const AliEMCALGeometry *geom, |
fb8eab96 | 303 | AliVCaloCells* cells, Int_t bc =-1); |
bd8c7aef | 304 | |
305 | //Track Cuts | |
01d44f1f | 306 | Bool_t IsAccepted(AliESDtrack *track); |
307 | void InitTrackCuts(); | |
308 | void SetTrackCutsType(Int_t type) { fTrackCutsType = type ; | |
309 | InitTrackCuts() ; } | |
310 | Int_t GetTrackCutsType() const { return fTrackCutsType; } | |
bd8c7aef | 311 | |
a6a1e3ab | 312 | // Define AOD track type for matching |
313 | void SwitchOffAODHybridTracksMatch() { fAODHybridTracks = kFALSE ; } | |
314 | void SwitchOffAODTPCOnlyTracksMatch() { fAODTPCOnlyTracks = kFALSE ; } | |
315 | void SwitchOnAODHybridTracksMatch() { fAODHybridTracks = kTRUE ; SwitchOffAODTPCOnlyTracksMatch() ; } | |
316 | void SwitchOnAODTPCOnlyTracksMatch() { fAODTPCOnlyTracks = kTRUE ; SwitchOffAODHybridTracksMatch() ; } | |
317 | void SetAODTrackFilterMask( UInt_t mask) { fAODFilterMask = mask ; | |
318 | SwitchOffAODTPCOnlyTracksMatch() ; SwitchOffAODHybridTracksMatch() ; } | |
c8fcffd3 | 319 | |
a6a1e3ab | 320 | // track quality cut setters |
01d44f1f | 321 | void SetMinTrackPt(Double_t pt=0) { fCutMinTrackPt = pt ; } |
322 | void SetMinNClustersTPC(Int_t min=-1) { fCutMinNClusterTPC = min ; } | |
323 | void SetMinNClustersITS(Int_t min=-1) { fCutMinNClusterITS = min ; } | |
324 | void SetMaxChi2PerClusterTPC(Float_t max=1e10) { fCutMaxChi2PerClusterTPC = max ; } | |
325 | void SetMaxChi2PerClusterITS(Float_t max=1e10) { fCutMaxChi2PerClusterITS = max ; } | |
326 | void SetRequireTPCRefit(Bool_t b=kFALSE) { fCutRequireTPCRefit = b ; } | |
327 | void SetRequireITSRefit(Bool_t b=kFALSE) { fCutRequireITSRefit = b ; } | |
328 | void SetAcceptKinkDaughters(Bool_t b=kTRUE) { fCutAcceptKinkDaughters = b ; } | |
329 | void SetMaxDCAToVertexXY(Float_t dist=1e10) { fCutMaxDCAToVertexXY = dist ; } | |
330 | void SetMaxDCAToVertexZ(Float_t dist=1e10) { fCutMaxDCAToVertexZ = dist ; } | |
331 | void SetDCAToVertex2D(Bool_t b=kFALSE) { fCutDCAToVertex2D = b ; } | |
42ceff04 | 332 | void SetRequireITSStandAlone(Bool_t b=kFALSE) {fCutRequireITSStandAlone = b;} //Marcel |
333 | void SetRequireITSPureStandAlone(Bool_t b=kFALSE){fCutRequireITSpureSA = b;} | |
a6a1e3ab | 334 | |
fa4287a2 | 335 | // getters |
01d44f1f | 336 | Double_t GetMinTrackPt() const { return fCutMinTrackPt ; } |
337 | Int_t GetMinNClusterTPC() const { return fCutMinNClusterTPC ; } | |
338 | Int_t GetMinNClustersITS() const { return fCutMinNClusterITS ; } | |
339 | Float_t GetMaxChi2PerClusterTPC() const { return fCutMaxChi2PerClusterTPC ; } | |
340 | Float_t GetMaxChi2PerClusterITS() const { return fCutMaxChi2PerClusterITS ; } | |
341 | Bool_t GetRequireTPCRefit() const { return fCutRequireTPCRefit ; } | |
342 | Bool_t GetRequireITSRefit() const { return fCutRequireITSRefit ; } | |
343 | Bool_t GetAcceptKinkDaughters() const { return fCutAcceptKinkDaughters ; } | |
344 | Float_t GetMaxDCAToVertexXY() const { return fCutMaxDCAToVertexXY ; } | |
345 | Float_t GetMaxDCAToVertexZ() const { return fCutMaxDCAToVertexZ ; } | |
346 | Bool_t GetDCAToVertex2D() const { return fCutDCAToVertex2D ; } | |
42ceff04 | 347 | Bool_t GetRequireITSStandAlone() const { return fCutRequireITSStandAlone ; } //Marcel |
fd6df01c | 348 | |
8fc351e3 | 349 | private: |
b540d03f | 350 | //Position recalculation |
96957075 | 351 | Float_t fMisalTransShift[15]; // Shift parameters |
352 | Float_t fMisalRotShift[15]; // Shift parameters | |
96957075 | 353 | Int_t fParticleType; // Particle type for depth calculation |
354 | Int_t fPosAlgo; // Position recalculation algorithm | |
355 | Float_t fW0; // Weight0 | |
01d44f1f | 356 | |
357 | // Non linearity | |
358 | Int_t fNonLinearityFunction; // Non linearity function choice | |
359 | Float_t fNonLinearityParams[7]; // Parameters for the non linearity function | |
7e0ecb89 | 360 | Int_t fNonLinearThreshold; // Non linearity threshold value for kBeamTesh non linearity function |
fd6df01c | 361 | |
01d44f1f | 362 | // Energy smearing for MC |
363 | Bool_t fSmearClusterEnergy; // Smear cluster energy, to be done only for simulated data to match real data | |
364 | Float_t fSmearClusterParam[3]; // Smearing parameters | |
365 | TRandom3 fRandom; // Random generator | |
366 | ||
3bfc4732 | 367 | // Energy Recalibration |
368 | Bool_t fCellsRecalibrated; // Internal bool to check if cells (time/energy) where recalibrated and not recalibrate them when recalculating different things | |
fd6df01c | 369 | Bool_t fRecalibration; // Switch on or off the recalibration |
370 | TObjArray* fEMCALRecalibrationFactors; // Array of histograms with map of recalibration factors, EMCAL | |
01d44f1f | 371 | |
3bfc4732 | 372 | // Time Recalibration |
373 | Bool_t fTimeRecalibration; // Switch on or off the time recalibration | |
374 | TObjArray* fEMCALTimeRecalibrationFactors; // Array of histograms with map of time recalibration factors, EMCAL | |
375 | ||
376 | // Recalibrate with run dependent corrections, energy | |
377 | Bool_t fUseRunCorrectionFactors; // Use Run Dependent Correction | |
01d44f1f | 378 | |
b540d03f | 379 | // Bad Channels |
fd6df01c | 380 | Bool_t fRemoveBadChannels; // Check the channel status provided and remove clusters with bad channels |
78467229 | 381 | Bool_t fRecalDistToBadChannels; // Calculate distance from highest energy tower of cluster to closes bad channel |
fd6df01c | 382 | TObjArray* fEMCALBadChannelMap; // Array of histograms with map of bad channels, EMCAL |
b540d03f | 383 | |
384 | // Border cells | |
fd6df01c | 385 | Int_t fNCellsFromEMCALBorder; // Number of cells from EMCAL border the cell with maximum amplitude has to be. |
386 | Bool_t fNoEMCALBorderAtEta0; // Do fiducial cut in EMCAL region eta = 0? | |
b540d03f | 387 | |
a7e5a381 | 388 | // Exotic cell / cluster |
01d44f1f | 389 | Bool_t fRejectExoticCluster; // Switch on or off exotic cluster rejection |
a7e5a381 | 390 | Bool_t fRejectExoticCells; // Remove exotic cells |
391 | Float_t fExoticCellFraction; // Good cell if fraction < 1-ecross/ecell | |
392 | Float_t fExoticCellDiffTime; // If time of candidate to exotic and close cell is too different (in ns), it must be noisy, set amp to 0 | |
393 | Float_t fExoticCellMinAmplitude; // Check for exotic only if amplitud is larger than this value | |
01d44f1f | 394 | |
395 | // PID | |
396 | AliEMCALPIDUtils * fPIDUtils; // Recalculate PID parameters | |
397 | ||
bb6f5f0b | 398 | //Track matching |
399 | UInt_t fAODFilterMask; // Filter mask to select AOD tracks. Refer to $ALICE_ROOT/ANALYSIS/macros/AddTaskESDFilter.C | |
1af378e6 | 400 | Bool_t fAODHybridTracks; // Match with hybrid |
a6a1e3ab | 401 | Bool_t fAODTPCOnlyTracks; // Match with TPC only tracks |
1af378e6 | 402 | |
b540d03f | 403 | TArrayI * fMatchedTrackIndex; // Array that stores indexes of matched tracks |
96957075 | 404 | TArrayI * fMatchedClusterIndex; // Array that stores indexes of matched clusters |
fa4287a2 | 405 | TArrayF * fResidualEta; // Array that stores the residual eta |
406 | TArrayF * fResidualPhi; // Array that stores the residual phi | |
407 | Bool_t fCutEtaPhiSum; // Place cut on sqrt(dEta^2+dPhi^2) | |
408 | Bool_t fCutEtaPhiSeparate; // Cut on dEta and dPhi separately | |
409 | Float_t fCutR; // sqrt(dEta^2+dPhi^2) cut on matching | |
410 | Float_t fCutEta; // dEta cut on matching | |
411 | Float_t fCutPhi; // dPhi cut on matching | |
8fc351e3 | 412 | Double_t fClusterWindow; // Select clusters in the window to be matched |
bb6f5f0b | 413 | Double_t fMass; // Mass hypothesis of the track |
8fc351e3 | 414 | Double_t fStepSurface; // Length of step to extrapolate tracks to EMCal surface |
415 | Double_t fStepCluster; // Length of step to extrapolate tracks to clusters | |
42ceff04 | 416 | Bool_t fITSTrackSA; // If track matching is to be done with ITS tracks standing alone |
a29b2a8a | 417 | Double_t fEMCalSurfaceDistance; // EMCal surface distance (= 430 by default, the last 10 cm are propagated on a cluster-track pair basis) |
42ceff04 | 418 | |
9741c6a0 | 419 | // Track cuts |
5f7714ad | 420 | Int_t fTrackCutsType; // Esd track cuts type for matching |
fa4287a2 | 421 | Double_t fCutMinTrackPt; // Cut on track pT |
96957075 | 422 | Int_t fCutMinNClusterTPC; // Min number of tpc clusters |
423 | Int_t fCutMinNClusterITS; // Min number of its clusters | |
424 | Float_t fCutMaxChi2PerClusterTPC; // Max tpc fit chi2 per tpc cluster | |
425 | Float_t fCutMaxChi2PerClusterITS; // Max its fit chi2 per its cluster | |
426 | Bool_t fCutRequireTPCRefit; // Require TPC refit | |
427 | Bool_t fCutRequireITSRefit; // Require ITS refit | |
428 | Bool_t fCutAcceptKinkDaughters; // Accepting kink daughters? | |
429 | Float_t fCutMaxDCAToVertexXY; // Track-to-vertex cut in max absolute distance in xy-plane | |
430 | Float_t fCutMaxDCAToVertexZ; // Track-to-vertex cut in max absolute distance in z-plane | |
8fc351e3 | 431 | Bool_t fCutDCAToVertex2D; // If true a 2D DCA cut is made. |
42ceff04 | 432 | Bool_t fCutRequireITSStandAlone; // Require ITSStandAlone |
18a566cc | 433 | Bool_t fCutRequireITSpureSA; // ITS pure standalone tracks |
42ceff04 | 434 | |
18a566cc | 435 | ClassDef(AliEMCALRecoUtils, 22) |
d9b3567c | 436 | }; |
d9b3567c | 437 | #endif // ALIEMCALRECOUTILS_H |
438 | ||
439 |