LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
trkmkr::TrackCreationBookKeeper Class Reference

Helper class to aid the creation of a recob::Track, keeping data vectors in sync. More...

#include "TrackCreationBookKeeper.h"

Public Member Functions

 TrackCreationBookKeeper (std::vector< art::Ptr< Hit > > &outhits, OptionalOutputs &optionals, int tkID, int pdgHyp, bool hasMomenta, int nfitpars=4)
 Constructor: needs reference to output hit vector, optional outputs struct, and other parameters needed when creating the track object. More...
 
void setTotChi2 (double totChi2)
 Set the total chi2 value. More...
 
 TrackCreationBookKeeper (const TrackCreationBookKeeper &)=delete
 Avoid copies of this object. More...
 
 TrackCreationBookKeeper (TrackCreationBookKeeper &&)=delete
 Avoid copies of this object. More...
 
TrackCreationBookKeeperoperator= (const TrackCreationBookKeeper &)=delete
 Avoid copies of this object. More...
 
TrackCreationBookKeeperoperator= (TrackCreationBookKeeper &&)=delete
 Avoid copies of this object. More...
 
void addPoint (const Point_t &point, const Vector_t &vect, art::Ptr< Hit > hit, const PointFlags_t &flag, double chi2)
 Add a single point; different version of the functions are provided using const references or rvalue references, with and without an OptionalPointElement argument. More...
 
void addPoint (const Point_t &point, const Vector_t &vect, art::Ptr< Hit > hit, const PointFlags_t &flag, double chi2, OptionalPointElement &ope)
 Add a single point; different version of the functions are provided using const references or rvalue references, with and without an OptionalPointElement argument. More...
 
void addPoint (Point_t &&point, Vector_t &&vect, art::Ptr< Hit > hit, PointFlags_t &&flag, double chi2)
 Add a single point; different version of the functions are provided using const references or rvalue references, with and without an OptionalPointElement argument. More...
 
void addPoint (Point_t &&point, Vector_t &&vect, art::Ptr< Hit > hit, PointFlags_t &&flag, double chi2, OptionalPointElement &ope)
 Add a single point; different version of the functions are provided using const references or rvalue references, with and without an OptionalPointElement argument. More...
 
Track finalizeTrack (const tracking::SMatrixSym55 &covStart, const tracking::SMatrixSym55 &covEnd)
 Get the finalized recob::Track; needs the start and end covariance matrices. More...
 
Track finalizeTrack (tracking::SMatrixSym55 &&covStart, tracking::SMatrixSym55 &&covEnd)
 Get the finalized recob::Track; needs the start and end covariance matrices. More...
 

Private Attributes

trkmkr::TrackTrajectoryCreationBookKeeper ttcbk_
 
int tkID_
 
int pdgHyp_
 
double totChi2_
 
OptionalOutputsopts
 
std::vector< double > chi2v
 
int nfittedpars
 

Detailed Description

Helper class to aid the creation of a recob::Track, keeping data vectors in sync.

Helper class to aid the creation of a recob::Track, keeping output data (vectors of recob::tracking::Point_t, recob::tracking::Vector_t, recob::TrackTrajectory::PointFlags_t, recob::Hit, and trkmkr::OptionalOutputs struct) in sync. It internally stores and uses a trkmkr::TrackTrajectoryCreationBookKeeper object. Elements of those vectors are added sequentially using the addPoint functions. Once all points have been added a call to the function finalizeTrack, builds the track moving the content of the vectors.

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

Definition at line 31 of file TrackCreationBookKeeper.h.

Constructor & Destructor Documentation

trkmkr::TrackCreationBookKeeper::TrackCreationBookKeeper ( std::vector< art::Ptr< Hit > > &  outhits,
OptionalOutputs optionals,
int  tkID,
int  pdgHyp,
bool  hasMomenta,
int  nfitpars = 4 
)
inline

Constructor: needs reference to output hit vector, optional outputs struct, and other parameters needed when creating the track object.

Definition at line 34 of file TrackCreationBookKeeper.h.

References addPoint().

35  : ttcbk_(outhits, hasMomenta), tkID_(tkID), pdgHyp_(pdgHyp), totChi2_(0), opts(&optionals), nfittedpars(nfitpars)
36  {
37  opts->reset();
38  }
trkmkr::TrackTrajectoryCreationBookKeeper ttcbk_
void reset()
reset the stored vectors
Definition: TrackMaker.h:91
trkmkr::TrackCreationBookKeeper::TrackCreationBookKeeper ( const TrackCreationBookKeeper )
delete

Avoid copies of this object.

trkmkr::TrackCreationBookKeeper::TrackCreationBookKeeper ( TrackCreationBookKeeper &&  )
delete

Avoid copies of this object.

Member Function Documentation

void trkmkr::TrackCreationBookKeeper::addPoint ( const Point_t point,
const Vector_t vect,
art::Ptr< Hit hit,
const PointFlags_t flag,
double  chi2 
)
inline

Add a single point; different version of the functions are provided using const references or rvalue references, with and without an OptionalPointElement argument.

Definition at line 50 of file TrackCreationBookKeeper.h.

Referenced by trkf::TrackKalmanFitter::fillResult(), and TrackCreationBookKeeper().

50  {
51  ttcbk_.addPoint(point, vect, hit, flag);
52  chi2v.push_back(chi2);
53  totChi2_+=chi2;
54  }
trkmkr::TrackTrajectoryCreationBookKeeper ttcbk_
void addPoint(const Point_t &point, const Vector_t &vect, art::Ptr< Hit > hit, const PointFlags_t &flag)
Add a single point; different version of the functions are provided using const references or rvalue ...
void trkmkr::TrackCreationBookKeeper::addPoint ( const Point_t point,
const Vector_t vect,
art::Ptr< Hit hit,
const PointFlags_t flag,
double  chi2,
OptionalPointElement ope 
)
inline

Add a single point; different version of the functions are provided using const references or rvalue references, with and without an OptionalPointElement argument.

Definition at line 55 of file TrackCreationBookKeeper.h.

55  {
56  addPoint(point, vect, hit, flag, chi2);
57  opts->addPoint(ope);
58  }
void addPoint(const Point_t &point, const Vector_t &vect, art::Ptr< Hit > hit, const PointFlags_t &flag, double chi2)
Add a single point; different version of the functions are provided using const references or rvalue ...
void addPoint(OptionalPointElement &ope)
add one OptionalPointElement
Definition: TrackMaker.h:78
void trkmkr::TrackCreationBookKeeper::addPoint ( Point_t &&  point,
Vector_t &&  vect,
art::Ptr< Hit hit,
PointFlags_t &&  flag,
double  chi2 
)
inline

Add a single point; different version of the functions are provided using const references or rvalue references, with and without an OptionalPointElement argument.

Definition at line 59 of file TrackCreationBookKeeper.h.

59  {
60  ttcbk_.addPoint(std::move(point), std::move(vect), hit, std::move(flag));
61  chi2v.push_back(chi2);
62  totChi2_+=chi2;
63  }
trkmkr::TrackTrajectoryCreationBookKeeper ttcbk_
void addPoint(const Point_t &point, const Vector_t &vect, art::Ptr< Hit > hit, const PointFlags_t &flag)
Add a single point; different version of the functions are provided using const references or rvalue ...
void trkmkr::TrackCreationBookKeeper::addPoint ( Point_t &&  point,
Vector_t &&  vect,
art::Ptr< Hit hit,
PointFlags_t &&  flag,
double  chi2,
OptionalPointElement ope 
)
inline

Add a single point; different version of the functions are provided using const references or rvalue references, with and without an OptionalPointElement argument.

Definition at line 64 of file TrackCreationBookKeeper.h.

64  {
65  addPoint(std::move(point), std::move(vect), hit, std::move(flag), chi2);
66  opts->addPoint(ope);
67  }
void addPoint(const Point_t &point, const Vector_t &vect, art::Ptr< Hit > hit, const PointFlags_t &flag, double chi2)
Add a single point; different version of the functions are provided using const references or rvalue ...
void addPoint(OptionalPointElement &ope)
add one OptionalPointElement
Definition: TrackMaker.h:78
Track trkmkr::TrackCreationBookKeeper::finalizeTrack ( const tracking::SMatrixSym55 covStart,
const tracking::SMatrixSym55 covEnd 
)
inline

Get the finalized recob::Track; needs the start and end covariance matrices.

Definition at line 75 of file TrackCreationBookKeeper.h.

Referenced by trkf::TrackKalmanFitter::fillResult().

75  {
78  }
ROOT::Math::SMatrix< Double32_t, 5, 5, ROOT::Math::MatRepSym< Double32_t, 5 > > SMatrixSym55
Definition: TrackingTypes.h:85
trkmkr::TrackTrajectoryCreationBookKeeper ttcbk_
recob::tracking::SMatrixSym55 SMatrixSym55
TrackCollectionProxyElement< TrackCollProxy > Track
Proxy to an element of a proxy collection of recob::Track objects.
Definition: Track.h:1035
TrackTrajectory finalizeTrackTrajectory()
Get the finalized recob::TrackTrajectory object; internal data vectors are moved so no more points sh...
Track trkmkr::TrackCreationBookKeeper::finalizeTrack ( tracking::SMatrixSym55 &&  covStart,
tracking::SMatrixSym55 &&  covEnd 
)
inline

Get the finalized recob::Track; needs the start and end covariance matrices.

Definition at line 79 of file TrackCreationBookKeeper.h.

79  {
81  std::move(covStart),std::move(covEnd),tkID_);
82  }
trkmkr::TrackTrajectoryCreationBookKeeper ttcbk_
TrackCollectionProxyElement< TrackCollProxy > Track
Proxy to an element of a proxy collection of recob::Track objects.
Definition: Track.h:1035
TrackTrajectory finalizeTrackTrajectory()
Get the finalized recob::TrackTrajectory object; internal data vectors are moved so no more points sh...
TrackCreationBookKeeper& trkmkr::TrackCreationBookKeeper::operator= ( const TrackCreationBookKeeper )
delete

Avoid copies of this object.

TrackCreationBookKeeper& trkmkr::TrackCreationBookKeeper::operator= ( TrackCreationBookKeeper &&  )
delete

Avoid copies of this object.

void trkmkr::TrackCreationBookKeeper::setTotChi2 ( double  totChi2)
inline

Set the total chi2 value.

Definition at line 71 of file TrackCreationBookKeeper.h.

Member Data Documentation

std::vector<double> trkmkr::TrackCreationBookKeeper::chi2v
private

Definition at line 90 of file TrackCreationBookKeeper.h.

int trkmkr::TrackCreationBookKeeper::nfittedpars
private

Definition at line 91 of file TrackCreationBookKeeper.h.

OptionalOutputs* trkmkr::TrackCreationBookKeeper::opts
private

Definition at line 89 of file TrackCreationBookKeeper.h.

int trkmkr::TrackCreationBookKeeper::pdgHyp_
private

Definition at line 87 of file TrackCreationBookKeeper.h.

int trkmkr::TrackCreationBookKeeper::tkID_
private

Definition at line 86 of file TrackCreationBookKeeper.h.

double trkmkr::TrackCreationBookKeeper::totChi2_
private

Definition at line 88 of file TrackCreationBookKeeper.h.

trkmkr::TrackTrajectoryCreationBookKeeper trkmkr::TrackCreationBookKeeper::ttcbk_
private

Definition at line 85 of file TrackCreationBookKeeper.h.


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