CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
AnalyticalImpactPointExtrapolator Class Reference

#include <AnalyticalImpactPointExtrapolator.h>

Public Member Functions

 AnalyticalImpactPointExtrapolator (const MagneticField *field)
 constructor with default geometrical propagator More...
 
 AnalyticalImpactPointExtrapolator (const Propagator &, const MagneticField *)
 constructor with alternative propagator More...
 
TrajectoryStateOnSurface extrapolate (const FreeTrajectoryState &fts, const GlobalPoint &vtx) const
 extrapolation from FreeTrajectoryState More...
 
TrajectoryStateOnSurface extrapolate (const TrajectoryStateOnSurface tsos, const GlobalPoint &vtx) const
 as above, but from TrajectoryStateOnSurface More...
 

Private Member Functions

TrajectoryStateOnSurface extrapolateFullState (const TrajectoryStateOnSurface tsos, const GlobalPoint &vertex) const
 extrapolation of (multi) TSOS More...
 
TrajectoryStateOnSurface extrapolateSingleState (const FreeTrajectoryState &fts, const GlobalPoint &vertex) const
 extrapolation of (single) FTS More...
 
bool propagateWithHelix (const IterativeHelixExtrapolatorToLine &extrapolator, const GlobalPoint &vertex, GlobalPoint &x, GlobalVector &p, double &s) const
 the actual propagation to a new point & momentum vector More...
 

Private Attributes

const MagneticFieldtheField
 
DeepCopyPointerByClone< PropagatorthePropagator
 

Detailed Description

Extrapolate to impact point with respect to vtx, i.e. to the point of closest approach to vtx in 3D. It is slightly faster than the ImpactPointExtrapolator. The helix model is explicitely used in the determination of the target surface. This target surface is centered on vtx; the axes of the local coordinate system (x_loc, y_loc, z_loc) are z_loc // trajectory direction at impact point; x_loc normal to trajectory and along impact vector (impact point - vtx); y_loc forms a right-handed system with the other axes.

Definition at line 26 of file AnalyticalImpactPointExtrapolator.h.

Constructor & Destructor Documentation

◆ AnalyticalImpactPointExtrapolator() [1/2]

AnalyticalImpactPointExtrapolator::AnalyticalImpactPointExtrapolator ( const MagneticField field)

constructor with default geometrical propagator

Definition at line 12 of file AnalyticalImpactPointExtrapolator.cc.

◆ AnalyticalImpactPointExtrapolator() [2/2]

AnalyticalImpactPointExtrapolator::AnalyticalImpactPointExtrapolator ( const Propagator propagator,
const MagneticField field 
)

constructor with alternative propagator

Definition at line 15 of file AnalyticalImpactPointExtrapolator.cc.

References anyDirection, Propagator::setPropagationDirection(), and thePropagator.

Member Function Documentation

◆ extrapolate() [1/2]

TrajectoryStateOnSurface AnalyticalImpactPointExtrapolator::extrapolate ( const FreeTrajectoryState fts,
const GlobalPoint vtx 
) const

extrapolation from FreeTrajectoryState

Definition at line 21 of file AnalyticalImpactPointExtrapolator.cc.

22  {
23  // static TimingReport::Item& timer = detailedDetTimer("AnalyticalImpactPointExtrapolator");
24  // TimeMe t(timer,false);
25 
26  return extrapolateSingleState(fts, vtx);
27 }

References extrapolateSingleState(), and extraflags_cff::vtx.

◆ extrapolate() [2/2]

TrajectoryStateOnSurface AnalyticalImpactPointExtrapolator::extrapolate ( const TrajectoryStateOnSurface  tsos,
const GlobalPoint vtx 
) const

as above, but from TrajectoryStateOnSurface

Definition at line 29 of file AnalyticalImpactPointExtrapolator.cc.

30  {
31  if (tsos.isValid())
32  return extrapolateFullState(tsos, vtx);
33  else
34  return tsos;
35 }

References extrapolateFullState(), TrajectoryStateOnSurface::isValid(), and extraflags_cff::vtx.

◆ extrapolateFullState()

TrajectoryStateOnSurface AnalyticalImpactPointExtrapolator::extrapolateFullState ( const TrajectoryStateOnSurface  tsos,
const GlobalPoint vertex 
) const
private

extrapolation of (multi) TSOS

Definition at line 37 of file AnalyticalImpactPointExtrapolator.cc.

38  {
39  //
40  // first determine IP plane using propagation with (single) FTS
41  // could be optimised (will propagate errors even if duplicated below)
42  //
44  if (!singleState.isValid() || tsos.singleState())
45  return singleState;
46  //
47  // propagate multiTsos to plane found above
48  //
49  return thePropagator->propagate(tsos, singleState.surface());
50 }

References extrapolateSingleState(), TrajectoryStateOnSurface::freeTrajectoryState(), TrajectoryStateOnSurface::isValid(), Propagator::propagate(), TrajectoryStateOnSurface::singleState(), TrajectoryStateOnSurface::surface(), thePropagator, and bphysicsOniaDQM_cfi::vertex.

Referenced by extrapolate().

◆ extrapolateSingleState()

TrajectoryStateOnSurface AnalyticalImpactPointExtrapolator::extrapolateSingleState ( const FreeTrajectoryState fts,
const GlobalPoint vertex 
) const
private

extrapolation of (single) FTS

Definition at line 52 of file AnalyticalImpactPointExtrapolator.cc.

53  {
54  //
55  // initialisation of position, momentum and transverse curvature
56  //
57  GlobalPoint x(fts.position());
58  GlobalVector p(fts.momentum());
59  double rho = fts.transverseCurvature();
60  //
61  // Straight line approximation? |rho|<1.e-10 equivalent to ~ 1um
62  // difference in transversal position at 10m.
63  //
64  double s(0);
65  if (fabs(rho) < 1.e-10) {
66  GlobalVector dx(p.dot(vertex - x) / p.mag2() * p);
67  x += dx;
68  float sign = p.dot(dx);
69  s = sign > 0 ? dx.mag() : -dx.mag();
70  }
71  //
72  // Helix case
73  //
74  else {
77  IterativeHelixExtrapolatorToLine extrapolator(helixPos, helixDir, rho, anyDirection);
78  if (!propagateWithHelix(extrapolator, vertex, x, p, s))
79  return TrajectoryStateOnSurface();
80  }
81  //
82  // Define target surface: origin on line, x_local from line
83  // to helix at closest approach, z_local along the helix
84  // and y_local to complete right-handed system
85  //
86  GlobalVector zLocal(p.unit());
87  GlobalVector yLocal(zLocal.cross(x - vertex).unit());
88  GlobalVector xLocal(yLocal.cross(zLocal));
89  Surface::RotationType rot(xLocal, yLocal, zLocal);
91  //
92  // Compute propagated state
93  //
95  if (fts.hasError()) {
96  //
97  // compute jacobian
98  //
99  AnalyticalCurvilinearJacobian analyticalJacobian(fts.parameters(), gtp.position(), gtp.momentum(), s);
101  ROOT::Math::Similarity(analyticalJacobian.jacobian(), fts.curvilinearError().matrix()));
102  return TrajectoryStateOnSurface(gtp, cte, *surface);
103  } else {
104  //
105  // return state without errors
106  //
107  return TrajectoryStateOnSurface(gtp, *surface);
108  }
109 }

References anyDirection, FreeTrajectoryState::charge(), FreeTrajectoryState::curvilinearError(), PVValHelper::dx, MillePedeFileConverter_cfg::e, FreeTrajectoryState::hasError(), CurvilinearTrajectoryError::matrix(), FreeTrajectoryState::momentum(), AlCaHLTBitMon_ParallelJobs::p, FreeTrajectoryState::parameters(), PlaneBuilder::plane(), GlobalTrajectoryParameters::position(), FreeTrajectoryState::position(), propagateWithHelix(), rho, makeMuonMisalignmentScenario::rot, alignCSCRings::s, Validation_hcalonly_cfi::sign, theField, FreeTrajectoryState::transverseCurvature(), bphysicsOniaDQM_cfi::vertex, and x.

Referenced by extrapolate(), and extrapolateFullState().

◆ propagateWithHelix()

bool AnalyticalImpactPointExtrapolator::propagateWithHelix ( const IterativeHelixExtrapolatorToLine extrapolator,
const GlobalPoint vertex,
GlobalPoint x,
GlobalVector p,
double &  s 
) const
private

the actual propagation to a new point & momentum vector

Definition at line 111 of file AnalyticalImpactPointExtrapolator.cc.

115  {
116  //
117  // save absolute value of momentum
118  //
119  double pmag(p.mag());
120  //
121  // get path length to solution
122  //
123  std::pair<bool, double> propResult = extrapolator.pathLength(vertex);
124  if (!propResult.first)
125  return false;
126  s = propResult.second;
127  //
128  // get point and (normalised) direction from path length
129  //
130  HelixLineExtrapolation::PositionType xGen = extrapolator.position(s);
132  //
133  // Fix normalisation and convert back to GlobalPoint / GlobalVector
134  //
135  x = GlobalPoint(xGen);
136  pGen *= pmag / pGen.mag();
137  p = GlobalVector(pGen);
138  //
139  return true;
140 }

References IterativeHelixExtrapolatorToLine::direction(), Basic3DVector< T >::mag(), AlCaHLTBitMon_ParallelJobs::p, IterativeHelixExtrapolatorToLine::pathLength(), IterativeHelixExtrapolatorToLine::position(), alignCSCRings::s, bphysicsOniaDQM_cfi::vertex, and x.

Referenced by extrapolateSingleState().

Member Data Documentation

◆ theField

const MagneticField* AnalyticalImpactPointExtrapolator::theField
private

Definition at line 53 of file AnalyticalImpactPointExtrapolator.h.

Referenced by extrapolateSingleState().

◆ thePropagator

DeepCopyPointerByClone<Propagator> AnalyticalImpactPointExtrapolator::thePropagator
private
Vector3DBase
Definition: Vector3DBase.h:8
TkRotation< float >
FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
TrajectoryStateOnSurface::freeTrajectoryState
FreeTrajectoryState const * freeTrajectoryState(bool withErrors=true) const
Definition: TrajectoryStateOnSurface.h:60
anyDirection
Definition: PropagationDirection.h:4
AnalyticalCurvilinearJacobian
Definition: AnalyticalCurvilinearJacobian.h:21
AnalyticalImpactPointExtrapolator::propagateWithHelix
bool propagateWithHelix(const IterativeHelixExtrapolatorToLine &extrapolator, const GlobalPoint &vertex, GlobalPoint &x, GlobalVector &p, double &s) const
the actual propagation to a new point & momentum vector
Definition: AnalyticalImpactPointExtrapolator.cc:111
AnalyticalImpactPointExtrapolator::extrapolateSingleState
TrajectoryStateOnSurface extrapolateSingleState(const FreeTrajectoryState &fts, const GlobalPoint &vertex) const
extrapolation of (single) FTS
Definition: AnalyticalImpactPointExtrapolator.cc:52
FreeTrajectoryState::hasError
bool hasError() const
Definition: FreeTrajectoryState.h:77
GlobalTrajectoryParameters::position
GlobalPoint position() const
Definition: GlobalTrajectoryParameters.h:60
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
FreeTrajectoryState::charge
TrackCharge charge() const
Definition: FreeTrajectoryState.h:69
IterativeHelixExtrapolatorToLine
Definition: IterativeHelixExtrapolatorToLine.h:13
Validation_hcalonly_cfi.sign
sign
Definition: Validation_hcalonly_cfi.py:32
IterativeHelixExtrapolatorToLine::pathLength
std::pair< bool, double > pathLength(const GlobalPoint &point) const override
Definition: IterativeHelixExtrapolatorToLine.cc:37
ReferenceCountingPointer< Plane >
DDAxes::x
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
Basic3DVector::mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: extBasic3DVector.h:116
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
alignCSCRings.s
s
Definition: alignCSCRings.py:92
CurvilinearTrajectoryError
Definition: CurvilinearTrajectoryError.h:27
TrackCandidateProducer_cfi.propagator
propagator
Definition: TrackCandidateProducer_cfi.py:17
FreeTrajectoryState::curvilinearError
const CurvilinearTrajectoryError & curvilinearError() const
Definition: FreeTrajectoryState.h:89
IterativeHelixExtrapolatorToLine::position
PositionType position(double s) const override
Definition: IterativeHelixExtrapolatorToLine.cc:128
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Point3DBase< float, GlobalTag >
Propagator::setPropagationDirection
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:130
DDAxes::rho
AnalyticalPropagator_cfi.AnalyticalPropagator
AnalyticalPropagator
Definition: AnalyticalPropagator_cfi.py:3
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
FreeTrajectoryState::parameters
const GlobalTrajectoryParameters & parameters() const
Definition: FreeTrajectoryState.h:79
AnalyticalImpactPointExtrapolator::extrapolateFullState
TrajectoryStateOnSurface extrapolateFullState(const TrajectoryStateOnSurface tsos, const GlobalPoint &vertex) const
extrapolation of (multi) TSOS
Definition: AnalyticalImpactPointExtrapolator.cc:37
Propagator::propagate
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
PlaneBuilder::plane
ReturnType plane(const PositionType &pos, const RotationType &rot) const
Definition: PlaneBuilder.h:21
extraflags_cff.vtx
vtx
Definition: extraflags_cff.py:18
TrajectoryStateOnSurface::singleState
bool singleState() const
Definition: TrajectoryStateOnSurface.h:86
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
IterativeHelixExtrapolatorToLine::direction
DirectionType direction(double s) const override
Definition: IterativeHelixExtrapolatorToLine.cc:174
AnalyticalImpactPointExtrapolator::theField
const MagneticField * theField
Definition: AnalyticalImpactPointExtrapolator.h:53
TrajectoryStateOnSurface::surface
const SurfaceType & surface() const
Definition: TrajectoryStateOnSurface.h:78
PlaneBuilder
Definition: PlaneBuilder.h:13
PVValHelper::dx
Definition: PVValidationHelpers.h:49
FreeTrajectoryState::transverseCurvature
double transverseCurvature() const
Definition: FreeTrajectoryState.h:71
Basic3DVector< float >
CurvilinearTrajectoryError::matrix
const AlgebraicSymMatrix55 & matrix() const
Definition: CurvilinearTrajectoryError.h:61
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
AnalyticalImpactPointExtrapolator::thePropagator
DeepCopyPointerByClone< Propagator > thePropagator
Definition: AnalyticalImpactPointExtrapolator.h:52
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37