CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
MultiTrajectoryStateTransform Class Reference

#include <MultiTrajectoryStateTransform.h>

Public Member Functions

TrajectoryStateOnSurface extrapolatedState (const TrajectoryStateOnSurface tsos, const GlobalPoint &point) const
 
bool innerMomentumFromMode (const reco::GsfTrack &tk, GlobalVector &momentum) const
 
TrajectoryStateOnSurface innerStateOnSurface (const reco::GsfTrack &tk) const
 
 MultiTrajectoryStateTransform ()
 
 MultiTrajectoryStateTransform (const TrackingGeometry *geom, const MagneticField *field)
 
bool outerMomentumFromMode (const reco::GsfTrack &tk, GlobalVector &momentum) const
 
TrajectoryStateOnSurface outerStateOnSurface (const reco::GsfTrack &tk) const
 
 ~MultiTrajectoryStateTransform ()
 

Static Public Member Functions

static TrajectoryStateOnSurface innerStateOnSurface (const reco::GsfTrack &tk, const TrackingGeometry &geom, const MagneticField *field)
 
static TrajectoryStateOnSurface outerStateOnSurface (const reco::GsfTrack &tk, const TrackingGeometry &geom, const MagneticField *field)
 

Private Types

enum  { dimension = reco::GsfTrackExtra::dimension }
 
typedef reco::GsfTrackExtra::LocalCovarianceMatrix CovarianceMatrix
 
typedef reco::GsfTrackExtra::LocalParameterVector ParameterVector
 

Private Member Functions

bool checkExtrapolator () const
 
bool checkGeometry () const
 

Static Private Member Functions

static TrajectoryStateOnSurface stateOnSurface (const std::vector< double > &weights, const std::vector< ParameterVector > &parameters, const std::vector< CovarianceMatrix > &covariances, const double &pzSign, const Surface &surface, const MagneticField *field)
 

Private Attributes

TransverseImpactPointExtrapolatorextrapolator_
 
const MagneticFieldfield_
 
const TrackingGeometrygeometry_
 

Detailed Description

Definition at line 18 of file MultiTrajectoryStateTransform.h.

Member Typedef Documentation

◆ CovarianceMatrix

Definition at line 21 of file MultiTrajectoryStateTransform.h.

◆ ParameterVector

Definition at line 20 of file MultiTrajectoryStateTransform.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
dimension 

Definition at line 22 of file MultiTrajectoryStateTransform.h.

Constructor & Destructor Documentation

◆ MultiTrajectoryStateTransform() [1/2]

MultiTrajectoryStateTransform::MultiTrajectoryStateTransform ( )
inline

Default constructor (deprecated) -> ES components have to be passed explicitely

Definition at line 26 of file MultiTrajectoryStateTransform.h.

26 : geometry_(nullptr), field_(nullptr), extrapolator_(nullptr) {}

◆ MultiTrajectoryStateTransform() [2/2]

MultiTrajectoryStateTransform::MultiTrajectoryStateTransform ( const TrackingGeometry geom,
const MagneticField field 
)
inline

Constructor from geometry and magnetic field

Definition at line 28 of file MultiTrajectoryStateTransform.h.

29  : geometry_(geom), field_(field), extrapolator_(nullptr) {}

◆ ~MultiTrajectoryStateTransform()

MultiTrajectoryStateTransform::~MultiTrajectoryStateTransform ( )

Destructor

Definition at line 17 of file MultiTrajectoryStateTransform.cc.

17 { delete extrapolator_; }

References extrapolator_.

Member Function Documentation

◆ checkExtrapolator()

bool MultiTrajectoryStateTransform::checkExtrapolator ( ) const
private

On-demand creation of a TransverseImpactPointExtrapolator

Definition at line 109 of file MultiTrajectoryStateTransform.cc.

109  {
110  if (extrapolator_)
111  return true;
112 
113  if (field_ == nullptr) {
114  edm::LogError("MultiTrajectoryStateTransform") << "Missing magnetic field";
115  return false;
116  }
117 
120  return true;
121 }

References AnalyticalPropagator_cfi::AnalyticalPropagator, anyDirection, extrapolator_, and field_.

Referenced by extrapolatedState().

◆ checkGeometry()

bool MultiTrajectoryStateTransform::checkGeometry ( ) const
private

Verification of the presence of geometry and field

Definition at line 96 of file MultiTrajectoryStateTransform.cc.

96  {
97  if (geometry_ && field_)
98  return true;
99 
100  edm::LogError("MultiTrajectoryStateTransform") << "Missing ES components";
101  return false;
102 }

References field_, and geometry_.

Referenced by innerStateOnSurface(), and outerStateOnSurface().

◆ extrapolatedState()

TrajectoryStateOnSurface MultiTrajectoryStateTransform::extrapolatedState ( const TrajectoryStateOnSurface  tsos,
const GlobalPoint point 
) const

◆ innerMomentumFromMode()

bool MultiTrajectoryStateTransform::innerMomentumFromMode ( const reco::GsfTrack tk,
GlobalVector momentum 
) const

Momentum vector from mode corresponding to the innermost state. Returns true for success.

Definition at line 31 of file MultiTrajectoryStateTransform.cc.

References multiTrajectoryStateMode::momentumFromModeCartesian(), and outerStateOnSurface().

◆ innerStateOnSurface() [1/2]

TrajectoryStateOnSurface MultiTrajectoryStateTransform::innerStateOnSurface ( const reco::GsfTrack tk) const

◆ innerStateOnSurface() [2/2]

TrajectoryStateOnSurface MultiTrajectoryStateTransform::innerStateOnSurface ( const reco::GsfTrack tk,
const TrackingGeometry geom,
const MagneticField field 
)
static

TrajectoryStateOnSurface from the innermost state of a reco::GsfTrack passing geometry and magnetic field (deprecated: use field from constructor)

Definition at line 49 of file MultiTrajectoryStateTransform.cc.

51  {
52  const Surface& surface = geom.idToDet(DetId(tk.extra()->innerDetId()))->surface();
53 
54  const reco::GsfTrackExtraRef& extra(tk.gsfExtra());
55  return stateOnSurface(extra->innerStateWeights(),
56  extra->innerStateLocalParameters(),
57  extra->innerStateCovariances(),
58  extra->innerStateLocalPzSign(),
59  surface,
60  field);
61 }

References reco::Track::extra(), relativeConstraints::geom, reco::GsfTrack::gsfExtra(), and stateOnSurface().

◆ outerMomentumFromMode()

bool MultiTrajectoryStateTransform::outerMomentumFromMode ( const reco::GsfTrack tk,
GlobalVector momentum 
) const

Momentum vector from mode corresponding to the outermost state

Definition at line 27 of file MultiTrajectoryStateTransform.cc.

References multiTrajectoryStateMode::momentumFromModeCartesian(), and outerStateOnSurface().

◆ outerStateOnSurface() [1/2]

TrajectoryStateOnSurface MultiTrajectoryStateTransform::outerStateOnSurface ( const reco::GsfTrack tk) const

◆ outerStateOnSurface() [2/2]

TrajectoryStateOnSurface MultiTrajectoryStateTransform::outerStateOnSurface ( const reco::GsfTrack tk,
const TrackingGeometry geom,
const MagneticField field 
)
static

TrajectoryStateOnSurface from the outermost state of a reco::GsfTrack passing geometry and magnetic field (deprecated: use field from constructor)

Definition at line 35 of file MultiTrajectoryStateTransform.cc.

37  {
38  const Surface& surface = geom.idToDet(DetId(tk.extra()->outerDetId()))->surface();
39 
40  const reco::GsfTrackExtraRef& extra(tk.gsfExtra());
41  return stateOnSurface(extra->outerStateWeights(),
42  extra->outerStateLocalParameters(),
43  extra->outerStateCovariances(),
44  extra->outerStateLocalPzSign(),
45  surface,
46  field);
47 }

References reco::Track::extra(), relativeConstraints::geom, reco::GsfTrack::gsfExtra(), and stateOnSurface().

◆ stateOnSurface()

TrajectoryStateOnSurface MultiTrajectoryStateTransform::stateOnSurface ( const std::vector< double > &  weights,
const std::vector< ParameterVector > &  parameters,
const std::vector< CovarianceMatrix > &  covariances,
const double &  pzSign,
const Surface surface,
const MagneticField field 
)
staticprivate

TSOS from a mixture in local parameters

Definition at line 63 of file MultiTrajectoryStateTransform.cc.

68  {
69  if (weights.empty())
70  return TrajectoryStateOnSurface();
71 
72  unsigned int nc(weights.size());
73  AlgebraicVector5 pars;
75 
76  std::vector<TrajectoryStateOnSurface> components;
77  components.reserve(nc);
78 
79  // create components TSOSs
80  for (unsigned int i = 0; i < nc; i++) {
81  // convert parameter vector and covariance matrix
82  for (unsigned int j1 = 0; j1 < dimension; j1++) {
83  pars[j1] = parameters[i](j1);
84  for (unsigned int j2 = 0; j2 <= j1; j2++)
85  cov(j1, j2) = covariances[i](j1, j2); //FIXME: SMatrix copy constructor should handle this!!
86  }
87  // create local parameters & errors
88  LocalTrajectoryParameters lp(pars, pzSign);
89  LocalTrajectoryError le(cov);
90  // create component
91  components.push_back(TrajectoryStateOnSurface(weights[i], lp, le, surface, field));
92  }
94 }

References makeMuonMisalignmentScenario::components, dimension, mps_fire::i, and HLT_FULL_cff::weights.

Referenced by innerStateOnSurface(), and outerStateOnSurface().

Member Data Documentation

◆ extrapolator_

TransverseImpactPointExtrapolator* MultiTrajectoryStateTransform::extrapolator_
mutableprivate

◆ field_

const MagneticField* MultiTrajectoryStateTransform::field_
private

◆ geometry_

const TrackingGeometry* MultiTrajectoryStateTransform::geometry_
private
BeamSpotPI::parameters
parameters
Definition: BeamSpotPayloadInspectorHelper.h:30
mps_fire.i
i
Definition: mps_fire.py:428
anyDirection
Definition: PropagationDirection.h:4
BasicMultiTrajectoryState
Definition: BasicMultiTrajectoryState.h:17
MultiTrajectoryStateTransform::geometry_
const TrackingGeometry * geometry_
Definition: MultiTrajectoryStateTransform.h:72
Surface
Definition: Surface.h:36
multiTrajectoryStateMode::momentumFromModeCartesian
bool momentumFromModeCartesian(TrajectoryStateOnSurface const &tsos, GlobalVector &momentum)
Definition: MultiTrajectoryStateMode.cc:16
TransverseImpactPointExtrapolator
Definition: TransverseImpactPointExtrapolator.h:26
reco::Track::extra
const TrackExtraRef & extra() const
reference to "extra" object
Definition: Track.h:139
edm::Ref< GsfTrackExtraCollection >
MultiTrajectoryStateTransform::outerStateOnSurface
TrajectoryStateOnSurface outerStateOnSurface(const reco::GsfTrack &tk) const
Definition: MultiTrajectoryStateTransform.cc:19
LocalTrajectoryParameters
Definition: LocalTrajectoryParameters.h:25
DetId
Definition: DetId.h:17
MultiTrajectoryStateTransform::extrapolator_
TransverseImpactPointExtrapolator * extrapolator_
Definition: MultiTrajectoryStateTransform.h:74
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
MultiTrajectoryStateTransform::checkGeometry
bool checkGeometry() const
Definition: MultiTrajectoryStateTransform.cc:96
HLT_FULL_cff.weights
weights
Definition: HLT_FULL_cff.py:99207
MultiTrajectoryStateTransform::checkExtrapolator
bool checkExtrapolator() const
Definition: MultiTrajectoryStateTransform.cc:109
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
reco::GsfTrack::gsfExtra
const GsfTrackExtraRef & gsfExtra() const
reference to "extra" object
Definition: GsfTrack.h:31
AnalyticalPropagator_cfi.AnalyticalPropagator
AnalyticalPropagator
Definition: AnalyticalPropagator_cfi.py:3
LocalTrajectoryError
Definition: LocalTrajectoryError.h:20
MultiTrajectoryStateTransform::stateOnSurface
static TrajectoryStateOnSurface stateOnSurface(const std::vector< double > &weights, const std::vector< ParameterVector > &parameters, const std::vector< CovarianceMatrix > &covariances, const double &pzSign, const Surface &surface, const MagneticField *field)
Definition: MultiTrajectoryStateTransform.cc:63
MultiTrajectoryStateTransform::dimension
Definition: MultiTrajectoryStateTransform.h:22
BasicTrajectoryState
Definition: BasicTrajectoryState.h:66
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
AlgebraicVector5
ROOT::Math::SVector< double, 5 > AlgebraicVector5
Definition: AlgebraicROOTObjects.h:14
makeMuonMisalignmentScenario.components
string components
Definition: makeMuonMisalignmentScenario.py:58
MultiTrajectoryStateTransform::field_
const MagneticField * field_
Definition: MultiTrajectoryStateTransform.h:73
reco::GsfTrackExtra::dimension
Definition: GsfTrackExtra.h:19
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
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
GsfPropagatorAdapter
Definition: GsfPropagatorAdapter.h:14
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23