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.

16  {
17  const reco::GsfTrackExtraRef& extra(tk.gsfExtra());
18  return multiState(extra->innerStateLocalParameters(), extra->innerStateCovariances(), extra->innerStateWeights());
19 }

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

◆ 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.

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 }

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

◆ 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.

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 }

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

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

◆ 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.

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 }

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

◆ 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 
)

◆ 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.

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 }

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

◆ 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.

10  {
11  const reco::GsfTrackExtraRef& extra(tk.gsfExtra());
12  return multiState(extra->outerStateLocalParameters(), extra->outerStateCovariances(), extra->outerStateWeights());
13 }

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

◆ 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.

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 }

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

◆ 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.

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 }

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

BeamSpotPI::parameters
parameters
Definition: BeamSpotPayloadInspectorHelper.h:30
mps_fire.i
i
Definition: mps_fire.py:428
MultiGaussianState
Mixture of multi-variate gaussian states.
Definition: MultiGaussianState.h:18
SingleGaussianState::covariance
const Matrix & covariance() const
covariance matrix
Definition: SingleGaussianState.h:30
edm::Ref< GsfTrackExtraCollection >
LocalTrajectoryParameters
Definition: LocalTrajectoryParameters.h:25
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
GetComponents
Definition: GetComponents.h:4
HLT_FULL_cff.weights
weights
Definition: HLT_FULL_cff.py:99207
N
#define N
Definition: blowfish.cc:9
MultiGaussianState1D
Definition: MultiGaussianState1D.h:12
reco::GsfTrack::gsfExtra
const GsfTrackExtraRef & gsfExtra() const
reference to "extra" object
Definition: GsfTrack.h:31
TrajectoryStateOnSurface::localParameters
const LocalTrajectoryParameters & localParameters() const
Definition: TrajectoryStateOnSurface.h:73
LocalTrajectoryError
Definition: LocalTrajectoryError.h:20
MultiGaussianStateTransform::multiState
MultiGaussianState< N > multiState(const std::vector< MultiGaussianState< N >::Vector > &, const std::vector< MultiGaussianState< N >::Matrix > &, const std::vector< double > &)
Definition: MultiGaussianStateTransform.cc:39
LocalTrajectoryParameters::pzSign
float pzSign() const
Sign of the z-component of the momentum in the local frame.
Definition: LocalTrajectoryParameters.h:146
SingleGaussianState
Definition: SingleGaussianState.h:14
MultiGaussianState::SingleStatePtr
std::shared_ptr< SingleState > SingleStatePtr
Definition: MultiGaussianState.h:23
SingleGaussianState1D
Definition: SingleGaussianState1D.h:10
MultiGaussianState1D::SingleState1dContainer
std::vector< SingleGaussianState1D > SingleState1dContainer
Definition: MultiGaussianState1D.h:14
makeMuonMisalignmentScenario.components
string components
Definition: makeMuonMisalignmentScenario.py:58
Exception
Definition: hltDiff.cc:245
reco::GsfTrackExtra::dimension
Definition: GsfTrackExtra.h:19
TrajectoryStateOnSurface::surface
const SurfaceType & surface() const
Definition: TrajectoryStateOnSurface.h:78
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
MultiGaussianState::SingleStateContainer
std::vector< SingleStatePtr > SingleStateContainer
Definition: MultiGaussianState.h:25
MultiGaussianStateTransform::multiState1D
MultiGaussianState1D multiState1D(const std::vector< MultiGaussianState< N >::Vector > &, const std::vector< MultiGaussianState< N >::Matrix > &, const std::vector< double > &, unsigned int)
Definition: MultiGaussianStateTransform.cc:54
TrajectoryStateOnSurface::magneticField
const MagneticField * magneticField() const
Definition: TrajectoryStateOnSurface.h:62
SingleGaussianState::mean
const Vector & mean() const
parameter vector
Definition: SingleGaussianState.h:28