LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "KTrack.h"
Public Member Functions | |
KTrack () | |
Enum. More... | |
KTrack (const std::shared_ptr< const Surface > &psurf) | |
Constructor - specify surface only. More... | |
KTrack (std::shared_ptr< const Surface > psurf, const TrackVector &vec, Surface::TrackDirection dir=Surface::UNKNOWN, int pdg=0) | |
Constructor - surface + track parameters. More... | |
virtual | ~KTrack () |
Destructor. More... | |
const std::shared_ptr< const Surface > & | getSurface () const |
Surface. More... | |
const TrackVector & | getVector () const |
Track state vector. More... | |
Surface::TrackDirection | getDirection () const |
Track direction. More... | |
int | PdgCode () const |
Pdg code. More... | |
double | Mass () const |
Based on pdg code. More... | |
TrackVector & | getVector () |
Modifiable state vector. More... | |
void | setSurface (const std::shared_ptr< const Surface > &psurf) |
Set surface. More... | |
void | setVector (const TrackVector &vec) |
Set state vector. More... | |
void | setDirection (Surface::TrackDirection dir) |
Set direction. More... | |
void | setPdgCode (int pdg) |
Set pdg code. More... | |
bool | isValid () const |
Test if track is valid. More... | |
void | getPosition (double xyz[3]) const |
Get position of track. More... | |
void | getMomentum (double mom[3]) const |
Get momentum vector of track. More... | |
double | XLatitude () const |
Get x-latitude. More... | |
double | XLongitude () const |
Get x-longitude. More... | |
virtual std::ostream & | Print (std::ostream &out, bool doTitle=true) const |
Printout. More... | |
Private Attributes | |
std::shared_ptr< const Surface > | fSurf |
Track surface. More... | |
TrackVector | fVec |
Track state vector. More... | |
Surface::TrackDirection | fDir |
Track direction. More... | |
int | fPdgCode |
Pdg id. hypothesis. More... | |
trkf::KTrack::KTrack | ( | ) |
trkf::KTrack::KTrack | ( | const std::shared_ptr< const Surface > & | psurf | ) |
Constructor - specify surface only.
Constructor - specify surface only.
Arguments:
psurf - Surface pointer.
Definition at line 37 of file KTrack.cxx.
trkf::KTrack::KTrack | ( | std::shared_ptr< const Surface > | psurf, |
const TrackVector & | vec, | ||
Surface::TrackDirection | dir = Surface::UNKNOWN , |
||
int | pdg = 0 |
||
) |
Constructor - surface + track parameters.
Constructor - surface + track parameters.
Arguments:
psurf - Surface pointer. vec - Track state vector. dir - Track direction. pdg - Pdg code.
Definition at line 50 of file KTrack.cxx.
|
virtual |
Surface::TrackDirection trkf::KTrack::getDirection | ( | ) | const |
Track direction.
Track direction accessor. Track direction implied by track parameters has precedence over track direction attribute. If the surface pointer is null, return UNKNOWN.
Definition at line 64 of file KTrack.cxx.
References fDir, fSurf, fVec, and trkf::Surface::UNKNOWN.
Referenced by getMomentum(), getVector(), isValid(), trkf::Propagator::lin_prop(), trkf::InteractPlane::noise(), trkf::PropYZLine::origin_vec_prop(), trkf::PropYZPlane::origin_vec_prop(), trkf::PropXYZPlane::origin_vec_prop(), trkf::PropYZPlane::short_vec_prop(), and trkf::PropXYZPlane::short_vec_prop().
void trkf::KTrack::getMomentum | ( | double | mom[3] | ) | const |
Get momentum vector of track.
Get momentum vector of track. Throw an exception if track is not valid.
Arguments:
mom - Momentum vector of track.
Definition at line 201 of file KTrack.cxx.
References dir, fSurf, fVec, getDirection(), and isValid().
Referenced by trkf::KGTrack::fillTrack(), trkf::InteractGeneral::noise(), Print(), trkf::KGTrack::Print(), trkf::Track3DKalmanHitAlg::qualityCutsOnSeedTrack(), setPdgCode(), trkf::Propagator::vec_prop(), XLatitude(), and XLongitude().
void trkf::KTrack::getPosition | ( | double | xyz[3] | ) | const |
Get position of track.
Get position of track. Throw an exception if track is not valid.
Arguments:
xyz - Position vector.
Definition at line 157 of file KTrack.cxx.
References fSurf, fVec, and isValid().
Referenced by trkf::KGTrack::fillTrack(), trkf::InteractGeneral::noise(), trkf::PropYZLine::origin_vec_prop(), trkf::PropXYZPlane::origin_vec_prop(), trkf::PropYZPlane::origin_vec_prop(), Print(), trkf::KGTrack::Print(), setPdgCode(), trkf::PropYZLine::short_vec_prop(), trkf::PropYZPlane::short_vec_prop(), trkf::PropXYZPlane::short_vec_prop(), and trkf::Propagator::vec_prop().
|
inline |
Definition at line 53 of file KTrack.h.
References fSurf.
Referenced by trkf::KalmanFilterAlg::buildTrack(), trkf::KFitTrack::combineFit(), trkf::KETrack::combineTrack(), trkf::KalmanFilterAlg::extendTrack(), trkf::KalmanFilterAlg::fitMomentumMS(), trkf::Propagator::lin_prop(), trkf::InteractPlane::noise(), trkf::PropYZLine::origin_vec_prop(), trkf::PropXYZPlane::origin_vec_prop(), trkf::PropYZPlane::origin_vec_prop(), trkf::KETrack::PointingError(), trkf::KHitMulti::predict(), trkf::KHit< N >::predict(), trkf::KalmanFilterAlg::smoothTrack(), trkf::KHitWireLine::subpredict(), trkf::KHitWireX::subpredict(), trkf::KHitMulti::update(), trkf::KHit< N >::update(), and trkf::KalmanFilterAlg::updateMomentum().
|
inline |
Track state vector.
Definition at line 54 of file KTrack.h.
References fVec, and getDirection().
Referenced by trkf::KETrack::combineTrack(), trkf::KalmanFilterAlg::extendTrack(), trkf::KalmanFilterAlg::fitMomentum(), trkf::KalmanFilterAlg::fitMomentumMS(), trkf::KalmanFilterAlg::fitMomentumRange(), trkf::Propagator::lin_prop(), trkf::InteractPlane::noise(), trkf::PropYZLine::origin_vec_prop(), trkf::PropYZPlane::origin_vec_prop(), trkf::PropXYZPlane::origin_vec_prop(), trkf::KETrack::PointingError(), trkf::KHitMulti::predict(), trkf::PropYZLine::short_vec_prop(), trkf::PropXYZPlane::short_vec_prop(), trkf::PropYZPlane::short_vec_prop(), trkf::KHitWireLine::subpredict(), trkf::KHitWireX::subpredict(), trkf::KHitMulti::update(), trkf::KHit< N >::update(), trkf::KalmanFilterAlg::updateMomentum(), and trkf::Propagator::vec_prop().
|
inline |
bool trkf::KTrack::isValid | ( | ) | const |
Test if track is valid.
Test if track is valid.
A default-constructed or partially-constructed track, is invalid by virtue of having an unknown propagation direction or a null surface pointer.
Tracks can become invaliddynamically for other reasons. This method also does the following checks: a) Check for invalid floating point values (inf and nan). b) Surface-dependent checks via virtual method Surface::isTrackValid.
Definition at line 81 of file KTrack.cxx.
References fSurf, fVec, getDirection(), geo::vect::isfinite(), and trkf::Surface::UNKNOWN.
Referenced by trkf::KGTrack::addTrack(), trkf::KalmanFilterAlg::buildTrack(), trkf::KETrack::combineTrack(), trkf::KalmanFilterAlg::extendTrack(), getMomentum(), getPosition(), trkf::Propagator::lin_prop(), trkf::PropYZLine::origin_vec_prop(), trkf::PropXYZPlane::origin_vec_prop(), trkf::PropYZPlane::origin_vec_prop(), trkf::KETrack::PointingError(), setPdgCode(), and trkf::KalmanFilterAlg::smoothTrack().
double trkf::KTrack::Mass | ( | ) | const |
Based on pdg code.
Particle mass based on pdg code.
Definition at line 116 of file KTrack.cxx.
References util::abs(), and fPdgCode.
Referenced by trkf::KalmanFilterAlg::fitMomentumMS(), trkf::InteractPlane::noise(), PdgCode(), trkf::PropYZLine::short_vec_prop(), trkf::PropXYZPlane::short_vec_prop(), trkf::PropYZPlane::short_vec_prop(), and trkf::Propagator::vec_prop().
|
inline |
|
virtual |
Printout.
Reimplemented in trkf::KFitTrack, trkf::KETrack, trkf::KHitsTrack, and trkf::KHitTrack.
Definition at line 210 of file KTrack.cxx.
References trkf::Surface::BACKWARD, dir, fDir, trkf::Surface::FORWARD, fPdgCode, fSurf, fVec, getMomentum(), getPosition(), XLatitude(), and XLongitude().
Referenced by trkf::operator<<(), trkf::KETrack::Print(), and setPdgCode().
|
inline |
Set direction.
Definition at line 66 of file KTrack.h.
Referenced by trkf::Propagator::lin_prop(), trkf::PropYZLine::origin_vec_prop(), trkf::PropYZPlane::origin_vec_prop(), and trkf::PropXYZPlane::origin_vec_prop().
|
inline |
Set pdg code.
Definition at line 67 of file KTrack.h.
References fPdgCode, getMomentum(), getPosition(), isValid(), Print(), XLatitude(), and XLongitude().
|
inline |
Set surface.
Definition at line 64 of file KTrack.h.
References fSurf.
Referenced by trkf::Propagator::lin_prop(), trkf::PropYZLine::origin_vec_prop(), trkf::PropYZPlane::origin_vec_prop(), trkf::PropXYZPlane::origin_vec_prop(), trkf::PropYZLine::short_vec_prop(), trkf::PropYZPlane::short_vec_prop(), and trkf::PropXYZPlane::short_vec_prop().
|
inline |
Set state vector.
Definition at line 65 of file KTrack.h.
References fVec.
Referenced by trkf::KETrack::combineTrack(), trkf::Propagator::lin_prop(), trkf::PropYZLine::origin_vec_prop(), trkf::PropYZPlane::origin_vec_prop(), trkf::PropXYZPlane::origin_vec_prop(), trkf::PropYZLine::short_vec_prop(), trkf::PropYZPlane::short_vec_prop(), trkf::PropXYZPlane::short_vec_prop(), trkf::KHitMulti::update(), and trkf::KHit< N >::update().
double trkf::KTrack::XLatitude | ( | ) | const |
Get x-latitude.
Get x-latitude.
The x-latitude is the latitude defined with respect to the x-axis. The x-latitude is zero of the track is traveling parallel to the wire planes.
Definition at line 169 of file KTrack.cxx.
References getMomentum().
Referenced by Print(), and setPdgCode().
double trkf::KTrack::XLongitude | ( | ) | const |
Get x-longitude.
Get x-longitude.
The x-longitude is the longitude defined with respect to the y- and z-axes. The x-longitude is zero of the track is parallel to the z-axis in the yz-plane.
Definition at line 185 of file KTrack.cxx.
References getMomentum().
Referenced by Print(), and setPdgCode().
|
private |
Track direction.
Definition at line 92 of file KTrack.h.
Referenced by getDirection(), Print(), and setDirection().
|
private |
|
private |
Track surface.
Definition at line 90 of file KTrack.h.
Referenced by getDirection(), getMomentum(), getPosition(), getSurface(), isValid(), Print(), and setSurface().
|
private |
Track state vector.
Definition at line 91 of file KTrack.h.
Referenced by getDirection(), getMomentum(), getPosition(), getVector(), isValid(), Print(), and setVector().