LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
Class for propagation of a trkf::TrackState to a recob::tracking::Plane. More...
#include "TrackStatePropagator.h"
Classes | |
struct | Config |
Public Types | |
enum | PropDirection { FORWARD =0, BACKWARD =1, UNKNOWN =2 } |
Propagation direction enum. More... | |
using | Plane = recob::tracking::Plane |
using | Point_t = recob::tracking::Point_t |
using | Vector_t = recob::tracking::Vector_t |
using | SVector6 = recob::tracking::SVector6 |
using | Parameters = fhicl::Table< Config > |
Public Member Functions | |
TrackStatePropagator (double minStep, double maxElossFrac, int maxNit, double tcut, double wrongDirDistTolerance, bool propPinvErr) | |
Constructor from parameter values. More... | |
TrackStatePropagator (Parameters const &p) | |
Constructor from Parameters (fhicl::Table<Config>). More... | |
virtual | ~TrackStatePropagator () |
Destructor. More... | |
TrackState | propagateToPlane (bool &success, const TrackState &origin, const Plane &target, bool dodedx, bool domcs, PropDirection dir=FORWARD) const |
Main function for propagation of a TrackState to a Plane. More... | |
TrackState | rotateToPlane (bool &success, const TrackState &origin, const Plane &target) const |
Rotation of a TrackState to a Plane (zero distance propagation) More... | |
Point_t | propagatedPosByDistance (const Point_t &origpos, const Vector_t &origdir, double distance) const |
Quick accesss to the propagated position given a distance. More... | |
void | apply_dedx (double &pinv, double dedx, double e1, double mass, double s, double &deriv) const |
Apply energy loss. More... | |
bool | apply_mcs (double dudw, double dvdw, double pinv, double mass, double s, double range, double p, double e2, bool flipSign, SMatrixSym55 &noise_matrix) const |
Apply multiple coulomb scattering. More... | |
double | getTcut () const |
get Tcut parameter used in DetectorPropertiesService Eloss method More... | |
double | distanceToPlane (bool &success, const Point_t &origpos, const Vector_t &origdir, const Plane &target) const |
Distance of a TrackState (Point and Vector) to a Plane, along the TrackState direction. More... | |
double | distanceToPlane (bool &success, const TrackState &origin, const Plane &target) const |
Distance of a TrackState (Point and Vector) to a Plane, along the TrackState direction. More... | |
double | perpDistanceToPlane (bool &success, const Point_t &origpos, const Plane &target) const |
Distance of a TrackState (Point) to a Plane along the direction orthogonal to the Plane. More... | |
double | perpDistanceToPlane (bool &success, const TrackState &origin, const Plane &target) const |
Distance of a TrackState (Point) to a Plane along the direction orthogonal to the Plane. More... | |
std::pair< double, double > | distancePairToPlane (bool &success, const Point_t &origpos, const Vector_t &origdir, const Plane &target) const |
Return both direction types in one go. More... | |
std::pair< double, double > | distancePairToPlane (bool &success, const TrackState &origin, const Plane &target) const |
Return both direction types in one go. More... | |
Private Member Functions | |
TrackState | rotateToPlane (bool &success, const TrackState &origin, const Plane &target, double &dw2dw1) const |
Rotation of a TrackState to a Plane (zero distance propagation), keeping track of dw2dw1 (needed by mcs) More... | |
Private Attributes | |
double | fMinStep |
Minimum propagation step length guaranteed. More... | |
double | fMaxElossFrac |
Maximum propagation step length based on fraction of energy loss. More... | |
int | fMaxNit |
Maximum number of iterations. More... | |
double | fTcut |
Maximum delta ray energy for dE/dx. More... | |
double | fWrongDirDistTolerance |
Allowed propagation distance in the wrong direction. More... | |
bool | fPropPinvErr |
Propagate error on 1/p or not (in order to avoid infs, it should be set to false when 1/p not updated) More... | |
const detinfo::DetectorProperties * | detprop |
const detinfo::LArProperties * | larprop |
Class for propagation of a trkf::TrackState to a recob::tracking::Plane.
This class holds the functionalities needed to propagate a trkf::TrackState to a recob::tracking::Plane. While the core physics is mainly duplicated from trkf::Propagator and its derived classes (kudos to H. Greenlee), the code and the interface are optimized for usage with classes based on SMatrix (e.g. TrackState) and for the needs of TrackKalmanFitter.
While the propagated position can be directly computed, accounting for the material effects in the covariance matrix requires an iterative procedure in case of long propagations distances.
For configuration options see TrackStatePropagator::Config
Definition at line 37 of file TrackStatePropagator.h.
Definition at line 80 of file TrackStatePropagator.h.
Definition at line 41 of file TrackStatePropagator.h.
Definition at line 42 of file TrackStatePropagator.h.
Definition at line 44 of file TrackStatePropagator.h.
Definition at line 43 of file TrackStatePropagator.h.
Propagation direction enum.
Enumerator | |
---|---|
FORWARD | |
BACKWARD | |
UNKNOWN |
Definition at line 83 of file TrackStatePropagator.h.
trkf::TrackStatePropagator::TrackStatePropagator | ( | double | minStep, |
double | maxElossFrac, | ||
int | maxNit, | ||
double | tcut, | ||
double | wrongDirDistTolerance, | ||
bool | propPinvErr | ||
) |
Constructor from parameter values.
Definition at line 11 of file TrackStatePropagator.cxx.
References detprop, and larprop.
|
inlineexplicit |
Constructor from Parameters (fhicl::Table<Config>).
Definition at line 89 of file TrackStatePropagator.h.
References dir, geo::origin(), and target.
|
virtual |
void trkf::TrackStatePropagator::apply_dedx | ( | double & | pinv, |
double | dedx, | ||
double | e1, | ||
double | mass, | ||
double | s, | ||
double & | deriv | ||
) | const |
Apply energy loss.
Definition at line 217 of file TrackStatePropagator.cxx.
References detprop, detinfo::DetectorProperties::Eloss(), and fTcut.
Referenced by propagateToPlane().
bool trkf::TrackStatePropagator::apply_mcs | ( | double | dudw, |
double | dvdw, | ||
double | pinv, | ||
double | mass, | ||
double | s, | ||
double | range, | ||
double | p, | ||
double | e2, | ||
bool | flipSign, | ||
SMatrixSym55 & | noise_matrix | ||
) | const |
Apply multiple coulomb scattering.
Definition at line 239 of file TrackStatePropagator.cxx.
References detinfo::DetectorProperties::Density(), detprop, detinfo::DetectorProperties::ElossVar(), fPropPinvErr, larprop, and detinfo::LArProperties::RadiationLength().
Referenced by propagateToPlane().
std::pair< double, double > trkf::TrackStatePropagator::distancePairToPlane | ( | bool & | success, |
const Point_t & | origpos, | ||
const Vector_t & | origdir, | ||
const Plane & | target | ||
) | const |
Return both direction types in one go.
Definition at line 201 of file TrackStatePropagator.cxx.
References recob::tracking::Plane::direction(), recob::tracking::Plane::position(), and s.
Referenced by propagateToPlane().
|
inline |
Return both direction types in one go.
Definition at line 122 of file TrackStatePropagator.h.
References trkf::TrackState::momentum(), trkf::TrackState::position(), s, and target.
double trkf::TrackStatePropagator::distanceToPlane | ( | bool & | success, |
const Point_t & | origpos, | ||
const Vector_t & | origdir, | ||
const Plane & | target | ||
) | const |
Distance of a TrackState (Point and Vector) to a Plane, along the TrackState direction.
Definition at line 178 of file TrackStatePropagator.cxx.
References recob::tracking::Plane::direction(), recob::tracking::Plane::position(), and s.
Referenced by trkf::TrackKalmanFitter::doFitWork(), and trkf::TrackKalmanFitter::setupInputStates().
|
inline |
Distance of a TrackState (Point and Vector) to a Plane, along the TrackState direction.
Definition at line 106 of file TrackStatePropagator.h.
References trkf::TrackState::momentum(), trkf::TrackState::position(), and target.
|
inline |
get Tcut parameter used in DetectorPropertiesService Eloss method
Definition at line 134 of file TrackStatePropagator.h.
double trkf::TrackStatePropagator::perpDistanceToPlane | ( | bool & | success, |
const Point_t & | origpos, | ||
const Plane & | target | ||
) | const |
Distance of a TrackState (Point) to a Plane along the direction orthogonal to the Plane.
Definition at line 192 of file TrackStatePropagator.cxx.
References recob::tracking::Plane::direction(), and recob::tracking::Plane::position().
|
inline |
Distance of a TrackState (Point) to a Plane along the direction orthogonal to the Plane.
Definition at line 114 of file TrackStatePropagator.h.
References trkf::TrackState::position(), and target.
|
inline |
Quick accesss to the propagated position given a distance.
Definition at line 101 of file TrackStatePropagator.h.
Referenced by propagateToPlane().
TrackState trkf::TrackStatePropagator::propagateToPlane | ( | bool & | success, |
const TrackState & | origin, | ||
const Plane & | target, | ||
bool | dodedx, | ||
bool | domcs, | ||
PropDirection | dir = FORWARD |
||
) | const |
Main function for propagation of a TrackState to a Plane.
Definition at line 27 of file TrackStatePropagator.cxx.
References apply_dedx(), apply_mcs(), BACKWARD, trkf::TrackState::covariance(), detprop, recob::tracking::Plane::direction(), distancePairToPlane(), e, detinfo::DetectorProperties::Eloss(), fMaxElossFrac, fMaxNit, fMinStep, FORWARD, fPropPinvErr, fTcut, fWrongDirDistTolerance, trkf::TrackState::isTrackAlongPlaneDir(), trkf::TrackState::mass(), max, trkf::TrackState::momentum(), geo::origin(), trkf::TrackState::parameters(), trkf::TrackState::pID(), trkf::TrackState::plane(), trkf::TrackState::position(), propagatedPosByDistance(), rotateToPlane(), and s.
Referenced by trkf::TrackKalmanFitter::doFitWork().
|
inline |
Rotation of a TrackState to a Plane (zero distance propagation)
Definition at line 98 of file TrackStatePropagator.h.
References rotateToPlane().
Referenced by trkf::TrackKalmanFitter::fillResult(), propagateToPlane(), and rotateToPlane().
|
private |
Rotation of a TrackState to a Plane (zero distance propagation), keeping track of dw2dw1 (needed by mcs)
Definition at line 107 of file TrackStatePropagator.cxx.
References recob::tracking::Plane::cosAlpha(), recob::tracking::Plane::cosBeta(), trkf::TrackState::covariance(), recob::tracking::Plane::direction(), trkf::TrackState::momentum(), geo::origin(), trkf::TrackState::parameters(), trkf::TrackState::pID(), trkf::TrackState::plane(), recob::tracking::Plane::position(), trkf::TrackState::position(), recob::tracking::Plane::sinAlpha(), and recob::tracking::Plane::sinBeta().
|
private |
Definition at line 147 of file TrackStatePropagator.h.
Referenced by apply_dedx(), apply_mcs(), propagateToPlane(), and TrackStatePropagator().
|
private |
Maximum propagation step length based on fraction of energy loss.
Definition at line 142 of file TrackStatePropagator.h.
Referenced by propagateToPlane().
|
private |
Maximum number of iterations.
Definition at line 143 of file TrackStatePropagator.h.
Referenced by propagateToPlane().
|
private |
Minimum propagation step length guaranteed.
Definition at line 141 of file TrackStatePropagator.h.
Referenced by propagateToPlane().
|
private |
Propagate error on 1/p or not (in order to avoid infs, it should be set to false when 1/p not updated)
Definition at line 146 of file TrackStatePropagator.h.
Referenced by apply_mcs(), and propagateToPlane().
|
private |
Maximum delta ray energy for dE/dx.
Definition at line 144 of file TrackStatePropagator.h.
Referenced by apply_dedx(), and propagateToPlane().
|
private |
Allowed propagation distance in the wrong direction.
Definition at line 145 of file TrackStatePropagator.h.
Referenced by propagateToPlane().
|
private |
Definition at line 148 of file TrackStatePropagator.h.
Referenced by apply_mcs(), and TrackStatePropagator().