All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
trkf::PropAny Class Reference

#include <PropAny.h>

Inheritance diagram for trkf::PropAny:
trkf::Propagator

Public Member Functions

 PropAny (detinfo::DetectorPropertiesData const &detProp, double tcut, bool doDedx)
 Constructor. More...
 
Propagatorclone () 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...
 
virtual 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...
 
- Public Member Functions inherited from trkf::Propagator
 Propagator (detinfo::DetectorPropertiesData const &detProp, double tcut, bool doDedx, const std::shared_ptr< const Interactor > &interactor)
 Constructor. More...
 
virtual ~Propagator ()
 Destructor. 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 Attributes

PropYZLine fPropYZLine
 Underlying propagators. More...
 
PropYZPlane fPropYZPlane
 
PropXYZPlane fPropXYZPlane
 

Additional Inherited Members

- Public Types inherited from trkf::Propagator
enum  PropDirection { FORWARD, BACKWARD, UNKNOWN }
 Propagation direction enum. More...
 

Detailed Description

Definition at line 25 of file PropAny.h.

Constructor & Destructor Documentation

trkf::PropAny::PropAny ( detinfo::DetectorPropertiesData const &  detProp,
double  tcut,
bool  doDedx 
)

Constructor.

Constructor.

Arguments.

tcut - Delta ray energy cutoff for calculating dE/dx. doDedx - dE/dx enable flag.

Definition at line 27 of file PropAny.cxx.

29  tcut,
30  doDedx,
31  (tcut >= 0 ? std::make_shared<InteractPlane const>(detProp, tcut) :
32  std::shared_ptr<Interactor const>{}))
Propagator(detinfo::DetectorPropertiesData const &detProp, double tcut, bool doDedx, const std::shared_ptr< const Interactor > &interactor)
Constructor.
Definition: Propagator.cxx:26
auto const detProp

Member Function Documentation

Propagator* trkf::PropAny::clone ( ) const
inlineoverridevirtual

Clone method.

Implements trkf::Propagator.

Definition at line 31 of file PropAny.h.

32  {
33  return new PropAny(*this);
34  }
PropAny(detinfo::DetectorPropertiesData const &detProp, double tcut, bool doDedx)
Constructor.
Definition: PropAny.cxx:27
std::optional< double > trkf::PropAny::origin_vec_prop ( KTrack trk,
const std::shared_ptr< const Surface > &  porient,
TrackMatrix prop_matrix = 0 
) const
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 96 of file PropAny.cxx.

99  {
100  // Default result.
101 
102  std::optional<double> result{std::nullopt};
103 
104  // Test the type of the destination surface.
105 
106  if (dynamic_cast<const SurfYZLine*>(&*porient))
107  result = fPropYZLine.origin_vec_prop(trk, porient, prop_matrix);
108  else if (dynamic_cast<const SurfYZPlane*>(&*porient))
109  result = fPropYZPlane.origin_vec_prop(trk, porient, prop_matrix);
110  else if (dynamic_cast<const SurfXYZPlane*>(&*porient))
111  result = fPropXYZPlane.origin_vec_prop(trk, porient, prop_matrix);
112  else
113  throw cet::exception("PropAny") << "Destination surface has unknown type.\n";
114 
115  // Done.
116 
117  return result;
118  }
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.
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.
PropYZPlane fPropYZPlane
Definition: PropAny.h:53
PropYZLine fPropYZLine
Underlying propagators.
Definition: PropAny.h:52
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.
PropXYZPlane fPropXYZPlane
Definition: PropAny.h:54
std::optional< double > trkf::PropAny::short_vec_prop ( KTrack trk,
const std::shared_ptr< const Surface > &  psurf,
Propagator::PropDirection  dir,
bool  doDedx,
TrackMatrix prop_matrix = 0,
TrackError noise_matrix = 0 
) const
overridevirtual

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 55 of file PropAny.cxx.

61  {
62  // Default result.
63 
64  std::optional<double> result{std::nullopt};
65 
66  // Test the type of the destination surface.
67 
68  if (dynamic_cast<const SurfYZLine*>(&*psurf))
69  result = fPropYZLine.short_vec_prop(trk, psurf, dir, doDedx, prop_matrix, noise_matrix);
70  else if (dynamic_cast<const SurfYZPlane*>(&*psurf))
71  result = fPropYZPlane.short_vec_prop(trk, psurf, dir, doDedx, prop_matrix, noise_matrix);
72  else if (dynamic_cast<const SurfXYZPlane*>(&*psurf))
73  result = fPropXYZPlane.short_vec_prop(trk, psurf, dir, doDedx, prop_matrix, noise_matrix);
74  else
75  throw cet::exception("PropAny") << "Destination surface has unknown type.\n";
76 
77  // Done.
78 
79  return result;
80  }
PropYZPlane fPropYZPlane
Definition: PropAny.h:53
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.
PropYZLine fPropYZLine
Underlying propagators.
Definition: PropAny.h:52
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.
PropXYZPlane fPropXYZPlane
Definition: PropAny.h:54
tuple dir
Definition: dropbox.py:28
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.

Member Data Documentation

PropXYZPlane trkf::PropAny::fPropXYZPlane
private

Definition at line 54 of file PropAny.h.

PropYZLine trkf::PropAny::fPropYZLine
private

Underlying propagators.

Definition at line 52 of file PropAny.h.

PropYZPlane trkf::PropAny::fPropYZPlane
private

Definition at line 53 of file PropAny.h.


The documentation for this class was generated from the following files: