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 
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>
87  propagatedStateWithPath (const FreeTrajectoryState& fts,
88  const Surface& surface,
89  const GlobalTrajectoryParameters& gtp,
90  const double& s) const dso_internal;
91 
93  bool propagateParametersOnCylinder(const FreeTrajectoryState& fts,
94  const Cylinder& cylinder,
95  GlobalPoint& x,
96  GlobalVector& p,
97  double& s) const dso_internal;
98 
100  bool propagateParametersOnPlane(const FreeTrajectoryState& fts,
101  const Plane& plane,
102  GlobalPoint& x,
103  GlobalVector& p,
104  double& s) const dso_internal;
105 
107  bool propagateWithLineCrossing(const GlobalPoint&, const GlobalVector&,
108  const Plane&, GlobalPoint&, double&) const dso_internal;
110  bool propagateWithLineCrossing(const GlobalPoint&, const GlobalVector&,
111  const Cylinder&, GlobalPoint&, double&) const dso_internal;
113  bool propagateWithHelixCrossing(HelixPlaneCrossing&, const Plane&, const float,
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
std::pair< TrajectoryStateOnSurface, double > TsosWP
const MagneticField * theField
PropagationDirection
Definition: Plane.h:17
AnalyticalPropagator(const MagneticField *field, PropagationDirection dir=alongMomentum, float maxDPhi=1.6, bool isOld=true)
virtual bool setMaxDirectionChange(float phiMax)
#define dso_internal
Definition: Visibility.h:13
void setMaxRelativeChangeInBz(const float maxDBz)
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:15
string const
Definition: compareJSON.py:14
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:56
dbl *** dir
Definition: mlp_gen.cc:35
Definition: DDAxes.h:10
virtual AnalyticalPropagator * clone() const
Unlimited (trivial) bounds.