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 edm::EventSetup &)
 
 ~GsfConstraintAtVertex ()
 

Private Attributes

const TrackerGeometrygeometry_
 
GsfPropagatorAdaptergsfPropagator_
 
GsfMultiStateUpdator gsfUpdator_
 
const MagneticFieldmagField_
 
MultiTrajectoryStateTransform multiStateTransformer_
 
TransverseImpactPointExtrapolatortipExtrapolator_
 

Detailed Description

Definition at line 21 of file GsfConstraintAtVertex.h.

Constructor & Destructor Documentation

◆ GsfConstraintAtVertex()

GsfConstraintAtVertex::GsfConstraintAtVertex ( const edm::EventSetup setup)
explicit

Definition at line 20 of file GsfConstraintAtVertex.cc.

20  {
21  edm::ESHandle<TrackerGeometry> geometryHandle;
22  setup.get<TrackerDigiGeometryRecord>().get(geometryHandle);
23  geometry_ = geometryHandle.product();
24 
25  edm::ESHandle<MagneticField> magFieldHandle;
26  setup.get<IdealMagneticFieldRecord>().get(magFieldHandle);
27  magField_ = magFieldHandle.product();
28 
29  // edm::ESHandle<Propagator> propagatorHandle;
30  // setup.get<TrackingComponentsRecord>().get(propagatorName_,propagatorHandle);
31  // propagator_ = propagatorHandle.product();
34 }

References AnalyticalPropagator_cfi::AnalyticalPropagator, anyDirection, geometry_, get, gsfPropagator_, magField_, edm::ESHandle< T >::product(), singleTopDQM_cfi::setup, and tipExtrapolator_.

◆ ~GsfConstraintAtVertex()

GsfConstraintAtVertex::~GsfConstraintAtVertex ( )

Definition at line 36 of file GsfConstraintAtVertex.cc.

36  {
37  delete tipExtrapolator_;
38  delete gsfPropagator_;
39 }

References gsfPropagator_, and 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 41 of file GsfConstraintAtVertex.cc.

42  {
43  //
44  // Beamspot (global co-ordinates)
45  //
46  GlobalPoint bsPosGlobal(beamSpot.x0(), beamSpot.y0(), beamSpot.z0());
47  GlobalError bsCovGlobal(beamSpot.rotatedCovariance3D());
48  //
49  return constrainAtPoint(track, bsPosGlobal, bsCovGlobal);
50 }

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

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

◆ 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 63 of file GsfConstraintAtVertex.cc.

65  {
66  //
67  // Track on TIP plane
68  //
70  if (!innerState.isValid())
71  return TrajectoryStateOnSurface();
72  TrajectoryStateOnSurface tipState = tipExtrapolator_->extrapolate(innerState, globalPosition);
73  if (!tipState.isValid())
74  return TrajectoryStateOnSurface();
75  //
76  // RecHit from beam spot
77  //
78  LocalError bsCovLocal = ErrorFrameTransformer().transform(globalError, tipState.surface());
79  auto bsHit =
80  TRecHit2DPosConstraint::build(tipState.surface().toLocal(globalPosition), bsCovLocal, &tipState.surface());
81  //
82  // update with constraint
83  //
84  TrajectoryStateOnSurface updatedState = gsfUpdator_.update(tipState, *bsHit);
85  if (!updatedState.isValid()) {
86  edm::LogWarning("GsfConstraintAtVertex") << " GSF update with vertex constraint failed";
87  return TrajectoryStateOnSurface();
88  }
89 
90  return updatedState;
91 }

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

Referenced by constrainAtBeamSpot(), and constrainAtVertex().

◆ constrainAtVertex()

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

(multi)TSOS after include a vertex

Definition at line 52 of file GsfConstraintAtVertex.cc.

53  {
54  //
55  // Beamspot (global co-ordinates)
56  //
57  GlobalPoint vtxPosGlobal(vertex.position().x(), vertex.position().y(), vertex.position().z());
58  GlobalError vtxCovGlobal(vertex.covariance());
59  //
60  return constrainAtPoint(track, vtxPosGlobal, vtxCovGlobal);
61 }

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

Member Data Documentation

◆ geometry_

const TrackerGeometry* GsfConstraintAtVertex::geometry_
private

Definition at line 38 of file GsfConstraintAtVertex.h.

Referenced by constrainAtPoint(), and GsfConstraintAtVertex().

◆ gsfPropagator_

GsfPropagatorAdapter* GsfConstraintAtVertex::gsfPropagator_
private

Definition at line 40 of file GsfConstraintAtVertex.h.

Referenced by GsfConstraintAtVertex(), and ~GsfConstraintAtVertex().

◆ gsfUpdator_

GsfMultiStateUpdator GsfConstraintAtVertex::gsfUpdator_
private

Definition at line 37 of file GsfConstraintAtVertex.h.

Referenced by constrainAtPoint().

◆ magField_

const MagneticField* GsfConstraintAtVertex::magField_
private

Definition at line 39 of file GsfConstraintAtVertex.h.

Referenced by constrainAtPoint(), and GsfConstraintAtVertex().

◆ multiStateTransformer_

MultiTrajectoryStateTransform GsfConstraintAtVertex::multiStateTransformer_
private

Definition at line 36 of file GsfConstraintAtVertex.h.

Referenced by constrainAtPoint().

◆ tipExtrapolator_

TransverseImpactPointExtrapolator* GsfConstraintAtVertex::tipExtrapolator_
private
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
GsfConstraintAtVertex::gsfUpdator_
GsfMultiStateUpdator gsfUpdator_
Definition: GsfConstraintAtVertex.h:37
anyDirection
Definition: PropagationDirection.h:4
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
GsfConstraintAtVertex::magField_
const MagneticField * magField_
Definition: GsfConstraintAtVertex.h:39
GsfConstraintAtVertex::multiStateTransformer_
MultiTrajectoryStateTransform multiStateTransformer_
Definition: GsfConstraintAtVertex.h:36
TransverseImpactPointExtrapolator
Definition: TransverseImpactPointExtrapolator.h:26
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
ErrorFrameTransformer
Definition: ErrorFrameTransformer.h:12
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:16
edm::ESHandle< TrackerGeometry >
Point3DBase< float, GlobalTag >
AnalyticalPropagator_cfi.AnalyticalPropagator
AnalyticalPropagator
Definition: AnalyticalPropagator_cfi.py:3
GsfConstraintAtVertex::tipExtrapolator_
TransverseImpactPointExtrapolator * tipExtrapolator_
Definition: GsfConstraintAtVertex.h:41
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
LocalError
Definition: LocalError.h:12
GsfConstraintAtVertex::constrainAtPoint
TrajectoryStateOnSurface constrainAtPoint(const reco::GsfTrack &, const GlobalPoint &globalPosition, const GlobalError &globalError) const
(multi)TSOS after including a point with covariance matrix
Definition: GsfConstraintAtVertex.cc:63
GlobalErrorBase< double, ErrorMatrixTag >
GsfConstraintAtVertex::geometry_
const TrackerGeometry * geometry_
Definition: GsfConstraintAtVertex.h:38
get
#define get
TRecHit2DPosConstraint::build
static RecHitPointer build(const LocalPoint &pos, const LocalError &err, const Surface *surface)
Definition: TRecHit2DPosConstraint.h:59
GloballyPositioned::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Definition: GloballyPositioned.h:98
TransverseImpactPointExtrapolator::extrapolate
TrajectoryStateOnSurface extrapolate(const FreeTrajectoryState &fts, const GlobalPoint &vtx) const
extrapolation with default (=geometrical) propagator
Definition: TransverseImpactPointExtrapolator.cc:23
MultiTrajectoryStateTransform::innerStateOnSurface
TrajectoryStateOnSurface innerStateOnSurface(const reco::GsfTrack &tk) const
Definition: MultiTrajectoryStateTransform.cc:23
TrajectoryStateOnSurface::surface
const SurfaceType & surface() const
Definition: TrajectoryStateOnSurface.h:78
GsfConstraintAtVertex::gsfPropagator_
GsfPropagatorAdapter * gsfPropagator_
Definition: GsfConstraintAtVertex.h:40
GsfMultiStateUpdator::update
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
Definition: GsfMultiStateUpdator.cc:13
ErrorFrameTransformer::transform
static GlobalError transform(const LocalError &le, const Surface &surf)
Definition: ErrorFrameTransformer.h:16
GsfPropagatorAdapter
Definition: GsfPropagatorAdapter.h:14
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54