test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
17 
23 class AnalyticalPropagator final : public Propagator {
24 
25 public:
26 
29  float maxDPhi = 1.6,bool isOld=true) :
30  Propagator(dir),
31  theMaxDPhi2(maxDPhi*maxDPhi),
32  theMaxDBzRatio(0.5),
33  theField(field),
34  isOldPropagationType(isOld) {}
35 
37 
38  //
39  // use base class methods where necessary:
40  // - propagation from TrajectoryStateOnSurface
41  // (will use propagation from FreeTrajectoryState)
42  // - propagation to general Surface
43  // (will use specialised methods for planes or cylinders)
44  //
47 
48  private:
50  std::pair<TrajectoryStateOnSurface,double>
52  const Plane& plane) const override;
53 
54 
56  std::pair<TrajectoryStateOnSurface,double>
58  const Cylinder& cylinder) const override;
59 
60 
61  public:
65  virtual bool setMaxDirectionChange( float phiMax) {
66  theMaxDPhi2 = phiMax*phiMax;
67  return true;
68  }
69 
70  virtual AnalyticalPropagator * clone() const
71  {
72  return new AnalyticalPropagator(*this);
73  }
74 
79  void setMaxRelativeChangeInBz (const float maxDBz) {
80  theMaxDBzRatio = maxDBz;
81  }
82 
83 
84 private:
86  std::pair<TrajectoryStateOnSurface,double>
88  const Surface& surface,
89  const GlobalTrajectoryParameters& gtp,
90  const double& s) const dso_internal;
91 
94  const Cylinder& cylinder,
95  GlobalPoint& x,
96  GlobalVector& p,
97  double& s) const dso_internal;
98 
101  const Plane& plane,
102  GlobalPoint& x,
103  GlobalVector& p,
104  double& s) const dso_internal;
105 
108  const Plane&, GlobalPoint&, double&) const dso_internal;
111  const Cylinder&, GlobalPoint&, double&) const dso_internal;
114  GlobalPoint&, GlobalVector&, double& s) const dso_internal;
115 
116  virtual const MagneticField* magneticField() const {return theField;}
117 
118 private:
119  typedef std::pair<TrajectoryStateOnSurface,double> TsosWP;
120  float theMaxDPhi2;
124 };
125 
126 #endif
AnalyticalPropagator(const MagneticField *field, PropagationDirection dir=alongMomentum, float maxDPhi=1.6, bool isOld=true)
virtual AnalyticalPropagator * clone() const
virtual const MagneticField * magneticField() const
bool propagateWithLineCrossing(const GlobalPoint &, const GlobalVector &, const Plane &, GlobalPoint &, double &) const
straight line parameter propagation to a plane
PropagationDirection
Definition: Plane.h:17
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 > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const override
propagation to plane with 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
bool propagateWithHelixCrossing(HelixPlaneCrossing &, const Plane &, const float, GlobalPoint &, GlobalVector &, double &s) const
helix parameter propagation to a plane using HelixPlaneCrossing
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:15
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)
string const
Definition: compareJSON.py:14
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:53
virtual bool setMaxDirectionChange(float phiMax)
#define dso_internal
std::pair< TrajectoryStateOnSurface, double > TsosWP
const MagneticField * theField
dbl *** dir
Definition: mlp_gen.cc:35