LArSoft
v09_90_00
Liquid Argon Software toolkit - https://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... | |
TrackState | propagateToPlane (bool &success, const detinfo::DetectorPropertiesData &detProp, 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, detinfo::DetectorPropertiesData const &detProp, double dedx, double e1, double mass, double s, double &deriv) const |
Apply energy loss. More... | |
bool | apply_mcs (detinfo::DetectorPropertiesData const &detProp, 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::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 38 of file TrackStatePropagator.h.
Definition at line 70 of file TrackStatePropagator.h.
Definition at line 40 of file TrackStatePropagator.h.
Definition at line 41 of file TrackStatePropagator.h.
Definition at line 43 of file TrackStatePropagator.h.
Definition at line 42 of file TrackStatePropagator.h.
Propagation direction enum.
Enumerator | |
---|---|
FORWARD | |
BACKWARD | |
UNKNOWN |
Definition at line 73 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 larprop.
|
inlineexplicit |
Constructor from Parameters (fhicl::Table<Config>).
Definition at line 84 of file TrackStatePropagator.h.
References dir, geo::origin(), and target.
void trkf::TrackStatePropagator::apply_dedx | ( | double & | pinv, |
detinfo::DetectorPropertiesData const & | detProp, | ||
double | dedx, | ||
double | e1, | ||
double | mass, | ||
double | s, | ||
double & | deriv | ||
) | const |
Apply energy loss.
Definition at line 263 of file TrackStatePropagator.cxx.
References detinfo::DetectorPropertiesData::Eloss(), and fTcut.
Referenced by propagateToPlane().
bool trkf::TrackStatePropagator::apply_mcs | ( | detinfo::DetectorPropertiesData const & | detProp, |
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 291 of file TrackStatePropagator.cxx.
References util::abs(), detinfo::DetectorPropertiesData::Density(), detinfo::DetectorPropertiesData::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 243 of file TrackStatePropagator.cxx.
References recob::tracking::Plane::direction(), and recob::tracking::Plane::position().
Referenced by propagateToPlane().
|
inline |
Return both direction types in one go.
Definition at line 144 of file TrackStatePropagator.h.
References trkf::TrackState::momentum(), trkf::TrackState::position(), 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 213 of file TrackStatePropagator.cxx.
References recob::tracking::Plane::direction(), and recob::tracking::Plane::position().
Referenced by trkf::TrackKalmanFitter::doFitWork().
|
inline |
Distance of a TrackState (Point and Vector) to a Plane, along the TrackState direction.
Definition at line 123 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 175 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 231 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 132 of file TrackStatePropagator.h.
References trkf::TrackState::position(), and target.
|
inline |
Quick accesss to the propagated position given a distance.
Definition at line 110 of file TrackStatePropagator.h.
Referenced by propagateToPlane().
TrackState trkf::TrackStatePropagator::propagateToPlane | ( | bool & | success, |
const detinfo::DetectorPropertiesData & | detProp, | ||
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 29 of file TrackStatePropagator.cxx.
References util::abs(), apply_dedx(), apply_mcs(), BACKWARD, trkf::TrackState::covariance(), recob::tracking::Plane::direction(), distancePairToPlane(), e, detinfo::DetectorPropertiesData::Eloss(), fMaxElossFrac, fMaxNit, fMinStep, FORWARD, fPropPinvErr, fTcut, fWrongDirDistTolerance, trkf::TrackState::isTrackAlongPlaneDir(), trkf::TrackState::mass(), trkf::TrackState::momentum(), geo::origin(), trkf::TrackState::parameters(), trkf::TrackState::pID(), trkf::TrackState::plane(), trkf::TrackState::position(), propagatedPosByDistance(), and rotateToPlane().
Referenced by trkf::TrackKalmanFitter::doFitWork().
|
inline |
Rotation of a TrackState to a Plane (zero distance propagation)
Definition at line 103 of file TrackStatePropagator.h.
Referenced by trkf::TrackKalmanFitter::fillResult(), and propagateToPlane().
|
private |
Rotation of a TrackState to a Plane (zero distance propagation), keeping track of dw2dw1 (needed by mcs)
Definition at line 131 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 |
Maximum propagation step length based on fraction of energy loss.
Definition at line 185 of file TrackStatePropagator.h.
Referenced by propagateToPlane().
|
private |
Maximum number of iterations.
Definition at line 186 of file TrackStatePropagator.h.
Referenced by propagateToPlane().
|
private |
Minimum propagation step length guaranteed.
Definition at line 184 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 190 of file TrackStatePropagator.h.
Referenced by apply_mcs(), and propagateToPlane().
|
private |
Maximum delta ray energy for dE/dx.
Definition at line 187 of file TrackStatePropagator.h.
Referenced by apply_dedx(), and propagateToPlane().
|
private |
Allowed propagation distance in the wrong direction.
Definition at line 188 of file TrackStatePropagator.h.
Referenced by propagateToPlane().
|
private |
Definition at line 191 of file TrackStatePropagator.h.
Referenced by apply_mcs(), and TrackStatePropagator().