CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Types
reco::GhostTrackState Class Reference

#include <GhostTrackState.h>

Inheritance diagram for reco::GhostTrackState:
ProxyBase11< T >

Public Types

typedef
BasicGhostTrackState::CovarianceMatrix 
CovarianceMatrix
 
typedef
BasicGhostTrackState::Vertex 
Vertex
 
- Public Types inherited from ProxyBase11< T >
using pointer = std::shared_ptr< T >
 

Public Member Functions

double axisDistance (const GlobalPoint &point, const GlobalVector &dir) const
 
double axisDistance (const GhostTrackPrediction &pred) const
 
CovarianceMatrix cartesianCovariance () const
 
GlobalError cartesianError () const
 
double flightDistance (const GlobalPoint &point, const GlobalVector &dir) const
 
 GhostTrackState (const TransientTrack &track)
 
 GhostTrackState (const GlobalPoint &pos, const CovarianceMatrix &cov)
 
 GhostTrackState (const GlobalPoint &pos, const GlobalError &error)
 
 GhostTrackState (const VertexState &state)
 
GlobalPoint globalPosition () const
 
bool isTrack () const
 
bool isValid () const
 
bool isVertex () const
 
double lambda () const
 
double lambdaError (const GhostTrackPrediction &pred, const GlobalError &pvError=GlobalError()) const
 
bool linearize (const GhostTrackPrediction &pred, bool initial=false, double lambda=0.)
 
bool linearize (const GhostTrackPrediction &pred, double lambda)
 
void reset ()
 
void setWeight (double weight)
 
const TransientTracktrack () const
 
const TrajectoryStateOnSurfacetsos () const
 
Vertex vertexStateOnGhostTrack (const GhostTrackPrediction &pred, bool withMeasurementError=true) const
 
Vertex vertexStateOnMeasurement (const GhostTrackPrediction &pred, bool withGhostTrackError=true) const
 
double weight () const
 
- Public Member Functions inherited from ProxyBase11< T >
void check () const
 
const Tdata () const
 
void destroy () noexcept
 
bool isValid () const
 
template<typename U >
ProxyBase11operator= (std::shared_ptr< U > p)
 
ProxyBase11operator= (ProxyBase11 &&other) noexcept=default
 
ProxyBase11operator= (const ProxyBase11 &other)=default
 
 ProxyBase11 ()
 
 ProxyBase11 (T *p)
 
template<typename U >
 ProxyBase11 (std::shared_ptr< U > p)
 
 ProxyBase11 (ProxyBase11 &&other) noexcept=default
 
 ProxyBase11 (ProxyBase11 const &other)=default
 
int references () const
 
void reset ()
 
TsharedData ()
 
void swap (ProxyBase11 &other) noexcept
 
TunsharedData ()
 
 ~ProxyBase11 () noexcept
 

Private Types

typedef BasicGhostTrackState::Proxy Base
 

Detailed Description

Definition at line 21 of file GhostTrackState.h.

Member Typedef Documentation

Definition at line 22 of file GhostTrackState.h.

Definition at line 25 of file GhostTrackState.h.

Definition at line 26 of file GhostTrackState.h.

Constructor & Destructor Documentation

GhostTrackState::GhostTrackState ( const TransientTrack track)

Definition at line 34 of file GhostTrackState.cc.

34 : Base(new TrackGhostTrackState(track)) {}
BasicGhostTrackState::Proxy Base
GhostTrackState::GhostTrackState ( const GlobalPoint pos,
const CovarianceMatrix cov 
)

Definition at line 36 of file GhostTrackState.cc.

37  : Base(new VertexGhostTrackState(pos, cov)) {}
BasicGhostTrackState::Proxy Base
GhostTrackState::GhostTrackState ( const GlobalPoint pos,
const GlobalError error 
)

Definition at line 39 of file GhostTrackState.cc.

40  : Base(new VertexGhostTrackState(pos, error.matrix())) {}
const AlgebraicSymMatrix33 matrix() const
BasicGhostTrackState::Proxy Base
GhostTrackState::GhostTrackState ( const VertexState state)

Definition at line 42 of file GhostTrackState.cc.

43  : Base(new VertexGhostTrackState(state.position(), state.error().matrix())) {}
const AlgebraicSymMatrix33 matrix() const
GlobalPoint position() const
Definition: VertexState.h:62
BasicGhostTrackState::Proxy Base
GlobalError error() const
Definition: VertexState.h:64

Member Function Documentation

double GhostTrackState::axisDistance ( const GlobalPoint point,
const GlobalVector dir 
) const

Definition at line 64 of file GhostTrackState.cc.

References globalPosition(), and mag().

Referenced by axisDistance().

64  {
65  return (globalPosition() - point).cross(dir.unit()).mag();
66 }
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Vector3DBase unit() const
Definition: Vector3DBase.h:54
GlobalPoint globalPosition() const
double GhostTrackState::axisDistance ( const GhostTrackPrediction pred) const

Definition at line 68 of file GhostTrackState.cc.

References axisDistance(), reco::GhostTrackPrediction::direction(), and reco::GhostTrackPrediction::origin().

68  {
69  return axisDistance(pred.origin(), pred.direction());
70 }
const GlobalPoint origin() const
double axisDistance(const GlobalPoint &point, const GlobalVector &dir) const
const GlobalVector direction() const
CovarianceMatrix reco::GhostTrackState::cartesianCovariance ( ) const
inline

Definition at line 38 of file GhostTrackState.h.

References ProxyBase11< T >::data().

38 { return data().cartesianCovariance(); }
const T & data() const
Definition: ProxyBase11.h:51
GlobalError reco::GhostTrackState::cartesianError ( ) const
inline

Definition at line 37 of file GhostTrackState.h.

References ProxyBase11< T >::data().

Referenced by vertexAtState().

37 { return data().cartesianError(); }
const T & data() const
Definition: ProxyBase11.h:51
double GhostTrackState::flightDistance ( const GlobalPoint point,
const GlobalVector dir 
) const

Definition at line 60 of file GhostTrackState.cc.

References globalPosition().

60  {
61  return (globalPosition() - point).dot(dir.unit());
62 }
Vector3DBase unit() const
Definition: Vector3DBase.h:54
GlobalPoint globalPosition() const
GlobalPoint reco::GhostTrackState::globalPosition ( ) const
inline

Definition at line 36 of file GhostTrackState.h.

References ProxyBase11< T >::data().

Referenced by axisDistance(), flightDistance(), and vertexAtState().

36 { return data().globalPosition(); }
const T & data() const
Definition: ProxyBase11.h:51
bool GhostTrackState::isTrack ( ) const

Definition at line 45 of file GhostTrackState.cc.

References ProxyBase11< T >::data().

45 { return dynamic_cast<const TrackGhostTrackState *>(&data()) != nullptr; }
const T & data() const
Definition: ProxyBase11.h:51
bool reco::GhostTrackState::isValid ( void  ) const
inline
bool GhostTrackState::isVertex ( ) const

Definition at line 47 of file GhostTrackState.cc.

References ProxyBase11< T >::data().

47 { return dynamic_cast<const VertexGhostTrackState *>(&data()) != nullptr; }
const T & data() const
Definition: ProxyBase11.h:51
double reco::GhostTrackState::lambda ( ) const
inline

Definition at line 40 of file GhostTrackState.h.

References ProxyBase11< T >::data().

Referenced by reco::PositiveSideGhostTrackFitter::fit(), linearize(), and vertexAtState().

40 { return data().lambda(); }
const T & data() const
Definition: ProxyBase11.h:51
double GhostTrackState::lambdaError ( const GhostTrackPrediction pred,
const GlobalError pvError = GlobalError() 
) const

Definition at line 72 of file GhostTrackState.cc.

References conv, reco::GhostTrackPrediction::direction(), isValid(), GlobalErrorBase< T, ErrorWeightType >::matrix(), reco::GhostTrackPrediction::rho2(), mathSSE::sqrt(), and vertexStateOnGhostTrack().

72  {
73  if (!isValid())
74  return -1.;
75 
76  return std::sqrt(ROOT::Math::Similarity(conv(pred.direction()),
77  (vertexStateOnGhostTrack(pred).second.matrix() + pvError.matrix())) /
78  pred.rho2());
79 }
Vertex vertexStateOnGhostTrack(const GhostTrackPrediction &pred, bool withMeasurementError=true) const
const AlgebraicSymMatrix33 matrix() const
T sqrt(T t)
Definition: SSEVec.h:19
EPOS::IO_EPOS conv
const GlobalVector direction() const
bool reco::GhostTrackState::linearize ( const GhostTrackPrediction pred,
bool  initial = false,
double  lambda = 0. 
)
inline
bool reco::GhostTrackState::linearize ( const GhostTrackPrediction pred,
double  lambda 
)
inline

Definition at line 50 of file GhostTrackState.h.

References ProxyBase11< T >::unsharedData().

50 { return unsharedData().linearize(pred, lambda); }
double lambda() const
T & unsharedData()
Definition: ProxyBase11.h:56
void reco::GhostTrackState::reset ( void  )
inline

Definition at line 46 of file GhostTrackState.h.

References ProxyBase11< T >::unsharedData().

46 { unsharedData().reset(); }
T & unsharedData()
Definition: ProxyBase11.h:56
void reco::GhostTrackState::setWeight ( double  weight)
inline
const TransientTrack & GhostTrackState::track ( ) const

Definition at line 56 of file GhostTrackState.cc.

References ProxyBase11< T >::data(), getTrack(), and reco::TrackGhostTrackState::track().

Referenced by vertexAtState().

56 { return getTrack(&data())->track(); }
const TransientTrack & track() const
const T & data() const
Definition: ProxyBase11.h:51
static const TrackGhostTrackState * getTrack(const BasicGhostTrackState *basic)
const TrajectoryStateOnSurface & GhostTrackState::tsos ( ) const

Definition at line 58 of file GhostTrackState.cc.

References ProxyBase11< T >::data(), getTrack(), and reco::TrackGhostTrackState::tsos().

58 { return getTrack(&data())->tsos(); }
const TrajectoryStateOnSurface & tsos() const
const T & data() const
Definition: ProxyBase11.h:51
static const TrackGhostTrackState * getTrack(const BasicGhostTrackState *basic)
Vertex reco::GhostTrackState::vertexStateOnGhostTrack ( const GhostTrackPrediction pred,
bool  withMeasurementError = true 
) const
inline

Definition at line 56 of file GhostTrackState.h.

References ProxyBase11< T >::data().

Referenced by lambdaError().

56  {
57  return data().vertexStateOnGhostTrack(pred, withMeasurementError);
58  }
const T & data() const
Definition: ProxyBase11.h:51
Vertex reco::GhostTrackState::vertexStateOnMeasurement ( const GhostTrackPrediction pred,
bool  withGhostTrackError = true 
) const
inline

Definition at line 59 of file GhostTrackState.h.

References ProxyBase11< T >::data().

59  {
60  return data().vertexStateOnMeasurement(pred, withGhostTrackError);
61  }
const T & data() const
Definition: ProxyBase11.h:51
double reco::GhostTrackState::weight ( ) const
inline

Definition at line 63 of file GhostTrackState.h.

References ProxyBase11< T >::data().

Referenced by reco::PositiveSideGhostTrackFitter::fit(), and reco::KalmanGhostTrackUpdater::update().

63 { return data().weight(); }
const T & data() const
Definition: ProxyBase11.h:51