CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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::auto_ptr< FitterImplfitter
 
std::auto_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 bookConverter::prior.

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

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
tuple tracks
Definition: testEve_cfg.py:39
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 45 of file GhostTrackFitter.cc.

References fit(), and bookConverter::prior.

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
tuple tracks
Definition: testEve_cfg.py:39
dictionary prior
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 unpackBuffers-CaloStage2::offset.

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
std::auto_ptr< FitterImpl > fitter
GhostTrack fit(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, double coneRadius, const std::vector< TransientTrack > &tracks) const
tuple tracks
Definition: testEve_cfg.py:39
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().

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 }
std::auto_ptr< FitterImpl > fitter
GhostTrack fit(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, double coneRadius, const std::vector< TransientTrack > &tracks) const
tuple tracks
Definition: testEve_cfg.py:39
GhostTrack GhostTrackFitter::fit ( FitterImpl fitterImpl,
const GhostTrackPrediction prior,
const std::vector< GhostTrackState > &  states 
) const
protected

Definition at line 91 of file GhostTrackFitter.cc.

References reco::GhostTrackFitter::FitterImpl::fit(), ndof, query::result, and updater.

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 }
tuple result
Definition: query.py:137
std::auto_ptr< PredictionUpdater > updater
void reco::GhostTrackFitter::setFitterImpl ( const FitterImpl fitterImpl)
inline

Definition at line 74 of file GhostTrackFitter.h.

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

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

Member Data Documentation

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

Definition at line 83 of file GhostTrackFitter.h.

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

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

Definition at line 84 of file GhostTrackFitter.h.

Referenced by fit(), and GhostTrackFitter().