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