#ifndef ALIISOLATIONCUT_H
#define ALIISOLATIONCUT_H
#include <TObject.h>
class TObjArray ;
#include <TLorentzVector.h>
class AliAODPWG4ParticleCorrelation ;
class AliCaloTrackReader ;
class AliCaloPID;
class AliIsolationCut : public TObject {
public:
AliIsolationCut() ;
virtual ~AliIsolationCut() {;}
enum type { kPtThresIC, kSumPtIC, kPtFracIC, kSumPtFracIC, kSumDensityIC, kSumBkgSubIC } ;
enum partInCone { kNeutralAndCharged=0, kOnlyNeutral=1, kOnlyCharged=2 } ;
void InitParameters() ;
TString GetICParametersList() ;
Float_t GetCellDensity( AliAODPWG4ParticleCorrelation * pCandidate,
AliCaloTrackReader * reader) const ;
void MakeIsolationCut(TObjArray * plCTS, TObjArray * plNe,
AliCaloTrackReader * reader,
AliCaloPID * pid,
Bool_t bFillAOD,
AliAODPWG4ParticleCorrelation * pCandidate, TString aodObjArrayName,
Int_t &n, Int_t & nfrac, Float_t &ptSum, Float_t &ptLead, Bool_t & isolated) ;
void Print(const Option_t * opt) const ;
Float_t Radius(Float_t etaCandidate, Float_t phiCandidate, Float_t eta, Float_t phi) const ;
Float_t CalculateExcessAreaFraction(Float_t excess) const ;
void CalculateUEBandClusterNormalization(AliCaloTrackReader * reader, Float_t etaC, Float_t phiC,
Float_t phiUEptsumCluster, Float_t etaUEptsumCluster,
Float_t & phiUEptsumClusterNorm, Float_t & etaUEptsumClusterNorm,
Float_t & excessFracEta, Float_t & excessFracPhi ) const ;
void CalculateUEBandTrackNormalization (AliCaloTrackReader * reader, Float_t etaC, Float_t phiC,
Float_t phiUEptsumTrack, Float_t etaUEptsumTrack,
Float_t & phiUEptsumTrackNorm, Float_t & etaUEptsumTrackNorm,
Float_t & excessFracEta, Float_t & excessFracPhi ) const ;
void GetCoeffNormBadCell(AliAODPWG4ParticleCorrelation * pCandidate,
AliCaloTrackReader * reader,
Float_t & coneBadCellsCoeff,
Float_t & etaBandBadCellsCoeff , Float_t & phiBandBadCellsCoeff) ;
Float_t GetConeSize() const { return fConeSize ; }
Float_t GetPtThreshold() const { return fPtThreshold ; }
Float_t GetPtThresholdMax() const { return fPtThresholdMax ; }
Float_t GetSumPtThreshold() const { return fSumPtThreshold ; }
Float_t GetSumPtThresholdMax() const { return fSumPtThresholdMax ; }
Float_t GetPtFraction() const { return fPtFraction ; }
Int_t GetICMethod() const { return fICMethod ; }
Int_t GetParticleTypeInCone() const { return fPartInCone ; }
Int_t GetDebug() const { return fDebug ; }
Bool_t GetFracIsThresh() const { return fFracIsThresh ; }
void SetConeSize(Float_t r) { fConeSize = r ; }
void SetPtThreshold(Float_t pt) { fPtThreshold = pt ; }
void SetPtThresholdMax(Float_t pt) { fPtThresholdMax = pt ; }
void SetSumPtThreshold(Float_t s) { fSumPtThreshold = s ; }
void SetSumPtThresholdMax(Float_t s){ fSumPtThresholdMax = s ; }
void SetPtFraction(Float_t pt) { fPtFraction = pt ; }
void SetICMethod(Int_t i ) { fICMethod = i ; }
void SetParticleTypeInCone(Int_t i) { fPartInCone = i ; }
void SetDebug(Int_t d) { fDebug = d ; }
void SetFracIsThresh(Bool_t f ) { fFracIsThresh = f ; }
private:
Float_t fConeSize ;
Float_t fPtThreshold ;
Float_t fPtThresholdMax ;
Float_t fSumPtThreshold ;
Float_t fSumPtThresholdMax ;
Float_t fPtFraction ;
Int_t fICMethod ;
Int_t fPartInCone;
Int_t fDebug;
Bool_t fFracIsThresh;
TLorentzVector fMomentum;
TVector3 fTrackVector;
AliIsolationCut( const AliIsolationCut & g) ;
AliIsolationCut & operator = (const AliIsolationCut & g) ;
ClassDef(AliIsolationCut,9)
} ;
#endif //ALIISOLATIONCUT_H