9#include "EventVertexCut.h"
11#include "DataFormatManager.h"
14#include <TLorentzVector.h>
17 EventVertexCut::EventVertexCut() : EventCut(2) {
18 SetUnitName(
"Vertex R_{t} [cm]", Rt());
19 SetUnitName(
"Vertex Z [cm]", Z());
22 Bool_t EventVertexCut::Pass(
Event* event) {
24 const TLorentzVector* pos = ev->
GetVertex();
25 Double_t x = pos->X();
26 Double_t y = pos->Y();
27 SetValue(TMath::Sqrt(x * x + y * y), Rt());
28 SetValue(pos->Z(), Z());
32 Bool_t EventVertexCut::Init(Int_t ) {
return kTRUE; }
44 EventVertexXYZCut::EventVertexXYZCut() :
EventCut(4), fShift(TVector3(0, 0, 0)) {
51 void EventVertexXYZCut::SetShift(
const TVector3& vec) { fShift = vec; }
54 Double_t x =
event->GetVertex()->X() - fShift.X();
55 Double_t y =
event->GetVertex()->Y() - fShift.Y();
56 Double_t z =
event->GetVertex()->Z() - fShift.Z();
57 SetValue(TMath::Sqrt(x * x + y * y), Rt());
void SetValue(Double_t val, Int_t i=0)
void SetUnitName(TString name, Int_t i=0)
virtual Package * Report() const
Bool_t Pass(Event *event)
Bool_t Pass(Event *event)
TLorentzVector * GetVertex() const
void AddObject(TObject *object)