CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
GsfMultiStateUpdator Class Reference

#include <GsfMultiStateUpdator.h>

Inheritance diagram for GsfMultiStateUpdator:
TrajectoryStateUpdator

Public Member Functions

virtual GsfMultiStateUpdatorclone () const
 
 GsfMultiStateUpdator ()
 
TrajectoryStateOnSurface update (const TrajectoryStateOnSurface &, const TrackingRecHit &) const
 
- 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 ( )
inline

Definition at line 20 of file GsfMultiStateUpdator.h.

Referenced by clone().

20 {}

Member Function Documentation

virtual GsfMultiStateUpdator* GsfMultiStateUpdator::clone ( void  ) const
inlinevirtual

Implements TrajectoryStateUpdator.

Definition at line 25 of file GsfMultiStateUpdator.h.

References GsfMultiStateUpdator().

25  {
26  return new GsfMultiStateUpdator(*this);
27  }
TrajectoryStateOnSurface GsfMultiStateUpdator::update ( const TrajectoryStateOnSurface tsos,
const TrackingRecHit aRecHit 
) const
virtual

Implements TrajectoryStateUpdator.

Definition at line 13 of file GsfMultiStateUpdator.cc.

References MultiTrajectoryStateAssembler::addState(), MultiTrajectoryStateAssembler::combinedState(), TrajectoryStateOnSurface::components(), TrajectoryStateOnSurface::globalParameters(), i, TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), GlobalTrajectoryParameters::magneticField(), query::result, TrajectoryStateOnSurface::surface(), KFUpdator::update(), PosteriorWeightsCalculator::weights(), and create_public_pileup_plots::weights.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), GsfConstraintAtVertex::constrainAtPoint(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

14  {
15 
16  std::vector<TrajectoryStateOnSurface> && predictedComponents = tsos.components();
17  if (predictedComponents.empty()) {
18  edm::LogError("GsfMultiStateUpdator") << "Trying to update trajectory state with zero components! " ;
19  return TrajectoryStateOnSurface();
20  }
21 
22  std::vector<double> && 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 (std::vector<TrajectoryStateOnSurface>::const_iterator iter = predictedComponents.begin();
32  iter != predictedComponents.end(); iter++) {
33  TrajectoryStateOnSurface updatedTSOS = KFUpdator().update(*iter, aRecHit);
34  if (updatedTSOS.isValid()){
35  result.addState(TrajectoryStateOnSurface(weights[i],
36  updatedTSOS.localParameters(),
37  updatedTSOS.localError(), updatedTSOS.surface(),
38  &(tsos.globalParameters().magneticField()),
39  (*iter).surfaceSide()
40  ));
41  i++;
42  }
43  else{
44  edm::LogError("GsfMultiStateUpdator") << "one of the KF updated state is invalid. skipping.";
45  }
46 
47  }
48 
49  return result.combinedState();
50 }
int i
Definition: DBlmapReader.cc:9
const LocalTrajectoryParameters & localParameters() const
std::vector< double > weights(const TrackingRecHit &tsos) const
Create random state.
void addState(const TrajectoryStateOnSurface)
const SurfaceType & surface() const
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const
Definition: KFUpdator.cc:75
tuple result
Definition: query.py:137
const LocalTrajectoryError & localError() const
const GlobalTrajectoryParameters & globalParameters() const
const MagneticField & magneticField() const
std::vector< TrajectoryStateOnSurface > components() const