CMS 3D CMS Logo

List of all members | Public Member Functions
GsfMultiStateUpdator Class Reference

#include <GsfMultiStateUpdator.h>

Inheritance diagram for GsfMultiStateUpdator:
TrajectoryStateUpdator

Public Member Functions

GsfMultiStateUpdatorclone () const override
 
 GsfMultiStateUpdator ()
 
TrajectoryStateOnSurface update (const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
 
- Public Member Functions inherited from TrajectoryStateUpdator
 TrajectoryStateUpdator ()
 
virtual ~TrajectoryStateUpdator ()
 

Detailed Description

Class which updates a Gaussian mixture trajectory state with the information from a reconstructed hit according to the Gaussian-sum filter (GSF) strategy. The relevant formulas can be derived from those described in R. Fruhwirth, Computer Physics Communications 100 (1997), 1.

Definition at line 16 of file GsfMultiStateUpdator.h.

Constructor & Destructor Documentation

◆ GsfMultiStateUpdator()

GsfMultiStateUpdator::GsfMultiStateUpdator ( )
inline

Definition at line 18 of file GsfMultiStateUpdator.h.

Referenced by clone().

18 {}

Member Function Documentation

◆ clone()

GsfMultiStateUpdator* GsfMultiStateUpdator::clone ( void  ) const
inlineoverridevirtual

Implements TrajectoryStateUpdator.

Definition at line 22 of file GsfMultiStateUpdator.h.

References GsfMultiStateUpdator().

22 { return new GsfMultiStateUpdator(*this); }

◆ update()

TrajectoryStateOnSurface GsfMultiStateUpdator::update ( const TrajectoryStateOnSurface tsos,
const TrackingRecHit aRecHit 
) const
overridevirtual

Implements TrajectoryStateUpdator.

Definition at line 13 of file GsfMultiStateUpdator.cc.

References TrajectoryStateOnSurface::curvilinearError(), TrajectoryStateOnSurface::globalParameters(), mps_fire::i, TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), GlobalTrajectoryParameters::magneticField(), CurvilinearTrajectoryError::matrix(), LocalTrajectoryError::posDef(), mps_fire::result, TrajectoryStateOnSurface::surface(), KFUpdator::update(), LocalTrajectoryError::valid(), PosteriorWeightsCalculator::weights(), and HLT_2022v12_cff::weights.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), GsfConstraintAtVertex::constrainAtPoint(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

14  {
15  GetComponents comps(tsos);
16  auto const& predictedComponents = comps();
17  if (predictedComponents.empty()) {
18  edm::LogError("GsfMultiStateUpdator") << "Trying to update trajectory state with zero components! ";
19  return TrajectoryStateOnSurface();
20  }
21 
22  auto&& weights = PosteriorWeightsCalculator(predictedComponents).weights(aRecHit);
23  if (weights.empty()) {
24  edm::LogError("GsfMultiStateUpdator") << " no weights could be retreived. invalid updated state !.";
25  return TrajectoryStateOnSurface();
26  }
27 
29 
30  int i = 0;
31  for (auto const& tsosI : predictedComponents) {
32  TrajectoryStateOnSurface updatedTSOS = KFUpdator().update(tsosI, aRecHit);
33 
34  double det = 0;
35  if (updatedTSOS.isValid() && updatedTSOS.localError().valid() && updatedTSOS.localError().posDef() &&
36  (updatedTSOS.curvilinearError().matrix().Det2(det)) && det > 0) {
38  updatedTSOS.localParameters(),
39  updatedTSOS.localError(),
40  updatedTSOS.surface(),
41  &(tsos.globalParameters().magneticField()),
42  tsosI.surfaceSide()));
43  } else {
44  edm::LogError("GsfMultiStateUpdator") << "KF updated state " << i << " is invalid. skipping.";
45  }
46  ++i;
47  }
48 
49  return result.combinedState();
50 }
const LocalTrajectoryError & localError() const
const GlobalTrajectoryParameters & globalParameters() const
const LocalTrajectoryParameters & localParameters() const
Log< level::Error, false > LogError
const SurfaceType & surface() const
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
Definition: KFUpdator.cc:177
std::vector< double > weights(const TrackingRecHit &tsos) const
Create random state.
const CurvilinearTrajectoryError & curvilinearError() const
const AlgebraicSymMatrix55 & matrix() const
const MagneticField & magneticField() const