LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "Track3DKalmanHitAlg.h"
Public Member Functions | |
Track3DKalmanHitAlg (const fhicl::ParameterSet &pset) | |
Constructor. More... | |
std::vector< trkf::KalmanOutput > | makeTracks (detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, KalmanInputs &kalman_inputs) |
void | fetchPFParticleSeeds (const art::PtrVector< recob::Seed > &pfseeds, const std::vector< Hits > &pfseedhits, std::vector< recob::Seed > &seeds, std::vector< Hits > &hitsperseed) const |
Fetch Seeds method. More... | |
recob::Seed | makeSeed (detinfo::DetectorPropertiesData const &detProp, const Hits &hits) const |
Make seed method. More... | |
void | growSeedsIntoTracks (detinfo::DetectorPropertiesData const &detProp, const bool pfseed, const std::vector< recob::Seed > &seeds, const std::vector< Hits > &hitsperseed, Hits &unusedhits, Hits &hits, std::deque< KGTrack > &kalman_tracks) |
Grow Seeds method. More... | |
void | growSeedIntoTracks (detinfo::DetectorPropertiesData const &detProp, const bool pfseed, const recob::Seed &seed, const Hits &hpsit, Hits &unusedhits, Hits &hits, std::deque< KGTrack > &kgtracks) |
void | chopHitsOffSeeds (Hits const &hpsit, bool pfseed, Hits &seedhits) const |
Chop hits off of the end of seeds. More... | |
bool | testSeedSlope (const double *dir) const |
std::shared_ptr< Surface > | makeSurface (const recob::Seed &seed, double *dir) const |
method to return a seed to surface. More... | |
bool | makeKalmanTracks (detinfo::DetectorPropertiesData const &detProp, const std::shared_ptr< trkf::Surface > psurf, const Surface::TrackDirection trkdir, Hits &seedhits, Hits &hits, std::deque< KGTrack > &kalman_tracks) |
bool | smoothandextendTrack (detinfo::DetectorPropertiesData const &detProp, Propagator const &propagator, KGTrack &trg0, const Hits hits, unsigned int prefplane, std::deque< KGTrack > &kalman_tracks) |
SMooth and extend track. More... | |
bool | extendandsmoothLoop (detinfo::DetectorPropertiesData const &detProp, Propagator const &propagator, KGTrack &trg1, unsigned int prefplane, Hits &trackhits) const |
SMooth and extend a track in a loop. More... | |
void | filterHitsOnKalmanTrack (const KGTrack &trg, Hits &hits, Hits &seederhits) const |
Filter hits that are on kalman tracks. More... | |
std::unique_ptr< KHitContainer > | fillHitContainer (detinfo::DetectorPropertiesData const &detProp, const Hits &hits) const |
Fill hit container with either seedhits or filtered hits i.e. recob::Hit. More... | |
bool | qualityCutsOnSeedTrack (const KGTrack &trg0) const |
Quality cuts on seed track. More... | |
void | fitnupdateMomentum (Propagator const &propagator, KGTrack &trg1, KGTrack &trg2) const |
fit and update method, used twice. More... | |
Private Attributes | |
bool | fDoDedx |
Global dE/dx enable flag. More... | |
bool | fSelfSeed |
Self seed flag. More... | |
double | fMaxTcut |
Maximum delta ray energy in MeV for restricted dE/dx. More... | |
bool | fLineSurface |
Line surface flag. More... | |
size_t | fMinSeedHits |
Minimum number of hits per track seed. More... | |
int | fMinSeedChopHits |
Potentially chop seeds that exceed this length. More... | |
int | fMaxChopHits |
Maximum number of hits to chop from each end of seed. More... | |
double | fMaxSeedChiDF |
Maximum seed track chisquare/dof. More... | |
double | fMinSeedSlope |
Minimum seed slope (dx/dz). More... | |
double | fInitialMomentum |
Initial (or constant) momentum. More... | |
KalmanFilterAlg | fKFAlg |
Kalman filter algorithm. More... | |
SeedFinderAlgorithm | fSeedFinderAlg |
Seed finder. More... | |
int | fNumTrack |
Number of tracks produced. More... | |
Definition at line 60 of file Track3DKalmanHitAlg.h.
|
explicit |
Constructor.
Definition at line 82 of file Track3DKalmanHitAlg.cxx.
References fInitialMomentum, fKFAlg, fLineSurface, fMaxChopHits, fMaxSeedChiDF, fMaxTcut, fMinSeedChopHits, fMinSeedHits, fMinSeedSlope, fNumTrack, fSeedFinderAlg, fSelfSeed, and fhicl::ParameterSet::get().
void trkf::Track3DKalmanHitAlg::chopHitsOffSeeds | ( | Hits const & | hpsit, |
bool | pfseed, | ||
Hits & | seedhits | ||
) | const |
Chop hits off of the end of seeds.
Definition at line 379 of file Track3DKalmanHitAlg.cxx.
References art::PtrVector< T >::begin(), art::PtrVector< T >::end(), fMaxChopHits, fMinSeedChopHits, fSelfSeed, art::PtrVector< T >::push_back(), art::PtrVector< T >::reserve(), and art::PtrVector< T >::size().
Referenced by growSeedIntoTracks().
bool trkf::Track3DKalmanHitAlg::extendandsmoothLoop | ( | detinfo::DetectorPropertiesData const & | detProp, |
Propagator const & | propagator, | ||
KGTrack & | trg1, | ||
unsigned int | prefplane, | ||
Hits & | trackhits | ||
) | const |
SMooth and extend a track in a loop.
Definition at line 449 of file Track3DKalmanHitAlg.cxx.
References trkf::KalmanFilterAlg::extendTrack(), fDoDedx, fillHitContainer(), trkf::KGTrack::fillHits(), fitnupdateMomentum(), fKFAlg, and trkf::KalmanFilterAlg::smoothTrack().
Referenced by smoothandextendTrack().
void trkf::Track3DKalmanHitAlg::fetchPFParticleSeeds | ( | const art::PtrVector< recob::Seed > & | pfseeds, |
const std::vector< Hits > & | pfseedhits, | ||
std::vector< recob::Seed > & | seeds, | ||
std::vector< Hits > & | hitsperseed | ||
) | const |
Fetch Seeds method.
Definition at line 165 of file Track3DKalmanHitAlg.cxx.
Referenced by makeTracks().
std::unique_ptr< trkf::KHitContainer > trkf::Track3DKalmanHitAlg::fillHitContainer | ( | detinfo::DetectorPropertiesData const & | detProp, |
const Hits & | hits | ||
) | const |
Fill hit container with either seedhits or filtered hits i.e. recob::Hit.
Definition at line 344 of file Track3DKalmanHitAlg.cxx.
References fLineSurface.
Referenced by extendandsmoothLoop(), and makeKalmanTracks().
void trkf::Track3DKalmanHitAlg::filterHitsOnKalmanTrack | ( | const KGTrack & | trg, |
Hits & | hits, | ||
Hits & | seederhits | ||
) | const |
Filter hits that are on kalman tracks.
Definition at line 331 of file Track3DKalmanHitAlg.cxx.
References trkf::KGTrack::fillHits().
Referenced by growSeedIntoTracks().
void trkf::Track3DKalmanHitAlg::fitnupdateMomentum | ( | Propagator const & | propagator, |
KGTrack & | trg1, | ||
KGTrack & | trg2 | ||
) | const |
fit and update method, used twice.
Definition at line 497 of file Track3DKalmanHitAlg.cxx.
References trkf::KalmanFilterAlg::fitMomentum(), fKFAlg, and trkf::KalmanFilterAlg::updateMomentum().
Referenced by extendandsmoothLoop(), and smoothandextendTrack().
void trkf::Track3DKalmanHitAlg::growSeedIntoTracks | ( | detinfo::DetectorPropertiesData const & | detProp, |
const bool | pfseed, | ||
const recob::Seed & | seed, | ||
const Hits & | hpsit, | ||
Hits & | unusedhits, | ||
Hits & | hits, | ||
std::deque< KGTrack > & | kgtracks | ||
) |
Definition at line 198 of file Track3DKalmanHitAlg.cxx.
References trkf::Surface::BACKWARD, chopHitsOffSeeds(), dir, fDoDedx, filterHitsOnKalmanTrack(), trkf::Surface::FORWARD, makeKalmanTracks(), makeSurface(), art::PtrVector< T >::size(), and testSeedSlope().
Referenced by growSeedsIntoTracks().
void trkf::Track3DKalmanHitAlg::growSeedsIntoTracks | ( | detinfo::DetectorPropertiesData const & | detProp, |
const bool | pfseed, | ||
const std::vector< recob::Seed > & | seeds, | ||
const std::vector< Hits > & | hitsperseed, | ||
Hits & | unusedhits, | ||
Hits & | hits, | ||
std::deque< KGTrack > & | kalman_tracks | ||
) |
Grow Seeds method.
Definition at line 179 of file Track3DKalmanHitAlg.cxx.
References growSeedIntoTracks().
Referenced by makeTracks().
bool trkf::Track3DKalmanHitAlg::makeKalmanTracks | ( | detinfo::DetectorPropertiesData const & | detProp, |
const std::shared_ptr< trkf::Surface > | psurf, | ||
const Surface::TrackDirection | trkdir, | ||
Hits & | seedhits, | ||
Hits & | hits, | ||
std::deque< KGTrack > & | kalman_tracks | ||
) |
Definition at line 276 of file Track3DKalmanHitAlg.cxx.
References trkf::KalmanFilterAlg::buildTrack(), fDoDedx, fillHitContainer(), fInitialMomentum, fKFAlg, fMaxTcut, trkf::Propagator::FORWARD, fSelfSeed, mf::isDebugEnabled(), trkf::KalmanFilterAlg::setPlane(), and smoothandextendTrack().
Referenced by growSeedIntoTracks().
recob::Seed trkf::Track3DKalmanHitAlg::makeSeed | ( | detinfo::DetectorPropertiesData const & | detProp, |
const Hits & | hits | ||
) | const |
Make seed method.
Definition at line 509 of file Track3DKalmanHitAlg.cxx.
References detinfo::DetectorPropertiesData::ConvertTicksToX(), dir, geo::WireGeo::GetCenter(), n, recob::Hit::PeakTime(), trkf::syminvert(), geo::WireGeo::ThetaZ(), w, geo::GeometryCore::Wire(), recob::Hit::WireID(), and x.
Referenced by makeTracks().
std::shared_ptr< trkf::Surface > trkf::Track3DKalmanHitAlg::makeSurface | ( | const recob::Seed & | seed, |
double * | dir | ||
) | const |
method to return a seed to surface.
Definition at line 257 of file Track3DKalmanHitAlg.cxx.
References recob::Seed::GetDirection(), recob::Seed::GetPoint(), and mf::isDebugEnabled().
Referenced by growSeedIntoTracks().
std::vector< trkf::KalmanOutput > trkf::Track3DKalmanHitAlg::makeTracks | ( | detinfo::DetectorClocksData const & | clockData, |
detinfo::DetectorPropertiesData const & | detProp, | ||
KalmanInputs & | kalman_inputs | ||
) |
Definition at line 102 of file Track3DKalmanHitAlg.cxx.
References art::PtrVector< T >::begin(), util::empty(), art::PtrVector< T >::end(), fetchPFParticleSeeds(), fSeedFinderAlg, fSelfSeed, trkf::SeedFinderAlgorithm::GetSeedsFromUnSortedHits(), growSeedsIntoTracks(), hits(), makeSeed(), tca::seeds, and art::PtrVector< T >::size().
Referenced by trkf::Track3DKalmanHit::produce().
bool trkf::Track3DKalmanHitAlg::qualityCutsOnSeedTrack | ( | const KGTrack & | trg0 | ) | const |
Quality cuts on seed track.
Definition at line 359 of file Track3DKalmanHitAlg.cxx.
References util::abs(), trkf::KGTrack::endTrack(), fMinSeedSlope, trkf::KTrack::getMomentum(), and trkf::KGTrack::startTrack().
Referenced by smoothandextendTrack().
bool trkf::Track3DKalmanHitAlg::smoothandextendTrack | ( | detinfo::DetectorPropertiesData const & | detProp, |
Propagator const & | propagator, | ||
KGTrack & | trg0, | ||
const Hits | hits, | ||
unsigned int | prefplane, | ||
std::deque< KGTrack > & | kalman_tracks | ||
) |
SMooth and extend track.
Definition at line 399 of file Track3DKalmanHitAlg.cxx.
References trkf::KGTrack::endTrack(), extendandsmoothLoop(), fDoDedx, fitnupdateMomentum(), fKFAlg, fMaxSeedChiDF, fMinSeedHits, fNumTrack, trkf::KFitTrack::getChisq(), hits(), n, trkf::KGTrack::numHits(), qualityCutsOnSeedTrack(), trkf::KalmanFilterAlg::smoothTrack(), and trkf::KGTrack::startTrack().
Referenced by makeKalmanTracks().
bool trkf::Track3DKalmanHitAlg::testSeedSlope | ( | const double * | dir | ) | const |
Definition at line 324 of file Track3DKalmanHitAlg.cxx.
References util::abs(), and fMinSeedSlope.
Referenced by growSeedIntoTracks().
|
private |
Global dE/dx enable flag.
Definition at line 116 of file Track3DKalmanHitAlg.h.
Referenced by extendandsmoothLoop(), growSeedIntoTracks(), makeKalmanTracks(), and smoothandextendTrack().
|
private |
Initial (or constant) momentum.
Definition at line 125 of file Track3DKalmanHitAlg.h.
Referenced by makeKalmanTracks(), and Track3DKalmanHitAlg().
|
private |
Kalman filter algorithm.
Definition at line 129 of file Track3DKalmanHitAlg.h.
Referenced by extendandsmoothLoop(), fitnupdateMomentum(), makeKalmanTracks(), smoothandextendTrack(), and Track3DKalmanHitAlg().
|
private |
Line surface flag.
Definition at line 119 of file Track3DKalmanHitAlg.h.
Referenced by fillHitContainer(), and Track3DKalmanHitAlg().
|
private |
Maximum number of hits to chop from each end of seed.
Definition at line 122 of file Track3DKalmanHitAlg.h.
Referenced by chopHitsOffSeeds(), and Track3DKalmanHitAlg().
|
private |
Maximum seed track chisquare/dof.
Definition at line 123 of file Track3DKalmanHitAlg.h.
Referenced by smoothandextendTrack(), and Track3DKalmanHitAlg().
|
private |
Maximum delta ray energy in MeV for restricted dE/dx.
Definition at line 118 of file Track3DKalmanHitAlg.h.
Referenced by makeKalmanTracks(), and Track3DKalmanHitAlg().
|
private |
Potentially chop seeds that exceed this length.
Definition at line 121 of file Track3DKalmanHitAlg.h.
Referenced by chopHitsOffSeeds(), and Track3DKalmanHitAlg().
|
private |
Minimum number of hits per track seed.
Definition at line 120 of file Track3DKalmanHitAlg.h.
Referenced by smoothandextendTrack(), and Track3DKalmanHitAlg().
|
private |
Minimum seed slope (dx/dz).
Definition at line 124 of file Track3DKalmanHitAlg.h.
Referenced by qualityCutsOnSeedTrack(), testSeedSlope(), and Track3DKalmanHitAlg().
|
private |
Number of tracks produced.
Definition at line 133 of file Track3DKalmanHitAlg.h.
Referenced by smoothandextendTrack(), and Track3DKalmanHitAlg().
|
private |
Seed finder.
Definition at line 130 of file Track3DKalmanHitAlg.h.
Referenced by makeTracks(), and Track3DKalmanHitAlg().
|
private |
Self seed flag.
Definition at line 117 of file Track3DKalmanHitAlg.h.
Referenced by chopHitsOffSeeds(), makeKalmanTracks(), makeTracks(), and Track3DKalmanHitAlg().