]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliEventBaseCut.h
Modifying the GetChainFromCollection function based on the additions of the TEntryList
[u/mrichter/AliRoot.git] / ANALYSIS / AliEventBaseCut.h
index df1f9b7c53ce3f7b2feaf302283c582cb86b9cd4..03c0e2bb07380d612ed54cce7242ee3059b434ed 100644 (file)
 
 class AliAOD;
 
-enum AliEventCutProperty
- {
-   kPrimVertexXCut,
-   kPrimVertexYCut,
-   kPrimVertexZCut,
-   kNChargedCut
- };
-
 class AliEventBaseCut: public TObject
 {
   public: 
+    enum EEventCutProperty {
+       kPrimVertexXCut,kPrimVertexYCut,kPrimVertexZCut,
+       kNChargedCut,kNone
+     };
+
     AliEventBaseCut();
-    AliEventBaseCut(Double_t min,Double_t max);
+    AliEventBaseCut(Double_t min,Double_t max, EEventCutProperty prop = kNone);
     virtual ~AliEventBaseCut(){}
-    
-    virtual Bool_t Pass(AliAOD* aod) const;//returns kTRUE if rejected
+    virtual Bool_t Rejected(AliAOD* aod) const;//returns kTRUE if rejected
+    virtual void   SetRange(Double_t min, Double_t max){fMin = min; fMax = max;}
+
+    virtual EEventCutProperty GetProperty()const{return fProperty;}
+
   protected:
     virtual Double_t GetValue(AliAOD* aod) const = 0;
     
     Double_t fMin;//Minimum value
     Double_t fMax;//Maximum value
+    EEventCutProperty fProperty;//Defines the type of the cut - used by the setters cut
+    
   private:
     ClassDef(AliEventBaseCut,1)
 };
@@ -45,8 +47,8 @@ class AliEventBaseCut: public TObject
 class AliPrimVertexXCut: public AliEventBaseCut
 {
  public: 
-   AliPrimVertexXCut(){}
-   AliPrimVertexXCut(Double_t min,Double_t max):AliEventBaseCut(min,max){}
+   AliPrimVertexXCut():AliEventBaseCut(0,0,kPrimVertexXCut){}
+   AliPrimVertexXCut(Double_t min,Double_t max):AliEventBaseCut(min,max,kPrimVertexXCut){}
    virtual ~AliPrimVertexXCut(){}
  protected:
    Double_t GetValue(AliAOD* aod) const;
@@ -59,8 +61,8 @@ class AliPrimVertexXCut: public AliEventBaseCut
 class AliPrimVertexYCut: public AliEventBaseCut
 {
  public: 
-   AliPrimVertexYCut(){}
-   AliPrimVertexYCut(Double_t min,Double_t max):AliEventBaseCut(min,max){}
+   AliPrimVertexYCut():AliEventBaseCut(0,0,kPrimVertexYCut){}
+   AliPrimVertexYCut(Double_t min,Double_t max):AliEventBaseCut(min,max,kPrimVertexYCut){}
    virtual ~AliPrimVertexYCut(){}
    
  protected:
@@ -74,8 +76,8 @@ class AliPrimVertexYCut: public AliEventBaseCut
 class AliPrimVertexZCut: public AliEventBaseCut
 {
  public: 
-   AliPrimVertexZCut(){}
-   AliPrimVertexZCut(Double_t min,Double_t max):AliEventBaseCut(min,max){}
+   AliPrimVertexZCut():AliEventBaseCut(0,0,kPrimVertexZCut){}
+   AliPrimVertexZCut(Double_t min,Double_t max):AliEventBaseCut(min,max,kPrimVertexZCut){}
    virtual ~AliPrimVertexZCut(){}
  protected:
    Double_t GetValue(AliAOD* aod) const;
@@ -90,10 +92,12 @@ class AliPrimVertexZCut: public AliEventBaseCut
 class AliNChargedCut: public AliEventBaseCut
 {
  public: 
-   AliNChargedCut(){}
-   AliNChargedCut(Double_t min, Double_t max, Double_t etamin = -10.0, Double_t etamax = 10.0):
-       AliEventBaseCut(min,max),fEtaMin(etamin),fEtaMax(etamax){}
+   AliNChargedCut():AliEventBaseCut(0,0,kNChargedCut),fEtaMin(-10.0),fEtaMax(10.0){}
+   AliNChargedCut(Int_t min, Int_t max, Double_t etamin = -10.0, Double_t etamax = 10.0):
+       AliEventBaseCut(min,max,kNChargedCut),fEtaMin(etamin),fEtaMax(etamax){}
    virtual ~AliNChargedCut(){}
+   
+   void     SetEtaRange(Double_t min,Double_t max){fEtaMin = min;fEtaMax = max;}
  protected:
    Double_t GetValue(AliAOD* aod) const;
    Double_t fEtaMin;//Defines max of eta range where mult is caclulated