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 TransientTrackingRecHit &) 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 TransientTrackingRecHit 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(), and PosteriorWeightsCalculator::weights().

Referenced by python.Vispa.Gui.VispaWidget.VispaWidget::autosize(), GsfConstraintAtVertex::constrainAtPoint(), python.Vispa.Views.LineDecayView.LineDecayContainer::createObject(), python.Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), python.Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), python.Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), python.Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), python.Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), python.Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), python.Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), python.Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), python.Vispa.Gui.FindDialog.FindDialog::reset(), python.Vispa.Gui.PortConnection.PointToPointConnection::select(), python.Vispa.Gui.VispaWidget.VispaWidget::select(), python.Vispa.Views.LineDecayView.LineDecayContainer::select(), python.Vispa.Gui.VispaWidget.VispaWidget::setText(), python.Vispa.Gui.VispaWidget.VispaWidget::setTitle(), python.Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), python.Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and python.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()){
36  updatedTSOS.localError(), updatedTSOS.surface(),
37  &(tsos.globalParameters().magneticField()),
38  (*iter).surfaceSide(), weights[i]));
39  i++;
40  }
41  else{
42  edm::LogError("GsfMultiStateUpdator") << "one of the KF updated state is invalid. skipping.";
43  }
44 
45  }
46 
47  return result.combinedState();
48 }
int i
Definition: DBlmapReader.cc:9
const LocalTrajectoryParameters & localParameters() const
void addState(const TrajectoryStateOnSurface)
tuple result
Definition: query.py:137
const LocalTrajectoryError & localError() const
std::vector< double > weights(const TransientTrackingRecHit &tsos) const
Create random state.
const GlobalTrajectoryParameters & globalParameters() const
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const
Definition: KFUpdator.cc:10
const Surface & surface() const
const MagneticField & magneticField() const
std::vector< TrajectoryStateOnSurface > components() const