CMS 3D CMS Logo

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

#include <GsfConstraintAtVertex.h>

Public Member Functions

TrajectoryStateOnSurface constrainAtBeamSpot (const reco::GsfTrack &, const reco::BeamSpot &) const
 (multi)TSOS after including the beamspot More...
 
TrajectoryStateOnSurface constrainAtPoint (const reco::GsfTrack &, const GlobalPoint &globalPosition, const GlobalError &globalError) const
 (multi)TSOS after including a point with covariance matrix More...
 
TrajectoryStateOnSurface constrainAtVertex (const reco::GsfTrack &, const reco::Vertex &) const
 (multi)TSOS after include a vertex More...
 
 GsfConstraintAtVertex (const TrackerGeometry *geometry, const MagneticField *magField)
 

Private Attributes

const TrackerGeometrygeometry_
 
GsfPropagatorAdapter gsfPropagator_
 
GsfMultiStateUpdator gsfUpdator_
 
const MagneticFieldmagField_
 
MultiTrajectoryStateTransform multiStateTransformer_
 
TransverseImpactPointExtrapolator tipExtrapolator_
 

Detailed Description

Definition at line 23 of file GsfConstraintAtVertex.h.

Constructor & Destructor Documentation

◆ GsfConstraintAtVertex()

GsfConstraintAtVertex::GsfConstraintAtVertex ( const TrackerGeometry geometry,
const MagneticField magField 
)
explicit

Definition at line 19 of file GsfConstraintAtVertex.cc.

21  magField_(magField),
const MagneticField * magField_
const TrackerGeometry * geometry_
GsfPropagatorAdapter gsfPropagator_
TransverseImpactPointExtrapolator tipExtrapolator_

Member Function Documentation

◆ constrainAtBeamSpot()

TrajectoryStateOnSurface GsfConstraintAtVertex::constrainAtBeamSpot ( const reco::GsfTrack track,
const reco::BeamSpot beamSpot 
) const

(multi)TSOS after including the beamspot

Definition at line 25 of file GsfConstraintAtVertex.cc.

References pwdgSkimBPark_cfi::beamSpot, constrainAtPoint(), and HLT_2022v11_cff::track.

Referenced by GsfElectronAlgo::ElectronData::calculateTSOS().

26  {
27  //
28  // Beamspot (global co-ordinates)
29  //
30  GlobalPoint bsPosGlobal(beamSpot.x0(), beamSpot.y0(), beamSpot.z0());
31  GlobalError bsCovGlobal(beamSpot.rotatedCovariance3D());
32  //
33  return constrainAtPoint(track, bsPosGlobal, bsCovGlobal);
34 }
TrajectoryStateOnSurface constrainAtPoint(const reco::GsfTrack &, const GlobalPoint &globalPosition, const GlobalError &globalError) const
(multi)TSOS after including a point with covariance matrix

◆ constrainAtPoint()

TrajectoryStateOnSurface GsfConstraintAtVertex::constrainAtPoint ( const reco::GsfTrack track,
const GlobalPoint globalPosition,
const GlobalError globalError 
) const

(multi)TSOS after including a point with covariance matrix

Definition at line 47 of file GsfConstraintAtVertex.cc.

References TRecHit2DPosConstraint::build(), TransverseImpactPointExtrapolator::extrapolate(), geometry_, gsfUpdator_, MultiTrajectoryStateTransform::innerStateOnSurface(), TrajectoryStateOnSurface::isValid(), magField_, multiStateTransformer_, TrajectoryStateOnSurface::surface(), tipExtrapolator_, GloballyPositioned< T >::toLocal(), HLT_2022v11_cff::track, ErrorFrameTransformer::transform(), and GsfMultiStateUpdator::update().

Referenced by constrainAtBeamSpot(), and constrainAtVertex().

49  {
50  //
51  // Track on TIP plane
52  //
54  if (!innerState.isValid())
55  return TrajectoryStateOnSurface();
56  TrajectoryStateOnSurface tipState = tipExtrapolator_.extrapolate(innerState, globalPosition);
57  if (!tipState.isValid())
58  return TrajectoryStateOnSurface();
59  //
60  // RecHit from beam spot
61  //
62  LocalError bsCovLocal = ErrorFrameTransformer().transform(globalError, tipState.surface());
63  auto bsHit =
64  TRecHit2DPosConstraint::build(tipState.surface().toLocal(globalPosition), bsCovLocal, &tipState.surface());
65  //
66  // update with constraint
67  //
68  TrajectoryStateOnSurface updatedState = gsfUpdator_.update(tipState, *bsHit);
69  if (!updatedState.isValid()) {
70  edm::LogWarning("GsfConstraintAtVertex") << " GSF update with vertex constraint failed";
71  return TrajectoryStateOnSurface();
72  }
73 
74  return updatedState;
75 }
static GlobalError transform(const LocalError &le, const Surface &surf)
static RecHitPointer build(const LocalPoint &pos, const LocalError &err, const Surface *surface)
TrajectoryStateOnSurface extrapolate(const FreeTrajectoryState &fts, const GlobalPoint &vtx) const
extrapolation with default (=geometrical) propagator
const SurfaceType & surface() const
LocalPoint toLocal(const GlobalPoint &gp) const
TrajectoryStateOnSurface innerStateOnSurface(const reco::GsfTrack &tk) const
MultiTrajectoryStateTransform multiStateTransformer_
const MagneticField * magField_
const TrackerGeometry * geometry_
GsfMultiStateUpdator gsfUpdator_
TransverseImpactPointExtrapolator tipExtrapolator_
Log< level::Warning, false > LogWarning
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override

◆ constrainAtVertex()

TrajectoryStateOnSurface GsfConstraintAtVertex::constrainAtVertex ( const reco::GsfTrack track,
const reco::Vertex vertex 
) const

(multi)TSOS after include a vertex

Definition at line 36 of file GsfConstraintAtVertex.cc.

References constrainAtPoint(), HLT_2022v11_cff::track, and bphysicsOniaDQM_cfi::vertex.

37  {
38  //
39  // Beamspot (global co-ordinates)
40  //
41  GlobalPoint vtxPosGlobal(vertex.position().x(), vertex.position().y(), vertex.position().z());
42  GlobalError vtxCovGlobal(vertex.covariance());
43  //
44  return constrainAtPoint(track, vtxPosGlobal, vtxCovGlobal);
45 }
TrajectoryStateOnSurface constrainAtPoint(const reco::GsfTrack &, const GlobalPoint &globalPosition, const GlobalError &globalError) const
(multi)TSOS after including a point with covariance matrix

Member Data Documentation

◆ geometry_

const TrackerGeometry* GsfConstraintAtVertex::geometry_
private

Definition at line 39 of file GsfConstraintAtVertex.h.

Referenced by constrainAtPoint().

◆ gsfPropagator_

GsfPropagatorAdapter GsfConstraintAtVertex::gsfPropagator_
private

Definition at line 41 of file GsfConstraintAtVertex.h.

◆ gsfUpdator_

GsfMultiStateUpdator GsfConstraintAtVertex::gsfUpdator_
private

Definition at line 38 of file GsfConstraintAtVertex.h.

Referenced by constrainAtPoint().

◆ magField_

const MagneticField* GsfConstraintAtVertex::magField_
private

Definition at line 40 of file GsfConstraintAtVertex.h.

Referenced by constrainAtPoint().

◆ multiStateTransformer_

MultiTrajectoryStateTransform GsfConstraintAtVertex::multiStateTransformer_
private

Definition at line 37 of file GsfConstraintAtVertex.h.

Referenced by constrainAtPoint().

◆ tipExtrapolator_

TransverseImpactPointExtrapolator GsfConstraintAtVertex::tipExtrapolator_
private

Definition at line 42 of file GsfConstraintAtVertex.h.

Referenced by constrainAtPoint().