All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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< recob::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< recob::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< recob::Hit > hit, const PointFlags_t &flag, double chi2, OptionalPointElement &ope)
 
void addPoint (Point_t &&point, Vector_t &&vect, art::Ptr< recob::Hit > hit, PointFlags_t &&flag, double chi2)
 
void addPoint (Point_t &&point, Vector_t &&vect, art::Ptr< recob::Hit > hit, PointFlags_t &&flag, double chi2, OptionalPointElement &ope)
 
recob::Track finalizeTrack (const recob::tracking::SMatrixSym55 &covStart, const recob::tracking::SMatrixSym55 &covEnd)
 Get the finalized recob::Track; needs the start and end covariance matrices. More...
 
recob::Track finalizeTrack (recob::tracking::SMatrixSym55 &&covStart, recob::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 32 of file TrackCreationBookKeeper.h.

Constructor & Destructor Documentation

trkmkr::TrackCreationBookKeeper::TrackCreationBookKeeper ( std::vector< art::Ptr< recob::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 35 of file TrackCreationBookKeeper.h.

36  : ttcbk_(outhits, hasMomenta), tkID_(tkID), pdgHyp_(pdgHyp), totChi2_(0), opts(&optionals), nfittedpars(nfitpars)
37  {
38  opts->reset();
39  }
trkmkr::TrackTrajectoryCreationBookKeeper ttcbk_
void reset()
reset the stored vectors
Definition: TrackMaker.h:148
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< recob::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 51 of file TrackCreationBookKeeper.h.

51  {
52  ttcbk_.addPoint(point, vect, hit, flag);
53  if (chi2>=0) {
54  chi2v.push_back(chi2);
55  totChi2_+=chi2;
56  }
57  }
then echo unknown compiler flag
trkmkr::TrackTrajectoryCreationBookKeeper ttcbk_
void addPoint(const Point_t &point, const Vector_t &vect, art::Ptr< recob::Hit > hit, const PointFlags_t &flag)
Add a single point; different version of the functions are provided using const references or rvalue ...
process_name hit
Definition: cheaterreco.fcl:51
void trkmkr::TrackCreationBookKeeper::addPoint ( const Point_t point,
const Vector_t vect,
art::Ptr< recob::Hit hit,
const PointFlags_t flag,
double  chi2,
OptionalPointElement ope 
)
inline

Definition at line 58 of file TrackCreationBookKeeper.h.

58  {
59  addPoint(point, vect, hit, flag, chi2);
60  opts->addPoint(ope);
61  }
void addPoint(const Point_t &point, const Vector_t &vect, art::Ptr< recob::Hit > hit, const PointFlags_t &flag, double chi2)
Add a single point; different version of the functions are provided using const references or rvalue ...
then echo unknown compiler flag
process_name hit
Definition: cheaterreco.fcl:51
void addPoint(OptionalPointElement &ope)
add one OptionalPointElement
Definition: TrackMaker.h:131
void trkmkr::TrackCreationBookKeeper::addPoint ( Point_t &&  point,
Vector_t &&  vect,
art::Ptr< recob::Hit hit,
PointFlags_t &&  flag,
double  chi2 
)
inline

Definition at line 62 of file TrackCreationBookKeeper.h.

62  {
63  ttcbk_.addPoint(std::move(point), std::move(vect), hit, std::move(flag));
64  if (chi2>=0) {
65  chi2v.push_back(chi2);
66  totChi2_+=chi2;
67  }
68  }
then echo unknown compiler flag
trkmkr::TrackTrajectoryCreationBookKeeper ttcbk_
void addPoint(const Point_t &point, const Vector_t &vect, art::Ptr< recob::Hit > hit, const PointFlags_t &flag)
Add a single point; different version of the functions are provided using const references or rvalue ...
process_name hit
Definition: cheaterreco.fcl:51
void trkmkr::TrackCreationBookKeeper::addPoint ( Point_t &&  point,
Vector_t &&  vect,
art::Ptr< recob::Hit hit,
PointFlags_t &&  flag,
double  chi2,
OptionalPointElement ope 
)
inline

Definition at line 69 of file TrackCreationBookKeeper.h.

69  {
70  addPoint(std::move(point), std::move(vect), hit, std::move(flag), chi2);
71  opts->addPoint(ope);
72  }
void addPoint(const Point_t &point, const Vector_t &vect, art::Ptr< recob::Hit > hit, const PointFlags_t &flag, double chi2)
Add a single point; different version of the functions are provided using const references or rvalue ...
then echo unknown compiler flag
process_name hit
Definition: cheaterreco.fcl:51
void addPoint(OptionalPointElement &ope)
add one OptionalPointElement
Definition: TrackMaker.h:131
recob::Track trkmkr::TrackCreationBookKeeper::finalizeTrack ( const recob::tracking::SMatrixSym55 covStart,
const recob::tracking::SMatrixSym55 covEnd 
)
inline

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

Definition at line 80 of file TrackCreationBookKeeper.h.

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

Definition at line 84 of file TrackCreationBookKeeper.h.

84  {
86  std::move(covStart),std::move(covEnd),tkID_);
87  }
recob::TrackTrajectory finalizeTrackTrajectory()
Get the finalized recob::TrackTrajectory object; internal data vectors are moved so no more points sh...
trkmkr::TrackTrajectoryCreationBookKeeper ttcbk_
TrackCollectionProxyElement< TrackCollProxy > Track
Proxy to an element of a proxy collection of recob::Track objects.
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 76 of file TrackCreationBookKeeper.h.

Member Data Documentation

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

Definition at line 95 of file TrackCreationBookKeeper.h.

int trkmkr::TrackCreationBookKeeper::nfittedpars
private

Definition at line 96 of file TrackCreationBookKeeper.h.

OptionalOutputs* trkmkr::TrackCreationBookKeeper::opts
private

Definition at line 94 of file TrackCreationBookKeeper.h.

int trkmkr::TrackCreationBookKeeper::pdgHyp_
private

Definition at line 92 of file TrackCreationBookKeeper.h.

int trkmkr::TrackCreationBookKeeper::tkID_
private

Definition at line 91 of file TrackCreationBookKeeper.h.

double trkmkr::TrackCreationBookKeeper::totChi2_
private

Definition at line 93 of file TrackCreationBookKeeper.h.

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

Definition at line 90 of file TrackCreationBookKeeper.h.


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