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 ( )

Definition at line 23 of file GhostTrackFitter.cc.

References fitter, and updater.

GhostTrackFitter::~GhostTrackFitter ( )
virtual

Definition at line 29 of file GhostTrackFitter.cc.

30 {
31 }

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 33 of file GhostTrackFitter.cc.

References fftjetcommon_cfi::prior.

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

39 {
40  GhostTrackPrediction prior(priorPosition, priorError,
41  direction, coneRadius);
42  return fit(prior, priorPosition, tracks);
43 }
GhostTrack fit(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, double coneRadius, const std::vector< TransientTrack > &tracks) const
GhostTrack GhostTrackFitter::fit ( const GlobalPoint priorPosition,
const GlobalError priorError,
const GlobalVector direction,
const GlobalError directionError,
const std::vector< TransientTrack > &  tracks 
) const

Definition at line 45 of file GhostTrackFitter.cc.

References fit(), and fftjetcommon_cfi::prior.

Referenced by trackingPlots.Iteration::modules().

51 {
52  GhostTrackPrediction prior(priorPosition, priorError,
53  direction, directionError);
54  return fit(prior, priorPosition, tracks);
55 }
GhostTrack fit(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, double coneRadius, const std::vector< TransientTrack > &tracks) const
GhostTrack GhostTrackFitter::fit ( const GhostTrackPrediction prior,
const GlobalPoint origin,
const std::vector< TransientTrack > &  tracks 
) const

Definition at line 57 of file GhostTrackFitter.cc.

References fit(), fitter, reco::GhostTrackPrediction::lambda(), reco::GhostTrackState::linearize(), and PFRecoTauDiscriminationByIsolation_cfi::offset.

Referenced by trackingPlots.Iteration::modules().

61 {
62  double offset = prior.lambda(origin);
63 
64  std::vector<GhostTrackState> states;
65  for(std::vector<TransientTrack>::const_iterator iter = tracks.begin();
66  iter != tracks.end(); ++iter) {
67  GhostTrackState state(*iter);
68  state.linearize(prior, true, offset);
69  states.push_back(state);
70  }
71 
72  PositiveSideGhostTrackFitter actualFitter(origin, *fitter);
73  return fit(actualFitter, prior, states);
74 }
double lambda(const GlobalPoint &point) const
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 76 of file GhostTrackFitter.cc.

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

Referenced by trackingPlots.Iteration::modules().

79 {
80  std::vector<GhostTrackState> states;
81  for(std::vector<TransientTrack>::const_iterator iter = tracks.begin();
82  iter != tracks.end(); ++iter) {
83  GhostTrackState state(*iter);
84  state.linearize(prior, true);
85  states.push_back(state);
86  }
87 
88  return fit(*fitter, prior, states);
89 }
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 91 of file GhostTrackFitter.cc.

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

Referenced by trackingPlots.Iteration::modules().

95 {
96  std::vector<GhostTrackState> states = states_;
97 
98  double ndof, chi2;
100  fitterImpl.fit(*updater, prior, states, ndof, chi2);
101 
102  GhostTrack result(prior, pred, states, ndof, chi2);
103 
104  return result;
105 }
std::unique_ptr< PredictionUpdater > updater
void reco::GhostTrackFitter::setFitterImpl ( const FitterImpl fitterImpl)
inline

Definition at line 74 of file GhostTrackFitter.h.

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

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

Member Data Documentation

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

Definition at line 83 of file GhostTrackFitter.h.

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

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