CMS 3D CMS Logo

GhostTrackFitter.h
Go to the documentation of this file.
1 #ifndef RecoBTag_GhostTrackFitter_h
2 #define RecoBTag_GhostTrackFitter_h
3 
4 #include <memory>
5 #include <vector>
6 
10 
12 
16 
17 namespace reco {
18 
20  public:
22  virtual ~GhostTrackFitter();
23 
24  GhostTrack fit(const GlobalPoint &priorPosition,
25  const GlobalError &priorError,
26  const GlobalVector &direction,
27  double coneRadius,
28  const std::vector<TransientTrack> &tracks) const;
29 
30  GhostTrack fit(const GlobalPoint &priorPosition,
31  const GlobalError &priorError,
32  const GlobalVector &direction,
33  const GlobalError &directionError,
34  const std::vector<TransientTrack> &tracks) const;
35 
37  const GlobalPoint &origin,
38  const std::vector<TransientTrack> &tracks) const;
39 
40  GhostTrack fit(const GhostTrackPrediction &prior, const std::vector<TransientTrack> &tracks) const;
41 
43  public:
44  virtual ~PredictionUpdater() {}
45 
46  virtual PredictionUpdater *clone() const = 0;
47 
49  const GhostTrackState &state,
50  double &ndof,
51  double &chi2) const = 0;
52 
53  virtual void contribution(const GhostTrackPrediction &pred,
54  const GhostTrackState &state,
55  double &ndof,
56  double &chi2,
57  bool withPredError = false) const = 0;
58  };
59 
60  class FitterImpl {
61  public:
62  virtual ~FitterImpl() {}
63 
64  virtual FitterImpl *clone() const = 0;
65 
67  const GhostTrackPrediction &pred,
68  std::vector<GhostTrackState> &states,
69  double &ndof,
70  double &chi2) = 0;
71  };
72 
73  void setFitterImpl(const FitterImpl &fitterImpl) { fitter.reset(fitterImpl.clone()); }
74 
75  protected:
76  GhostTrack fit(FitterImpl &fitterImpl,
78  const std::vector<GhostTrackState> &states) const;
79 
80  private:
81  std::unique_ptr<FitterImpl> fitter;
82  std::unique_ptr<PredictionUpdater> updater;
83  };
84 
85 } // namespace reco
86 #endif // RecoBTag_GhostTrackFitter_h
GhostTrackPrediction.h
reco::GhostTrackFitter::PredictionUpdater
Definition: GhostTrackFitter.h:42
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
reco::GhostTrackFitter::FitterImpl::clone
virtual FitterImpl * clone() const =0
reco::GhostTrackFitter::fitter
std::unique_ptr< FitterImpl > fitter
Definition: GhostTrackFitter.h:81
reco::GhostTrackFitter::PredictionUpdater::contribution
virtual void contribution(const GhostTrackPrediction &pred, const GhostTrackState &state, double &ndof, double &chi2, bool withPredError=false) const =0
reco::GhostTrackFitter::PredictionUpdater::update
virtual GhostTrackPrediction update(const GhostTrackPrediction &pred, const GhostTrackState &state, double &ndof, double &chi2) const =0
GhostTrackState.h
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
reco::GhostTrackFitter::PredictionUpdater::~PredictionUpdater
virtual ~PredictionUpdater()
Definition: GhostTrackFitter.h:44
TransientTrack.h
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
reco::GhostTrackState
Definition: GhostTrackState.h:21
ndof
Definition: HIMultiTrackSelector.h:49
reco::GhostTrackFitter::updater
std::unique_ptr< PredictionUpdater > updater
Definition: GhostTrackFitter.h:82
reco::GhostTrackFitter::~GhostTrackFitter
virtual ~GhostTrackFitter()
Definition: GhostTrackFitter.cc:28
reco::GhostTrackFitter::FitterImpl
Definition: GhostTrackFitter.h:60
reco::GhostTrackFitter::fit
GhostTrack fit(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, double coneRadius, const std::vector< TransientTrack > &tracks) const
Definition: GhostTrackFitter.cc:30
reco::GhostTrackFitter::FitterImpl::fit
virtual GhostTrackPrediction fit(const PredictionUpdater &updater, const GhostTrackPrediction &pred, std::vector< GhostTrackState > &states, double &ndof, double &chi2)=0
math::GlobalVector
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalVector
vector in glovbal coordinate system
Definition: Vector3D.h:28
reco::GhostTrack
Definition: GhostTrack.h:16
GlobalError.h
GlobalErrorBase< double, ErrorMatrixTag >
reco::GhostTrackFitter::FitterImpl::~FitterImpl
virtual ~FitterImpl()
Definition: GhostTrackFitter.h:62
reco::GhostTrackFitter
Definition: GhostTrackFitter.h:19
reco::GhostTrackFitter::GhostTrackFitter
GhostTrackFitter()
Definition: GhostTrackFitter.cc:23
GlobalVector.h
bookConverter.prior
prior
Definition: bookConverter.py:146
math::GlobalPoint
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:18
GhostTrack.h
reco::GhostTrackPrediction
Definition: GhostTrackPrediction.h:21
UEAnalysisJets_cfi.coneRadius
coneRadius
Definition: UEAnalysisJets_cfi.py:7
GlobalPoint.h
reco::GhostTrackFitter::setFitterImpl
void setFitterImpl(const FitterImpl &fitterImpl)
Definition: GhostTrackFitter.h:73
reco::GhostTrackFitter::PredictionUpdater::clone
virtual PredictionUpdater * clone() const =0