LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
Propagator.h
Go to the documentation of this file.
1 
76 #ifndef PROPAGATOR_H
77 #define PROPAGATOR_H
78 
79 #include <memory>
83 #include "boost/optional.hpp"
84 
85 namespace trkf {
86 
87  class Propagator
88  {
89  public:
90 
93 
95  Propagator(double tcut, bool doDedx, const std::shared_ptr<const Interactor>& interactor);
96 
98  virtual ~Propagator();
99 
100  // Accessors.
101 
102  double getTcut() const {return fTcut;}
103  bool getDoDedx() const {return fDoDedx;}
104  const std::shared_ptr<const Interactor>& getInteractor() const {return fInteractor;}
105 
106  // Virtual methods.
107 
109  virtual Propagator* clone() const = 0;
110 
112  virtual boost::optional<double> short_vec_prop(KTrack& trk,
113  const std::shared_ptr<const Surface>& psurf,
115  bool doDedx,
116  TrackMatrix* prop_matrix = 0,
117  TrackError* noise_matrix = 0) const = 0;
118 
120  virtual boost::optional<double> origin_vec_prop(KTrack& trk,
121  const std::shared_ptr<const Surface>& porient,
122  TrackMatrix* prop_matrix = 0) const = 0;
123 
125  boost::optional<double> vec_prop(KTrack& trk,
126  const std::shared_ptr<const Surface>& psurf,
127  PropDirection dir,
128  bool doDedx,
129  TrackMatrix* prop_matrix = 0,
130  TrackError* noise_matrix = 0) const;
131 
133  boost::optional<double> lin_prop(KTrack& trk,
134  const std::shared_ptr<const Surface>& psurf,
135  PropDirection dir,
136  bool doDedx,
137  KTrack* ref = 0,
138  TrackMatrix* prop_matrix = 0,
139  TrackError* noise_matrix = 0) const;
141  boost::optional<double> err_prop(KETrack& tre,
142  const std::shared_ptr<const Surface>& psurf,
143  PropDirection dir,
144  bool doDedx,
145  KTrack* ref = 0,
146  TrackMatrix* prop_matrix = 0) const;
147 
149  boost::optional<double> noise_prop(KETrack& tre,
150  const std::shared_ptr<const Surface>& psurf,
151  PropDirection dir,
152  bool doDedx,
153  KTrack* ref = 0) const;
154 
156  boost::optional<double> dedx_prop(double pinv, double mass,
157  double s, double* deriv=0) const;
158 
159  private:
160 
161  // Attributes.
162 
163  double fTcut;
164  bool fDoDedx;
165  std::shared_ptr<const Interactor> fInteractor;
166  };
167 }
168 
169 #endif
Float_t s
Definition: plot.C:23
KSymMatrix< 5 >::type TrackError
Track error matrix, dimension 5x5.
boost::optional< double > dedx_prop(double pinv, double mass, double s, double *deriv=0) const
Method to calculate updated momentum due to dE/dx.
Definition: Propagator.cxx:459
Base class for Kalman filter track interactor.
double getTcut() const
Definition: Propagator.h:102
const std::shared_ptr< const Interactor > & getInteractor() const
Definition: Propagator.h:104
double fTcut
Maximum delta ray energy for dE/dx.
Definition: Propagator.h:163
virtual ~Propagator()
Destructor.
Definition: Propagator.cxx:33
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.
Definition: Propagator.cxx:394
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.
Definition: Propagator.cxx:354
Propagator(double tcut, bool doDedx, const std::shared_ptr< const Interactor > &interactor)
Constructor.
Definition: Propagator.cxx:25
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).
Definition: Propagator.cxx:52
Kalman filter linear algebra typedefs.
bool getDoDedx() const
Definition: Propagator.h:103
TDirectory * dir
Definition: macro.C:5
KMatrix< 5, 5 >::type TrackMatrix
General 5x5 matrix.
std::shared_ptr< const Interactor > fInteractor
Interactor (for calculating noise).
Definition: Propagator.h:165
bool fDoDedx
Energy loss enable flag.
Definition: Propagator.h:164
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.
Definition: Propagator.cxx:258
virtual boost::optional< double > origin_vec_prop(KTrack &trk, const std::shared_ptr< const Surface > &porient, TrackMatrix *prop_matrix=0) const =0
Propagate without error to surface whose origin parameters coincide with track position.
Basic Kalman filter track class, with error.
virtual boost::optional< double > short_vec_prop(KTrack &trk, const std::shared_ptr< const Surface > &psurf, PropDirection dir, bool doDedx, TrackMatrix *prop_matrix=0, TrackError *noise_matrix=0) const =0
Propagate without error (short distance).
virtual Propagator * clone() const =0
Clone method.
PropDirection
Propagation direction enum.
Definition: Propagator.h:92