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  // use base class methods where necessary:
39  // - propagation from TrajectoryStateOnSurface
40  // (will use propagation from FreeTrajectoryState)
41  // - propagation to general Surface
42  // (will use specialised methods for planes or cylinders)
43  //
46 
49  const Plane& plane) const {
50  return propagateWithPath(fts,plane).first;
51  }
53  std::pair<TrajectoryStateOnSurface,double>
55  const Plane& plane) const;
56 
59  const Cylinder& cylinder) const {
60  return propagateWithPath(fts,cylinder).first;
61  }
63  std::pair<TrajectoryStateOnSurface,double>
65  const Cylinder& cylinder) const;
69  virtual bool setMaxDirectionChange( float phiMax) {
70  theMaxDPhi2 = phiMax*phiMax;
71  return true;
72  }
73 
74 #ifndef CMS_NO_RELAXED_RETURN_TYPE
76 #else
77  virtual Propagator * clone() const
78 #endif
79  {
80  return new AnalyticalPropagator(*this);
81  }
82 
87  void setMaxRelativeChangeInBz (const float maxDBz) {
88  theMaxDBzRatio = maxDBz;
89  }
90 
91 
92 private:
94  std::pair<TrajectoryStateOnSurface,double>
95  propagatedStateWithPath (const FreeTrajectoryState& fts,
96  const Surface& surface,
97  const GlobalTrajectoryParameters& gtp,
98  const double& s) const dso_internal;
99 
101  bool propagateParametersOnCylinder(const FreeTrajectoryState& fts,
102  const Cylinder& cylinder,
103  GlobalPoint& x,
104  GlobalVector& p,
105  double& s) const dso_internal;
106 
108  bool propagateParametersOnPlane(const FreeTrajectoryState& fts,
109  const Plane& plane,
110  GlobalPoint& x,
111  GlobalVector& p,
112  double& s) const dso_internal;
113 
115  bool propagateWithLineCrossing(const GlobalPoint&, const GlobalVector&,
116  const Plane&, GlobalPoint&, double&) const dso_internal;
118  bool propagateWithLineCrossing(const GlobalPoint&, const GlobalVector&,
119  const Cylinder&, GlobalPoint&, double&) const dso_internal;
121  bool propagateWithHelixCrossing(HelixPlaneCrossing&, const Plane&, const float,
122  GlobalPoint&, GlobalVector&, double& s) const dso_internal;
123 
124  virtual const MagneticField* magneticField() const {return theField;}
125 
126 private:
127  typedef std::pair<TrajectoryStateOnSurface,double> TsosWP;
128  float theMaxDPhi2;
132 };
133 
134 #endif
std::pair< TrajectoryStateOnSurface, double > TsosWP
const MagneticField * theField
virtual Propagator * clone() const =0
PropagationDirection
Definition: Plane.h:17
tuple field
Definition: statics.py:62
AnalyticalPropagator(const MagneticField *field, PropagationDirection dir=alongMomentum, float maxDPhi=1.6, bool isOld=true)
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:77
virtual bool setMaxDirectionChange(float phiMax)
TrajectoryStateOnSurface propagate(const FreeTrajectoryState &fts, const Cylinder &cylinder) const
propagation to cylinder
#define dso_internal
Definition: Visibility.h:13
void setMaxRelativeChangeInBz(const float maxDBz)
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:12
TrajectoryStateOnSurface propagate(const FreeTrajectoryState &fts, const Plane &plane) const
propagation to plane
string const
Definition: compareJSON.py:14
dbl *** dir
Definition: mlp_gen.cc:35
Definition: DDAxes.h:10
virtual AnalyticalPropagator * clone() const
Unlimited (trivial) bounds.