CMS 3D CMS Logo

Enumerations | Functions
MultiGaussianStateTransform Namespace Reference

Enumerations

enum  { N = reco::GsfTrackExtra::dimension }
 

Functions

MultiGaussianState< NinnerMultiState (const reco::GsfTrack &tk)
 
MultiGaussianState1D innerMultiState1D (const reco::GsfTrack &tk, unsigned int index)
 
MultiGaussianState< NmultiState (const std::vector< MultiGaussianState< N >::Vector > &, const std::vector< MultiGaussianState< N >::Matrix > &, const std::vector< double > &)
 
MultiGaussianState< 5 > multiState (const TrajectoryStateOnSurface)
 
MultiGaussianState1D multiState1D (const std::vector< MultiGaussianState< N >::Vector > &, const std::vector< MultiGaussianState< N >::Matrix > &, const std::vector< double > &, unsigned int)
 
MultiGaussianState1D multiState1D (const TrajectoryStateOnSurface, unsigned int)
 
MultiGaussianState< NouterMultiState (const reco::GsfTrack &tk)
 
MultiGaussianState1D outerMultiState1D (const reco::GsfTrack &tk, unsigned int index)
 
TrajectoryStateOnSurface tsosFromSingleState (const SingleGaussianState< 5 > &, const TrajectoryStateOnSurface)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator

Definition at line 19 of file MultiGaussianStateTransform.h.

Function Documentation

◆ innerMultiState()

MultiGaussianState< MultiGaussianStateTransform::N > MultiGaussianStateTransform::innerMultiState ( const reco::GsfTrack tk)

Construct a MultiGaussianState from the reco::GsfTrack innermost state (local parameters)

Definition at line 15 of file MultiGaussianStateTransform.cc.

References reco::GsfTrack::gsfExtra(), and multiState().

16  {
17  const reco::GsfTrackExtraRef& extra(tk.gsfExtra());
18  return multiState(extra->innerStateLocalParameters(), extra->innerStateCovariances(), extra->innerStateWeights());
19 }
const GsfTrackExtraRef & gsfExtra() const
reference to "extra" object
Definition: GsfTrack.h:31
MultiGaussianState< N > multiState(const std::vector< MultiGaussianState< N >::Vector > &, const std::vector< MultiGaussianState< N >::Matrix > &, const std::vector< double > &)

◆ innerMultiState1D()

MultiGaussianState1D MultiGaussianStateTransform::innerMultiState1D ( const reco::GsfTrack tk,
unsigned int  index 
)

Construct a MultiGaussianState1D for the local parameter corresponding to "index" (0<=index<5) from the reco::GsfTrack innermost state

Definition at line 30 of file MultiGaussianStateTransform.cc.

References Exception, reco::GsfTrack::gsfExtra(), multiState1D(), and N.

30  {
31  if (index >= N)
32  throw cms::Exception("LogicError") << "MultiGaussianStateTransform: index out of range";
33 
34  const reco::GsfTrackExtraRef& extra(tk.gsfExtra());
35  return multiState1D(
36  extra->innerStateLocalParameters(), extra->innerStateCovariances(), extra->innerStateWeights(), index);
37 }
MultiGaussianState1D multiState1D(const std::vector< MultiGaussianState< N >::Vector > &, const std::vector< MultiGaussianState< N >::Matrix > &, const std::vector< double > &, unsigned int)
#define N
Definition: blowfish.cc:9
const GsfTrackExtraRef & gsfExtra() const
reference to "extra" object
Definition: GsfTrack.h:31

◆ multiState() [1/2]

MultiGaussianState< MultiGaussianStateTransform::N > MultiGaussianStateTransform::multiState ( const std::vector< MultiGaussianState< N >::Vector > &  parameters,
const std::vector< MultiGaussianState< N >::Matrix > &  covariances,
const std::vector< double > &  weights 
)

Construct a MultiGaussianState from the vectors of parameters, covariances and weights

Definition at line 39 of file MultiGaussianStateTransform.cc.

References makeMuonMisalignmentScenario::components, mps_fire::i, and hltDeepSecondaryVertexTagInfosPFPuppi_cfi::weights.

Referenced by innerMultiState(), MultiTrajectoryStateMerger::merge(), outerMultiState(), GaussianStateConversions::tsosFromMultiGaussianState(), and GaussianStateConversions::vertexFromMultiGaussianState().

42  {
43  unsigned int nc = parameters.size();
45  components.reserve(nc);
46  for (unsigned int i = 0; i < nc; ++i) {
49  components.push_back(sgs);
50  }
52 }
Mixture of multi-variate gaussian states.
std::vector< SingleStatePtr > SingleStateContainer
std::shared_ptr< SingleState > SingleStatePtr

◆ multiState() [2/2]

MultiGaussianState< 5 > MultiGaussianStateTransform::multiState ( const TrajectoryStateOnSurface  tsos)

Construct a MultiGaussianState from a TrajectoryStateOnSurface (local parameters)

Definition at line 68 of file MultiGaussianStateTransform.cc.

References makeMuonMisalignmentScenario::components, and mps_fire::i.

68  {
69  GetComponents comps(tsos);
70  auto const& tsosComponents = comps();
72  components.reserve(tsosComponents.size());
73  for (auto i = tsosComponents.begin(); i != tsosComponents.end(); ++i) {
75  new MultiGaussianState<5>::SingleState(i->localParameters().vector(), i->localError().matrix(), i->weight()));
76  components.push_back(sgs);
77  }
79 }
Mixture of multi-variate gaussian states.
std::vector< SingleStatePtr > SingleStateContainer
std::shared_ptr< SingleState > SingleStatePtr

◆ multiState1D() [1/2]

MultiGaussianState1D MultiGaussianStateTransform::multiState1D ( const std::vector< MultiGaussianState< N >::Vector > &  parameters,
const std::vector< MultiGaussianState< N >::Matrix > &  covariances,
const std::vector< double > &  weights,
unsigned int  index 
)

Construct a MultiGaussianState1D from the vectors of parameters, covariances and weights

Definition at line 54 of file MultiGaussianStateTransform.cc.

References makeMuonMisalignmentScenario::components, mps_fire::i, and hltDeepSecondaryVertexTagInfosPFPuppi_cfi::weights.

Referenced by multiTrajectoryStateMode::chargeFromMode(), PFGsfHelper::computeQpMode(), egamma::correctElectronMomentum(), GsfTrackProducerBase::fillMode(), innerMultiState1D(), GsfTrackProducerBase::localParametersFromQpMode(), multiTrajectoryStateMode::momentumFromModeLocal(), multiTrajectoryStateMode::momentumFromModeP(), multiTrajectoryStateMode::momentumFromModeQP(), outerMultiState1D(), and multiTrajectoryStateMode::positionFromModeLocal().

◆ multiState1D() [2/2]

MultiGaussianState1D MultiGaussianStateTransform::multiState1D ( const TrajectoryStateOnSurface  tsos,
unsigned int  index 
)

Construct a MultiGaussianState1D from a TrajectoryStateOnSurface (local parameters)

Definition at line 81 of file MultiGaussianStateTransform.cc.

References makeMuonMisalignmentScenario::components, Exception, mps_fire::i, and N.

82  {
83  if (index >= N)
84  throw cms::Exception("LogicError") << "MultiGaussianStateTransform: index out of range";
85  GetComponents comps(tsos);
86  auto const& tsosComponents = comps();
88  components.reserve(tsosComponents.size());
89  for (auto i = tsosComponents.begin(); i != tsosComponents.end(); ++i) {
91  i->localParameters().vector()(index), i->localError().matrix()(index, index), i->weight()));
92  }
94 }
std::vector< SingleGaussianState1D > SingleState1dContainer
#define N
Definition: blowfish.cc:9

◆ outerMultiState()

MultiGaussianState< MultiGaussianStateTransform::N > MultiGaussianStateTransform::outerMultiState ( const reco::GsfTrack tk)

Construct a MultiGaussianState from the reco::GsfTrack innermost state (local parameters)

Definition at line 9 of file MultiGaussianStateTransform.cc.

References reco::GsfTrack::gsfExtra(), and multiState().

10  {
11  const reco::GsfTrackExtraRef& extra(tk.gsfExtra());
12  return multiState(extra->outerStateLocalParameters(), extra->outerStateCovariances(), extra->outerStateWeights());
13 }
const GsfTrackExtraRef & gsfExtra() const
reference to "extra" object
Definition: GsfTrack.h:31
MultiGaussianState< N > multiState(const std::vector< MultiGaussianState< N >::Vector > &, const std::vector< MultiGaussianState< N >::Matrix > &, const std::vector< double > &)

◆ outerMultiState1D()

MultiGaussianState1D MultiGaussianStateTransform::outerMultiState1D ( const reco::GsfTrack tk,
unsigned int  index 
)

Construct a MultiGaussianState1D for the local parameter corresponding to "index" (0<=index<5) from the reco::GsfTrack outermost state

Definition at line 21 of file MultiGaussianStateTransform.cc.

References Exception, reco::GsfTrack::gsfExtra(), multiState1D(), and N.

21  {
22  if (index >= N)
23  throw cms::Exception("LogicError") << "MultiGaussianStateTransform: index out of range";
24 
25  const reco::GsfTrackExtraRef& extra(tk.gsfExtra());
26  return multiState1D(
27  extra->outerStateLocalParameters(), extra->outerStateCovariances(), extra->outerStateWeights(), index);
28 }
MultiGaussianState1D multiState1D(const std::vector< MultiGaussianState< N >::Vector > &, const std::vector< MultiGaussianState< N >::Matrix > &, const std::vector< double > &, unsigned int)
#define N
Definition: blowfish.cc:9
const GsfTrackExtraRef & gsfExtra() const
reference to "extra" object
Definition: GsfTrack.h:31

◆ tsosFromSingleState()

TrajectoryStateOnSurface MultiGaussianStateTransform::tsosFromSingleState ( const SingleGaussianState< 5 > &  singleState,
const TrajectoryStateOnSurface  refTsos 
)

Construct a TrajectoryStateOnSurface from a 5D SingleGaussianState (local parameters) and a reference TSOS (surface, charge, ..)

Definition at line 96 of file MultiGaussianStateTransform.cc.

References SingleGaussianState< N >::covariance(), TrajectoryStateOnSurface::localParameters(), TrajectoryStateOnSurface::magneticField(), SingleGaussianState< N >::mean(), LocalTrajectoryParameters::pzSign(), and TrajectoryStateOnSurface::surface().

97  {
98  const LocalTrajectoryParameters& refPars(refTsos.localParameters());
99  double pzSign = refPars.pzSign();
100  bool charged = refPars.charge() != 0;
101  LocalTrajectoryParameters pars(singleState.mean(), pzSign, charged);
102  LocalTrajectoryError errs(singleState.covariance());
103  // return state (doesn't use weight of the single state)
104  return TrajectoryStateOnSurface(pars, errs, refTsos.surface(), refTsos.magneticField());
105 }
float pzSign() const
Sign of the z-component of the momentum in the local frame.
const LocalTrajectoryParameters & localParameters() const
const SurfaceType & surface() const
const Matrix & covariance() const
covariance matrix
const Vector & mean() const
parameter vector
const MagneticField * magneticField() const