]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliEventCut.h
New shortcut methods for setting range of primary vertex
[u/mrichter/AliRoot.git] / ANALYSIS / AliEventCut.h
index 6ab0369b86d7b71cc6b3a7bc342133e8be0ba71a..3bc0fcbf23dc7620f02d369155e21b0292e2df22 100644 (file)
@@ -3,30 +3,56 @@
 //________________________________
 ///////////////////////////////////////////////////////////
 //
 //________________________________
 ///////////////////////////////////////////////////////////
 //
-// class AliRunAnalysis
-//
-//
+// class AliEventCut
 //
 //
+// Event cut. It has list of base event cuts. 
+// Each of base event cut checks only one property.
+// Logical base cuts also exists that point to other base cuts.
+// Using them one can build complicated cut with binary tree structure
 //
 ///////////////////////////////////////////////////////////
 
 //
 ///////////////////////////////////////////////////////////
 
-#include "TObject.h"
+#include <TObject.h>
+#include <TObjArray.h>
+#include "AliEventBaseCut.h"
 
 
-class AliESD;
-class TObjArray;
+class AliAOD;
+enum AliEventBaseCut::EEventCutProperty;
 
 class AliEventCut: public TObject
 {
   public: 
     AliEventCut();
 
 class AliEventCut: public TObject
 {
   public: 
     AliEventCut();
+    AliEventCut(const AliEventCut& in);
     virtual ~AliEventCut();
     
     virtual ~AliEventCut();
     
-    virtual Bool_t Pass(AliESD* esd) const;//returns kTRUE if rejected
+    virtual Bool_t Rejected(AliAOD* aod) const;//returns kTRUE if rejected
+    void           AddBasePartCut(AliEventBaseCut* ebcut);
+
+    void           SetNChargedRange(Int_t min,Int_t max, Double_t etamin = -10.0,Double_t etamax = 10.0);
+    void           SetVertexXRange(Int_t min,Int_t max);
+    void           SetVertexYRange(Int_t min,Int_t max);
+    void           SetVertexZRange(Int_t min,Int_t max);
     
   protected:
     
   protected:
-    TObjArray* fBaseCuts;
+    AliEventBaseCut* FindCut(AliEventBaseCut::EEventCutProperty prop);
+    
+    TObjArray fBaseCuts;
   private:
     ClassDef(AliEventCut,1)
 };
 
   private:
     ClassDef(AliEventCut,1)
 };
 
+class AliEventEmptyCut: public TObject
+{
+  public: 
+    AliEventEmptyCut(){}
+    virtual ~AliEventEmptyCut(){}
+    
+    Bool_t Rejected(AliAOD* /*aod*/) const {return kFALSE;}//always accept
+    
+  protected:
+  private:
+    ClassDef(AliEventEmptyCut,1)
+};
+
 #endif
 #endif