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