Public Member Functions | Private Attributes | List of all members
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
 
TrackCreationBookKeeperoperator= (const TrackCreationBookKeeper &)=delete
 
TrackCreationBookKeeperoperator= (TrackCreationBookKeeper &&)=delete
 
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)
 
void addPoint (Point_t &&point, Vector_t &&vect, art::Ptr< Hit > hit, PointFlags_t &&flag, double chi2)
 
void addPoint (Point_t &&point, Vector_t &&vect, art::Ptr< Hit > hit, PointFlags_t &&flag, double chi2, OptionalPointElement &ope)
 
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)
 

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.

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:137
trkmkr::TrackCreationBookKeeper::TrackCreationBookKeeper ( const TrackCreationBookKeeper )
delete

Avoid copies of this object.

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

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.

50  {
51  ttcbk_.addPoint(point, vect, hit, flag);
52  if (chi2>=0) {
53  chi2v.push_back(chi2);
54  totChi2_+=chi2;
55  }
56  }
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

Definition at line 57 of file TrackCreationBookKeeper.h.

57  {
58  addPoint(point, vect, hit, flag, chi2);
59  opts->addPoint(ope);
60  }
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:120
void trkmkr::TrackCreationBookKeeper::addPoint ( Point_t &&  point,
Vector_t &&  vect,
art::Ptr< Hit hit,
PointFlags_t &&  flag,
double  chi2 
)
inline

Definition at line 61 of file TrackCreationBookKeeper.h.

61  {
62  ttcbk_.addPoint(std::move(point), std::move(vect), hit, std::move(flag));
63  if (chi2>=0) {
64  chi2v.push_back(chi2);
65  totChi2_+=chi2;
66  }
67  }
trkmkr::TrackTrajectoryCreationBookKeeper ttcbk_
def move(depos, offset)
Definition: depos.py:107
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

Definition at line 68 of file TrackCreationBookKeeper.h.

68  {
69  addPoint(std::move(point), std::move(vect), hit, std::move(flag), chi2);
70  opts->addPoint(ope);
71  }
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 ...
def move(depos, offset)
Definition: depos.py:107
void addPoint(OptionalPointElement &ope)
add one OptionalPointElement
Definition: TrackMaker.h:120
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 79 of file TrackCreationBookKeeper.h.

79  {
82  }
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:1036
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

Definition at line 83 of file TrackCreationBookKeeper.h.

83  {
85  std::move(covStart),std::move(covEnd),tkID_);
86  }
trkmkr::TrackTrajectoryCreationBookKeeper ttcbk_
def move(depos, offset)
Definition: depos.py:107
TrackCollectionProxyElement< TrackCollProxy > Track
Proxy to an element of a proxy collection of recob::Track objects.
Definition: Track.h:1036
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
TrackCreationBookKeeper& trkmkr::TrackCreationBookKeeper::operator= ( TrackCreationBookKeeper &&  )
delete
void trkmkr::TrackCreationBookKeeper::setTotChi2 ( double  totChi2)
inline

Set the total chi2 value.

Definition at line 75 of file TrackCreationBookKeeper.h.

Member Data Documentation

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

Definition at line 94 of file TrackCreationBookKeeper.h.

int trkmkr::TrackCreationBookKeeper::nfittedpars
private

Definition at line 95 of file TrackCreationBookKeeper.h.

OptionalOutputs* trkmkr::TrackCreationBookKeeper::opts
private

Definition at line 93 of file TrackCreationBookKeeper.h.

int trkmkr::TrackCreationBookKeeper::pdgHyp_
private

Definition at line 91 of file TrackCreationBookKeeper.h.

int trkmkr::TrackCreationBookKeeper::tkID_
private

Definition at line 90 of file TrackCreationBookKeeper.h.

double trkmkr::TrackCreationBookKeeper::totChi2_
private

Definition at line 92 of file TrackCreationBookKeeper.h.

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

Definition at line 89 of file TrackCreationBookKeeper.h.


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