CMS 3D CMS Logo

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< PredictionUpdaterupdater
 

Detailed Description

Definition at line 19 of file GhostTrackFitter.h.

Constructor & Destructor Documentation

◆ GhostTrackFitter()

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::~GhostTrackFitter ( )
virtual

Definition at line 28 of file GhostTrackFitter.cc.

28 {}

Member Function Documentation

◆ fit() [1/5]

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, and tracks.

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

◆ fit() [2/5]

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(), bookConverter::prior, and tracks.

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

◆ fit() [3/5]

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, hltrates_dqm_sourceclient-live_cfg::offset, bookConverter::prior, and tracks.

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 }
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

◆ fit() [4/5]

GhostTrack GhostTrackFitter::fit ( const GhostTrackPrediction prior,
const std::vector< TransientTrack > &  tracks 
) const

Definition at line 64 of file GhostTrackFitter.cc.

References fit(), fitter, bookConverter::prior, and tracks.

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

◆ fit() [5/5]

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

Definition at line 75 of file GhostTrackFitter.cc.

References hltPixelTracks_cff::chi2, reco::GhostTrackFitter::FitterImpl::fit(), ndof, bookConverter::prior, 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 }
std::unique_ptr< PredictionUpdater > updater

◆ setFitterImpl()

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

◆ fitter

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

Definition at line 81 of file GhostTrackFitter.h.

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

◆ updater

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

Definition at line 82 of file GhostTrackFitter.h.

Referenced by fit(), and GhostTrackFitter().