CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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,
77  const GhostTrackPrediction &prior,
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
auto const & tracks
cannot be loose
virtual GhostTrackPrediction fit(const PredictionUpdater &updater, const GhostTrackPrediction &pred, std::vector< GhostTrackState > &states, double &ndof, double &chi2)=0
virtual void contribution(const GhostTrackPrediction &pred, const GhostTrackState &state, double &ndof, double &chi2, bool withPredError=false) const =0
GhostTrack fit(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, double coneRadius, const std::vector< TransientTrack > &tracks) const
virtual FitterImpl * clone() const =0
void setFitterImpl(const FitterImpl &fitterImpl)
virtual PredictionUpdater * clone() const =0
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalVector
vector in glovbal coordinate system
Definition: Vector3D.h:28
virtual GhostTrackPrediction update(const GhostTrackPrediction &pred, const GhostTrackState &state, double &ndof, double &chi2) const =0
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:18
dictionary prior
std::unique_ptr< FitterImpl > fitter
std::unique_ptr< PredictionUpdater > updater