X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ANALYSIS%2FAliESDpidCuts.h;h=d7c9e52d512af90e77028322258779b2b290557d;hb=010a58eb3a0860d9e82dbdae971a4dc079716c9a;hp=7c643538f1ab8595c042d25409a68351c47ca0b4;hpb=f61ab38250e3911ebd0209ff7b687ac0fc827d83;p=u%2Fmrichter%2FAliRoot.git diff --git a/ANALYSIS/AliESDpidCuts.h b/ANALYSIS/AliESDpidCuts.h index 7c643538f1a..d7c9e52d512 100644 --- a/ANALYSIS/AliESDpidCuts.h +++ b/ANALYSIS/AliESDpidCuts.h @@ -1,111 +1,119 @@ -#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 AliTPCpidESD; -class AliTOFpidESD; - -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 *o); - virtual Bool_t IsSelected(TList *) { return kTRUE; } - virtual Bool_t AcceptTrack(const AliESDtrack *track); - - 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 - AliTPCpidESD *fTPCpid; //! TPC PID (n-sigma cut) - AliTOFpidESD *fTOFpid; //! TOF PID (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, 1) -}; - -//_____________________________________________________________________ -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 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); + + AliESDpid *GetESDpid() { return fESDpid; }; + + 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 * 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