CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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

virtual std::unique_ptr
< TrajectoryFitter
clone () const override
 
Trajectory fitOne (const Trajectory &aTraj, fitType type) const
 
Trajectory fitOne (const TrajectorySeed &aSeed, const RecHitContainer &hits, fitType type) const
 
Trajectory fitOne (const TrajectorySeed &aSeed, const RecHitContainer &hits, const TSOS &firstPredTsos, fitType type) const
 
 KFSplittingFitter (const Propagator &aPropagator, const TrajectoryStateUpdator &aUpdator, const MeasurementEstimator &aEstimator)
 
 KFSplittingFitter (const Propagator *aPropagator, const TrajectoryStateUpdator *aUpdator, const MeasurementEstimator *aEstimator)
 
virtual void setHitCloner (TkCloner const *hc)
 
- 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 21 of file KFSplittingFitter.h.

Definition at line 18 of file KFSplittingFitter.h.

Definition at line 22 of file KFSplittingFitter.h.

Definition at line 20 of file KFSplittingFitter.h.

Constructor & Destructor Documentation

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

Definition at line 26 of file KFSplittingFitter.h.

Referenced by clone().

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

Definition at line 32 of file KFSplittingFitter.h.

34  :
35  fitter(aPropagator, aUpdator, aEstimator) {}
KFTrajectoryFitter fitter

Member Function Documentation

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

Implements TrajectoryFitter.

Definition at line 37 of file KFSplittingFitter.h.

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

37  {
38  return std::unique_ptr<TrajectoryFitter>(
40  fitter.updator(),
41  fitter.estimator()));
42  }
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
virtual

Implements TrajectoryFitter.

Definition at line 27 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().

27  {
28 
29  if(aTraj.empty()) return Trajectory();
30 
31  TM firstTM = aTraj.firstMeasurement();
32  TSOS firstTsos =
33  TrajectoryStateWithArbitraryError()(firstTM.predictedState());
34 
35  RecHitContainer const & hits = aTraj.recHits();
37  sorter(hits,aTraj.direction(),result);
38 
39 
40  return fitter.fitOne(aTraj.seed(), result, firstTsos,type);
41 
42 }
bool empty() const
True if trajectory has no measurements.
Definition: Trajectory.h:299
type
Definition: HCALResponse.h:21
TrajectorySeed const & seed() const
Access to the seed used to reconstruct the Trajectory.
Definition: Trajectory.h:330
ConstRecHitContainer recHits() const
Definition: Trajectory.h:258
tuple result
Definition: mps_fire.py:84
PropagationDirection const & direction() const
Definition: Trajectory.cc:125
void sorter(const RecHitContainer &hits, PropagationDirection dir, RecHitContainer &result) const
RecHitSplitter::RecHitContainer RecHitContainer
KFTrajectoryFitter fitter
TrajectoryMeasurement const & firstMeasurement() const
Definition: Trajectory.h:241
TrajectoryMeasurement TM
Trajectory fitOne(const Trajectory &aTraj, fitType) const
Trajectory KFSplittingFitter::fitOne ( const TrajectorySeed aSeed,
const RecHitContainer hits,
fitType  type 
) const
virtual

Implements TrajectoryFitter.

Definition at line 44 of file KFSplittingFitter.cc.

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

46  {
47 
49  sorter(hits,aSeed.direction(),result);
50 
51 
52  return fitter.fitOne(aSeed, result, type);
53 
54 
55 }
PropagationDirection direction() const
type
Definition: HCALResponse.h:21
tuple result
Definition: mps_fire.py:84
void sorter(const RecHitContainer &hits, PropagationDirection dir, RecHitContainer &result) const
RecHitSplitter::RecHitContainer RecHitContainer
KFTrajectoryFitter fitter
Trajectory fitOne(const Trajectory &aTraj, fitType) const
Trajectory KFSplittingFitter::fitOne ( const TrajectorySeed aSeed,
const RecHitContainer hits,
const TSOS firstPredTsos,
fitType  type 
) const
virtual

Implements TrajectoryFitter.

Definition at line 57 of file KFSplittingFitter.cc.

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

59  {
60 
62  sorter(hits,aSeed.direction(),result);
63 
64 
65  return fitter.fitOne(aSeed, result, firstPredTsos,type);
66 
67 }
PropagationDirection direction() const
type
Definition: HCALResponse.h:21
tuple result
Definition: mps_fire.py:84
void sorter(const RecHitContainer &hits, PropagationDirection dir, RecHitContainer &result) const
RecHitSplitter::RecHitContainer RecHitContainer
KFTrajectoryFitter fitter
Trajectory fitOne(const Trajectory &aTraj, fitType) const
virtual void KFSplittingFitter::setHitCloner ( TkCloner const *  hc)
inlinevirtual

Implements TrajectoryFitter.

Definition at line 54 of file KFSplittingFitter.h.

References fitter, and KFTrajectoryFitter::setHitCloner().

54  {
56  }
virtual void setHitCloner(TkCloner const *hc)
KFTrajectoryFitter fitter
susybsm::HSCParticleCollection hc
Definition: classes.h:25
void KFSplittingFitter::sorter ( const RecHitContainer hits,
PropagationDirection  dir,
RecHitContainer result 
) const
private

Definition at line 8 of file KFSplittingFitter.cc.

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

Referenced by fitOne().

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

Member Data Documentation

KFTrajectoryFitter KFSplittingFitter::fitter
private

Definition at line 62 of file KFSplittingFitter.h.

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