LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
Propagator.h
Go to the documentation of this file.
1 
76 #ifndef PROPAGATOR_H
77 #define PROPAGATOR_H
78 
82 namespace detinfo {
83  class DetectorPropertiesData;
84 }
85 
86 #include <memory>
87 #include <optional>
88 
89 namespace trkf {
90 
91  class Propagator {
92  public:
94  enum PropDirection { FORWARD, BACKWARD, UNKNOWN };
95 
98  double tcut,
99  bool doDedx,
100  const std::shared_ptr<const Interactor>& interactor);
101 
103  virtual ~Propagator();
104 
105  // Accessors.
106 
107  double getTcut() const { return fTcut; }
108  bool getDoDedx() const { return fDoDedx; }
109  const std::shared_ptr<const Interactor>& getInteractor() const { return fInteractor; }
110 
111  // Virtual methods.
112 
114  virtual Propagator* clone() const = 0;
115 
117  virtual std::optional<double> short_vec_prop(KTrack& trk,
118  const std::shared_ptr<const Surface>& psurf,
120  bool doDedx,
121  TrackMatrix* prop_matrix = 0,
122  TrackError* noise_matrix = 0) const = 0;
123 
125  virtual std::optional<double> origin_vec_prop(KTrack& trk,
126  const std::shared_ptr<const Surface>& porient,
127  TrackMatrix* prop_matrix = 0) const = 0;
128 
130  std::optional<double> vec_prop(KTrack& trk,
131  const std::shared_ptr<const Surface>& psurf,
132  PropDirection dir,
133  bool doDedx,
134  TrackMatrix* prop_matrix = 0,
135  TrackError* noise_matrix = 0) const;
136 
138  std::optional<double> lin_prop(KTrack& trk,
139  const std::shared_ptr<const Surface>& psurf,
140  PropDirection dir,
141  bool doDedx,
142  KTrack* ref = 0,
143  TrackMatrix* prop_matrix = 0,
144  TrackError* noise_matrix = 0) const;
146  std::optional<double> err_prop(KETrack& tre,
147  const std::shared_ptr<const Surface>& psurf,
148  PropDirection dir,
149  bool doDedx,
150  KTrack* ref = 0,
151  TrackMatrix* prop_matrix = 0) const;
152 
154  std::optional<double> noise_prop(KETrack& tre,
155  const std::shared_ptr<const Surface>& psurf,
156  PropDirection dir,
157  bool doDedx,
158  KTrack* ref = 0) const;
159 
161  std::optional<double> dedx_prop(double pinv, double mass, double s, double* deriv = 0) const;
162 
163  private:
165  double fTcut;
166  bool fDoDedx;
167  std::shared_ptr<const Interactor> fInteractor;
168  };
169 }
170 
171 #endif
KSymMatrix< 5 >::type TrackError
Track error matrix, dimension 5x5.
Base class for Kalman filter track interactor.
double getTcut() const
Definition: Propagator.h:107
const std::shared_ptr< const Interactor > & getInteractor() const
Definition: Propagator.h:109
double fTcut
Maximum delta ray energy for dE/dx.
Definition: Propagator.h:165
KMatrix< 5, 5 >::type TrackMatrix
General 5x5 matrix.
detinfo::DetectorPropertiesData const & fDetProp
Definition: Propagator.h:164
General LArSoft Utilities.
Kalman filter linear algebra typedefs.
bool getDoDedx() const
Definition: Propagator.h:108
TDirectory * dir
Definition: macro.C:5
std::shared_ptr< const Interactor > fInteractor
Interactor (for calculating noise).
Definition: Propagator.h:167
bool fDoDedx
Energy loss enable flag.
Definition: Propagator.h:166
Basic Kalman filter track class, with error.
PropDirection
Propagation direction enum.
Definition: Propagator.h:94