#include <SequentialGhostTrackFitter.h>
Public Member Functions | |
GhostTrackPrediction | fit (const GhostTrackFitter::PredictionUpdater &updater, const GhostTrackPrediction &prior, std::vector< GhostTrackState > &states, double &ndof, double &chi2) |
SequentialGhostTrackFitter () | |
~SequentialGhostTrackFitter () | |
Protected Member Functions | |
virtual void | postFit (const GhostTrackFitter::PredictionUpdater &updater, const GhostTrackPrediction &pred, std::vector< GhostTrackState > &states) |
virtual void | reset () |
virtual bool | stable (const GhostTrackPrediction &before, const GhostTrackPrediction &after) const |
Private Member Functions | |
virtual FitterImpl * | clone () const |
Private Attributes | |
unsigned int | maxIteration |
double | minDeltaR |
double | minDistance |
double | weightThreshold |
Definition at line 13 of file SequentialGhostTrackFitter.h.
SequentialGhostTrackFitter::SequentialGhostTrackFitter | ( | ) |
Definition at line 14 of file SequentialGhostTrackFitter.cc.
Referenced by clone().
: maxIteration(15), minDeltaR(0.0015), minDistance(0.002), weightThreshold(0.001) { }
reco::SequentialGhostTrackFitter::~SequentialGhostTrackFitter | ( | ) | [inline] |
Definition at line 16 of file SequentialGhostTrackFitter.h.
{}
virtual FitterImpl* reco::SequentialGhostTrackFitter::clone | ( | void | ) | const [inline, private, virtual] |
Implements reco::GhostTrackFitter::FitterImpl.
Reimplemented in reco::AnnealingGhostTrackFitter.
Definition at line 34 of file SequentialGhostTrackFitter.h.
References SequentialGhostTrackFitter().
{ return new SequentialGhostTrackFitter(*this); }
GhostTrackPrediction SequentialGhostTrackFitter::fit | ( | const GhostTrackFitter::PredictionUpdater & | updater, |
const GhostTrackPrediction & | prior, | ||
std::vector< GhostTrackState > & | states, | ||
double & | ndof, | ||
double & | chi2 | ||
) | [virtual] |
Implements reco::GhostTrackFitter::FitterImpl.
Definition at line 32 of file SequentialGhostTrackFitter.cc.
References i, align_cfg::iteration, reco::GhostTrackState::linearize(), maxIteration, postFit(), bookConverter::prior, reset(), stable(), evf::utils::state, reco::GhostTrackFitter::PredictionUpdater::update(), and weightThreshold.
Referenced by reco::GhostTrackVertexFinder::refitGhostTrack().
{ GhostTrackPrediction pred, lastPred = prior; reset(); ndof = 0.; chi2 = 0.; unsigned int iteration = 0; for(;;) { pred = prior; if (states.begin() == states.end()) break; if (iteration > 0) { for(unsigned int i = 0; i < states.size(); i++) { GhostTrackState &state = states[i]; state.linearize(lastPred); } } ndof = 0.; // prior gives us an initial ndof chi2 = 0.; for(std::vector<GhostTrackState>::const_iterator state = states.begin(); state != states.end(); ++state) { if (state->isValid() && state->weight() > weightThreshold) pred = updater.update(pred, *state, ndof, chi2); } if (++iteration >= maxIteration || stable(lastPred, pred)) break; postFit(updater, pred, states); lastPred = pred; } return pred; }
virtual void reco::SequentialGhostTrackFitter::postFit | ( | const GhostTrackFitter::PredictionUpdater & | updater, |
const GhostTrackPrediction & | pred, | ||
std::vector< GhostTrackState > & | states | ||
) | [inline, protected, virtual] |
Reimplemented in reco::AnnealingGhostTrackFitter.
Definition at line 28 of file SequentialGhostTrackFitter.h.
Referenced by fit().
{}
virtual void reco::SequentialGhostTrackFitter::reset | ( | void | ) | [inline, protected, virtual] |
Reimplemented in reco::AnnealingGhostTrackFitter.
Definition at line 27 of file SequentialGhostTrackFitter.h.
Referenced by fit().
{}
bool SequentialGhostTrackFitter::stable | ( | const GhostTrackPrediction & | before, |
const GhostTrackPrediction & | after | ||
) | const [protected, virtual] |
Reimplemented in reco::AnnealingGhostTrackFitter.
Definition at line 22 of file SequentialGhostTrackFitter.cc.
References reco::GhostTrackPrediction::eta(), reco::GhostTrackPrediction::ip(), minDeltaR, minDistance, reco::GhostTrackPrediction::phi(), funct::sqr(), and reco::GhostTrackPrediction::sz().
Referenced by fit().
unsigned int reco::SequentialGhostTrackFitter::maxIteration [private] |
Definition at line 37 of file SequentialGhostTrackFitter.h.
Referenced by fit().
double reco::SequentialGhostTrackFitter::minDeltaR [private] |
Definition at line 38 of file SequentialGhostTrackFitter.h.
Referenced by stable().
double reco::SequentialGhostTrackFitter::minDistance [private] |
Definition at line 39 of file SequentialGhostTrackFitter.h.
Referenced by stable().
double reco::SequentialGhostTrackFitter::weightThreshold [private] |
Definition at line 40 of file SequentialGhostTrackFitter.h.
Referenced by fit().