]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/CaloTrackCorrBase/AliIsolationCut.h
Fixes for wrong use of const causing PW.CAST_TO_QUALIFIED_TYPE defect in Coverity
[u/mrichter/AliRoot.git] / PWG / CaloTrackCorrBase / AliIsolationCut.h
CommitLineData
1a31a9ab 1#ifndef ALIISOLATIONCUT_H
2#define ALIISOLATIONCUT_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
1a31a9ab 5
6//_________________________________________________________________________
7// Class containing methods for the isolation cut.
8// An AOD candidate (AliAODPWG4ParticleCorrelation type)
9// is passed. Look in a cone around the candidate and study
10// the hadronic activity inside to decide if the candidate is isolated
11//
1a31a9ab 12// -- Author: Gustavo Conesa (INFN-LNF)
b960c7eb 13//
14// -- Yaxian Mao (add the possibility for different IC method with different pt range, 01/10/2010)
1a31a9ab 15
16// --- ROOT system ---
17#include <TObject.h>
18class TObjArray ;
19
20// --- ANALYSIS system ---
21class AliAODPWG4ParticleCorrelation ;
22class AliCaloTrackReader ;
ac5111f9 23class AliCaloPID;
b960c7eb 24
1a31a9ab 25class AliIsolationCut : public TObject {
26
27 public:
c5693f62 28
29 AliIsolationCut() ; // default ctor
30 virtual ~AliIsolationCut() {;} // virtual dtor
1a31a9ab 31
32 // Enums
33
70561f53 34 enum type { kPtThresIC, kSumPtIC, kPtFracIC, kSumPtFracIC, kSumDensityIC, kSumBkgSubIC } ;
1a31a9ab 35
36 enum partInCone { kNeutralAndCharged=0, kOnlyNeutral=1, kOnlyCharged=2 } ;
37
38 // Main Methods
39
40 void InitParameters() ;
41
42 TString GetICParametersList() ;
43
70561f53 44 Float_t GetCellDensity( AliAODPWG4ParticleCorrelation * pCandidate,
45 AliCaloTrackReader * reader) const ;
f8d07abf 46
70561f53 47 void MakeIsolationCut(TObjArray * plCTS, TObjArray * plNe,
48 AliCaloTrackReader * reader,
49 AliCaloPID * pid,
8a2dbbff 50 Bool_t bFillAOD,
51 AliAODPWG4ParticleCorrelation * pCandidate, TString aodObjArrayName,
1a31a9ab 52 Int_t &n, Int_t & nfrac, Float_t &ptsum, Bool_t & isolated) const ;
53
54 void Print(const Option_t * opt) const ;
55
8a2dbbff 56 Float_t Radius(Float_t etaCandidate, Float_t phiCandidate, Float_t eta, Float_t phi) const ;
1a31a9ab 57
70561f53 58 // Cone background studies medthods
59
8a2dbbff 60 Float_t CalculateExcessAreaFraction(Float_t excess) const ;
70561f53 61
8a2dbbff 62 void CalculateUEBandClusterNormalization(AliCaloTrackReader * reader, Float_t etaC, Float_t phiC,
63 Float_t phiUEptsumCluster, Float_t etaUEptsumCluster,
64 Float_t & phiUEptsumClusterNorm, Float_t & etaUEptsumClusterNorm,
65 Float_t & excessFracEta, Float_t & excessFracPhi ) const ;
70561f53 66
8a2dbbff 67 void CalculateUEBandTrackNormalization (AliCaloTrackReader * reader, Float_t etaC, Float_t phiC,
68 Float_t phiUEptsumTrack, Float_t etaUEptsumTrack,
69 Float_t & phiUEptsumTrackNorm, Float_t & etaUEptsumTrackNorm,
70 Float_t & excessFracEta, Float_t & excessFracPhi ) const ;
70561f53 71
72 void GetCoeffNormBadCell(AliAODPWG4ParticleCorrelation * pCandidate,
73 AliCaloTrackReader * reader,
74 Float_t & coneBadCellsCoeff,
75 Float_t & etaBandBadCellsCoeff , Float_t & phiBandBadCellsCoeff) ;
76
77
1a31a9ab 78 // Parameter setters and getters
79
80 Float_t GetConeSize() const { return fConeSize ; }
81 Float_t GetPtThreshold() const { return fPtThreshold ; }
043c8ec2 82 Float_t GetPtThresholdMax() const { return fPtThresholdMax ; }
1a31a9ab 83 Float_t GetSumPtThreshold() const { return fSumPtThreshold ; }
84 Float_t GetPtFraction() const { return fPtFraction ; }
85 Int_t GetICMethod() const { return fICMethod ; }
86 Int_t GetParticleTypeInCone() const { return fPartInCone ; }
22c7f802 87 Bool_t GetFracIsThresh() const { return fFracIsThresh ; }
1a31a9ab 88
89 void SetConeSize(Float_t r) { fConeSize = r ; }
90 void SetPtThreshold(Float_t pt) { fPtThreshold = pt ; }
043c8ec2 91 void SetPtThresholdMax(Float_t pt) { fPtThresholdMax = pt ; }
1a31a9ab 92 void SetSumPtThreshold(Float_t s) { fSumPtThreshold = s ; }
93 void SetPtFraction(Float_t pt) { fPtFraction = pt ; }
94 void SetICMethod(Int_t i ) { fICMethod = i ; }
95 void SetParticleTypeInCone(Int_t i) { fPartInCone = i ; }
03bae431 96 void SetDebug(Int_t d) { fDebug = d ; }
22c7f802 97 void SetFracIsThresh(Bool_t f ) { fFracIsThresh = f ; }
1a31a9ab 98 private:
99
100 Float_t fConeSize ; // Size of the isolation cone
101 Float_t fPtThreshold ; // Mimium pt of the particles in the cone or sum in cone (UE pt mean in the forward region cone)
043c8ec2 102 Float_t fPtThresholdMax ; // Maximum pt of the particles outside the cone (needed to fit shower distribution isolated/non-isolated particles)
1a31a9ab 103 Float_t fSumPtThreshold ; // Minium of sum pt of the particles in the cone (UE sum in the forward region cone)
104 Float_t fPtFraction ; // Fraction of the momentum of particles in cone or sum in cone
105 Int_t fICMethod ; // Isolation cut method to be used
106 // kPtIC: Pt threshold method
107 // kSumPtIC: Cone pt sum method
108 // kPtFracIC: Pt threshold, fraction of candidate pt, method
109 // kSumPtFracIC: Cone pt sum , fraction of cone sum, method
110 Int_t fPartInCone; // Type of particles inside cone:
111 // kNeutralAndCharged, kOnlyNeutral, kOnlyCharged
c5693f62 112
03bae431 113 Int_t fDebug; // Debug level
22c7f802 114 Bool_t fFracIsThresh; // Use threshold instead of fraction when pt leading is small
03bae431 115
b960c7eb 116 AliIsolationCut( const AliIsolationCut & g) ; // cpy ctor
c5693f62 117 AliIsolationCut & operator = (const AliIsolationCut & g) ; // cpy assignment
118
f8d07abf 119 ClassDef(AliIsolationCut,6)
1a31a9ab 120} ;
121
122
123#endif //ALIISOLATIONCUT_H
124
125
126