]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/CaloTrackCorrBase/AliIsolationCut.h
Coverity 18392+18321 and fix leaky assignment operator
[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
34 enum type { kPtThresIC, kSumPtIC, kPtFracIC, kSumPtFracIC } ;
35
36 enum partInCone { kNeutralAndCharged=0, kOnlyNeutral=1, kOnlyCharged=2 } ;
37
38 // Main Methods
39
40 void InitParameters() ;
41
42 TString GetICParametersList() ;
43
ac5111f9 44 void MakeIsolationCut(const TObjArray * plCTS, const TObjArray * plNe,
45 const AliCaloTrackReader * reader,
46 const AliCaloPID * pid,
1a31a9ab 47 const Bool_t bFillAOD, AliAODPWG4ParticleCorrelation * pCandidate, const TString &aodObjArrayName,
48 Int_t &n, Int_t & nfrac, Float_t &ptsum, Bool_t & isolated) const ;
49
50 void Print(const Option_t * opt) const ;
51
f18cb329 52 Float_t Radius(const Float_t etaCandidate, const Float_t phiCandidate, const Float_t eta, const Float_t phi) const ;
1a31a9ab 53
54 // Parameter setters and getters
55
56 Float_t GetConeSize() const { return fConeSize ; }
57 Float_t GetPtThreshold() const { return fPtThreshold ; }
58 Float_t GetSumPtThreshold() const { return fSumPtThreshold ; }
59 Float_t GetPtFraction() const { return fPtFraction ; }
60 Int_t GetICMethod() const { return fICMethod ; }
61 Int_t GetParticleTypeInCone() const { return fPartInCone ; }
62
63 void SetConeSize(Float_t r) { fConeSize = r ; }
64 void SetPtThreshold(Float_t pt) { fPtThreshold = pt ; }
65 void SetSumPtThreshold(Float_t s) { fSumPtThreshold = s ; }
66 void SetPtFraction(Float_t pt) { fPtFraction = pt ; }
67 void SetICMethod(Int_t i ) { fICMethod = i ; }
68 void SetParticleTypeInCone(Int_t i) { fPartInCone = i ; }
03bae431 69 void SetDebug(Int_t d) { fDebug = d ; }
1a31a9ab 70 private:
71
72 Float_t fConeSize ; // Size of the isolation cone
73 Float_t fPtThreshold ; // Mimium pt of the particles in the cone or sum in cone (UE pt mean in the forward region cone)
74 Float_t fSumPtThreshold ; // Minium of sum pt of the particles in the cone (UE sum in the forward region cone)
75 Float_t fPtFraction ; // Fraction of the momentum of particles in cone or sum in cone
76 Int_t fICMethod ; // Isolation cut method to be used
77 // kPtIC: Pt threshold method
78 // kSumPtIC: Cone pt sum method
79 // kPtFracIC: Pt threshold, fraction of candidate pt, method
80 // kSumPtFracIC: Cone pt sum , fraction of cone sum, method
81 Int_t fPartInCone; // Type of particles inside cone:
82 // kNeutralAndCharged, kOnlyNeutral, kOnlyCharged
c5693f62 83
03bae431 84 Int_t fDebug; // Debug level
85
b960c7eb 86 AliIsolationCut( const AliIsolationCut & g) ; // cpy ctor
c5693f62 87 AliIsolationCut & operator = (const AliIsolationCut & g) ; // cpy assignment
88
03bae431 89 ClassDef(AliIsolationCut,5)
1a31a9ab 90} ;
91
92
93#endif //ALIISOLATIONCUT_H
94
95
96