CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
Enumerator
N 

Definition at line 19 of file MultiGaussianStateTransform.h.

Function Documentation

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

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

Definition at line 18 of file MultiGaussianStateTransform.cc.

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

19 {
20  const reco::GsfTrackExtraRef& extra(tk.gsfExtra());
21  return multiState(extra->innerStateLocalParameters(),
22  extra->innerStateCovariances(),
23  extra->innerStateWeights());
24 }
const GsfTrackExtraRef & gsfExtra() const
reference to &quot;extra&quot; object
Definition: GsfTrack.h:32
MultiGaussianState< N > multiState(const std::vector< MultiGaussianState< N >::Vector > &, const std::vector< MultiGaussianState< N >::Matrix > &, const std::vector< double > &)
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 41 of file MultiGaussianStateTransform.cc.

References edm::hlt::Exception, reco::GsfTrack::gsfExtra(), cmsHarvester::index, multiState1D(), and N.

43 {
44  if ( index>=N )
45  throw cms::Exception("LogicError") << "MultiGaussianStateTransform: index out of range";
46 
47  const reco::GsfTrackExtraRef& extra(tk.gsfExtra());
48  return multiState1D(extra->innerStateLocalParameters(),
49  extra->innerStateCovariances(),
50  extra->innerStateWeights(),
51  index);
52 }
MultiGaussianState1D multiState1D(const std::vector< MultiGaussianState< N >::Vector > &, const std::vector< MultiGaussianState< N >::Matrix > &, const std::vector< double > &, unsigned int)
const GsfTrackExtraRef & gsfExtra() const
reference to &quot;extra&quot; object
Definition: GsfTrack.h:32
#define N
Definition: blowfish.cc:9
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 55 of file MultiGaussianStateTransform.cc.

References makeMuonMisalignmentScenario::components, i, and Parameters::parameters.

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

58 {
59  unsigned int nc = parameters.size();
61  components.reserve(nc);
62  for ( unsigned int i=0; i<nc; ++i ) {
64  sgs(new MultiGaussianState<N>::SingleState(parameters[i],covariances[i],weights[i]));
65  components.push_back(sgs);
66  }
68 }
int i
Definition: DBlmapReader.cc:9
dictionary parameters
Definition: Parameters.py:2
Mixture of multi-variate gaussian states.
std::vector< SingleStatePtr > SingleStateContainer
boost::shared_ptr< SingleState > SingleStatePtr
MultiGaussianState< 5 > MultiGaussianStateTransform::multiState ( const TrajectoryStateOnSurface  tsos)

Construct a MultiGaussianState from a TrajectoryStateOnSurface (local parameters)

Definition at line 87 of file MultiGaussianStateTransform.cc.

References makeMuonMisalignmentScenario::components, TrajectoryStateOnSurface::components(), and i.

88 {
89  std::vector<TrajectoryStateOnSurface> tsosComponents(tsos.components());
91  components.reserve(tsosComponents.size());
92  for ( std::vector<TrajectoryStateOnSurface>::const_iterator i=tsosComponents.begin();
93  i!=tsosComponents.end(); ++i ) {
95  sgs(new MultiGaussianState<5>::SingleState(i->localParameters().vector(),
96  i->localError().matrix(),
97  i->weight()));
98  components.push_back(sgs);
99  }
101 }
int i
Definition: DBlmapReader.cc:9
Mixture of multi-variate gaussian states.
std::vector< SingleStatePtr > SingleStateContainer
std::vector< TrajectoryStateOnSurface > components() const
boost::shared_ptr< SingleState > SingleStatePtr
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 71 of file MultiGaussianStateTransform.cc.

References makeMuonMisalignmentScenario::components, i, and Parameters::parameters.

Referenced by MultiTrajectoryStateMode::chargeFromMode(), PFGsfHelper::computeQpMode(), ElectronMomentumCorrector::correct(), GsfTrackProducerBase::fillMode(), innerMultiState1D(), GsfTrackProducerBase::localParametersFromQpMode(), MultiTrajectoryStateMode::momentumFromModeLocal(), MultiTrajectoryStateMode::momentumFromModeP(), MultiTrajectoryStateMode::momentumFromModeQP(), outerMultiState1D(), and MultiTrajectoryStateMode::positionFromModeLocal().

74 {
75  unsigned int nc = parameters.size();
77  components.reserve(nc);
78  for ( unsigned int i=0; i<nc; ++i ) {
79  components.push_back(SingleGaussianState1D(parameters[i](index),
80  covariances[i](index,index),
81  weights[i]));
82  }
83  return MultiGaussianState1D(components);
84 }
int i
Definition: DBlmapReader.cc:9
dictionary parameters
Definition: Parameters.py:2
std::vector< SingleGaussianState1D > SingleState1dContainer
MultiGaussianState1D MultiGaussianStateTransform::multiState1D ( const TrajectoryStateOnSurface  tsos,
unsigned int  index 
)

Construct a MultiGaussianState1D from a TrajectoryStateOnSurface (local parameters)

Definition at line 104 of file MultiGaussianStateTransform.cc.

References makeMuonMisalignmentScenario::components, TrajectoryStateOnSurface::components(), edm::hlt::Exception, i, cmsHarvester::index, and N.

106 {
107  if ( index>=N )
108  throw cms::Exception("LogicError") << "MultiGaussianStateTransform: index out of range";
109  std::vector<TrajectoryStateOnSurface> tsosComponents(tsos.components());
111  components.reserve(tsosComponents.size());
112  for ( std::vector<TrajectoryStateOnSurface>::const_iterator i=tsosComponents.begin();
113  i!=tsosComponents.end(); ++i ) {
114  components.push_back(SingleGaussianState1D(i->localParameters().vector()(index),
115  i->localError().matrix()(index,index),
116  i->weight()));
117  }
118  return MultiGaussianState1D(components);
119 }
int i
Definition: DBlmapReader.cc:9
std::vector< SingleGaussianState1D > SingleState1dContainer
#define N
Definition: blowfish.cc:9
std::vector< TrajectoryStateOnSurface > components() const
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(),
13  extra->outerStateCovariances(),
14  extra->outerStateWeights());
15 }
const GsfTrackExtraRef & gsfExtra() const
reference to &quot;extra&quot; object
Definition: GsfTrack.h:32
MultiGaussianState< N > multiState(const std::vector< MultiGaussianState< N >::Vector > &, const std::vector< MultiGaussianState< N >::Matrix > &, const std::vector< double > &)
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 27 of file MultiGaussianStateTransform.cc.

References edm::hlt::Exception, reco::GsfTrack::gsfExtra(), cmsHarvester::index, multiState1D(), and N.

29 {
30  if ( index>=N )
31  throw cms::Exception("LogicError") << "MultiGaussianStateTransform: index out of range";
32 
33  const reco::GsfTrackExtraRef& extra(tk.gsfExtra());
34  return multiState1D(extra->outerStateLocalParameters(),
35  extra->outerStateCovariances(),
36  extra->outerStateWeights(),
37  index);
38 }
MultiGaussianState1D multiState1D(const std::vector< MultiGaussianState< N >::Vector > &, const std::vector< MultiGaussianState< N >::Matrix > &, const std::vector< double > &, unsigned int)
const GsfTrackExtraRef & gsfExtra() const
reference to &quot;extra&quot; object
Definition: GsfTrack.h:32
#define N
Definition: blowfish.cc:9
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 122 of file MultiGaussianStateTransform.cc.

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

124 {
125  const LocalTrajectoryParameters& refPars(refTsos.localParameters());
126  double pzSign = refPars.pzSign();
127  bool charged = refPars.charge()!=0;
128  LocalTrajectoryParameters pars(singleState.mean(),pzSign,charged);
129  LocalTrajectoryError errs(singleState.covariance());
130  // return state (doesn't use weight of the single state)
131  return TrajectoryStateOnSurface(pars,errs,refTsos.surface(),refTsos.magneticField());
132 }
const LocalTrajectoryParameters & localParameters() const
const Vector & mean() const
parameter vector
const MagneticField * magneticField() const
const Matrix & covariance() const
covariance matrix
const SurfaceType & surface() const
float pzSign() const
Sign of the z-component of the momentum in the local frame.