#include <TrackGhostTrackState.h>
Public Member Functions | |
CovarianceMatrix | cartesianCovariance () const |
GlobalError | cartesianError () const |
GlobalPoint | globalPosition () const |
bool | isValid () const |
bool | linearize (const GhostTrackPrediction &pred, bool initial, double lambda) |
bool | linearize (const GhostTrackPrediction &pred, double lambda) |
void | reset () |
const TransientTrack & | track () const |
TrackGhostTrackState (const TransientTrack &track) | |
const TrajectoryStateOnSurface & | tsos () const |
Vertex | vertexStateOnGhostTrack (const GhostTrackPrediction &pred, bool withMeasurementError) const |
Vertex | vertexStateOnMeasurement (const GhostTrackPrediction &pred, bool withGhostTrackError) const |
Private Member Functions | |
BasicGhostTrackState * | clone () const |
Private Attributes | |
TransientTrack | track_ |
TrajectoryStateOnSurface | tsos_ |
Definition at line 19 of file TrackGhostTrackState.h.
reco::TrackGhostTrackState::TrackGhostTrackState | ( | const TransientTrack & | track | ) | [inline] |
CovarianceMatrix reco::TrackGhostTrackState::cartesianCovariance | ( | ) | const [inline, virtual] |
Implements reco::BasicGhostTrackState.
Definition at line 32 of file TrackGhostTrackState.h.
References TrajectoryStateOnSurface::cartesianError(), CartesianTrajectoryError::matrix(), and tsos_.
{ return tsos_.cartesianError().matrix().Sub<CovarianceMatrix>(0, 0); }
GlobalError reco::TrackGhostTrackState::cartesianError | ( | ) | const [inline, virtual] |
Implements reco::BasicGhostTrackState.
Definition at line 30 of file TrackGhostTrackState.h.
References TrajectoryStateOnSurface::cartesianError(), CartesianTrajectoryError::position(), and tsos_.
{ return tsos_.cartesianError().position(); }
BasicGhostTrackState* reco::TrackGhostTrackState::clone | ( | void | ) | const [inline, private, virtual] |
Implements reco::BasicGhostTrackState.
Definition at line 46 of file TrackGhostTrackState.h.
References TrackGhostTrackState().
{ return new TrackGhostTrackState(*this); }
GlobalPoint reco::TrackGhostTrackState::globalPosition | ( | ) | const [inline, virtual] |
Implements reco::BasicGhostTrackState.
Definition at line 28 of file TrackGhostTrackState.h.
References TrajectoryStateOnSurface::globalPosition(), and tsos_.
{ return tsos_.globalPosition(); }
bool reco::TrackGhostTrackState::isValid | ( | void | ) | const [inline, virtual] |
Reimplemented from reco::BasicGhostTrackState.
Definition at line 26 of file TrackGhostTrackState.h.
References TrajectoryStateOnSurface::isValid(), and tsos_.
Referenced by linearize(), vertexStateOnGhostTrack(), and vertexStateOnMeasurement().
bool TrackGhostTrackState::linearize | ( | const GhostTrackPrediction & | pred, |
double | lambda | ||
) | [virtual] |
Reimplemented from reco::BasicGhostTrackState.
Definition at line 70 of file TrackGhostTrackState.cc.
References reco::TransientTrack::field(), reco::TransientTrack::impactPointState(), isValid(), reco::BasicGhostTrackState::lambda(), reco::BasicGhostTrackState::lambda_, point, reco::GhostTrackPrediction::position(), track_, and tsos_.
{ AnalyticalImpactPointExtrapolator extrap(track_.field()); GlobalPoint point = pred.position(lambda); tsos_ = extrap.extrapolate(track_.impactPointState(), point); if (!isValid()) return false; lambda_ = lambda; return true; }
bool TrackGhostTrackState::linearize | ( | const GhostTrackPrediction & | pred, |
bool | initial, | ||
double | lambda | ||
) | [virtual] |
Reimplemented from reco::BasicGhostTrackState.
Definition at line 44 of file TrackGhostTrackState.cc.
References reco::GhostTrackPrediction::direction(), reco::TransientTrack::field(), TrajectoryStateOnSurface::globalPosition(), reco::TransientTrack::impactPointState(), isValid(), reco::BasicGhostTrackState::lambda_, geometryCSVtoXML::line, reco::GhostTrackPrediction::origin(), reco::GhostTrackPrediction::rho2(), track_, and tsos_.
{ AnalyticalTrajectoryExtrapolatorToLine extrap(track_.field()); GlobalPoint origin = pred.origin(); GlobalVector direction = pred.direction(); if (isValid() && !initial) { GlobalPoint pca = origin + lambda_ * direction; Line line(pca, direction); tsos_ = extrap.extrapolate(tsos_, line); } else { GlobalPoint pca = origin + lambda * direction; Line line(pca, direction); tsos_ = extrap.extrapolate(track_.impactPointState(), line); } if (!isValid()) return false; lambda_ = (tsos_.globalPosition() - origin) * direction / pred.rho2(); return true; }
void reco::TrackGhostTrackState::reset | ( | void | ) | [inline, virtual] |
Reimplemented from reco::BasicGhostTrackState.
Definition at line 35 of file TrackGhostTrackState.h.
References tsos_.
{ tsos_ = TrajectoryStateOnSurface(); }
const TransientTrack& reco::TrackGhostTrackState::track | ( | void | ) | const [inline] |
Definition at line 23 of file TrackGhostTrackState.h.
References track_.
Referenced by reco::GhostTrackState::track().
{ return track_; }
const TrajectoryStateOnSurface& reco::TrackGhostTrackState::tsos | ( | ) | const [inline] |
Definition at line 24 of file TrackGhostTrackState.h.
References tsos_.
Referenced by reco::GhostTrackState::tsos().
{ return tsos_; }
BasicGhostTrackState::Vertex TrackGhostTrackState::vertexStateOnGhostTrack | ( | const GhostTrackPrediction & | pred, |
bool | withMeasurementError | ||
) | const [virtual] |
Implements reco::BasicGhostTrackState.
Definition at line 86 of file TrackGhostTrackState.cc.
References b, TrajectoryStateOnSurface::cartesianError(), reco::GhostTrackPrediction::cartesianError(), conv, reco::GhostTrackPrediction::direction(), error, g, TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), isValid(), prof2calltree::l, reco::BasicGhostTrackState::lambda(), CartesianTrajectoryError::matrix(), reco::GhostTrackPrediction::origin(), pos, rho, reco::GhostTrackPrediction::rho2(), funct::sqr(), mathSSE::sqrt(), and tsos_.
{ using namespace ROOT::Math; if (!isValid()) return Vertex(); GlobalPoint origin = pred.origin(); GlobalVector direction = pred.direction(); double rho2 = pred.rho2(); double rho = std::sqrt(rho2); double lambda = (tsos_.globalPosition() - origin) * direction / rho2; GlobalPoint pos = origin + lambda * direction; GlobalVector momentum = tsos_.globalMomentum(); double mom = momentum.mag(); Vector3 b = conv(direction) / rho; Vector3 d = conv(momentum) / mom; double l = Dot(b, d); double g = 1. / (1. - sqr(l)); Vector3 ca = conv(pos - tsos_.globalPosition()); Vector3 bd = b - l * d; b *= g; Matrix33 pA = TensorProd(b, bd); Matrix33 pB = TensorProd(b, ca); Matrix36 jacobian; jacobian.Place_at(-pA + Matrix33(SMatrixIdentity()), 0, 0); jacobian.Place_at(pB / rho, 0, 3); Matrix3S error = Similarity(jacobian, pred.cartesianError(lambda)); if (withMeasurementError) { jacobian.Place_at(pA, 0, 0); jacobian.Place_at(-pB / mom, 0, 3); error += Similarity(jacobian, tsos_.cartesianError().matrix()); } return Vertex(pos, error); }
BasicGhostTrackState::Vertex TrackGhostTrackState::vertexStateOnMeasurement | ( | const GhostTrackPrediction & | pred, |
bool | withGhostTrackError | ||
) | const [virtual] |
Implements reco::BasicGhostTrackState.
Definition at line 131 of file TrackGhostTrackState.cc.
References b, TrajectoryStateOnSurface::cartesianError(), reco::GhostTrackPrediction::cartesianError(), conv, reco::GhostTrackPrediction::direction(), error, g, TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), isValid(), prof2calltree::l, reco::BasicGhostTrackState::lambda(), CartesianTrajectoryError::matrix(), reco::GhostTrackPrediction::origin(), pos, rho, reco::GhostTrackPrediction::rho2(), funct::sqr(), mathSSE::sqrt(), and tsos_.
{ using namespace ROOT::Math; if (!isValid()) return Vertex(); GlobalPoint origin = pred.origin(); GlobalVector direction = pred.direction(); double rho2 = pred.rho2(); double rho = std::sqrt(rho2); double lambda = (tsos_.globalPosition() - origin) * direction / rho2; GlobalPoint pos = origin + lambda * direction; GlobalVector momentum = tsos_.globalMomentum(); double mom = momentum.mag(); Vector3 b = conv(direction) / rho; Vector3 d = conv(momentum) / mom; double l = Dot(b, d); double g = 1. / (1. - sqr(l)); Vector3 ca = conv(tsos_.globalPosition() - pos); Vector3 bd = l * b - d; d *= g; Matrix33 pC = TensorProd(d, bd); Matrix33 pD = TensorProd(d, ca); Matrix36 jacobian; jacobian.Place_at(pC + Matrix33(SMatrixIdentity()), 0, 0); jacobian.Place_at(pD / mom, 0, 3); Matrix3S error = Similarity(jacobian, tsos_.cartesianError().matrix()); if (withGhostTrackError) { jacobian.Place_at(-pC, 0, 0); jacobian.Place_at(-pD / rho, 0, 3); error += Similarity(jacobian, pred.cartesianError(lambda)); } return Vertex(tsos_.globalPosition(), error); }
Definition at line 50 of file TrackGhostTrackState.h.
Referenced by linearize(), and track().
Definition at line 49 of file TrackGhostTrackState.h.
Referenced by cartesianCovariance(), cartesianError(), globalPosition(), isValid(), linearize(), reset(), tsos(), vertexStateOnGhostTrack(), and vertexStateOnMeasurement().