CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AnalyticalPropagator.h
Go to the documentation of this file.
1 #ifndef _COMMONRECO_ANALYTICALPROPAGATOR_H_
2 #define _COMMONRECO_ANALYTICALPROPAGATOR_H_
3 
7 
8 #include <cmath>
9 #include <cfloat>
10 
11 class Surface;
12 class Cylinder;
13 class Plane;
14 class HelixPlaneCrossing;
15 class MagneticField;
16 
22 class AnalyticalPropagator final : public Propagator {
23 public:
26  float maxDPhi = 1.6,
27  bool isOld = true)
28  : Propagator(dir),
29  theMaxDPhi2(maxDPhi * maxDPhi),
30  theMaxDBzRatio(0.5),
31  theField(field),
32  isOldPropagationType(isOld) {}
33 
34  ~AnalyticalPropagator() override {}
35 
36  //
37  // use base class methods where necessary:
38  // - propagation from TrajectoryStateOnSurface
39  // (will use propagation from FreeTrajectoryState)
40  // - propagation to general Surface
41  // (will use specialised methods for planes or cylinders)
42  //
45 
46 private:
48  std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const FreeTrajectoryState& fts,
49  const Plane& plane) const override;
50 
52  std::pair<TrajectoryStateOnSurface, double> propagateWithPath(const FreeTrajectoryState& fts,
53  const Cylinder& cylinder) const override;
54 
55 public:
59  bool setMaxDirectionChange(float phiMax) override {
60  theMaxDPhi2 = phiMax * phiMax;
61  return true;
62  }
63 
64  AnalyticalPropagator* clone() const override { return new AnalyticalPropagator(*this); }
65 
70  void setMaxRelativeChangeInBz(const float maxDBz) { theMaxDBzRatio = maxDBz; }
71 
72 private:
74  std::pair<TrajectoryStateOnSurface, double> propagatedStateWithPath(const FreeTrajectoryState& fts,
75  const Surface& surface,
76  const GlobalTrajectoryParameters& gtp,
77  const double& s) const dso_internal;
78 
81  const Cylinder& cylinder,
82  GlobalPoint& x,
83  GlobalVector& p,
84  double& s) const dso_internal;
85 
88  const Plane& plane,
89  GlobalPoint& x,
90  GlobalVector& p,
91  double& s) const dso_internal;
92 
94  bool propagateWithLineCrossing(const GlobalPoint&, const GlobalVector&, const Plane&, GlobalPoint&, double&) const
98  dso_internal;
101  HelixPlaneCrossing&, const Plane&, const float, GlobalPoint&, GlobalVector&, double& s) const dso_internal;
102 
103  const MagneticField* magneticField() const override { return theField; }
104 
105 private:
106  typedef std::pair<TrajectoryStateOnSurface, double> TsosWP;
107  float theMaxDPhi2;
111 };
112 
113 #endif
const MagneticField * magneticField() const override
AnalyticalPropagator(const MagneticField *field, PropagationDirection dir=alongMomentum, float maxDPhi=1.6, bool isOld=true)
bool propagateWithLineCrossing(const GlobalPoint &, const GlobalVector &, const Plane &, GlobalPoint &, double &) const
straight line parameter propagation to a plane
PropagationDirection
Definition: Plane.h:16
bool propagateParametersOnPlane(const FreeTrajectoryState &fts, const Plane &plane, GlobalPoint &x, GlobalVector &p, double &s) const
parameter propagation to plane (returns position, momentum and path length)
std::pair< TrajectoryStateOnSurface, double > propagatedStateWithPath(const FreeTrajectoryState &fts, const Surface &surface, const GlobalTrajectoryParameters &gtp, const double &s) const
propagation of errors (if needed) and generation of a new TSOS
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const override
propagation to plane with path length
bool propagateWithHelixCrossing(HelixPlaneCrossing &, const Plane &, const float, GlobalPoint &, GlobalVector &, double &s) const
helix parameter propagation to a plane using HelixPlaneCrossing
#define dso_internal
Definition: Visibility.h:13
AnalyticalPropagator * clone() const override
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:10
bool propagateParametersOnCylinder(const FreeTrajectoryState &fts, const Cylinder &cylinder, GlobalPoint &x, GlobalVector &p, double &s) const
parameter propagation to cylinder (returns position, momentum and path length)
void setMaxRelativeChangeInBz(const float maxDBz)
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
std::pair< TrajectoryStateOnSurface, double > TsosWP
bool setMaxDirectionChange(float phiMax) override
const MagneticField * theField