test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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,
41  const std::vector<TransientTrack> &tracks) const;
42 
44  public:
45  virtual ~PredictionUpdater() {}
46 
47  virtual PredictionUpdater *clone() const = 0;
48 
50  const GhostTrackPrediction &pred,
51  const GhostTrackState &state,
52  double &ndof, double &chi2) const = 0;
53 
54  virtual void contribution(
55  const GhostTrackPrediction &pred,
56  const GhostTrackState &state,
57  double &ndof, double &chi2,
58  bool withPredError = false) const = 0;
59  };
60 
61  class FitterImpl {
62  public:
63  virtual ~FitterImpl() {}
64 
65  virtual FitterImpl *clone() const = 0;
66 
67  virtual GhostTrackPrediction fit(
69  const GhostTrackPrediction &pred,
70  std::vector<GhostTrackState> &states,
71  double &ndof, double &chi2) = 0;
72  };
73 
74  void setFitterImpl(const FitterImpl &fitterImpl)
75  { fitter.reset(fitterImpl.clone()); }
76 
77  protected:
78  GhostTrack fit(FitterImpl &fitterImpl,
79  const GhostTrackPrediction &prior,
80  const std::vector<GhostTrackState> &states) const;
81 
82  private:
83  std::auto_ptr<FitterImpl> fitter;
84  std::auto_ptr<PredictionUpdater> updater;
85 };
86 
87 }
88 #endif // RecoBTag_GhostTrackFitter_h
std::auto_ptr< FitterImpl > fitter
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:27
virtual GhostTrackPrediction update(const GhostTrackPrediction &pred, const GhostTrackState &state, double &ndof, double &chi2) const =0
tuple tracks
Definition: testEve_cfg.py:39
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:17
dictionary prior
std::auto_ptr< PredictionUpdater > updater