Concrete implementation of a tool to fit tracks with TrackKalmanFitter. More...
Classes | |
struct | Config |
struct | Options |
Public Types | |
using | Parameters = art::ToolConfigTable< Config > |
Public Member Functions | |
KalmanFilterFitTrackMaker (Parameters const &p) | |
Constructor from Parameters. More... | |
void | initEvent (const art::Event &e) override |
initialize event: get collection of recob::MCSFitResult More... | |
bool | makeTrackImpl (const detinfo::DetectorPropertiesData &detProp, const recob::TrackTrajectory &traj, const int tkID, const std::vector< art::Ptr< recob::Hit >> &inHits, const recob::tracking::SMatrixSym55 &covVtx, const recob::tracking::SMatrixSym55 &covEnd, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const |
function that actually calls the fitter More... | |
bool | makeTrack (const detinfo::DetectorPropertiesData &detProp, const recob::TrackTrajectory &traj, const int tkID, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const override |
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 override |
override of TrackMaker virtual function with recob::Track as argument More... | |
int | getParticleID (const recob::TrackTrajectory &traj, const int tkID) const |
set the particle ID hypothesis More... | |
double | getMomentum (const recob::TrackTrajectory &traj, const int pid, const bool isFlip, const int tkID) const |
set the initial momentum estimate More... | |
bool | isFlipDirection (const recob::TrackTrajectory &traj, const int tkID) const |
decide whether to flip the direction or not More... | |
void | restoreInputPoints (const recob::TrackTrajectory &traj, const std::vector< art::Ptr< recob::Hit >> &inHits, recob::Track &outTrack, std::vector< art::Ptr< recob::Hit >> &outHits, OptionalOutputs &optionals) const |
Public Member Functions inherited from trkmkr::TrackMaker | |
virtual | ~TrackMaker () noexcept=default |
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::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 |
Private Attributes | |
Parameters | p_ |
const trkf::TrackStatePropagator | prop |
const trkf::TrackKalmanFitter | kalmanFitter |
const trkf::TrajectoryMCSFitter | mcsfitter |
double | mom_def_ |
bool | momFromMCSColl_ |
art::InputTag | mcsInputTag_ |
bool | momFromCombAndPid_ |
art::InputTag | contInputTag_ |
bool | pidFromColl_ |
art::InputTag | pidInputTag_ |
double | mom_len_cut_ |
int | pid_def_ |
bool | alwaysFlip_ |
bool | dirFromVec_ |
recob::tracking::Vector_t | dirVec |
const std::vector < recob::MCSFitResult > * | mcs = nullptr |
const std::vector < anab::CosmicTag > * | cont = nullptr |
const std::vector < anab::ParticleID > * | pid = nullptr |
trkf::TrackMomentumCalculator | tmc |
Concrete implementation of a tool to fit tracks with TrackKalmanFitter.
Concrete implementation of a tool to fit tracks with trkf::TrackKalmanFitter; inherits from abstract class TrackMaker. It prepares the input needed by the fitter (momentum, particleId, direction), and returns a track with all outputs filled. If the flag keepInputTrajectoryPoints is set to true, the tracjetory points from the input track are copied into the output, so that only the covariance matrices, the chi2 and the ndof in the output track are resulting from the fit.
For configuration options see KalmanFilterFitTrackMaker::Options and KalmanFilterFitTrackMaker::Config.
Definition at line 47 of file KalmanFilterFitTrackMaker_tool.cc.
using trkmkr::KalmanFilterFitTrackMaker::Parameters = art::ToolConfigTable<Config> |
Definition at line 125 of file KalmanFilterFitTrackMaker_tool.cc.
|
inlineexplicit |
Constructor from Parameters.
Definition at line 128 of file KalmanFilterFitTrackMaker_tool.cc.
double trkmkr::KalmanFilterFitTrackMaker::getMomentum | ( | const recob::TrackTrajectory & | traj, |
const int | pid, | ||
const bool | isFlip, | ||
const int | tkID | ||
) | const |
set the initial momentum estimate
Definition at line 325 of file KalmanFilterFitTrackMaker_tool.cc.
int trkmkr::KalmanFilterFitTrackMaker::getParticleID | ( | const recob::TrackTrajectory & | traj, |
const int | tkID | ||
) | const |
set the particle ID hypothesis
Definition at line 358 of file KalmanFilterFitTrackMaker_tool.cc.
|
inlineoverridevirtual |
initialize event: get collection of recob::MCSFitResult
Reimplemented from trkmkr::TrackMaker.
Definition at line 183 of file KalmanFilterFitTrackMaker_tool.cc.
bool trkmkr::KalmanFilterFitTrackMaker::isFlipDirection | ( | const recob::TrackTrajectory & | traj, |
const int | tkID | ||
) | const |
decide whether to flip the direction or not
Definition at line 369 of file KalmanFilterFitTrackMaker_tool.cc.
|
inlineoverridevirtual |
override of TrackMaker purely virtual function with recob::TrackTrajectory as argument
Implements trkmkr::TrackMaker.
Definition at line 209 of file KalmanFilterFitTrackMaker_tool.cc.
|
inlineoverridevirtual |
override of TrackMaker virtual function with recob::Track as argument
Reimplemented from trkmkr::TrackMaker.
Definition at line 230 of file KalmanFilterFitTrackMaker_tool.cc.
bool trkmkr::KalmanFilterFitTrackMaker::makeTrackImpl | ( | const detinfo::DetectorPropertiesData & | detProp, |
const recob::TrackTrajectory & | traj, | ||
const int | tkID, | ||
const std::vector< art::Ptr< recob::Hit >> & | inHits, | ||
const recob::tracking::SMatrixSym55 & | covVtx, | ||
const recob::tracking::SMatrixSym55 & | covEnd, | ||
recob::Track & | outTrack, | ||
std::vector< art::Ptr< recob::Hit >> & | outHits, | ||
OptionalOutputs & | optionals | ||
) | const |
function that actually calls the fitter
Definition at line 292 of file KalmanFilterFitTrackMaker_tool.cc.
void trkmkr::KalmanFilterFitTrackMaker::restoreInputPoints | ( | const recob::TrackTrajectory & | traj, |
const std::vector< art::Ptr< recob::Hit >> & | inHits, | ||
recob::Track & | outTrack, | ||
std::vector< art::Ptr< recob::Hit >> & | outHits, | ||
OptionalOutputs & | optionals | ||
) | const |
restore the TrajectoryPoints in the Track to be the same as those in the input TrackTrajectory (but keep covariance matrices and chi2 from fit).
Definition at line 381 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 281 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 285 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 276 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 282 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 283 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 270 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 284 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 271 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 274 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 272 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 279 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 275 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 273 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 268 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 286 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 280 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 277 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 278 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 269 of file KalmanFilterFitTrackMaker_tool.cc.
|
private |
Definition at line 287 of file KalmanFilterFitTrackMaker_tool.cc.