]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/CaloTrackCorrBase/AliIsolationCut.h
add nested decay (i.e. allow daughters to decay to any requested depth)
[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, Float_t &ptLead, 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    GetSumPtThresholdMax()   const { return fSumPtThresholdMax ; }
85   Float_t    GetPtFraction()          const { return fPtFraction     ; }
86   Int_t      GetICMethod()            const { return fICMethod       ; }
87   Int_t      GetParticleTypeInCone()  const { return fPartInCone     ; }
88   Bool_t     GetFracIsThresh()        const { return fFracIsThresh   ; }
89         
90   void       SetConeSize(Float_t r)         { fConeSize       = r    ; }
91   void       SetPtThreshold(Float_t pt)     { fPtThreshold    = pt   ; }
92   void       SetPtThresholdMax(Float_t pt)  { fPtThresholdMax = pt   ; }
93   void       SetSumPtThreshold(Float_t s)   { fSumPtThreshold = s    ; }
94   void       SetSumPtThresholdMax(Float_t s){ fSumPtThresholdMax = s ; }
95   void       SetPtFraction(Float_t pt)      { fPtFraction     = pt   ; }
96   void       SetICMethod(Int_t i )          { fICMethod       = i    ; }
97   void       SetParticleTypeInCone(Int_t i) { fPartInCone     = i    ; }
98   void       SetDebug(Int_t d)              { fDebug          = d    ; }
99   void       SetFracIsThresh(Bool_t f )     { fFracIsThresh   = f    ; }
100  private:
101   
102   Float_t    fConeSize ;         // Size of the isolation cone
103   Float_t    fPtThreshold ;      // Mimium pt of the particles in the cone or sum in cone (UE pt mean in the forward region cone)
104   Float_t    fPtThresholdMax ;   // Maximum pt of the particles outside the cone (needed to fit shower distribution isolated/non-isolated particles)
105   Float_t    fSumPtThreshold ;   // Minimum of sum pt of the particles in the cone (UE sum in the forward region cone)
106   Float_t    fSumPtThresholdMax ;// Maximum of sum pt of the particles in the cone (UE sum in the forward region cone)
107   Float_t    fPtFraction ;       // Fraction of the momentum of particles in cone or sum in cone
108   Int_t      fICMethod ;         // Isolation cut method to be used
109                                  // kPtIC: Pt threshold method
110                                  // kSumPtIC: Cone pt sum method
111                                  // kPtFracIC:   Pt threshold, fraction of candidate pt, method
112                                  // kSumPtFracIC:   Cone pt sum , fraction of cone sum, method
113   Int_t      fPartInCone;        // Type of particles inside cone:
114                                  // kNeutralAndCharged, kOnlyNeutral, kOnlyCharged
115
116   Int_t      fDebug;             // Debug level
117   Bool_t     fFracIsThresh;      // Use threshold instead of fraction when pt leading is small
118   
119   AliIsolationCut(              const AliIsolationCut & g) ; // cpy ctor
120   AliIsolationCut & operator = (const AliIsolationCut & g) ; // cpy assignment
121   
122   ClassDef(AliIsolationCut,7)
123 } ;
124
125
126 #endif //ALIISOLATIONCUT_H
127
128
129