CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
AnalyticalPropagator Class Referencefinal

#include <AnalyticalPropagator.h>

Inheritance diagram for AnalyticalPropagator:
Propagator

Public Member Functions

 AnalyticalPropagator (const MagneticField *field, PropagationDirection dir=alongMomentum, float maxDPhi=1.6, bool isOld=true)
 
AnalyticalPropagatorclone () const override
 
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest1, const GlobalPoint &pDest2) const final
 
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &ftsStart, const reco::BeamSpot &beamSpot) const final
 
template<typename STA , typename SUR >
TrajectoryStateOnSurface propagate (STA const &state, SUR const &surface) const
 
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const final
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &tsos, const Surface &sur) const final
 
virtual std::pair< FreeTrajectoryState, double > propagateWithPath (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest1, const GlobalPoint &pDest2) const
 Propagate to PCA to a line (given by 2 points) given a starting point. More...
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Plane &) const=0
 
virtual std::pair< FreeTrajectoryState, double > propagateWithPath (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const
 
virtual std::pair< FreeTrajectoryState, double > propagateWithPath (const FreeTrajectoryState &ftsStart, const reco::BeamSpot &beamSpot) const
 Propagate to PCA to a line (given by beamSpot position and slope) given a starting point. More...
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Surface &) const final
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &tsos, const Cylinder &sur) const
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Cylinder &) const=0
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &tsos, const Plane &sur) const
 
bool setMaxDirectionChange (float phiMax) override
 
void setMaxRelativeChangeInBz (const float maxDBz)
 
 ~AnalyticalPropagator () override
 
- Public Member Functions inherited from Propagator
template<typename STA , typename SUR >
TrajectoryStateOnSurface propagate (STA const &state, SUR const &surface) const
 
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const final
 
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest1, const GlobalPoint &pDest2) const final
 
virtual FreeTrajectoryState propagate (const FreeTrajectoryState &ftsStart, const reco::BeamSpot &beamSpot) const final
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &, const Surface &) const final
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &tsos, const Surface &sur) const final
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &tsos, const Plane &sur) const
 
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const TrajectoryStateOnSurface &tsos, const Cylinder &sur) const
 
virtual std::pair< FreeTrajectoryState, double > propagateWithPath (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const
 
virtual std::pair< FreeTrajectoryState, double > propagateWithPath (const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest1, const GlobalPoint &pDest2) const
 Propagate to PCA to a line (given by 2 points) given a starting point. More...
 
virtual std::pair< FreeTrajectoryState, double > propagateWithPath (const FreeTrajectoryState &ftsStart, const reco::BeamSpot &beamSpot) const
 Propagate to PCA to a line (given by beamSpot position and slope) given a starting point. More...
 
virtual PropagationDirection propagationDirection () const final
 
 Propagator (PropagationDirection dir=alongMomentum)
 
virtual void setPropagationDirection (PropagationDirection dir)
 
virtual ~Propagator ()
 

Private Types

typedef std::pair< TrajectoryStateOnSurface, double > TsosWP
 

Private Member Functions

const MagneticFieldmagneticField () const override
 
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 More...
 
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) More...
 
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) More...
 
bool propagateWithHelixCrossing (HelixPlaneCrossing &, const Plane &, const float, GlobalPoint &, GlobalVector &, double &s) const
 helix parameter propagation to a plane using HelixPlaneCrossing More...
 
bool propagateWithLineCrossing (const GlobalPoint &, const GlobalVector &, const Plane &, GlobalPoint &, double &) const
 straight line parameter propagation to a plane More...
 
bool propagateWithLineCrossing (const GlobalPoint &, const GlobalVector &, const Cylinder &, GlobalPoint &, double &) const
 straight line parameter propagation to a cylinder More...
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &fts, const Plane &plane) const override
 propagation to plane with path length More...
 
std::pair< TrajectoryStateOnSurface, double > propagateWithPath (const FreeTrajectoryState &fts, const Cylinder &cylinder) const override
 propagation to cylinder with path length More...
 

Private Attributes

bool isOldPropagationType
 
const MagneticFieldtheField
 
float theMaxDBzRatio
 
float theMaxDPhi2
 

Detailed Description

(Mostly) analytical helix propagation to cylindrical or planar surfaces. Based on GtfGeometricalPropagator with successive replacement of components (currently: propagation to arbitrary plane).

Definition at line 22 of file AnalyticalPropagator.h.

Member Typedef Documentation

◆ TsosWP

typedef std::pair<TrajectoryStateOnSurface, double> AnalyticalPropagator::TsosWP
private

Definition at line 106 of file AnalyticalPropagator.h.

Constructor & Destructor Documentation

◆ AnalyticalPropagator()

AnalyticalPropagator::AnalyticalPropagator ( const MagneticField field,
PropagationDirection  dir = alongMomentum,
float  maxDPhi = 1.6,
bool  isOld = true 
)
inline

Definition at line 24 of file AnalyticalPropagator.h.

Referenced by clone().

28  : Propagator(dir),
30  theMaxDBzRatio(0.5),
31  theField(field),
32  isOldPropagationType(isOld) {}
Propagator(PropagationDirection dir=alongMomentum)
Definition: Propagator.h:46
const MagneticField * theField

◆ ~AnalyticalPropagator()

AnalyticalPropagator::~AnalyticalPropagator ( )
inlineoverride

Definition at line 34 of file AnalyticalPropagator.h.

34 {}

Member Function Documentation

◆ clone()

AnalyticalPropagator* AnalyticalPropagator::clone ( void  ) const
inlineoverridevirtual

Implements Propagator.

Definition at line 64 of file AnalyticalPropagator.h.

References AnalyticalPropagator().

64 { return new AnalyticalPropagator(*this); }
AnalyticalPropagator(const MagneticField *field, PropagationDirection dir=alongMomentum, float maxDPhi=1.6, bool isOld=true)

◆ magneticField()

const MagneticField* AnalyticalPropagator::magneticField ( ) const
inlineoverrideprivatevirtual

Implements Propagator.

Definition at line 103 of file AnalyticalPropagator.h.

References theField.

103 { return theField; }
const MagneticField * theField

◆ propagate() [1/4]

virtual FreeTrajectoryState Propagator::propagate
inlinefinal

Definition at line 117 of file Propagator.h.

118  {
119  return propagateWithPath(ftsStart, beamSpot).first;
120  }
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const override
propagation to plane with path length

◆ propagate() [2/4]

template<typename STA , typename SUR >
TrajectoryStateOnSurface Propagator::propagate ( typename STA  ,
typename SUR   
)
inline

◆ propagate() [3/4]

virtual FreeTrajectoryState Propagator::propagate
inlinefinal

Definition at line 109 of file Propagator.h.

109  {
110  return propagateWithPath(ftsStart, pDest).first;
111  }
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const override
propagation to plane with path length

◆ propagate() [4/4]

virtual FreeTrajectoryState Propagator::propagate
inlinefinal

Definition at line 112 of file Propagator.h.

114  {
115  return propagateWithPath(ftsStart, pDest1, pDest2).first;
116  }
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const override
propagation to plane with path length

◆ propagatedStateWithPath()

std::pair< TrajectoryStateOnSurface, double > AnalyticalPropagator::propagatedStateWithPath ( const FreeTrajectoryState fts,
const Surface surface,
const GlobalTrajectoryParameters gtp,
const double &  s 
) const
private

propagation of errors (if needed) and generation of a new TSOS

Definition at line 106 of file AnalyticalPropagator.cc.

References SurfaceSideDefinition::afterSurface, alongMomentum, SurfaceSideDefinition::beforeSurface, FreeTrajectoryState::curvilinearError(), FreeTrajectoryState::hasError(), AnalyticalCurvilinearJacobian::jacobian(), CurvilinearTrajectoryError::matrix(), GlobalTrajectoryParameters::momentum(), FreeTrajectoryState::parameters(), GlobalTrajectoryParameters::position(), and alignCSCRings::s.

110  {
111  //
112  // for forward propagation: state is before surface,
113  // for backward propagation: state is after surface
114  //
115  SurfaceSide side =
117  //
118  //
119  // error propagation (if needed) and conversion to a TrajectoryStateOnSurface
120  //
121  if (fts.hasError()) {
122  //
123  // compute jacobian
124  //
125  AnalyticalCurvilinearJacobian analyticalJacobian(fts.parameters(), gtp.position(), gtp.momentum(), s);
126  const AlgebraicMatrix55& jacobian = analyticalJacobian.jacobian();
127  // CurvilinearTrajectoryError cte(ROOT::Math::Similarity(jacobian, fts.curvilinearError().matrix()));
128  return TsosWP(
129  TrajectoryStateOnSurface(gtp, ROOT::Math::Similarity(jacobian, fts.curvilinearError().matrix()), surface, side),
130  s);
131  } else {
132  //
133  // return state without errors
134  //
135  return TsosWP(TrajectoryStateOnSurface(gtp, surface, side), s);
136  }
137 }
const CurvilinearTrajectoryError & curvilinearError() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
const GlobalTrajectoryParameters & parameters() const
const AlgebraicSymMatrix55 & matrix() const
std::pair< TrajectoryStateOnSurface, double > TsosWP
const AlgebraicMatrix55 & jacobian() const

◆ propagateParametersOnCylinder()

bool AnalyticalPropagator::propagateParametersOnCylinder ( const FreeTrajectoryState fts,
const Cylinder cylinder,
GlobalPoint x,
GlobalVector p,
double &  s 
) const
private

parameter propagation to cylinder (returns position, momentum and path length)

Definition at line 139 of file AnalyticalPropagator.cc.

References funct::abs(), MillePedeFileConverter_cfg::e, f, PV3DBase< T, PVType, FrameType >::mag(), FreeTrajectoryState::momentum(), AlCaHLTBitMon_ParallelJobs::p, GloballyPositioned< T >::position(), FreeTrajectoryState::position(), alignCSCRings::s, tolerance, FreeTrajectoryState::transverseCurvature(), UNLIKELY, x, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

140  {
141  GlobalPoint const& sp = cylinder.position();
142  if UNLIKELY (sp.x() != 0. || sp.y() != 0.) {
143  throw PropagationException("Cannot propagate to an arbitrary cylinder");
144  }
145  // preset output
146  x = fts.position();
147  p = fts.momentum();
148  s = 0;
149  // (transverse) curvature
150  auto rho = fts.transverseCurvature();
151  //
152  // Straight line approximation? |rho|<1.e-10 equivalent to ~ 1um
153  // difference in transversal position at 10m.
154  //
155  if UNLIKELY (std::abs(rho) < 1.e-10f)
156  return propagateWithLineCrossing(fts.position(), p, cylinder, x, s);
157  //
158  // Helix case
159  //
160  // check for possible intersection
161  constexpr float tolerance = 1.e-4; // 1 micron distance
162  auto rdiff = x.perp() - cylinder.radius();
163  if (std::abs(rdiff) < tolerance)
164  return true;
165  //
166  // Instantiate HelixBarrelCylinderCrossing and get solutions
167  //
168  HelixBarrelCylinderCrossing cylinderCrossing(fts.position(), fts.momentum(), rho, propagationDirection(), cylinder);
169  if UNLIKELY (!cylinderCrossing.hasSolution())
170  return false;
171  // path length
172  s = cylinderCrossing.pathLength();
173  // point
174  x = cylinderCrossing.position();
175  // direction (renormalised)
176  p = cylinderCrossing.direction().unit() * fts.momentum().mag();
177  return true;
178 }
bool propagateWithLineCrossing(const GlobalPoint &, const GlobalVector &, const Plane &, GlobalPoint &, double &) const
straight line parameter propagation to a plane
const double tolerance
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
GlobalPoint position() const
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
T mag() const
Definition: PV3DBase.h:64
GlobalVector momentum() const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]
Common base class.
double transverseCurvature() const
const PositionType & position() const
#define UNLIKELY(x)
Definition: Likely.h:21

◆ propagateParametersOnPlane()

bool AnalyticalPropagator::propagateParametersOnPlane ( const FreeTrajectoryState fts,
const Plane plane,
GlobalPoint x,
GlobalVector p,
double &  s 
) const
private

parameter propagation to plane (returns position, momentum and path length)

Definition at line 180 of file AnalyticalPropagator.cc.

References funct::abs(), MillePedeFileConverter_cfg::e, f, LIKELY, LogDebug, PV3DBase< T, PVType, FrameType >::mag(), Basic3DVector< T >::mag(), FreeTrajectoryState::momentum(), oppositeToMomentum, AlCaHLTBitMon_ParallelJobs::p, perp(), PV3DBase< T, PVType, FrameType >::phi(), FreeTrajectoryState::position(), alignCSCRings::s, tolerance, FreeTrajectoryState::transverseCurvature(), UNLIKELY, and x.

181  {
182  // initialisation of position, momentum and path length
183  x = fts.position();
184  p = fts.momentum();
185  s = 0;
186  // (transverse) curvature
187  auto rho = fts.transverseCurvature();
188  //
189  // Straight line approximation? |rho|<1.e-10 equivalent to ~ 1um
190  // difference in transversal position at 10m.
191  //
192  if UNLIKELY (std::abs(rho) < 1.e-10f)
193  return propagateWithLineCrossing(fts.position(), p, plane, x, s);
194  //
195  // Helix case
196  //
197 
198  //
199  // Frame-independant point and vector are created explicitely to
200  // avoid confusing gcc (refuses to compile with temporary objects
201  // in the constructor).
202  //
206  OptimalHelixPlaneCrossing planeCrossing(plane, helixPos, helixDir, rho, propagationDirection());
207  return propagateWithHelixCrossing(*planeCrossing, plane, fts.momentum().mag(), x, p, s);
208  }
209 
210  //--- Alternative implementation to be used for the propagation of the parameters of looping
211  // particles that cross twice the (infinite) surface of the plane. It is not trivial to determine
212  // which of the two intersections has to be returned.
213 
214  //---- FIXME: WHAT FOLLOWS HAS TO BE REWRITTEN IN A CLEANER (AND CPU-OPTIMIZED) WAY ---------
215  LogDebug("AnalyticalPropagator") << "In AnaliticalProp, calling HAPC "
216  << "\n"
217  << "plane is centered in xyz: " << plane.position().x() << " , "
218  << plane.position().y() << " , " << plane.position().z() << "\n";
219 
220  GlobalPoint gp1 = fts.position();
221  GlobalVector gm1 = fts.momentum();
222  double s1 = 0;
223  double rho1 = fts.transverseCurvature();
224  HelixPlaneCrossing::PositionType helixPos1(gp1);
225  HelixPlaneCrossing::DirectionType helixDir1(gm1);
226  LogDebug("AnalyticalPropagator") << "gp1 before calling planeCrossing1: " << gp1 << "\n";
227  OptimalHelixPlaneCrossing planeCrossing1(plane, helixPos1, helixDir1, rho1, propagationDirection());
228 
231 
232  double tolerance(0.0050);
234  tolerance *= -1;
235 
236  bool check1 = propagateWithHelixCrossing(*planeCrossing1, plane, fts.momentum().mag(), gp1, gm1, s1);
237  double dphi1 = fabs(fts.momentum().phi() - gm1.phi());
238  LogDebug("AnalyticalPropagator") << "check1, s1, dphi, gp1: " << check1 << " , " << s1 << " , " << dphi1 << " , "
239  << gp1 << "\n";
240 
241  //move forward a bit to avoid that the propagator doesn't propagate because the state is already on surface.
242  //we want to go to the other point of intersection between the helix and the plane
243  xGen = (*planeCrossing1).position(s1 + tolerance);
244  pGen = (*planeCrossing1).direction(s1 + tolerance);
245 
246  /*
247  if(!check1 || s1>170 ){
248  //PropagationDirection newDir = (propagationDirection() == alongMomentum) ? oppositeToMomentum : alongMomentum;
249  PropagationDirection newDir = anyDirection;
250  HelixArbitraryPlaneCrossing planeCrossing1B(helixPos1,helixDir1,rho1,newDir);
251  check1 = propagateWithHelixCrossing(planeCrossing1B,plane,fts.momentum().mag(),gp1,gm1,s1);
252  LogDebug("AnalyticalPropagator") << "after second attempt, check1, s1,gp1: "
253  << check1 << " , "
254  << s1 << " , " << gp1 << "\n";
255 
256  xGen = planeCrossing1B.position(s1+tolerance);
257  pGen = planeCrossing1B.direction(s1+tolerance);
258  }
259  */
260 
261  if (!check1) {
262  LogDebug("AnalyticalPropagator") << "failed also second attempt. No idea what to do, then bailout"
263  << "\n";
264  }
265 
266  pGen *= gm1.mag() / pGen.mag();
267  GlobalPoint gp2(xGen);
268  GlobalVector gm2(pGen);
269  double s2 = 0;
270  double rho2 = rho1;
271  HelixPlaneCrossing::PositionType helixPos2(gp2);
272  HelixPlaneCrossing::DirectionType helixDir2(gm2);
273  OptimalHelixPlaneCrossing planeCrossing2(plane, helixPos2, helixDir2, rho2, propagationDirection());
274 
275  bool check2 = propagateWithHelixCrossing(*planeCrossing2, plane, gm2.mag(), gp2, gm2, s2);
276 
277  if (!check2) {
278  x = gp1;
279  p = gm1;
280  s = s1;
281  return check1;
282  }
283 
284  if (!check1) {
285  edm::LogError("AnalyticalPropagator") << "LOGIC ERROR: I should not have entered here!"
286  << "\n";
287  return false;
288  }
289 
290  LogDebug("AnalyticalPropagator") << "check2, s2, gp2: " << check2 << " , " << s2 << " , " << gp2 << "\n";
291 
292  double dist1 = (plane.position() - gp1).perp();
293  double dist2 = (plane.position() - gp2).perp();
294 
295  LogDebug("AnalyticalPropagator") << "propDir, dist1, dist2: " << propagationDirection() << " , " << dist1 << " , "
296  << dist2 << "\n";
297 
298  //If there are two solutions, the one which is the closest to the module's center is chosen
299  if (dist1 < 2 * dist2) {
300  x = gp1;
301  p = gm1;
302  s = s1;
303  return check1;
304  } else if (dist2 < 2 * dist1) {
305  x = gp2;
306  p = gm2;
307  s = s1 + s2 + tolerance;
308  return check2;
309  } else {
310  if (fabs(s1) < fabs(s2)) {
311  x = gp1;
312  p = gm1;
313  s = s1;
314  return check1;
315  } else {
316  x = gp2;
317  p = gm2;
318  s = s1 + s2 + tolerance;
319  return check2;
320  }
321  }
322 
323  //-------- END of ugly piece of code ---------------
324 }
bool propagateWithLineCrossing(const GlobalPoint &, const GlobalVector &, const Plane &, GlobalPoint &, double &) const
straight line parameter propagation to a plane
const double tolerance
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
#define LIKELY(x)
Definition: Likely.h:20
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
Log< level::Error, false > LogError
GlobalPoint position() const
bool propagateWithHelixCrossing(HelixPlaneCrossing &, const Plane &, const float, GlobalPoint &, GlobalVector &, double &s) const
helix parameter propagation to a plane using HelixPlaneCrossing
T mag() const
Definition: PV3DBase.h:64
GlobalVector momentum() const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]
T perp() const
Magnitude of transverse component.
double transverseCurvature() const
#define UNLIKELY(x)
Definition: Likely.h:21
#define LogDebug(id)

◆ propagateWithHelixCrossing()

bool AnalyticalPropagator::propagateWithHelixCrossing ( HelixPlaneCrossing planeCrossing,
const Plane plane,
const float  pmag,
GlobalPoint x,
GlobalVector p,
double &  s 
) const
private

helix parameter propagation to a plane using HelixPlaneCrossing

Definition at line 372 of file AnalyticalPropagator.cc.

References HelixPlaneCrossing::direction(), PV3DBase< T, PVType, FrameType >::mag(), AlCaHLTBitMon_ParallelJobs::p, HelixPlaneCrossing::pathLength(), HelixPlaneCrossing::position(), alignCSCRings::s, UNLIKELY, and x.

377  {
378  // get solution
379  std::pair<bool, double> propResult = planeCrossing.pathLength(plane);
380  if UNLIKELY (!propResult.first)
381  return false;
382 
383  s = propResult.second;
384  x = GlobalPoint(planeCrossing.position(s));
385  // direction (reconverted to GlobalVector, renormalised)
386  GlobalVector pGen = GlobalVector(planeCrossing.direction(s));
387  pGen *= pmag / pGen.mag();
388  p = pGen;
389  //
390  return true;
391 }
return((rh ^ lh) &mask)
U second(std::pair< T, U > const &p)
virtual std::pair< bool, double > pathLength(const Plane &)=0
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
static int position[264][3]
Definition: ReadPGInfo.cc:289
#define UNLIKELY(x)
Definition: Likely.h:21

◆ propagateWithLineCrossing() [1/2]

bool AnalyticalPropagator::propagateWithLineCrossing ( const GlobalPoint ,
const GlobalVector ,
const Plane ,
GlobalPoint ,
double &   
) const
private

straight line parameter propagation to a plane

◆ propagateWithLineCrossing() [2/2]

bool AnalyticalPropagator::propagateWithLineCrossing ( const GlobalPoint ,
const GlobalVector ,
const Cylinder ,
GlobalPoint ,
double &   
) const
private

straight line parameter propagation to a cylinder

◆ propagateWithPath() [1/11]

std::pair< FreeTrajectoryState, double > Propagator::propagateWithPath

implemented by Stepping Helix Propagate to PCA to point given a starting point

Definition at line 42 of file Propagator.cc.

43  {
44  throw cms::Exception("Propagator::propagate(FTS,GlobalPoint) not implemented");
45  return std::pair<FreeTrajectoryState, double>();
46 }

◆ propagateWithPath() [2/11]

std::pair< FreeTrajectoryState, double > Propagator::propagateWithPath

Propagate to PCA to a line (given by beamSpot position and slope) given a starting point.

Definition at line 53 of file Propagator.cc.

54  {
55  throw cms::Exception("Propagator::propagate(FTS,beamSpot) not implemented");
56  return std::pair<FreeTrajectoryState, double>();
57 }

◆ propagateWithPath() [3/11]

std::pair< FreeTrajectoryState, double > Propagator::propagateWithPath

Propagate to PCA to a line (given by 2 points) given a starting point.

Definition at line 47 of file Propagator.cc.

49  {
50  throw cms::Exception("Propagator::propagate(FTS,GlobalPoint,GlobalPoint) not implemented");
51  return std::pair<FreeTrajectoryState, double>();
52 }

◆ propagateWithPath() [4/11]

std::pair< TrajectoryStateOnSurface, double > Propagator::propagateWithPath
final

The methods propagateWithPath() are identical to the corresponding methods propagate() in what concerns the resulting TrajectoryStateOnSurface, but they provide in addition the exact path length along the trajectory.Only use the generic method if the surface type (plane or cylinder) is not known at the calling point.

Definition at line 10 of file Propagator.cc.

11  {
12  // try plane first, most probable case (disk "is a" plane too)
13  const Plane* bp = dynamic_cast<const Plane*>(&sur);
14  if (bp != nullptr)
15  return propagateWithPath(state, *bp);
16 
17  // if not plane try cylinder
18  const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur);
19  if (bc != nullptr)
20  return propagateWithPath(state, *bc);
21 
22  // unknown surface - can't do it!
23  throw PropagationException("The surface is neither Cylinder nor Plane");
24 }
Definition: Plane.h:16
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const override
propagation to plane with path length
Common base class.

◆ propagateWithPath() [5/11]

virtual std::pair<TrajectoryStateOnSurface, double> Propagator::propagateWithPath

◆ propagateWithPath() [6/11]

std::pair< TrajectoryStateOnSurface, double > Propagator::propagateWithPath
final

The following three methods are equivalent to the corresponding methods above, but if the starting state is a TrajectoryStateOnSurface, it's better to use it as such rather than use just the FreeTrajectoryState part. It may help some concrete propagators.Only use the generic method if the surface type (plane or cylinder) is not known at the calling point.

Definition at line 26 of file Propagator.cc.

27  {
28  // try plane first, most probable case (disk "is a" plane too)
29  const Plane* bp = dynamic_cast<const Plane*>(&sur);
30  if (bp != nullptr)
31  return propagateWithPath(state, *bp);
32 
33  // if not plane try cylinder
34  const Cylinder* bc = dynamic_cast<const Cylinder*>(&sur);
35  if (bc != nullptr)
36  return propagateWithPath(state, *bc);
37 
38  // unknown surface - can't do it!
39  throw PropagationException("The surface is neither Cylinder nor Plane");
40 }
Definition: Plane.h:16
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const override
propagation to plane with path length
Common base class.

◆ propagateWithPath() [7/11]

virtual std::pair<TrajectoryStateOnSurface, double> Propagator::propagateWithPath

◆ propagateWithPath() [8/11]

virtual std::pair<TrajectoryStateOnSurface, double> Propagator::propagateWithPath
inline

Definition at line 91 of file Propagator.h.

92  {
93  return propagateWithPath(*tsos.freeState(), sur);
94  }
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const override
propagation to plane with path length

◆ propagateWithPath() [9/11]

virtual std::pair<TrajectoryStateOnSurface, double> Propagator::propagateWithPath
inline

Definition at line 86 of file Propagator.h.

87  {
88  return propagateWithPath(*tsos.freeState(), sur);
89  }
std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &fts, const Plane &plane) const override
propagation to plane with path length

◆ propagateWithPath() [10/11]

std::pair<TrajectoryStateOnSurface, double> AnalyticalPropagator::propagateWithPath ( const FreeTrajectoryState fts,
const Plane plane 
) const
overrideprivatevirtual

propagation to plane with path length

Implements Propagator.

◆ propagateWithPath() [11/11]

std::pair<TrajectoryStateOnSurface, double> AnalyticalPropagator::propagateWithPath ( const FreeTrajectoryState fts,
const Cylinder cylinder 
) const
overrideprivatevirtual

propagation to cylinder with path length

Implements Propagator.

◆ setMaxDirectionChange()

bool AnalyticalPropagator::setMaxDirectionChange ( float  phiMax)
inlineoverridevirtual

limitation of change in transverse direction (to avoid loops).

Reimplemented from Propagator.

Definition at line 59 of file AnalyticalPropagator.h.

References AlignmentTrackSelector_cfi::phiMax, and theMaxDPhi2.

◆ setMaxRelativeChangeInBz()

void AnalyticalPropagator::setMaxRelativeChangeInBz ( const float  maxDBz)
inline

Set the maximum relative change in Bz (Bz_at_end-Bz_at_start)/Bz_at_start for a single propagation. The default is no limit. NB: this propagator assumes constant, non-zero magnetic field parallel to the z-axis!

Definition at line 70 of file AnalyticalPropagator.h.

References theMaxDBzRatio.

70 { theMaxDBzRatio = maxDBz; }

Member Data Documentation

◆ isOldPropagationType

bool AnalyticalPropagator::isOldPropagationType
private

Definition at line 110 of file AnalyticalPropagator.h.

◆ theField

const MagneticField* AnalyticalPropagator::theField
private

Definition at line 109 of file AnalyticalPropagator.h.

Referenced by magneticField().

◆ theMaxDBzRatio

float AnalyticalPropagator::theMaxDBzRatio
private

Definition at line 108 of file AnalyticalPropagator.h.

Referenced by setMaxRelativeChangeInBz().

◆ theMaxDPhi2

float AnalyticalPropagator::theMaxDPhi2
private

Definition at line 107 of file AnalyticalPropagator.h.

Referenced by setMaxDirectionChange().