New shortcut methods for setting range of primary vertex
authorskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Jul 2004 20:49:24 +0000 (20:49 +0000)
committerskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Jul 2004 20:49:24 +0000 (20:49 +0000)
ANALYSIS/AliEventCut.cxx
ANALYSIS/AliEventCut.h

index fc32fa12f1e778273385378950972c8017d44cbe..d1ff673576842ca57614fe5e5ef00085104ce046 100644 (file)
@@ -107,7 +107,33 @@ void AliEventCut::SetNChargedRange(Int_t min,Int_t max,Double_t etamin,Double_t
    }  
   else fBaseCuts.Add(new AliNChargedCut(min,max,etamin,etamax));
 }
+/*********************************************************/
+
+void AliEventCut::SetVertexXRange(Int_t min,Int_t max)
+{
+  //Sets range of z coordinate of a primary vertex
+  AliEventBaseCut* cut = FindCut(AliEventBaseCut::kPrimVertexXCut);
+  if (cut) cut->SetRange(min,max);
+  else fBaseCuts.Add(new AliPrimVertexXCut(min,max));
+}
+/*********************************************************/
 
+void AliEventCut::SetVertexYRange(Int_t min,Int_t max)
+{
+  //Sets range of z coordinate of a primary vertex
+  AliEventBaseCut* cut = FindCut(AliEventBaseCut::kPrimVertexYCut);
+  if (cut) cut->SetRange(min,max);
+  else fBaseCuts.Add(new AliPrimVertexYCut(min,max));
+}
+/*********************************************************/
+
+void AliEventCut::SetVertexZRange(Int_t min,Int_t max)
+{
+  //Sets range of z coordinate of a primary vertex
+  AliEventBaseCut* cut = FindCut(AliEventBaseCut::kPrimVertexZCut);
+  if (cut) cut->SetRange(min,max);
+  else fBaseCuts.Add(new AliPrimVertexZCut(min,max));
+}
 /*********************************************************/
 /*********************************************************/
 /*********************************************************/
index ec03a6c44c45cf1ba32876cb5108b4c162c659d6..3bc0fcbf23dc7620f02d369155e21b0292e2df22 100644 (file)
@@ -30,6 +30,9 @@ class AliEventCut: public TObject
     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:
     AliEventBaseCut* FindCut(AliEventBaseCut::EEventCutProperty prop);