LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "PropAny.h"
Public Types | |
enum | PropDirection { FORWARD, BACKWARD, UNKNOWN } |
Propagation direction enum. More... | |
Public Member Functions | |
PropAny (double tcut, bool doDedx) | |
Constructor. More... | |
virtual | ~PropAny () |
Destructor. More... | |
Propagator * | clone () const |
Clone method. More... | |
boost::optional< double > | short_vec_prop (KTrack &trk, const std::shared_ptr< const Surface > &surf, Propagator::PropDirection dir, bool doDedx, TrackMatrix *prop_matrix=0, TrackError *noise_matrix=0) const |
Propagate without error. More... | |
virtual boost::optional< double > | origin_vec_prop (KTrack &trk, const std::shared_ptr< const Surface > &porient, TrackMatrix *prop_matrix=0) const |
Propagate without error to surface whose origin parameters coincide with track position. More... | |
double | getTcut () const |
bool | getDoDedx () const |
const std::shared_ptr< const Interactor > & | getInteractor () const |
boost::optional< double > | vec_prop (KTrack &trk, const std::shared_ptr< const Surface > &psurf, PropDirection dir, bool doDedx, TrackMatrix *prop_matrix=0, TrackError *noise_matrix=0) const |
Propagate without error (long distance). More... | |
boost::optional< double > | lin_prop (KTrack &trk, const std::shared_ptr< const Surface > &psurf, PropDirection dir, bool doDedx, KTrack *ref=0, TrackMatrix *prop_matrix=0, TrackError *noise_matrix=0) const |
Linearized propagate without error. More... | |
boost::optional< double > | err_prop (KETrack &tre, const std::shared_ptr< const Surface > &psurf, PropDirection dir, bool doDedx, KTrack *ref=0, TrackMatrix *prop_matrix=0) const |
Propagate with error, but without noise. More... | |
boost::optional< double > | noise_prop (KETrack &tre, const std::shared_ptr< const Surface > &psurf, PropDirection dir, bool doDedx, KTrack *ref=0) const |
Propagate with error and noise. More... | |
boost::optional< double > | dedx_prop (double pinv, double mass, double s, double *deriv=0) const |
Method to calculate updated momentum due to dE/dx. More... | |
Private Attributes | |
PropYZLine | fPropYZLine |
Underlying propagators. More... | |
PropYZPlane | fPropYZPlane |
PropXYZPlane | fPropXYZPlane |
|
inherited |
Propagation direction enum.
Enumerator | |
---|---|
FORWARD | |
BACKWARD | |
UNKNOWN |
Definition at line 92 of file Propagator.h.
trkf::PropAny::PropAny | ( | double | tcut, |
bool | doDedx | ||
) |
Constructor.
Constructor.
Arguments.
tcut - Delta ray energy cutoff for calculating dE/dx. doDedx - dE/dx enable flag.
Definition at line 28 of file PropAny.cxx.
Referenced by clone().
|
virtual |
|
inlinevirtual |
Clone method.
Implements trkf::Propagator.
Definition at line 38 of file PropAny.h.
References dir, origin_vec_prop(), PropAny(), and short_vec_prop().
|
inherited |
Method to calculate updated momentum due to dE/dx.
Method to calculate updated momentum due to dE/dx.
Arguments:
pinv - Initial inverse momentum (units c/GeV). mass - Particle mass (GeV/c^2). s - Path distance. deriv - Pointer to store derivative d(pinv2)/d(pinv1) if nonzero.
Returns: Final inverse momentum (pinv2) + success flag.
Failure is returned in case of range out.
Inverse momentum can be signed (q/p). Returned inverse momentum has the same sign as the input.
In this method, we are solving the differential equation in terms of energy.
dE/dx = -f(E)
where f(E) is the stopping power returned by method LArProperties::Eloss.
We expect that this method will be called exclusively for short distance propagation. The differential equation is solved using the midpoint method using a single step, which requires two evaluations of f(E).
dE = -s*f(E1) E2 = E1 - s*f(E1 + 0.5*dE)
The derivative is calculated assuming E2 = E1 + constant, giving
d(pinv2)/d(pinv1) = pinv2^3 E2 / (pinv1^3 E1).
Definition at line 459 of file Propagator.cxx.
References trkf::Propagator::fTcut.
Referenced by trkf::Propagator::getInteractor(), trkf::PropXYZPlane::short_vec_prop(), trkf::PropYZLine::short_vec_prop(), and trkf::PropYZPlane::short_vec_prop().
|
inherited |
Propagate with error, but without noise.
Propagate with error, but without noise (i.e. reversibly).
Arguments:
tre - Track to propagate. psurf - Destination surface. dir - Propagation direction (FORWARD, BACKWARD, or UNKNOWN). doDedx - dE/dx enable/disable flag. ref - Reference track (for linearized propagation). Can be null. prop_matrix - Return propagation matrix if not null.
Returned value: propagation distance + success flag.
Definition at line 354 of file Propagator.cxx.
References trkf::KETrack::getError(), trkf::Propagator::lin_prop(), and trkf::KETrack::setError().
Referenced by trkf::KGTrack::fillTrack(), trkf::KalmanFilterAlg::fitMomentumMS(), trkf::Propagator::getInteractor(), and trkf::KHit< N >::predict().
|
inlineinherited |
Definition at line 103 of file Propagator.h.
References trkf::Propagator::fDoDedx.
Referenced by trkf::PropXYZPlane::short_vec_prop(), trkf::PropYZPlane::short_vec_prop(), trkf::PropYZLine::short_vec_prop(), and trkf::Propagator::vec_prop().
|
inlineinherited |
Definition at line 104 of file Propagator.h.
References trkf::Propagator::clone(), trkf::Propagator::dedx_prop(), dir, trkf::Propagator::err_prop(), trkf::Propagator::fInteractor, trkf::Propagator::lin_prop(), trkf::Propagator::noise_prop(), trkf::Propagator::origin_vec_prop(), s, trkf::Propagator::short_vec_prop(), and trkf::Propagator::vec_prop().
Referenced by trkf::PropXYZPlane::short_vec_prop(), trkf::PropYZLine::short_vec_prop(), and trkf::PropYZPlane::short_vec_prop().
|
inlineinherited |
|
inherited |
Linearized propagate without error.
Linearized propagate without error.
Arguments:
trk - Track to propagate. psurf - Destination surface. dir - Propagation direction (FORWARD, BACKWARD, or UNKNOWN). doDedx - dE/dx enable/disable flag. ref - Reference track (for linearized propagation). Can be null. prop_matrix - Return propagation matrix if not null. noise_matrix - Return noise matrix if not null.
Returned value: Propagation distance & success flag.
If the reference track is null, this method simply calls vec_prop.
Definition at line 258 of file Propagator.cxx.
References trkf::KTrack::getDirection(), trkf::KTrack::getSurface(), trkf::KTrack::getVector(), trkf::KTrack::isValid(), trkf::KTrack::setDirection(), trkf::KTrack::setSurface(), trkf::KTrack::setVector(), and trkf::Propagator::vec_prop().
Referenced by trkf::Propagator::err_prop(), trkf::Propagator::getInteractor(), and trkf::Propagator::noise_prop().
|
inherited |
Propagate with error and noise.
Propagate with error and noise.
Arguments:
tre - Track to propagate. psurf - Destination surface. dir - Propagation direction (FORWARD, BACKWARD, or UNKNOWN). doDedx - dE/dx enable/disable flag. ref - Reference track (for linearized propagation). Can be null.
Returned value: propagation distance + success flag.
Definition at line 394 of file Propagator.cxx.
References trkf::KETrack::getError(), trkf::Propagator::lin_prop(), and trkf::KETrack::setError().
Referenced by trkf::KalmanFilterAlg::buildTrack(), trkf::KalmanFilterAlg::extendTrack(), trkf::KalmanFilterAlg::fitMomentumMS(), trkf::Propagator::getInteractor(), trkf::KalmanFilterAlg::smoothTrack(), and trkf::KalmanFilterAlg::updateMomentum().
|
virtual |
Propagate without error to surface whose origin parameters coincide with track position.
Propagate without error to dynamically generated origin surface. Optionally return propagation matrix.
Arguments:
trk - Track to propagate. porient - Orientation surface. prop_matrix - Pointer to optional propagation matrix.
Returned value: propagation distance + success flag.
Propagation distance is always zero after successful propagation.
Implements trkf::Propagator.
Definition at line 99 of file PropAny.cxx.
References fPropXYZPlane, fPropYZLine, fPropYZPlane, trkf::PropYZPlane::origin_vec_prop(), trkf::PropYZLine::origin_vec_prop(), and trkf::PropXYZPlane::origin_vec_prop().
Referenced by clone().
|
virtual |
Propagate without error.
Propagate without error. Optionally return propagation matrix and noise matrix. This method tests the type of the destination surface, and calls the corresponding typed propagator.
Arguments:
trk - Track to propagate. psurf - Destination surface. dir - Propagation direction (FORWARD, BACKWARD, or UNKNOWN). doDedx - dE/dx enable/disable flag. prop_matrix - Pointer to optional propagation matrix. noise_matrix - Pointer to optional noise matrix.
Returned value: propagation distance + success flag.
Implements trkf::Propagator.
Definition at line 58 of file PropAny.cxx.
References fPropXYZPlane, fPropYZLine, fPropYZPlane, trkf::PropYZPlane::short_vec_prop(), trkf::PropYZLine::short_vec_prop(), and trkf::PropXYZPlane::short_vec_prop().
Referenced by clone(), and trkf::InteractGeneral::noise().
|
inherited |
Propagate without error (long distance).
Propagate without error (long distance).
Arguments:
trk - Track to propagate. psurf - Destination surface. dir - Propagation direction (FORWARD, BACKWARD, or UNKNOWN). doDedx - dE/dx enable/disable flag. prop_matrix - Return propagation matrix if not null. noise_matrix - Return noise matrix if not null.
Returned value: Propagation distance & success flag.
This method calls virtual method short_vec_prop in steps of some maximum size.
Definition at line 52 of file Propagator.cxx.
References e, trkf::Propagator::fTcut, trkf::Propagator::getDoDedx(), trkf::KTrack::getMomentum(), trkf::KTrack::getPosition(), trkf::KTrack::getVector(), trkf::KTrack::Mass(), s, and trkf::Propagator::short_vec_prop().
Referenced by trkf::KalmanFilterAlg::fitMomentumMS(), trkf::Propagator::getInteractor(), trkf::Propagator::lin_prop(), trkf::KHitContainer::sort(), and trkf::KalmanFilterAlg::updateMomentum().
|
private |
Definition at line 61 of file PropAny.h.
Referenced by origin_vec_prop(), and short_vec_prop().
|
private |
Underlying propagators.
Definition at line 59 of file PropAny.h.
Referenced by origin_vec_prop(), and short_vec_prop().
|
private |
Definition at line 60 of file PropAny.h.
Referenced by origin_vec_prop(), and short_vec_prop().