#include "IReconVertex.hxx" ClassImp(COMET::IReconVertex); COMET::IReconVertex::IReconVertex() { fState = new IVertexState; fNodes = new IReconNodeContainerImpl; } COMET::IReconVertex::~IReconVertex() {} TLorentzVector COMET::IReconVertex::GetPosition() const { // This is the preferred way to access a state field. IHandle state = GetState(); if (!state) throw EMissingField(); return state->GetPosition(); } TLorentzVector COMET::IReconVertex::GetPositionVariance() const { // This is the preferred way to access a state field. IHandle state = GetState(); if (!state) throw EMissingField(); return state->GetPositionVariance(); } bool COMET::IReconVertex::IsXVertex() const { TLorentzVector var = GetPositionVariance(); if (COMET::ICorrValues::IsFree(var.X())) return false; return true; } bool COMET::IReconVertex::IsYVertex() const { TLorentzVector var = GetPositionVariance(); if (COMET::ICorrValues::IsFree(var.Y())) return false; return true; } bool COMET::IReconVertex::IsZVertex() const { TLorentzVector var = GetPositionVariance(); if (COMET::ICorrValues::IsFree(var.Z())) return false; return true; } int COMET::IReconVertex::GetDimensions() const{ TLorentzVector var = GetPositionVariance(); int dim = 0; if (IsXVertex()) ++dim; if (IsYVertex()) ++dim; if (IsZVertex()) ++dim; return dim; }