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 |
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 |
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 |
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.
using trkf::TrackStatePropagator::Parameters = fhicl::Table<Config> |
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.
|
inlineexplicit |
Constructor from Parameters (fhicl::Table<Config>).
Definition at line 84 of file TrackStatePropagator.h.
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 269 of file TrackStatePropagator.cxx.
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 298 of file TrackStatePropagator.cxx.
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 248 of file TrackStatePropagator.cxx.
|
inline |
Definition at line 147 of file TrackStatePropagator.h.
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 216 of file TrackStatePropagator.cxx.
|
inline |
Definition at line 124 of file TrackStatePropagator.h.
|
inline |
get Tcut parameter used in DetectorPropertiesService Eloss method
Definition at line 177 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 235 of file TrackStatePropagator.cxx.
|
inline |
Definition at line 134 of file TrackStatePropagator.h.
|
inline |
Quick accesss to the propagated position given a distance.
Definition at line 112 of file TrackStatePropagator.h.
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 30 of file TrackStatePropagator.cxx.
|
inline |
Rotation of a TrackState to a Plane (zero distance propagation)
Definition at line 104 of file TrackStatePropagator.h.
|
private |
Rotation of a TrackState to a Plane (zero distance propagation), keeping track of dw2dw1 (needed by mcs)
Definition at line 133 of file TrackStatePropagator.cxx.
|
private |
Maximum propagation step length based on fraction of energy loss.
Definition at line 190 of file TrackStatePropagator.h.
|
private |
Maximum number of iterations.
Definition at line 191 of file TrackStatePropagator.h.
|
private |
Minimum propagation step length guaranteed.
Definition at line 189 of file TrackStatePropagator.h.
|
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 195 of file TrackStatePropagator.h.
|
private |
Maximum delta ray energy for dE/dx.
Definition at line 192 of file TrackStatePropagator.h.
|
private |
Allowed propagation distance in the wrong direction.
Definition at line 193 of file TrackStatePropagator.h.
|
private |
Definition at line 196 of file TrackStatePropagator.h.