LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
trkf::VertexWrapper Class Reference

Wrapper class to facilitate vertex production. More...

#include "VertexWrapper.h"

Public Member Functions

 VertexWrapper ()
 
 VertexWrapper (const recob::Vertex &vtx)
 
 VertexWrapper (const recob::tracking::Point_t &pos, const recob::tracking::SMatrixSym33 &cov, double chi2, int ndof)
 
const recob::Vertexvertex () const
 
bool isValid () const
 
const recob::tracking::Point_tposition () const
 
const recob::tracking::SMatrixSym33covariance () const
 
void setVertexId (int newID)
 
void addTrack (const recob::Track &tk)
 
void addTrackAndUpdateVertex (const recob::tracking::Point_t &pos, const recob::tracking::SMatrixSym33 &cov, double chi2, int ndof, const recob::Track &tk)
 
size_t findTrack (const recob::Track &tk) const
 
size_t tracksSize () const
 
const TrackRefVectracks () const
 
TrackRefVec tracksWithoutElement (size_t element) const
 

Private Attributes

recob::Vertex vtx_
 
TrackRefVec vtxtks_
 

Detailed Description

Wrapper class to facilitate vertex production.

It stores the recob::Vertex being built and the references to the tracks being used in the vertex fit. Tracks are stored in a vector of std::reference_wrapper<const recob::Track>, so the wrapper does not own the pointer to the original track object.

Author
G. Cerati (FNAL, MicroBooNE)
Date
2017
Version
1.0

Definition at line 28 of file VertexWrapper.h.

Constructor & Destructor Documentation

trkf::VertexWrapper::VertexWrapper ( )
inline

Definition at line 32 of file VertexWrapper.h.

References vtx_.

32 { vtx_ = recob::Vertex(); }
recob::Vertex vtx_
Definition: VertexWrapper.h:66
Definition of vertex object for LArSoft.
Definition: Vertex.h:35
trkf::VertexWrapper::VertexWrapper ( const recob::Vertex vtx)
inline

Definition at line 33 of file VertexWrapper.h.

33 : vtx_(vtx) {}
recob::Vertex vtx_
Definition: VertexWrapper.h:66
trkf::VertexWrapper::VertexWrapper ( const recob::tracking::Point_t pos,
const recob::tracking::SMatrixSym33 cov,
double  chi2,
int  ndof 
)
inline

Definition at line 34 of file VertexWrapper.h.

References vtx_.

34 { vtx_ = recob::Vertex(pos,cov,chi2,ndof); }
recob::Vertex vtx_
Definition: VertexWrapper.h:66
Definition of vertex object for LArSoft.
Definition: Vertex.h:35

Member Function Documentation

void trkf::VertexWrapper::addTrack ( const recob::Track tk)
inline

Definition at line 43 of file VertexWrapper.h.

References vtxtks_.

Referenced by addTrackAndUpdateVertex(), and trkf::Geometric3DVertexFitter::fitTwoTracks().

43 { vtxtks_.push_back(tk); }
TrackRefVec vtxtks_
Definition: VertexWrapper.h:67
void trkf::VertexWrapper::addTrackAndUpdateVertex ( const recob::tracking::Point_t pos,
const recob::tracking::SMatrixSym33 cov,
double  chi2,
int  ndof,
const recob::Track tk 
)
inline

Definition at line 44 of file VertexWrapper.h.

References addTrack(), recob::Vertex::chi2(), recob::Vertex::ndof(), and vtx_.

Referenced by trkf::Geometric3DVertexFitter::addTrackToVertex(), trkf::Geometric3DVertexFitter::closestPointAlongTrack(), and trkf::Geometric3DVertexFitter::fitTwoTracks().

45  {
46  vtx_ = recob::Vertex(pos, cov, vtx_.chi2()+chi2, vtx_.ndof()+ndof);
47  addTrack(tk);
48  }
void addTrack(const recob::Track &tk)
Definition: VertexWrapper.h:43
recob::Vertex vtx_
Definition: VertexWrapper.h:66
Definition of vertex object for LArSoft.
Definition: Vertex.h:35
double chi2() const
Definition: Vertex.h:64
double ndof() const
Definition: Vertex.h:66
const recob::tracking::SMatrixSym33& trkf::VertexWrapper::covariance ( ) const
inline

Definition at line 39 of file VertexWrapper.h.

References recob::Vertex::covariance(), and vtx_.

Referenced by trkf::Geometric3DVertexFitter::addTrackToVertex(), trkf::Geometric3DVertexFitter::fitTwoTracks(), and trkf::Geometric3DVertexFitter::getParsCovsOnPlane().

39 { return vtx_.covariance(); }
recob::Vertex vtx_
Definition: VertexWrapper.h:66
const SMatrixSym33 & covariance() const
Return vertex 3D covariance (be careful, the matrix may have rank=2).
Definition: Vertex.h:62
size_t trkf::VertexWrapper::findTrack ( const recob::Track tk) const
inline
bool trkf::VertexWrapper::isValid ( ) const
inline

Definition at line 37 of file VertexWrapper.h.

References recob::Vertex::isValid(), and vtx_.

Referenced by trkf::Geometric3DVertexFitter::fitTracks(), and trkf::VertexFitter::produce().

37 {return vtx_.isValid();}
recob::Vertex vtx_
Definition: VertexWrapper.h:66
bool isValid() const
Definition: Vertex.h:72
const recob::tracking::Point_t& trkf::VertexWrapper::position ( ) const
inline
void trkf::VertexWrapper::setVertexId ( int  newID)
inline

Definition at line 41 of file VertexWrapper.h.

References recob::Vertex::setID(), and vtx_.

Referenced by trkf::VertexFitter::produce().

41 { vtx_.setID(newID); }
void setID(int newID)
Set vertex id.
Definition: Vertex.h:82
recob::Vertex vtx_
Definition: VertexWrapper.h:66
const TrackRefVec& trkf::VertexWrapper::tracks ( void  ) const
inline

Definition at line 58 of file VertexWrapper.h.

References vtxtks_.

Referenced by trkf::Geometric3DVertexFitter::computeMeta().

58 { return vtxtks_; }
TrackRefVec vtxtks_
Definition: VertexWrapper.h:67
TrackRefVec trkf::VertexWrapper::tracksWithoutElement ( size_t  element) const
inline
const recob::Vertex& trkf::VertexWrapper::vertex ( ) const
inline

Definition at line 36 of file VertexWrapper.h.

References vtx_.

Referenced by trkf::VertexFitter::produce().

36 { return vtx_; }
recob::Vertex vtx_
Definition: VertexWrapper.h:66

Member Data Documentation

recob::Vertex trkf::VertexWrapper::vtx_
private
TrackRefVec trkf::VertexWrapper::vtxtks_
private

Definition at line 67 of file VertexWrapper.h.

Referenced by addTrack(), findTrack(), tracks(), tracksSize(), and tracksWithoutElement().


The documentation for this class was generated from the following file: