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>
96  const Surface& surface,
97  const GlobalTrajectoryParameters& gtp,
98  const double& s) const dso_internal;
99 
102  const Cylinder& cylinder,
103  GlobalPoint& x,
104  GlobalVector& p,
105  double& s) const dso_internal;
106 
109  const Plane& plane,
110  GlobalPoint& x,
111  GlobalVector& p,
112  double& s) const dso_internal;
113 
116  const Plane&, GlobalPoint&, double&) const dso_internal;
119  const Cylinder&, GlobalPoint&, double&) const dso_internal;
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
AnalyticalPropagator(const MagneticField *field, PropagationDirection dir=alongMomentum, float maxDPhi=1.6, bool isOld=true)
virtual AnalyticalPropagator * clone() const
TrajectoryStateOnSurface propagate(const FreeTrajectoryState &fts, const Plane &plane) const
propagation to plane
bool propagateParametersOnPlane(const FreeTrajectoryState &fts, const Plane &plane, GlobalPoint &x, GlobalVector &p, double &s) const dso_internal
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 dso_internal
propagation of errors (if needed) and generation of a new TSOS
virtual const MagneticField * magneticField() const
PropagationDirection
Definition: Plane.h:17
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:77
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const
propagation to plane with path length
#define dso_internal
Definition: Visibility.h:13
bool propagateParametersOnCylinder(const FreeTrajectoryState &fts, const Cylinder &cylinder, GlobalPoint &x, GlobalVector &p, double &s) const dso_internal
parameter propagation to cylinder (returns position, momentum and path length)
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:12
void setMaxRelativeChangeInBz(const float maxDBz)
string const
Definition: compareJSON.py:14
virtual bool setMaxDirectionChange(float phiMax)
bool propagateWithHelixCrossing(HelixPlaneCrossing &, const Plane &, const float, GlobalPoint &, GlobalVector &, double &s) const dso_internal
helix parameter propagation to a plane using HelixPlaneCrossing
std::pair< TrajectoryStateOnSurface, double > TsosWP
const MagneticField * theField
dbl *** dir
Definition: mlp_gen.cc:35
Definition: DDAxes.h:10
bool propagateWithLineCrossing(const GlobalPoint &, const GlobalVector &, const Plane &, GlobalPoint &, double &) const dso_internal
straight line parameter propagation to a plane
TrajectoryStateOnSurface propagate(const FreeTrajectoryState &fts, const Cylinder &cylinder) const
propagation to cylinder