File indexing completed on 2024-04-06 12:29:08
0001 #ifndef RecoBTag_GhostTrack_h
0002 #define RecoBTag_GhostTrack_h
0003
0004 #include <vector>
0005
0006 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0007 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0008
0009 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
0010
0011 #include "RecoVertex/GhostTrackFitter/interface/GhostTrackState.h"
0012 #include "RecoVertex/GhostTrackFitter/interface/GhostTrackPrediction.h"
0013
0014 namespace reco {
0015
0016 class GhostTrack {
0017 public:
0018 GhostTrack(const GhostTrackPrediction &prior,
0019 const GhostTrackPrediction &prediction,
0020 const std::vector<GhostTrackState> &states,
0021 double ndof,
0022 double chi2)
0023 : prediction_(prediction), prior_(prior), states_(states), ndof_(ndof), chi2_(chi2) {}
0024
0025 GhostTrack(const GhostTrackPrediction &prior,
0026 const GhostTrackPrediction &prediction,
0027 const std::vector<TransientTrack> &tracks,
0028 double ndof,
0029 double chi2,
0030 const std::vector<float> &weights = std::vector<float>(),
0031 const GlobalPoint &origin = GlobalPoint(),
0032 bool withOrigin = false);
0033
0034 GhostTrack(const Track &ghostTrack,
0035 const std::vector<TransientTrack> &tracks,
0036 const std::vector<float> &weights = std::vector<float>(),
0037 const GhostTrackPrediction &prior = GhostTrackPrediction(),
0038 const GlobalPoint &origin = GlobalPoint(),
0039 bool withOrigin = false);
0040
0041 const GhostTrackPrediction &prediction() const { return prediction_; }
0042 const GhostTrackPrediction &prior() const { return prior_; }
0043
0044 const std::vector<GhostTrackState> &states() const { return states_; }
0045 double ndof() const { return ndof_; }
0046 double chi2() const { return chi2_; }
0047
0048 operator Track() const { return prediction_.track(ndof_, chi2_); }
0049
0050 private:
0051 void initStates(const std::vector<TransientTrack> &tracks, const std::vector<float> &weights, double offset);
0052
0053 GhostTrackPrediction prediction_;
0054 GhostTrackPrediction prior_;
0055 std::vector<GhostTrackState> states_;
0056 double ndof_;
0057 double chi2_;
0058 };
0059
0060 }
0061
0062 #endif