LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "KGTrack.h"
Public Member Functions | |
KGTrack (int prefplane) | |
Constructor. More... | |
~KGTrack () | |
Destructor. More... | |
int | getPrefPlane () const |
const std::multimap< double, KHitTrack > & | getTrackMap () const |
KHitTrack collection, indexed by path distance. More... | |
size_t | numHits () const |
Number of measurements in track. More... | |
const KHitTrack & | startTrack () const |
Track at start point. More... | |
const KHitTrack & | endTrack () const |
Track at end point. More... | |
bool | isValid () const |
Validity flag. More... | |
std::multimap< double, KHitTrack > & | getTrackMap () |
Modifiable KHitTrack collection, indexed by path distance. More... | |
KHitTrack & | startTrack () |
Modifiable track at start point. More... | |
KHitTrack & | endTrack () |
Modifiable track at end point. More... | |
void | addTrack (const KHitTrack &trh) |
Add track. More... | |
void | recalibrate () |
Recalibrate track map. More... | |
void | clear () |
Clear track collection. More... | |
void | fillTrack (recob::Track &track, int id) const |
Fill a recob::Track. More... | |
void | fillHits (art::PtrVector< recob::Hit > &hits, std::vector< unsigned int > &hittpindex) const |
Fill a PtrVector of Hits. More... | |
const std::multimap< double, KHitTrack > | TrackMap () const |
std::ostream & | Print (std::ostream &out) const |
Printout. More... | |
Private Attributes | |
int | fPrefPlane |
Preferred plane. More... | |
std::multimap< double, KHitTrack > | fTrackMap |
KHitTrack collection, indexed by path distance. More... | |
trkf::KGTrack::KGTrack | ( | int | prefplane | ) |
trkf::KGTrack::~KGTrack | ( | ) |
void trkf::KGTrack::addTrack | ( | const KHitTrack & | trh | ) |
Add track.
Definition at line 85 of file KGTrack.cxx.
References fTrackMap, trkf::KHitTrack::getHit(), trkf::KFitTrack::getPath(), and trkf::KTrack::isValid().
Referenced by trkf::KalmanFilterAlg::buildTrack(), trkf::KalmanFilterAlg::extendTrack(), getTrackMap(), and trkf::KalmanFilterAlg::smoothTrack().
|
inline |
Clear track collection.
Definition at line 86 of file KGTrack.h.
References fillHits(), fillTrack(), fTrackMap, hits(), and track.
const KHitTrack & trkf::KGTrack::endTrack | ( | ) | const |
Track at end point.
Throw exception if track is not valid.
Definition at line 46 of file KGTrack.cxx.
References fTrackMap, and isValid().
Referenced by trkf::KalmanFilterAlg::buildTrack(), trkf::KalmanFilterAlg::extendTrack(), trkf::KalmanFilterAlg::fitMomentumRange(), getTrackMap(), numHits(), trkf::Track3DKalmanHitAlg::qualityCutsOnSeedTrack(), trkf::Track3DKalmanHitAlg::smoothandextendTrack(), and trkf::KalmanFilterAlg::smoothTrack().
KHitTrack & trkf::KGTrack::endTrack | ( | ) |
Modifiable track at end point.
Throw exception if track is not valid.
Definition at line 72 of file KGTrack.cxx.
References fTrackMap, and isValid().
void trkf::KGTrack::fillHits | ( | art::PtrVector< recob::Hit > & | hits, |
std::vector< unsigned int > & | hittpindex | ||
) | const |
Fill a PtrVector of Hits.
Fill a PtrVector of Hits.
Arguments:
hits - Hit vector to fill.
Definition at line 219 of file KGTrack.cxx.
References fTrackMap, trkf::KHitTrack::getHit(), art::Ptr< T >::isNull(), art::PtrVector< T >::push_back(), art::PtrVector< T >::reserve(), art::PtrVector< T >::size(), and track.
Referenced by clear(), trkf::Track3DKalmanHitAlg::extendandsmoothLoop(), trkf::Track3DKalmanHitAlg::filterHitsOnKalmanTrack(), and trkf::TrackKalmanCheater::produce().
void trkf::KGTrack::fillTrack | ( | recob::Track & | track, |
int | id | ||
) | const |
Fill a recob::Track.
Fill a recob::Track.
Arguments:
track - Track to fill.
Definition at line 128 of file KGTrack.cxx.
References trkf::Propagator::err_prop(), fTrackMap, trkf::KFitTrack::getChisq(), trkf::KETrack::getError(), trkf::KTrack::getMomentum(), trkf::KTrack::getPosition(), recob::TrajectoryPointFlags::makeMask(), n, startTrack(), and trkf::Propagator::UNKNOWN.
Referenced by clear(), and trkf::TrackKalmanCheater::produce().
|
inline |
Definition at line 51 of file KGTrack.h.
References fPrefPlane.
Referenced by trkf::KalmanFilterAlg::smoothTrackIter().
|
inline |
KHitTrack collection, indexed by path distance.
Definition at line 54 of file KGTrack.h.
References fTrackMap.
Referenced by trkf::KalmanFilterAlg::cleanTrack(), trkf::Track3DKalmanHit::fillHistograms(), trkf::KalmanFilterAlg::fitMomentumMS(), trkf::TrackKalmanCheater::produce(), trkf::KalmanFilterAlg::smoothTrack(), and trkf::KalmanFilterAlg::updateMomentum().
|
inline |
Modifiable KHitTrack collection, indexed by path distance.
Definition at line 71 of file KGTrack.h.
References addTrack(), endTrack(), fTrackMap, recalibrate(), and startTrack().
|
inline |
Validity flag.
Definition at line 66 of file KGTrack.h.
References fTrackMap.
Referenced by trkf::KalmanFilterAlg::buildTrack(), endTrack(), trkf::KalmanFilterAlg::extendTrack(), trkf::KalmanFilterAlg::fitMomentumRange(), trkf::KalmanFilterAlg::smoothTrack(), and startTrack().
|
inline |
Number of measurements in track.
Definition at line 57 of file KGTrack.h.
References endTrack(), fTrackMap, and startTrack().
Referenced by trkf::KalmanFilterAlg::buildTrack(), trkf::KalmanFilterAlg::extendTrack(), trkf::Track3DKalmanHitAlg::smoothandextendTrack(), and trkf::KalmanFilterAlg::smoothTrack().
std::ostream & trkf::KGTrack::Print | ( | std::ostream & | out | ) | const |
Printout.
Printout
Definition at line 253 of file KGTrack.cxx.
References f, fTrackMap, trkf::KHitTrack::getHit(), trkf::KHitBase::getMeasPlane(), trkf::KTrack::getMomentum(), trkf::KTrack::getPosition(), n, and s.
Referenced by trkf::operator<<(), and TrackMap().
void trkf::KGTrack::recalibrate | ( | ) |
Recalibrate track map.
Recalibrate track map.
Loop over contents of track map. Copy each KHitTrack into a new multimap track map. Offset the distance stored in the KHitTracks such that the minimum distance is zero. Also update multimap keys to agree with distance stored in track.
Definition at line 97 of file KGTrack.cxx.
References fTrackMap, trkf::KFitTrack::getPath(), s, and trkf::KFitTrack::setPath().
Referenced by getTrackMap(), and trkf::KalmanFilterAlg::smoothTrack().
const KHitTrack & trkf::KGTrack::startTrack | ( | ) | const |
Track at start point.
Throw exception if track is not valid.
Definition at line 33 of file KGTrack.cxx.
References fTrackMap, and isValid().
Referenced by trkf::KalmanFilterAlg::buildTrack(), trkf::KalmanFilterAlg::extendTrack(), fillTrack(), trkf::KalmanFilterAlg::fitMomentum(), getTrackMap(), numHits(), trkf::Track3DKalmanHitAlg::qualityCutsOnSeedTrack(), trkf::Track3DKalmanHitAlg::smoothandextendTrack(), and trkf::KalmanFilterAlg::smoothTrack().
KHitTrack & trkf::KGTrack::startTrack | ( | ) |
Modifiable track at start point.
Throw exception if track is not valid.
Definition at line 59 of file KGTrack.cxx.
References fTrackMap, and isValid().
|
inline |
Definition at line 98 of file KGTrack.h.
References fTrackMap, and Print().
Referenced by trkf::TrackKalmanCheater::produce().
|
private |
|
private |
KHitTrack collection, indexed by path distance.
Definition at line 111 of file KGTrack.h.
Referenced by addTrack(), clear(), endTrack(), fillHits(), fillTrack(), getTrackMap(), isValid(), numHits(), Print(), recalibrate(), startTrack(), and TrackMap().