CMS 3D CMS Logo

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 35 of file GhostTrackState.cc.

35  :
36  Base(new TrackGhostTrackState(track))
37 {
38 }
BasicGhostTrackState::Proxy Base
GhostTrackState::GhostTrackState ( const GlobalPoint pos,
const CovarianceMatrix cov 
)

Definition at line 40 of file GhostTrackState.cc.

41  :
42  Base(new VertexGhostTrackState(pos, cov))
43 {
44 }
BasicGhostTrackState::Proxy Base
GhostTrackState::GhostTrackState ( const GlobalPoint pos,
const GlobalError error 
)

Definition at line 46 of file GhostTrackState.cc.

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

Definition at line 52 of file GhostTrackState.cc.

52  :
54  state.error().matrix()))
55 {
56 }
const AlgebraicSymMatrix33 matrix() const
GlobalPoint position() const
Definition: VertexState.h:69
BasicGhostTrackState::Proxy Base
GlobalError error() const
Definition: VertexState.h:74

Member Function Documentation

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

Definition at line 94 of file GhostTrackState.cc.

References globalPosition(), and mag().

Referenced by axisDistance(), and linearize().

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

Definition at line 100 of file GhostTrackState.cc.

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

101 {
102  return axisDistance(pred.origin(), pred.direction());
103 }
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:54
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:54
double GhostTrackState::flightDistance ( const GlobalPoint point,
const GlobalVector dir 
) const

Definition at line 88 of file GhostTrackState.cc.

References globalPosition().

Referenced by linearize().

90 {
91  return (globalPosition() - point).dot(dir.unit());
92 }
Vector3DBase unit() const
Definition: Vector3DBase.h:57
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:54
bool GhostTrackState::isTrack ( ) const

Definition at line 58 of file GhostTrackState.cc.

References ProxyBase11< T >::data().

Referenced by isValid().

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

Definition at line 63 of file GhostTrackState.cc.

References ProxyBase11< T >::data().

Referenced by isValid().

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

Definition at line 40 of file GhostTrackState.h.

References ProxyBase11< T >::data(), and lambdaError().

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

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

Definition at line 105 of file GhostTrackState.cc.

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

Referenced by lambda().

107 {
108  if (!isValid())
109  return -1.;
110 
111  return std::sqrt(
112  ROOT::Math::Similarity(
113  conv(pred.direction()),
114  (vertexStateOnGhostTrack(pred).second.matrix() +
115  pvError.matrix()))
116  / pred.rho2());
117 }
Vertex vertexStateOnGhostTrack(const GhostTrackPrediction &pred, bool withMeasurementError=true) const
static HepMC::IO_HEPEVT conv
const AlgebraicSymMatrix33 matrix() const
T sqrt(T t)
Definition: SSEVec.h:18
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 51 of file GhostTrackState.h.

References axisDistance(), dir, flightDistance(), point, and ProxyBase11< T >::unsharedData().

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

Definition at line 47 of file GhostTrackState.h.

References ProxyBase11< T >::unsharedData().

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

Definition at line 78 of file GhostTrackState.cc.

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

Referenced by getTrack(), IPProducer< Container, Base, Helper >::produce(), and vertexAtState().

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

Definition at line 83 of file GhostTrackState.cc.

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

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

Definition at line 60 of file GhostTrackState.h.

References ProxyBase11< T >::data().

Referenced by lambdaError().

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

Definition at line 64 of file GhostTrackState.h.

References ProxyBase11< T >::data().

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

Definition at line 68 of file GhostTrackState.h.

References ProxyBase11< T >::data().

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

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