]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/CaloTrackCorrBase/AliIsolationCut.h
Merge branch 'feature-movesplit'
[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 #include <TLorentzVector.h>
20
21 // --- ANALYSIS system ---
22 class AliAODPWG4ParticleCorrelation ;
23 class AliCaloTrackReader ;
24 class AliCaloPID; 
25
26 class AliIsolationCut : public TObject {
27   
28  public: 
29   
30   AliIsolationCut() ;            // default ctor
31   virtual ~AliIsolationCut() {;} // virtual dtor
32  
33   // Enums 
34   
35   enum type       { kPtThresIC, kSumPtIC, kPtFracIC, kSumPtFracIC, kSumDensityIC, kSumBkgSubIC } ;
36   
37   enum partInCone { kNeutralAndCharged=0, kOnlyNeutral=1, kOnlyCharged=2 } ;
38         
39   // Main Methods
40   
41   void       InitParameters() ;
42   
43   TString    GetICParametersList() ; 
44   
45   Float_t    GetCellDensity(  AliAODPWG4ParticleCorrelation * pCandidate, 
46                               AliCaloTrackReader * reader) const ;
47
48   void       MakeIsolationCut(TObjArray * plCTS, TObjArray * plNe, 
49                               AliCaloTrackReader * reader, 
50                               AliCaloPID * pid, 
51                               Bool_t bFillAOD,
52                               AliAODPWG4ParticleCorrelation  * pCandidate, TString aodObjArrayName,
53                               Int_t &n, Int_t & nfrac, Float_t &ptSum, Float_t &ptLead, Bool_t & isolated) ;
54   
55   void       Print(const Option_t * opt) const ;
56   
57   Float_t    Radius(Float_t etaCandidate, Float_t phiCandidate, Float_t eta, Float_t phi) const ;
58   
59   // Cone background studies medthods
60   
61   Float_t    CalculateExcessAreaFraction(Float_t excess) const ;
62
63   void       CalculateUEBandClusterNormalization(AliCaloTrackReader * reader,     Float_t   etaC, Float_t phiC,
64                                                  Float_t   phiUEptsumCluster,     Float_t   etaUEptsumCluster,
65                                                  Float_t & phiUEptsumClusterNorm, Float_t & etaUEptsumClusterNorm,
66                                                  Float_t & excessFracEta,         Float_t & excessFracPhi              ) const ;
67   
68   void       CalculateUEBandTrackNormalization  (AliCaloTrackReader * reader,     Float_t   etaC,  Float_t phiC,
69                                                  Float_t   phiUEptsumTrack,       Float_t   etaUEptsumTrack,
70                                                  Float_t & phiUEptsumTrackNorm,   Float_t & etaUEptsumTrackNorm,
71                                                  Float_t & excessFracEta,         Float_t & excessFracPhi              )   const ;
72
73   void       GetCoeffNormBadCell(AliAODPWG4ParticleCorrelation * pCandidate,
74                                  AliCaloTrackReader * reader,
75                                  Float_t & coneBadCellsCoeff,
76                                  Float_t & etaBandBadCellsCoeff  , Float_t & phiBandBadCellsCoeff) ;
77
78   
79   // Parameter setters and getters
80   
81   Float_t    GetConeSize()            const { return fConeSize       ; }
82   Float_t    GetPtThreshold()         const { return fPtThreshold    ; }
83   Float_t    GetPtThresholdMax()      const { return fPtThresholdMax ; }
84   Float_t    GetSumPtThreshold()      const { return fSumPtThreshold ; }
85   Float_t    GetSumPtThresholdMax()   const { return fSumPtThresholdMax ; }
86   Float_t    GetPtFraction()          const { return fPtFraction     ; }
87   Int_t      GetICMethod()            const { return fICMethod       ; }
88   Int_t      GetParticleTypeInCone()  const { return fPartInCone     ; }
89   Int_t      GetDebug()               const { return fDebug          ; }
90   Bool_t     GetFracIsThresh()        const { return fFracIsThresh   ; }
91         
92   void       SetConeSize(Float_t r)         { fConeSize       = r    ; }
93   void       SetPtThreshold(Float_t pt)     { fPtThreshold    = pt   ; }
94   void       SetPtThresholdMax(Float_t pt)  { fPtThresholdMax = pt   ; }
95   void       SetSumPtThreshold(Float_t s)   { fSumPtThreshold = s    ; }
96   void       SetSumPtThresholdMax(Float_t s){ fSumPtThresholdMax = s ; }
97   void       SetPtFraction(Float_t pt)      { fPtFraction     = pt   ; }
98   void       SetICMethod(Int_t i )          { fICMethod       = i    ; }
99   void       SetParticleTypeInCone(Int_t i) { fPartInCone     = i    ; }
100   void       SetDebug(Int_t d)              { fDebug          = d    ; }
101   void       SetFracIsThresh(Bool_t f )     { fFracIsThresh   = f    ; }
102  private:
103   
104   Float_t    fConeSize ;         // Size of the isolation cone
105   Float_t    fPtThreshold ;      // Mimium pt of the particles in the cone or sum in cone (UE pt mean in the forward region cone)
106   Float_t    fPtThresholdMax ;   // Maximum pt of the particles outside the cone (needed to fit shower distribution isolated/non-isolated particles)
107   Float_t    fSumPtThreshold ;   // Minimum of sum pt of the particles in the cone (UE sum in the forward region cone)
108   Float_t    fSumPtThresholdMax ;// Maximum of sum pt of the particles in the cone (UE sum in the forward region cone)
109   Float_t    fPtFraction ;       // Fraction of the momentum of particles in cone or sum in cone
110   Int_t      fICMethod ;         // Isolation cut method to be used
111                                  // kPtIC: Pt threshold method
112                                  // kSumPtIC: Cone pt sum method
113                                  // kPtFracIC:   Pt threshold, fraction of candidate pt, method
114                                  // kSumPtFracIC:   Cone pt sum , fraction of cone sum, method
115   Int_t      fPartInCone;        // Type of particles inside cone:
116                                  // kNeutralAndCharged, kOnlyNeutral, kOnlyCharged
117
118   Int_t      fDebug;             // Debug level
119   Bool_t     fFracIsThresh;      // Use threshold instead of fraction when pt leading is small
120   
121   TLorentzVector fMomentum;      //! momentum of cluster
122   TVector3       fTrackVector;   //! track moment
123   
124   AliIsolationCut(              const AliIsolationCut & g) ; // cpy ctor
125   AliIsolationCut & operator = (const AliIsolationCut & g) ; // cpy assignment
126   
127   ClassDef(AliIsolationCut,9)
128 } ;
129
130
131 #endif //ALIISOLATIONCUT_H
132
133
134