X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ANALYSIS%2FAliESDpidCuts.h;h=667ca1992bf975a7c25cc45cb56a80529bf03beb;hb=7dad7f170b2e4c5cc85f0d590e2dbe1f4d8ec655;hp=e5803fd860ca048467a7282d7b632619b5f4c406;hpb=95621324ced393c3d67a68febcf20f48010fbaf2;p=u%2Fmrichter%2FAliRoot.git diff --git a/ANALYSIS/AliESDpidCuts.h b/ANALYSIS/AliESDpidCuts.h index e5803fd860c..667ca1992bf 100644 --- a/ANALYSIS/AliESDpidCuts.h +++ b/ANALYSIS/AliESDpidCuts.h @@ -1,110 +1,121 @@ -#ifndef ALIESDPIDCUTS_H -#define ALIESDPIDCUTS_H - -#ifndef ALIANALYSISCUTS_H -#include "AliAnalysisCuts.h" -#endif - -#ifndef ALIPID_H -#include "AliPID.h" -#endif - -class TCollection; -class TH1F; -class TH1I; -class TH2I; -class TList; -class AliESDtrack; -class AliESDEvent; -class AliESDpid; - -class AliESDpidCuts : public AliAnalysisCuts{ - enum{ - kHasHistograms = BIT(17) - }; - public: - AliESDpidCuts(const Char_t *name = "AliESDpidCuts", const Char_t *title = ""); - AliESDpidCuts(const AliESDpidCuts &ref); // Copy constructor - AliESDpidCuts &operator=(const AliESDpidCuts &ref); - virtual ~AliESDpidCuts(); - - virtual void Copy(TObject &c) const; - virtual Long64_t Merge(TCollection *coll); - - Bool_t HasHistograms() const { return TestBit(kHasHistograms); } - void DefineHistograms(Color_t color = kRed); - void DrawHistograms(); - void SaveHistograms(const Char_t *location = NULL); - virtual Bool_t IsSelected(TObject *); - virtual Bool_t IsSelected(TList * /*lst*/) {return kTRUE; } - virtual Bool_t AcceptTrack(const AliESDtrack *track, const AliESDEvent *event); - - void SetTPCclusterRatioCut(Float_t clr) { fCutTPCclusterRatio = clr; } - inline void SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t nSigma); - inline void SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma); - inline void SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t nSigma); - inline void SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma); - void SetMinMomentumTOF(Float_t mom) { fMinMomentumTOF = mom; } - - protected: - static const Int_t kNcuts; // Number of Cuts - AliESDpid *fESDpid; //! PID helper (n-sigma-cut) - Char_t fTPCsigmaCutRequired; // Sigma cut Requirement for TPC and Particle Species - Char_t fTOFsigmaCutRequired; // Sigma cut Requirement for TOF and Particle Species - Float_t fCutTPCnSigma[AliPID::kSPECIES * 2]; // Species dependent cut on the distance to the TPC dE/dx line - Float_t fCutTOFnSigma[AliPID::kSPECIES]; // Species dependent cut on the distance to the TOF calculated time of flight line - Float_t fCutTPCclusterRatio; // Cut on Ratio of found clusters with repect to findable clusters in the TPC - Float_t fMinMomentumTOF; // Apply TOF PID only above a certain momentum - - //------------------------------------------ - // QA histograms - TH1I *fHcutStatistics; // Cut Statistics - TH2I *fHcutCorrelation; // Cut Correlation - TH1F *fHclusterRatio[2]; // TPC cluster Ratio - TH1F *fHnSigmaTPC[AliPID::kSPECIES][2]; // TPC n-sigma cut - TH1F *fHnSigmaTOF[AliPID::kSPECIES][2]; // TOF n-sigma cut - //------------------------------------------ - - ClassDef(AliESDpidCuts, 2) -}; - -//_____________________________________________________________________ -void AliESDpidCuts::SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t nSigma){ - // - // symmetric sigma cut for TPC PID - // - fCutTPCnSigma[itype * 2] = -nSigma; - fCutTPCnSigma[itype * 2 + 1] = nSigma; - fTPCsigmaCutRequired |= 1 << static_cast(itype); -} - -//_____________________________________________________________________ -void AliESDpidCuts::SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma){ - // - // assymetric sigma cut for TPC PID - // - fCutTPCnSigma[itype * 2] = negSigma; - fCutTPCnSigma[itype * 2 + 1] = posSigma; - fTPCsigmaCutRequired |= 1 << static_cast(itype); -} - -//_____________________________________________________________________ -void AliESDpidCuts::SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t nSigma){ - // - // symmetric sigma cut for TOF PID - // - fCutTOFnSigma[itype * 2] = -nSigma; - fCutTOFnSigma[itype * 2 + 1] = nSigma; - fTOFsigmaCutRequired |= 1 << static_cast(itype); -} - -//_____________________________________________________________________ -void AliESDpidCuts::SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma){ - // - // assymetric sigma cut for TOF PID - // - fCutTOFnSigma[itype * 2] = negSigma; - fCutTOFnSigma[itype * 2 + 1] = posSigma; - fTOFsigmaCutRequired |= 1 << static_cast(itype); -} -#endif +#ifndef ALIESDPIDCUTS_H +#define ALIESDPIDCUTS_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ +// +// Class for PID cuts +// Cuts the track based on numbers of sigmas in the detectors TPC and TOF +// The sigma cuts can be applied symmetrically or assymetrically +// + +#ifndef ALIANALYSISCUTS_H +#include "AliAnalysisCuts.h" +#endif + +#ifndef ALIPID_H +#include "AliPID.h" +#endif + +class TCollection; +class TH1F; +class TH1I; +class TH2I; +class TList; +class AliESDtrack; +class AliESDEvent; +class AliESDpid; + +class AliESDpidCuts : public AliAnalysisCuts{ + enum{ + kHasHistograms = BIT(17) + }; + public: + AliESDpidCuts(const Char_t *name = "AliESDpidCuts", const Char_t *title = ""); + AliESDpidCuts(const AliESDpidCuts &ref); // Copy constructor + AliESDpidCuts &operator=(const AliESDpidCuts &ref); + virtual ~AliESDpidCuts(); + + virtual void Init(); + virtual void Copy(TObject &c) const; + virtual Long64_t Merge(TCollection *coll); + + Bool_t HasHistograms() const { return TestBit(kHasHistograms); } + void DefineHistograms(Color_t color = kRed); + void DrawHistograms(); + void SaveHistograms(const Char_t *location = NULL); + virtual Bool_t IsSelected(TObject *); + virtual Bool_t IsSelected(TList * /*lst*/) {return kTRUE; } + virtual Bool_t AcceptTrack(const AliESDtrack *track, const AliESDEvent *event); + + void SetPIDResponse(AliPIDResponse * pidresponse) { fPIDresponse = pidresponse; } + AliPIDResponse *GetPIDresponse() { return fPIDresponse; }; + + void SetTPCclusterRatioCut(Float_t clr) { fCutTPCclusterRatio = clr; } + inline void SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t nSigma); + inline void SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma); + inline void SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t nSigma); + inline void SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma); + void SetMinMomentumTOF(Float_t mom) { fMinMomentumTOF = mom; } + + protected: + static const Int_t kNcuts; // Number of Cuts + AliPIDResponse *fPIDresponse; //! PID helper (n-sigma-cut) + Char_t fTPCsigmaCutRequired; // Sigma cut Requirement for TPC and Particle Species + Char_t fTOFsigmaCutRequired; // Sigma cut Requirement for TOF and Particle Species + Float_t fCutTPCnSigma[AliPID::kSPECIES * 2]; // Species dependent cut on the distance to the TPC dE/dx line + Float_t fCutTOFnSigma[AliPID::kSPECIES * 2]; // Species dependent cut on the distance to the TOF calculated time of flight line + Float_t fCutTPCclusterRatio; // Cut on Ratio of found clusters with repect to findable clusters in the TPC + Float_t fMinMomentumTOF; // Apply TOF PID only above a certain momentum + + //------------------------------------------ + // QA histograms + TH1I *fHcutStatistics; // Cut Statistics + TH2I *fHcutCorrelation; // Cut Correlation + TH1F *fHclusterRatio[2]; // TPC cluster Ratio + TH1F *fHnSigmaTPC[AliPID::kSPECIES][2]; // TPC n-sigma cut + TH1F *fHnSigmaTOF[AliPID::kSPECIES][2]; // TOF n-sigma cut + //------------------------------------------ + + ClassDef(AliESDpidCuts, 3) +}; + +//_____________________________________________________________________ +void AliESDpidCuts::SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t nSigma){ + // + // symmetric sigma cut for TPC PID + // + fCutTPCnSigma[itype * 2] = -nSigma; + fCutTPCnSigma[itype * 2 + 1] = nSigma; + fTPCsigmaCutRequired |= 1 << static_cast(itype); +} + +//_____________________________________________________________________ +void AliESDpidCuts::SetTPCnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma){ + // + // assymetric sigma cut for TPC PID + // + fCutTPCnSigma[itype * 2] = negSigma; + fCutTPCnSigma[itype * 2 + 1] = posSigma; + fTPCsigmaCutRequired |= 1 << static_cast(itype); +} + +//_____________________________________________________________________ +void AliESDpidCuts::SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t nSigma){ + // + // symmetric sigma cut for TOF PID + // + fCutTOFnSigma[itype * 2] = -nSigma; + fCutTOFnSigma[itype * 2 + 1] = nSigma; + fTOFsigmaCutRequired |= 1 << static_cast(itype); +} + +//_____________________________________________________________________ +void AliESDpidCuts::SetTOFnSigmaCut(AliPID::EParticleType itype, Float_t negSigma, Float_t posSigma){ + // + // assymetric sigma cut for TOF PID + // + fCutTOFnSigma[itype * 2] = negSigma; + fCutTOFnSigma[itype * 2 + 1] = posSigma; + fTOFsigmaCutRequired |= 1 << static_cast(itype); +} +#endif