CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Member Functions | Private Attributes
reco::GhostTrackFitter Class Reference

#include <GhostTrackFitter.h>

Classes

class  FitterImpl
 
class  PredictionUpdater
 

Public Member Functions

GhostTrack fit (const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, double coneRadius, const std::vector< TransientTrack > &tracks) const
 
GhostTrack fit (const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, const GlobalError &directionError, const std::vector< TransientTrack > &tracks) const
 
GhostTrack fit (const GhostTrackPrediction &prior, const GlobalPoint &origin, const std::vector< TransientTrack > &tracks) const
 
GhostTrack fit (const GhostTrackPrediction &prior, const std::vector< TransientTrack > &tracks) const
 
 GhostTrackFitter ()
 
void setFitterImpl (const FitterImpl &fitterImpl)
 
virtual ~GhostTrackFitter ()
 

Protected Member Functions

GhostTrack fit (FitterImpl &fitterImpl, const GhostTrackPrediction &prior, const std::vector< GhostTrackState > &states) const
 

Private Attributes

std::unique_ptr< FitterImplfitter
 
std::unique_ptr
< PredictionUpdater
updater
 

Detailed Description

Definition at line 19 of file GhostTrackFitter.h.

Constructor & Destructor Documentation

GhostTrackFitter::GhostTrackFitter ( )

Definition at line 23 of file GhostTrackFitter.cc.

References fitter, and updater.

23  {
24  fitter = std::make_unique<AnnealingGhostTrackFitter>();
25  updater = std::make_unique<KalmanGhostTrackUpdater>();
26 }
std::unique_ptr< FitterImpl > fitter
std::unique_ptr< PredictionUpdater > updater
GhostTrackFitter::~GhostTrackFitter ( )
virtual

Definition at line 28 of file GhostTrackFitter.cc.

28 {}

Member Function Documentation

GhostTrack GhostTrackFitter::fit ( const GlobalPoint priorPosition,
const GlobalError priorError,
const GlobalVector direction,
double  coneRadius,
const std::vector< TransientTrack > &  tracks 
) const

Definition at line 30 of file GhostTrackFitter.cc.

References bookConverter::prior.

Referenced by fit(), trackingPlots.Iteration::modules(), IPProducer< Container, Base, Helper >::produce(), and reco::GhostTrackVertexFinder::vertices().

34  {
35  GhostTrackPrediction prior(priorPosition, priorError, direction, coneRadius);
36  return fit(prior, priorPosition, tracks);
37 }
auto const & tracks
cannot be loose
GhostTrack fit(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, double coneRadius, const std::vector< TransientTrack > &tracks) const
dictionary prior
GhostTrack GhostTrackFitter::fit ( const GlobalPoint priorPosition,
const GlobalError priorError,
const GlobalVector direction,
const GlobalError directionError,
const std::vector< TransientTrack > &  tracks 
) const

Definition at line 39 of file GhostTrackFitter.cc.

References fit(), and bookConverter::prior.

Referenced by trackingPlots.Iteration::modules().

43  {
44  GhostTrackPrediction prior(priorPosition, priorError, direction, directionError);
45  return fit(prior, priorPosition, tracks);
46 }
auto const & tracks
cannot be loose
GhostTrack fit(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, double coneRadius, const std::vector< TransientTrack > &tracks) const
dictionary prior
GhostTrack GhostTrackFitter::fit ( const GhostTrackPrediction prior,
const GlobalPoint origin,
const std::vector< TransientTrack > &  tracks 
) const

Definition at line 48 of file GhostTrackFitter.cc.

References fit(), fitter, reco::GhostTrackPrediction::lambda(), reco::GhostTrackState::linearize(), and hltrates_dqm_sourceclient-live_cfg::offset.

Referenced by trackingPlots.Iteration::modules().

50  {
51  double offset = prior.lambda(origin);
52 
53  std::vector<GhostTrackState> states;
54  for (std::vector<TransientTrack>::const_iterator iter = tracks.begin(); iter != tracks.end(); ++iter) {
55  GhostTrackState state(*iter);
56  state.linearize(prior, true, offset);
57  states.push_back(state);
58  }
59 
60  PositiveSideGhostTrackFitter actualFitter(origin, *fitter);
61  return fit(actualFitter, prior, states);
62 }
double lambda(const GlobalPoint &point) const
auto const & tracks
cannot be loose
GhostTrack fit(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, double coneRadius, const std::vector< TransientTrack > &tracks) const
std::unique_ptr< FitterImpl > fitter
GhostTrack GhostTrackFitter::fit ( const GhostTrackPrediction prior,
const std::vector< TransientTrack > &  tracks 
) const

Definition at line 64 of file GhostTrackFitter.cc.

References fit(), fitter, and reco::GhostTrackState::linearize().

Referenced by trackingPlots.Iteration::modules().

64  {
65  std::vector<GhostTrackState> states;
66  for (std::vector<TransientTrack>::const_iterator iter = tracks.begin(); iter != tracks.end(); ++iter) {
67  GhostTrackState state(*iter);
68  state.linearize(prior, true);
69  states.push_back(state);
70  }
71 
72  return fit(*fitter, prior, states);
73 }
auto const & tracks
cannot be loose
GhostTrack fit(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, double coneRadius, const std::vector< TransientTrack > &tracks) const
std::unique_ptr< FitterImpl > fitter
GhostTrack GhostTrackFitter::fit ( FitterImpl fitterImpl,
const GhostTrackPrediction prior,
const std::vector< GhostTrackState > &  states 
) const
protected

Definition at line 75 of file GhostTrackFitter.cc.

References HLT_FULL_cff::chi2, reco::GhostTrackFitter::FitterImpl::fit(), ndof, mps_fire::result, and updater.

Referenced by trackingPlots.Iteration::modules().

77  {
78  std::vector<GhostTrackState> states = states_;
79 
80  double ndof, chi2;
81  GhostTrackPrediction pred = fitterImpl.fit(*updater, prior, states, ndof, chi2);
82 
83  GhostTrack result(prior, pred, states, ndof, chi2);
84 
85  return result;
86 }
tuple result
Definition: mps_fire.py:311
std::unique_ptr< PredictionUpdater > updater
void reco::GhostTrackFitter::setFitterImpl ( const FitterImpl fitterImpl)
inline

Definition at line 73 of file GhostTrackFitter.h.

References reco::GhostTrackFitter::FitterImpl::clone(), and fitter.

73 { fitter.reset(fitterImpl.clone()); }
std::unique_ptr< FitterImpl > fitter

Member Data Documentation

std::unique_ptr<FitterImpl> reco::GhostTrackFitter::fitter
private

Definition at line 81 of file GhostTrackFitter.h.

Referenced by fit(), GhostTrackFitter(), and setFitterImpl().

std::unique_ptr<PredictionUpdater> reco::GhostTrackFitter::updater
private

Definition at line 82 of file GhostTrackFitter.h.

Referenced by fit(), and GhostTrackFitter().