]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/CaloTrackCorrBase/AliIsolationCut.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWG / CaloTrackCorrBase / AliIsolationCut.h
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     */
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 //
12 // -- Author: Gustavo Conesa (INFN-LNF)
13 //
14 // -- Yaxian Mao (add the possibility for different IC method with different pt range, 01/10/2010)
15
16 // --- ROOT system --- 
17 #include <TObject.h>
18 class TObjArray ;
19
20 // --- ANALYSIS system ---
21 class AliAODPWG4ParticleCorrelation ;
22 class AliCaloTrackReader ;
23 class AliCaloPID; 
24
25 class AliIsolationCut : public TObject {
26   
27  public: 
28   
29   AliIsolationCut() ;            // default ctor
30   virtual ~AliIsolationCut() {;} // virtual dtor
31  
32   // Enums 
33   
34   enum type       { kPtThresIC, kSumPtIC, kPtFracIC, kSumPtFracIC, kSumDensityIC, kSumBkgSubIC } ;
35   
36   enum partInCone { kNeutralAndCharged=0, kOnlyNeutral=1, kOnlyCharged=2 } ;
37         
38   // Main Methods
39   
40   void       InitParameters() ;
41   
42   TString    GetICParametersList() ; 
43   
44   Float_t    GetCellDensity(  AliAODPWG4ParticleCorrelation * pCandidate, 
45                               AliCaloTrackReader * reader) const ;
46
47   void       MakeIsolationCut(TObjArray * plCTS, TObjArray * plNe, 
48                               AliCaloTrackReader * reader, 
49                               AliCaloPID * pid, 
50                               Bool_t bFillAOD,
51                               AliAODPWG4ParticleCorrelation  * pCandidate, TString aodObjArrayName,
52                               Int_t &n, Int_t & nfrac, Float_t &ptsum, Bool_t & isolated) const ;  
53   
54   void       Print(const Option_t * opt) const ;
55   
56   Float_t    Radius(Float_t etaCandidate, Float_t phiCandidate, Float_t eta, Float_t phi) const ;
57   
58   // Cone background studies medthods
59   
60   Float_t  CalculateExcessAreaFraction(Float_t excess) const ;
61
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 ;
66   
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 ;
71
72   void     GetCoeffNormBadCell(AliAODPWG4ParticleCorrelation * pCandidate,
73                                AliCaloTrackReader * reader, 
74                                Float_t & coneBadCellsCoeff,
75                                Float_t & etaBandBadCellsCoeff  , Float_t & phiBandBadCellsCoeff) ;
76
77   
78   // Parameter setters and getters
79   
80   Float_t    GetConeSize()            const { return fConeSize       ; }
81   Float_t    GetPtThreshold()         const { return fPtThreshold    ; }
82   Float_t    GetPtThresholdMax()      const { return fPtThresholdMax    ; }
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     ; }
87   Bool_t     GetFracIsThresh()        const { return fFracIsThresh   ; }
88         
89   void       SetConeSize(Float_t r)         { fConeSize       = r    ; }
90   void       SetPtThreshold(Float_t pt)     { fPtThreshold    = pt   ; }
91   void       SetPtThresholdMax(Float_t pt)  { fPtThresholdMax    = pt   ; }
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    ; }
96   void       SetDebug(Int_t d)              { fDebug          = d    ; }
97   void       SetFracIsThresh(Bool_t f )     { fFracIsThresh   = f    ; }
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)
102   Float_t    fPtThresholdMax ; // Maximum pt of the particles outside the cone (needed to fit shower distribution isolated/non-isolated particles)
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
112
113   Int_t      fDebug;           // Debug level
114   Bool_t     fFracIsThresh;    // Use threshold instead of fraction when pt leading is small
115   
116   AliIsolationCut(              const AliIsolationCut & g) ; // cpy ctor
117   AliIsolationCut & operator = (const AliIsolationCut & g) ; // cpy assignment
118   
119   ClassDef(AliIsolationCut,6)
120 } ;
121
122
123 #endif //ALIISOLATIONCUT_H
124
125
126