LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "Track3DKalmanHitAlg.h"
Public Member Functions | |
Track3DKalmanHitAlg (const fhicl::ParameterSet &pset) | |
Constructor. More... | |
void | reconfigure (const fhicl::ParameterSet &pset) |
Reconfigure method. More... | |
std::vector< trkf::KalmanOutput > | makeTracks (KalmanInputs &kalman_inputs) |
bool | fetchPFParticleSeeds (const art::PtrVector< recob::Seed > &pfseeds, const std::vector< Hits > &pfseedhits, std::vector< recob::Seed > &seeds, std::vector< Hits > &hitsperseed) |
Fetch Seeds method. More... | |
recob::Seed | makeSeed (const Hits &hits) const |
Make seed method. More... | |
void | growSeedsIntoTracks (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 (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 (const std::shared_ptr< trkf::Surface > psurf, const Surface::TrackDirection trkdir, Hits &seedhits, Hits &hits, std::deque< KGTrack > &kalman_tracks) |
bool | smoothandextendTrack (KGTrack &trg0, const Hits hits, unsigned int prefplane, std::deque< KGTrack > &kalman_tracks) |
SMooth and extend track. More... | |
bool | extendandsmoothLoop (KGTrack &trg1, unsigned int prefplane, Hits &trackhits) |
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 (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 (KGTrack &trg1, KGTrack &trg2) |
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... | |
std::unique_ptr< const Propagator > | fProp |
Propagator. More... | |
int | fNumTrack |
Number of tracks produced. More... | |
Definition at line 64 of file Track3DKalmanHitAlg.h.
|
explicit |
Constructor.
Definition at line 52 of file Track3DKalmanHitAlg.cxx.
References reconfigure().
void trkf::Track3DKalmanHitAlg::chopHitsOffSeeds | ( | Hits const & | hpsit, |
bool | pfseed, | ||
Hits & | seedhits | ||
) | const |
Chop hits off of the end of seeds.
Definition at line 364 of file Track3DKalmanHitAlg.cxx.
References art::PtrVector< T >::begin(), art::PtrVector< T >::end(), fMaxChopHits, fMinSeedChopHits, fSelfSeed, max, min, art::PtrVector< T >::push_back(), art::PtrVector< T >::reserve(), and art::PtrVector< T >::size().
Referenced by growSeedIntoTracks().
bool trkf::Track3DKalmanHitAlg::extendandsmoothLoop | ( | KGTrack & | trg1, |
unsigned int | prefplane, | ||
Hits & | trackhits | ||
) |
SMooth and extend a track in a loop.
Definition at line 437 of file Track3DKalmanHitAlg.cxx.
References trkf::KalmanFilterAlg::extendTrack(), fDoDedx, fillHitContainer(), trkf::KGTrack::fillHits(), fitnupdateMomentum(), fKFAlg, fProp, and trkf::KalmanFilterAlg::smoothTrack().
Referenced by smoothandextendTrack().
bool trkf::Track3DKalmanHitAlg::fetchPFParticleSeeds | ( | const art::PtrVector< recob::Seed > & | pfseeds, |
const std::vector< Hits > & | pfseedhits, | ||
std::vector< recob::Seed > & | seeds, | ||
std::vector< Hits > & | hitsperseed | ||
) |
Fetch Seeds method.
Definition at line 156 of file Track3DKalmanHitAlg.cxx.
Referenced by makeTracks().
std::unique_ptr< trkf::KHitContainer > trkf::Track3DKalmanHitAlg::fillHitContainer | ( | const Hits & | hits | ) | const |
Fill hit container with either seedhits or filtered hits i.e. recob::Hit.
Definition at line 332 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 320 of file Track3DKalmanHitAlg.cxx.
References trkf::KGTrack::fillHits().
Referenced by growSeedIntoTracks().
fit and update method, used twice.
Definition at line 481 of file Track3DKalmanHitAlg.cxx.
References trkf::KalmanFilterAlg::fitMomentum(), fKFAlg, fProp, and trkf::KalmanFilterAlg::updateMomentum().
Referenced by extendandsmoothLoop(), and smoothandextendTrack().
void trkf::Track3DKalmanHitAlg::growSeedIntoTracks | ( | const bool | pfseed, |
const recob::Seed & | seed, | ||
const Hits & | hpsit, | ||
Hits & | unusedhits, | ||
Hits & | hits, | ||
std::deque< KGTrack > & | kgtracks | ||
) |
Definition at line 189 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 | ( | 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 172 of file Track3DKalmanHitAlg.cxx.
References growSeedIntoTracks().
Referenced by makeTracks().
bool trkf::Track3DKalmanHitAlg::makeKalmanTracks | ( | const std::shared_ptr< trkf::Surface > | psurf, |
const Surface::TrackDirection | trkdir, | ||
Hits & | seedhits, | ||
Hits & | hits, | ||
std::deque< KGTrack > & | kalman_tracks | ||
) |
Definition at line 270 of file Track3DKalmanHitAlg.cxx.
References trkf::KalmanFilterAlg::buildTrack(), fillHitContainer(), fInitialMomentum, fKFAlg, trkf::Propagator::FORWARD, fProp, fSelfSeed, mf::isDebugEnabled(), trkf::KalmanFilterAlg::setPlane(), and smoothandextendTrack().
Referenced by growSeedIntoTracks().
recob::Seed trkf::Track3DKalmanHitAlg::makeSeed | ( | const Hits & | hits | ) | const |
Make seed method.
Definition at line 490 of file Track3DKalmanHitAlg.cxx.
References detinfo::DetectorProperties::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 249 of file Track3DKalmanHitAlg.cxx.
References recob::Seed::GetDirection(), recob::Seed::GetPoint(), and mf::isDebugEnabled().
Referenced by growSeedIntoTracks().
std::vector< trkf::KalmanOutput > trkf::Track3DKalmanHitAlg::makeTracks | ( | KalmanInputs & | kalman_inputs | ) |
Definition at line 97 of file Track3DKalmanHitAlg.cxx.
References art::PtrVector< T >::begin(), art::PtrVector< T >::end(), fetchPFParticleSeeds(), fSeedFinderAlg, fSelfSeed, trkf::SeedFinderAlgorithm::GetSeedsFromUnSortedHits(), growSeedsIntoTracks(), hits(), makeSeed(), 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 344 of file Track3DKalmanHitAlg.cxx.
References trkf::KGTrack::endTrack(), fMinSeedSlope, trkf::KTrack::getMomentum(), and trkf::KGTrack::startTrack().
Referenced by smoothandextendTrack().
void trkf::Track3DKalmanHitAlg::reconfigure | ( | const fhicl::ParameterSet & | pset | ) |
Reconfigure method.
Definition at line 78 of file Track3DKalmanHitAlg.cxx.
References fDoDedx, fInitialMomentum, fKFAlg, fLineSurface, fMaxChopHits, fMaxSeedChiDF, fMaxTcut, fMinSeedChopHits, fMinSeedHits, fMinSeedSlope, fProp, fSeedFinderAlg, fSelfSeed, fhicl::ParameterSet::get(), trkf::SeedFinderAlgorithm::reconfigure(), and trkf::KalmanFilterAlg::reconfigure().
Referenced by trkf::Track3DKalmanHit::reconfigure(), and Track3DKalmanHitAlg().
bool trkf::Track3DKalmanHitAlg::smoothandextendTrack | ( | KGTrack & | trg0, |
const Hits | hits, | ||
unsigned int | prefplane, | ||
std::deque< KGTrack > & | kalman_tracks | ||
) |
SMooth and extend track.
Definition at line 384 of file Track3DKalmanHitAlg.cxx.
References trkf::KGTrack::endTrack(), extendandsmoothLoop(), fDoDedx, fitnupdateMomentum(), fKFAlg, fMaxSeedChiDF, fMinSeedHits, fNumTrack, fProp, 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 313 of file Track3DKalmanHitAlg.cxx.
References fMinSeedSlope.
Referenced by growSeedIntoTracks().
|
private |
Global dE/dx enable flag.
Definition at line 124 of file Track3DKalmanHitAlg.h.
Referenced by extendandsmoothLoop(), growSeedIntoTracks(), reconfigure(), and smoothandextendTrack().
|
private |
Initial (or constant) momentum.
Definition at line 133 of file Track3DKalmanHitAlg.h.
Referenced by makeKalmanTracks(), and reconfigure().
|
private |
Kalman filter algorithm.
Definition at line 137 of file Track3DKalmanHitAlg.h.
Referenced by extendandsmoothLoop(), fitnupdateMomentum(), makeKalmanTracks(), reconfigure(), and smoothandextendTrack().
|
private |
Line surface flag.
Definition at line 127 of file Track3DKalmanHitAlg.h.
Referenced by fillHitContainer(), and reconfigure().
|
private |
Maximum number of hits to chop from each end of seed.
Definition at line 130 of file Track3DKalmanHitAlg.h.
Referenced by chopHitsOffSeeds(), and reconfigure().
|
private |
Maximum seed track chisquare/dof.
Definition at line 131 of file Track3DKalmanHitAlg.h.
Referenced by reconfigure(), and smoothandextendTrack().
|
private |
Maximum delta ray energy in MeV for restricted dE/dx.
Definition at line 126 of file Track3DKalmanHitAlg.h.
Referenced by reconfigure().
|
private |
Potentially chop seeds that exceed this length.
Definition at line 129 of file Track3DKalmanHitAlg.h.
Referenced by chopHitsOffSeeds(), and reconfigure().
|
private |
Minimum number of hits per track seed.
Definition at line 128 of file Track3DKalmanHitAlg.h.
Referenced by reconfigure(), and smoothandextendTrack().
|
private |
Minimum seed slope (dx/dz).
Definition at line 132 of file Track3DKalmanHitAlg.h.
Referenced by qualityCutsOnSeedTrack(), reconfigure(), and testSeedSlope().
|
private |
Number of tracks produced.
Definition at line 144 of file Track3DKalmanHitAlg.h.
Referenced by smoothandextendTrack().
|
private |
Definition at line 141 of file Track3DKalmanHitAlg.h.
Referenced by extendandsmoothLoop(), fitnupdateMomentum(), makeKalmanTracks(), reconfigure(), and smoothandextendTrack().
|
private |
Seed finder.
Definition at line 138 of file Track3DKalmanHitAlg.h.
Referenced by makeTracks(), and reconfigure().
|
private |
Self seed flag.
Definition at line 125 of file Track3DKalmanHitAlg.h.
Referenced by chopHitsOffSeeds(), makeKalmanTracks(), makeTracks(), and reconfigure().