File indexing completed on 2024-04-06 12:29:08
0001 #ifndef RecoBTag_GhostTrackState_h
0002 #define RecoBTag_GhostTrackState_h
0003
0004 #include <utility>
0005
0006 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0007 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
0008 #include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h"
0009
0010 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0011
0012 #include "RecoVertex/GhostTrackFitter/interface/BasicGhostTrackState.h"
0013
0014 class VertexState;
0015
0016 namespace reco {
0017
0018 class TransientTrack;
0019 class GhostTrackPrediction;
0020
0021 class GhostTrackState : public BasicGhostTrackState::Proxy {
0022 typedef BasicGhostTrackState::Proxy Base;
0023
0024 public:
0025 typedef BasicGhostTrackState::CovarianceMatrix CovarianceMatrix;
0026 typedef BasicGhostTrackState::Vertex Vertex;
0027
0028 GhostTrackState(const TransientTrack &track);
0029 GhostTrackState(const GlobalPoint &pos, const CovarianceMatrix &cov);
0030 GhostTrackState(const GlobalPoint &pos, const GlobalError &error);
0031 GhostTrackState(const VertexState &state);
0032
0033 const TransientTrack &track() const;
0034 const TrajectoryStateOnSurface &tsos() const;
0035
0036 GlobalPoint globalPosition() const { return data().globalPosition(); }
0037 GlobalError cartesianError() const { return data().cartesianError(); }
0038 CovarianceMatrix cartesianCovariance() const { return data().cartesianCovariance(); }
0039
0040 double lambda() const { return data().lambda(); }
0041 double lambdaError(const GhostTrackPrediction &pred, const GlobalError &pvError = GlobalError()) const;
0042 bool isValid() const { return Base::isValid() && data().isValid(); }
0043 bool isTrack() const;
0044 bool isVertex() const;
0045
0046 void reset() { unsharedData().reset(); }
0047 bool linearize(const GhostTrackPrediction &pred, bool initial = false, double lambda = 0.) {
0048 return unsharedData().linearize(pred, initial, lambda);
0049 }
0050 bool linearize(const GhostTrackPrediction &pred, double lambda) { return unsharedData().linearize(pred, lambda); }
0051
0052 double flightDistance(const GlobalPoint &point, const GlobalVector &dir) const;
0053 double axisDistance(const GlobalPoint &point, const GlobalVector &dir) const;
0054 double axisDistance(const GhostTrackPrediction &pred) const;
0055
0056 Vertex vertexStateOnGhostTrack(const GhostTrackPrediction &pred, bool withMeasurementError = true) const {
0057 return data().vertexStateOnGhostTrack(pred, withMeasurementError);
0058 }
0059 Vertex vertexStateOnMeasurement(const GhostTrackPrediction &pred, bool withGhostTrackError = true) const {
0060 return data().vertexStateOnMeasurement(pred, withGhostTrackError);
0061 }
0062
0063 double weight() const { return data().weight(); }
0064 void setWeight(double weight) { unsharedData().setWeight(weight); }
0065 };
0066
0067 }
0068
0069 #endif