From: skowron Date: Mon, 5 Jul 2004 20:49:24 +0000 (+0000) Subject: New shortcut methods for setting range of primary vertex X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=2d54468654f9c68fac584dbced0e587e800dc6b5;ds=inline New shortcut methods for setting range of primary vertex --- diff --git a/ANALYSIS/AliEventCut.cxx b/ANALYSIS/AliEventCut.cxx index fc32fa12f1e..d1ff6735768 100644 --- a/ANALYSIS/AliEventCut.cxx +++ b/ANALYSIS/AliEventCut.cxx @@ -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)); +} /*********************************************************/ /*********************************************************/ /*********************************************************/ diff --git a/ANALYSIS/AliEventCut.h b/ANALYSIS/AliEventCut.h index ec03a6c44c4..3bc0fcbf23d 100644 --- a/ANALYSIS/AliEventCut.h +++ b/ANALYSIS/AliEventCut.h @@ -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);