#include <KFSplittingFitter.h>
Public Member Functions | |
virtual KFSplittingFitter * | clone () const |
virtual std::vector< Trajectory > | fit (const TrajectorySeed &aSeed, const RecHitContainer &hits, const TSOS &firstPredTsos) const |
virtual std::vector< Trajectory > | fit (const Trajectory &aTraj) const |
KFSplittingFitter (const Propagator &aPropagator, const TrajectoryStateUpdator &aUpdator, const MeasurementEstimator &aEstimator) | |
KFSplittingFitter (const Propagator *aPropagator, const TrajectoryStateUpdator *aUpdator, const MeasurementEstimator *aEstimator) | |
Private Types | |
typedef FreeTrajectoryState | FTS |
typedef TrajectoryMeasurement | TM |
typedef TrajectoryStateOnSurface | TSOS |
Definition at line 15 of file KFSplittingFitter.h.
typedef FreeTrajectoryState KFSplittingFitter::FTS [private] |
Reimplemented from KFTrajectoryFitter.
Definition at line 20 of file KFSplittingFitter.h.
typedef TrajectoryMeasurement KFSplittingFitter::TM [private] |
Reimplemented from KFTrajectoryFitter.
Definition at line 21 of file KFSplittingFitter.h.
typedef TrajectoryStateOnSurface KFSplittingFitter::TSOS [private] |
Reimplemented from KFTrajectoryFitter.
Definition at line 19 of file KFSplittingFitter.h.
KFSplittingFitter::KFSplittingFitter | ( | const Propagator & | aPropagator, |
const TrajectoryStateUpdator & | aUpdator, | ||
const MeasurementEstimator & | aEstimator | ||
) | [inline] |
Definition at line 25 of file KFSplittingFitter.h.
Referenced by clone().
: KFTrajectoryFitter(aPropagator, aUpdator, aEstimator) {}
KFSplittingFitter::KFSplittingFitter | ( | const Propagator * | aPropagator, |
const TrajectoryStateUpdator * | aUpdator, | ||
const MeasurementEstimator * | aEstimator | ||
) | [inline] |
Definition at line 31 of file KFSplittingFitter.h.
: KFTrajectoryFitter(aPropagator, aUpdator, aEstimator) {}
virtual KFSplittingFitter* KFSplittingFitter::clone | ( | void | ) | const [inline, virtual] |
Reimplemented from KFTrajectoryFitter.
Definition at line 36 of file KFSplittingFitter.h.
References KFTrajectoryFitter::estimator(), KFSplittingFitter(), KFTrajectoryFitter::propagator(), and KFTrajectoryFitter::updator().
{ return new KFSplittingFitter(propagator(),updator(),estimator()); }
std::vector< Trajectory > KFSplittingFitter::fit | ( | const TrajectorySeed & | aSeed, |
const RecHitContainer & | hits, | ||
const TSOS & | firstPredTsos | ||
) | const [virtual] |
Reimplemented from KFTrajectoryFitter.
Definition at line 40 of file KFSplittingFitter.cc.
References TrajectorySeed::direction(), fit(), query::result, RecHitSorter::sortHits(), and RecHitSplitter::split().
{ RecHitContainer result; result.reserve(hits.size()); for(RecHitContainer::const_iterator ihit = hits.begin(); ihit != hits.end(); ihit++) { if(!(**ihit).isValid()) result.push_back(*ihit); else if((**ihit).transientHits().size() == 1) result.push_back(*ihit); else { RecHitContainer splitted = RecHitSplitter().split((**ihit).transientHits()); RecHitContainer sorted = RecHitSorter().sortHits(splitted, aSeed.direction()); for (RecHitContainer::iterator srt = sorted.begin(); srt != sorted.end(); srt++) { result.push_back(*srt); // result.insert(result.end(), sorted.begin(), sorted.end()); } } } return KFTrajectoryFitter::fit(aSeed, result, firstPredTsos); }
std::vector< Trajectory > KFSplittingFitter::fit | ( | const Trajectory & | aTraj | ) | const [virtual] |
Reimplemented from KFTrajectoryFitter.
Definition at line 7 of file KFSplittingFitter.cc.
References Trajectory::direction(), Trajectory::empty(), Trajectory::firstMeasurement(), TrajectoryMeasurement::predictedState(), Trajectory::recHits(), query::result, Trajectory::seed(), RecHitSorter::sortHits(), and RecHitSplitter::split().
Referenced by fit().
{ typedef RecHitSplitter::RecHitContainer RecHitContainer; if(aTraj.empty()) return std::vector<Trajectory>(); TM firstTM = aTraj.firstMeasurement(); TSOS firstTsos = TrajectoryStateWithArbitraryError()(firstTM.predictedState()); RecHitContainer hits = aTraj.recHits(); RecHitContainer result; result.reserve(hits.size()); for(RecHitContainer::iterator ihit = hits.begin(); ihit != hits.end(); ihit++) { if(!(**ihit).isValid()) result.push_back(*ihit); else if((**ihit).transientHits().size() == 1) result.push_back(*ihit); else { RecHitContainer splitted = RecHitSplitter().split((**ihit).transientHits()); RecHitContainer sorted = RecHitSorter().sortHits(splitted, aTraj.direction()); for (RecHitContainer::iterator srt = sorted.begin(); srt != sorted.end(); srt++) { result.push_back(*srt); // result.insert(result.end(), sorted.begin(), sorted.end()); } } } return KFTrajectoryFitter::fit(aTraj.seed(), result, firstTsos); }