Public Member Functions | List of all members
trkmkr::TrackMaker Class Referenceabstract

Base abstract class for tools used to fit tracks. More...

#include <TrackMaker.h>

Inheritance diagram for trkmkr::TrackMaker:
trkmkr::KalmanFilterFitTrackMaker

Public Member Functions

virtual ~TrackMaker () noexcept=default
 
virtual void initEvent (const art::Event &e)
 per-event initialization; concrete classes may override this function to retrieve other products or associations from the event. More...
 
virtual bool makeTrack (const detinfo::DetectorPropertiesData &detProp, const art::Ptr< recob::TrackTrajectory > ttraj, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
 makeTrack functions with art::Ptr<recob::TrackTrajectory>; calls the purely virtual version with const recob::TrackTrajectory reference as argument. More...
 
virtual bool makeTrack (const detinfo::DetectorPropertiesData &detProp, const recob::TrackTrajectory &ttraj, const int tkID, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const =0
 
virtual bool makeTrack (const detinfo::DetectorPropertiesData &detProp, const recob::Trajectory &traj, const std::vector< recob::TrajectoryPointFlags > &flags, const int tkID, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
 makeTrack functions with recob::Trajectory as argument; calls the version with recob::TrackTrajectory using a dummy flags vector. More...
 
virtual bool makeTrack (const detinfo::DetectorPropertiesData &detProp, const art::Ptr< recob::Trajectory > traj, const std::vector< recob::TrajectoryPointFlags > &flags, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
 
virtual bool makeTrack (const detinfo::DetectorPropertiesData &detProp, const art::Ptr< recob::Track > track, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
 
virtual bool makeTrack (const detinfo::DetectorPropertiesData &detProp, const recob::Track &track, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
 

Detailed Description

Base abstract class for tools used to fit tracks.

The virtual function makeTrack comes in different versions, one for each possible input (Trajectory, TrackTrajectory, Track), both using const references and art pointers as input). The functions return a bool corresponding to the success or failure status of the fit.

The only purely virtual function is the one for input Trajectories (by default the other two just forward the call to it). Its arguments are the const inputs (Trajectory, TrajectoryPointFlags, track ID) and the non-const ouputs (mandatory: outTrack and outHits; optional outputs stored in OptionalOutputs).

In case other products are needed from the event (e.g. associations to the input), they can be retrieved overriding the initEvent function.

The tool is not meant to put collections in the event.

Requirements are that a Track has at least 2 points, that it has the same number of Points and Momenta, that TrajectoryPoints and Hit have a 1-1 correspondance (same number and same order).

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

Definition at line 223 of file TrackMaker.h.

Constructor & Destructor Documentation

virtual trkmkr::TrackMaker::~TrackMaker ( )
virtualdefaultnoexcept

Member Function Documentation

virtual void trkmkr::TrackMaker::initEvent ( const art::Event e)
inlinevirtual

per-event initialization; concrete classes may override this function to retrieve other products or associations from the event.

Reimplemented in trkmkr::KalmanFilterFitTrackMaker.

Definition at line 229 of file TrackMaker.h.

230  {}
virtual bool trkmkr::TrackMaker::makeTrack ( const detinfo::DetectorPropertiesData detProp,
const recob::Trajectory traj,
const std::vector< recob::TrajectoryPointFlags > &  flags,
const int  tkID,
const std::vector< art::Ptr< recob::Hit >> &  inHits,
recob::Track outTrack,
std::vector< art::Ptr< recob::Hit >> &  outHits,
OptionalOutputs optionals 
) const
inlinevirtual

makeTrack functions with recob::Trajectory as argument; calls the version with recob::TrackTrajectory using a dummy flags vector.

Definition at line 235 of file TrackMaker.h.

243  {
244  return makeTrack(
245  detProp,
247  tkID,
248  inHits,
249  outTrack,
250  outHits,
251  optionals);
252  }
size_t NPoints() const
Returns the number of stored trajectory points.
Definition: Trajectory.h:167
A trajectory in space reconstructed from hits.
virtual bool makeTrack(const detinfo::DetectorPropertiesData &detProp, const recob::Trajectory &traj, const std::vector< recob::TrajectoryPointFlags > &flags, const int tkID, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
makeTrack functions with recob::Trajectory as argument; calls the version with recob::TrackTrajectory...
Definition: TrackMaker.h:235
std::vector< PointFlags_t > Flags_t
Type of point flag list.
virtual bool trkmkr::TrackMaker::makeTrack ( const detinfo::DetectorPropertiesData detProp,
const art::Ptr< recob::Trajectory traj,
const std::vector< recob::TrajectoryPointFlags > &  flags,
const std::vector< art::Ptr< recob::Hit >> &  inHits,
recob::Track outTrack,
std::vector< art::Ptr< recob::Hit >> &  outHits,
OptionalOutputs optionals 
) const
inlinevirtual

Definition at line 254 of file TrackMaker.h.

261  {
262  return makeTrack(
263  detProp,
265  traj.key(),
266  inHits,
267  outTrack,
268  outHits,
269  optionals);
270  }
size_t NPoints() const
Returns the number of stored trajectory points.
Definition: Trajectory.h:167
A trajectory in space reconstructed from hits.
key_type key() const noexcept
Definition: Ptr.h:216
virtual bool makeTrack(const detinfo::DetectorPropertiesData &detProp, const recob::Trajectory &traj, const std::vector< recob::TrajectoryPointFlags > &flags, const int tkID, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
makeTrack functions with recob::Trajectory as argument; calls the version with recob::TrackTrajectory...
Definition: TrackMaker.h:235
std::vector< PointFlags_t > Flags_t
Type of point flag list.
virtual bool trkmkr::TrackMaker::makeTrack ( const detinfo::DetectorPropertiesData detProp,
const art::Ptr< recob::TrackTrajectory ttraj,
const std::vector< art::Ptr< recob::Hit >> &  inHits,
recob::Track outTrack,
std::vector< art::Ptr< recob::Hit >> &  outHits,
OptionalOutputs optionals 
) const
inlinevirtual

makeTrack functions with art::Ptr<recob::TrackTrajectory>; calls the purely virtual version with const recob::TrackTrajectory reference as argument.

Definition at line 275 of file TrackMaker.h.

281  {
282  return makeTrack(detProp, *ttraj, ttraj.key(), inHits, outTrack, outHits, optionals);
283  }
key_type key() const noexcept
Definition: Ptr.h:216
virtual bool makeTrack(const detinfo::DetectorPropertiesData &detProp, const recob::Trajectory &traj, const std::vector< recob::TrajectoryPointFlags > &flags, const int tkID, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
makeTrack functions with recob::Trajectory as argument; calls the version with recob::TrackTrajectory...
Definition: TrackMaker.h:235
virtual bool trkmkr::TrackMaker::makeTrack ( const detinfo::DetectorPropertiesData detProp,
const recob::TrackTrajectory ttraj,
const int  tkID,
const std::vector< art::Ptr< recob::Hit >> &  inHits,
recob::Track outTrack,
std::vector< art::Ptr< recob::Hit >> &  outHits,
OptionalOutputs optionals 
) const
pure virtual

makeTrack functions with const recob::TrackTrajectory reference as argument: purely virtual, to be implemented in concrete classes.

Implemented in trkmkr::KalmanFilterFitTrackMaker.

virtual bool trkmkr::TrackMaker::makeTrack ( const detinfo::DetectorPropertiesData detProp,
const art::Ptr< recob::Track track,
const std::vector< art::Ptr< recob::Hit >> &  inHits,
recob::Track outTrack,
std::vector< art::Ptr< recob::Hit >> &  outHits,
OptionalOutputs optionals 
) const
inlinevirtual

makeTrack functions with recob::Track as argument; calls the version with recob::TrackTrajectory.

Definition at line 299 of file TrackMaker.h.

305  {
306  return makeTrack(
307  detProp, track->Trajectory(), track.key(), inHits, outTrack, outHits, optionals);
308  }
const recob::TrackTrajectory & Trajectory() const
Access to the stored recob::TrackTrajectory.
Definition: Track.h:98
key_type key() const noexcept
Definition: Ptr.h:216
virtual bool makeTrack(const detinfo::DetectorPropertiesData &detProp, const recob::Trajectory &traj, const std::vector< recob::TrajectoryPointFlags > &flags, const int tkID, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
makeTrack functions with recob::Trajectory as argument; calls the version with recob::TrackTrajectory...
Definition: TrackMaker.h:235
virtual bool trkmkr::TrackMaker::makeTrack ( const detinfo::DetectorPropertiesData detProp,
const recob::Track track,
const std::vector< art::Ptr< recob::Hit >> &  inHits,
recob::Track outTrack,
std::vector< art::Ptr< recob::Hit >> &  outHits,
OptionalOutputs optionals 
) const
inlinevirtual

Reimplemented in trkmkr::KalmanFilterFitTrackMaker.

Definition at line 311 of file TrackMaker.h.

317  {
318  return makeTrack(
319  detProp, track.Trajectory(), track.ID(), inHits, outTrack, outHits, optionals);
320  }
const recob::TrackTrajectory & Trajectory() const
Access to the stored recob::TrackTrajectory.
Definition: Track.h:98
virtual bool makeTrack(const detinfo::DetectorPropertiesData &detProp, const recob::Trajectory &traj, const std::vector< recob::TrajectoryPointFlags > &flags, const int tkID, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const
makeTrack functions with recob::Trajectory as argument; calls the version with recob::TrackTrajectory...
Definition: TrackMaker.h:235
int ID() const
Definition: Track.h:198

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