CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
KFSplittingFitter Class Referencefinal

#include <KFSplittingFitter.h>

Inheritance diagram for KFSplittingFitter:
TrajectoryFitter

Public Member Functions

std::unique_ptr< TrajectoryFitterclone () const override
 
Trajectory fitOne (const Trajectory &aTraj, fitType type) const override
 
Trajectory fitOne (const TrajectorySeed &aSeed, const RecHitContainer &hits, fitType type) const override
 
Trajectory fitOne (const TrajectorySeed &aSeed, const RecHitContainer &hits, const TSOS &firstPredTsos, fitType type) const override
 
 KFSplittingFitter (const Propagator &aPropagator, const TrajectoryStateUpdator &aUpdator, const MeasurementEstimator &aEstimator)
 
 KFSplittingFitter (const Propagator *aPropagator, const TrajectoryStateUpdator *aUpdator, const MeasurementEstimator *aEstimator)
 
void setHitCloner (TkCloner const *hc) override
 
- Public Member Functions inherited from TrajectoryFitter
std::vector< Trajectoryfit (const Trajectory &traj, fitType type=standard) const
 
std::vector< Trajectoryfit (const TrajectorySeed &seed, const RecHitContainer &hits, fitType type=standard) const
 
std::vector< Trajectoryfit (const TrajectorySeed &seed, const RecHitContainer &hits, const TrajectoryStateOnSurface &tsos, fitType type=standard) const
 
virtual ~TrajectoryFitter ()
 

Private Types

typedef FreeTrajectoryState FTS
 
typedef
RecHitSplitter::RecHitContainer 
RecHitContainer
 
typedef TrajectoryMeasurement TM
 
typedef TrajectoryStateOnSurface TSOS
 

Private Member Functions

void sorter (const RecHitContainer &hits, PropagationDirection dir, RecHitContainer &result) const
 

Private Attributes

KFTrajectoryFitter fitter
 

Additional Inherited Members

- Public Types inherited from TrajectoryFitter
enum  fitType { standard = 0, looper = 1 }
 
typedef Trajectory::RecHitContainer RecHitContainer
 
typedef TrajectoryFitterRecord Record
 

Detailed Description

Definition at line 14 of file KFSplittingFitter.h.

Member Typedef Documentation

Definition at line 19 of file KFSplittingFitter.h.

Definition at line 16 of file KFSplittingFitter.h.

Definition at line 20 of file KFSplittingFitter.h.

Definition at line 18 of file KFSplittingFitter.h.

Constructor & Destructor Documentation

KFSplittingFitter::KFSplittingFitter ( const Propagator aPropagator,
const TrajectoryStateUpdator aUpdator,
const MeasurementEstimator aEstimator 
)
inline

Definition at line 23 of file KFSplittingFitter.h.

Referenced by clone().

26  : fitter(aPropagator, aUpdator, aEstimator) {}
KFTrajectoryFitter fitter
KFSplittingFitter::KFSplittingFitter ( const Propagator aPropagator,
const TrajectoryStateUpdator aUpdator,
const MeasurementEstimator aEstimator 
)
inline

Definition at line 28 of file KFSplittingFitter.h.

31  : fitter(aPropagator, aUpdator, aEstimator) {}
KFTrajectoryFitter fitter

Member Function Documentation

std::unique_ptr<TrajectoryFitter> KFSplittingFitter::clone ( void  ) const
inlineoverridevirtual

Implements TrajectoryFitter.

Definition at line 33 of file KFSplittingFitter.h.

References KFTrajectoryFitter::estimator(), fitter, KFSplittingFitter(), KFTrajectoryFitter::propagator(), and KFTrajectoryFitter::updator().

33  {
34  return std::unique_ptr<TrajectoryFitter>(
36  }
const TrajectoryStateUpdator * updator() const
const MeasurementEstimator * estimator() const
KFSplittingFitter(const Propagator &aPropagator, const TrajectoryStateUpdator &aUpdator, const MeasurementEstimator &aEstimator)
KFTrajectoryFitter fitter
const Propagator * propagator() const
Trajectory KFSplittingFitter::fitOne ( const Trajectory aTraj,
fitType  type 
) const
overridevirtual

Implements TrajectoryFitter.

Definition at line 24 of file KFSplittingFitter.cc.

References Trajectory::direction(), Trajectory::empty(), Trajectory::firstMeasurement(), KFTrajectoryFitter::fitOne(), fitter, TrajectoryMeasurement::predictedState(), Trajectory::recHits(), mps_fire::result, Trajectory::seed(), and sorter().

24  {
25  if (aTraj.empty())
26  return Trajectory();
27 
28  const TM& firstTM = aTraj.firstMeasurement();
29  TSOS firstTsos = TrajectoryStateWithArbitraryError()(firstTM.predictedState());
30 
31  RecHitContainer const& hits = aTraj.recHits();
33  sorter(hits, aTraj.direction(), result);
34 
35  return fitter.fitOne(aTraj.seed(), result, firstTsos, type);
36 }
bool empty() const
True if trajectory has no measurements.
Definition: Trajectory.h:233
TrajectorySeed const & seed() const
Access to the seed used to reconstruct the Trajectory.
Definition: Trajectory.h:263
ConstRecHitContainer recHits() const
Definition: Trajectory.h:186
tuple result
Definition: mps_fire.py:311
PropagationDirection const & direction() const
Definition: Trajectory.cc:133
void sorter(const RecHitContainer &hits, PropagationDirection dir, RecHitContainer &result) const
RecHitSplitter::RecHitContainer RecHitContainer
KFTrajectoryFitter fitter
TrajectoryMeasurement const & firstMeasurement() const
Definition: Trajectory.h:166
TrajectoryMeasurement TM
Trajectory fitOne(const Trajectory &aTraj, fitType) const override
Trajectory KFSplittingFitter::fitOne ( const TrajectorySeed aSeed,
const RecHitContainer hits,
fitType  type 
) const
overridevirtual

Implements TrajectoryFitter.

Definition at line 38 of file KFSplittingFitter.cc.

References TrajectorySeed::direction(), KFTrajectoryFitter::fitOne(), fitter, mps_fire::result, and sorter().

38  {
40  sorter(hits, aSeed.direction(), result);
41 
42  return fitter.fitOne(aSeed, result, type);
43 }
PropagationDirection direction() const
tuple result
Definition: mps_fire.py:311
void sorter(const RecHitContainer &hits, PropagationDirection dir, RecHitContainer &result) const
RecHitSplitter::RecHitContainer RecHitContainer
KFTrajectoryFitter fitter
Trajectory fitOne(const Trajectory &aTraj, fitType) const override
Trajectory KFSplittingFitter::fitOne ( const TrajectorySeed aSeed,
const RecHitContainer hits,
const TSOS firstPredTsos,
fitType  type 
) const
overridevirtual

Implements TrajectoryFitter.

Definition at line 45 of file KFSplittingFitter.cc.

References TrajectorySeed::direction(), KFTrajectoryFitter::fitOne(), fitter, mps_fire::result, and sorter().

48  {
50  sorter(hits, aSeed.direction(), result);
51 
52  return fitter.fitOne(aSeed, result, firstPredTsos, type);
53 }
PropagationDirection direction() const
tuple result
Definition: mps_fire.py:311
void sorter(const RecHitContainer &hits, PropagationDirection dir, RecHitContainer &result) const
RecHitSplitter::RecHitContainer RecHitContainer
KFTrajectoryFitter fitter
Trajectory fitOne(const Trajectory &aTraj, fitType) const override
void KFSplittingFitter::setHitCloner ( TkCloner const *  hc)
inlineoverridevirtual

Implements TrajectoryFitter.

Definition at line 45 of file KFSplittingFitter.h.

References fitter, and KFTrajectoryFitter::setHitCloner().

45 { fitter.setHitCloner(hc); }
KFTrajectoryFitter fitter
void setHitCloner(TkCloner const *hc) override
void KFSplittingFitter::sorter ( const RecHitContainer hits,
PropagationDirection  dir,
RecHitContainer result 
) const
private

Definition at line 6 of file KFSplittingFitter.cc.

References RecHitSorter::sortHits(), and RecHitSplitter::split().

Referenced by fitOne().

6  {
7  result.reserve(hits.size());
8  for (RecHitContainer::const_iterator ihit = hits.begin(); ihit != hits.end(); ihit++) {
9  if (!(**ihit).isValid())
10  result.push_back(*ihit);
11  else if ((**ihit).transientHits().size() == 1)
12  result.push_back(*ihit);
13  else {
14  RecHitContainer splitted = RecHitSplitter().split((**ihit).transientHits());
15  RecHitContainer sorted = RecHitSorter().sortHits(splitted, dir);
16  for (RecHitContainer::iterator srt = sorted.begin(); srt != sorted.end(); srt++) {
17  result.push_back(*srt);
18  // result.insert(result.end(), sorted.begin(), sorted.end());
19  }
20  }
21  }
22 }
RecHitContainer sortHits(const RecHitContainer &hits, const PropagationDirection &dir) const
Definition: RecHitSorter.cc:6
tuple result
Definition: mps_fire.py:311
RecHitSplitter::RecHitContainer RecHitContainer
RecHitContainer split(const RecHitContainer &hits) const

Member Data Documentation

KFTrajectoryFitter KFSplittingFitter::fitter
private

Definition at line 50 of file KFSplittingFitter.h.

Referenced by clone(), fitOne(), and setHitCloner().