LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "PropYZPlane.h"
Public Types | |
enum | PropDirection { FORWARD, BACKWARD, UNKNOWN } |
Propagation direction enum. More... | |
Public Member Functions | |
PropYZPlane (detinfo::DetectorPropertiesData const &detProp, double tcut, bool doDedx) | |
Propagator * | clone () const override |
Clone method. More... | |
std::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 override |
Propagate without error. More... | |
std::optional< double > | origin_vec_prop (KTrack &trk, const std::shared_ptr< const Surface > &porient, TrackMatrix *prop_matrix=0) const override |
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 |
std::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... | |
std::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... | |
std::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... | |
std::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... | |
std::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 Member Functions | |
bool | transformYZLine (double phi1, double phi2, TrackVector &vec, Surface::TrackDirection &dir, TrackMatrix *prop_matrix) const |
Transform yz line -> yz plane. More... | |
bool | transformYZPlane (double phi1, double phi2, TrackVector &vec, Surface::TrackDirection &dir, TrackMatrix *prop_matrix) const |
Transform yz plane -> yz plane. More... | |
bool | transformXYZPlane (double theta1, double phi1, double phi2, TrackVector &vec, Surface::TrackDirection &dir, TrackMatrix *prop_matrix) const |
Transform xyz plane -> yz plane. More... | |
Definition at line 24 of file PropYZPlane.h.
|
inherited |
Propagation direction enum.
Enumerator | |
---|---|
FORWARD | |
BACKWARD | |
UNKNOWN |
Definition at line 94 of file Propagator.h.
trkf::PropYZPlane::PropYZPlane | ( | detinfo::DetectorPropertiesData const & | detProp, |
double | tcut, | ||
bool | doDedx | ||
) |
Constructor.
Arguments.
tcut - Delta ray energy cutoff for calculating dE/dx. doDedx - dE/dx enable flag.
Definition at line 28 of file PropYZPlane.cxx.
|
inlineoverridevirtual |
Clone method.
Implements trkf::Propagator.
Definition at line 29 of file PropYZPlane.h.
References dir.
|
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 447 of file Propagator.cxx.
References util::abs(), detinfo::DetectorPropertiesData::Eloss(), trkf::Propagator::fDetProp, and trkf::Propagator::fTcut.
Referenced by trkf::PropYZLine::short_vec_prop(), short_vec_prop(), and trkf::PropXYZPlane::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 343 of file Propagator.cxx.
References trkf::KETrack::getError(), trkf::Propagator::lin_prop(), and trkf::KETrack::setError().
Referenced by trkf::KGTrack::fillTrack(), trkf::KalmanFilterAlg::fitMomentumMS(), and trkf::KHit< N >::predict().
|
inlineinherited |
Definition at line 108 of file Propagator.h.
Referenced by trkf::PropYZLine::short_vec_prop(), short_vec_prop(), trkf::PropXYZPlane::short_vec_prop(), and trkf::Propagator::vec_prop().
|
inlineinherited |
Definition at line 109 of file Propagator.h.
References dir.
Referenced by trkf::PropYZLine::short_vec_prop(), short_vec_prop(), and trkf::PropXYZPlane::short_vec_prop().
|
inlineinherited |
Definition at line 107 of file Propagator.h.
|
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 249 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(), 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 382 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::KalmanFilterAlg::smoothTrack(), and trkf::KalmanFilterAlg::updateMomentum().
|
overridevirtual |
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 257 of file PropYZPlane.cxx.
References dir, trkf::KTrack::getDirection(), trkf::KTrack::getPosition(), trkf::KTrack::getSurface(), trkf::KTrack::getVector(), trkf::KTrack::isValid(), trkf::SurfYZPlane::phi(), trkf::KTrack::setDirection(), trkf::KTrack::setSurface(), trkf::KTrack::setVector(), transformXYZPlane(), transformYZLine(), and transformYZPlane().
Referenced by trkf::PropAny::origin_vec_prop(), and short_vec_prop().
|
overridevirtual |
Propagate without error.
Propagate without error. Optionally return propagation matrix and noise matrix.
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 50 of file PropYZPlane.cxx.
References trkf::Surface::BACKWARD, trkf::Propagator::BACKWARD, trkf::Propagator::dedx_prop(), trkf::Propagator::FORWARD, trkf::KTrack::getDirection(), trkf::Propagator::getDoDedx(), trkf::Propagator::getInteractor(), trkf::KTrack::getPosition(), trkf::KTrack::getVector(), trkf::KTrack::Mass(), origin_vec_prop(), trkf::SurfYZPlane::phi(), trkf::KTrack::setSurface(), trkf::KTrack::setVector(), trkf::Surface::UNKNOWN, trkf::Propagator::UNKNOWN, trkf::SurfYZPlane::x0(), trkf::SurfYZPlane::y0(), and trkf::SurfYZPlane::z0().
Referenced by trkf::PropAny::short_vec_prop().
|
private |
Transform xyz plane -> yz plane.
Definition at line 643 of file PropYZPlane.cxx.
References trkf::Surface::BACKWARD, trkf::Surface::FORWARD, and trkf::Surface::UNKNOWN.
Referenced by origin_vec_prop().
|
private |
Transform yz line -> yz plane.
The following methods transform the track parameters from initial surface to SurfYZPlane origin surface, and generate a propagation matrix. The first group of function parameters are the orientation surface parameters of the initial surface. The second group of function parameters are the orientation parameters of the of the destination surface. The origin parameters of the destination surface are assumed to match the position of the track.
Definition at line 357 of file PropYZPlane.cxx.
Referenced by origin_vec_prop().
|
private |
Transform yz plane -> yz plane.
Definition at line 548 of file PropYZPlane.cxx.
References trkf::Surface::BACKWARD, trkf::Surface::FORWARD, and trkf::Surface::UNKNOWN.
Referenced by origin_vec_prop().
|
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 util::abs(), larg4::dist(), e, detinfo::DetectorPropertiesData::Eloss(), trkf::Propagator::fDetProp, trkf::Propagator::fTcut, trkf::Propagator::getDoDedx(), trkf::KTrack::getMomentum(), trkf::KTrack::getPosition(), trkf::KTrack::getVector(), trkf::KTrack::Mass(), and trkf::Propagator::short_vec_prop().
Referenced by trkf::KalmanFilterAlg::fitMomentumMS(), trkf::Propagator::lin_prop(), trkf::KHitContainer::sort(), and trkf::KalmanFilterAlg::updateMomentum().