#include <GsfMultiStateUpdator.h>
Public Member Functions | |
virtual GsfMultiStateUpdator * | clone () const |
GsfMultiStateUpdator () | |
TrajectoryStateOnSurface | update (const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const |
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.
GsfMultiStateUpdator::GsfMultiStateUpdator | ( | ) | [inline] |
virtual GsfMultiStateUpdator* GsfMultiStateUpdator::clone | ( | void | ) | const [inline, virtual] |
Implements TrajectoryStateUpdator.
Definition at line 25 of file GsfMultiStateUpdator.h.
References GsfMultiStateUpdator().
{ return new GsfMultiStateUpdator(*this); }
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 GsfConstraintAtVertex::constrainAtPoint().
{ std::vector<TrajectoryStateOnSurface> predictedComponents = tsos.components(); if (predictedComponents.empty()) { edm::LogError("GsfMultiStateUpdator") << "Trying to update trajectory state with zero components! " ; return TrajectoryStateOnSurface(); } std::vector<double> weights = PosteriorWeightsCalculator(predictedComponents).weights(aRecHit); if ( weights.empty() ) { edm::LogError("GsfMultiStateUpdator") << " no weights could be retreived. invalid updated state !."; return TrajectoryStateOnSurface(); } MultiTrajectoryStateAssembler result; int i = 0; for (std::vector<TrajectoryStateOnSurface>::const_iterator iter = predictedComponents.begin(); iter != predictedComponents.end(); iter++) { TrajectoryStateOnSurface updatedTSOS = KFUpdator().update(*iter, aRecHit); if (updatedTSOS.isValid()){ result.addState(TrajectoryStateOnSurface(updatedTSOS.localParameters(), updatedTSOS.localError(), updatedTSOS.surface(), &(tsos.globalParameters().magneticField()), (*iter).surfaceSide(), weights[i])); i++; } else{ edm::LogError("GsfMultiStateUpdator") << "one of the KF updated state is invalid. skipping."; } } return result.combinedState(); }