CMS 3D CMS Logo

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

#include <GhostTrackState.h>

Inheritance diagram for reco::GhostTrackState:
ProxyBase< T, Cloner >

Public Types

typedef
BasicGhostTrackState::CovarianceMatrix 
CovarianceMatrix
 
typedef
BasicGhostTrackState::Vertex 
Vertex
 

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
 

Private Types

typedef BasicGhostTrackState::Proxy Base
 

Additional Inherited Members

- Protected Member Functions inherited from ProxyBase< T, Cloner >
void check () const
 
const Tdata () const
 
void destroy ()
 
bool isValid () const
 
ProxyBaseoperator= (const ProxyBase &other)
 
 ProxyBase ()
 
 ProxyBase (T *p)
 
 ProxyBase (const ProxyBase &other)
 
int references () const
 
TsharedData ()
 
void swap (ProxyBase &other)
 
TunsharedData ()
 
 ~ProxyBase ()
 

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_new()))
49 {
50 }
const AlgebraicSymMatrix33 & matrix_new() const
BasicGhostTrackState::Proxy Base
GhostTrackState::GhostTrackState ( const VertexState state)

Definition at line 52 of file GhostTrackState.cc.

52  :
54  state.error().matrix_new()))
55 {
56 }
GlobalPoint position() const
Definition: VertexState.h:50
const AlgebraicSymMatrix33 & matrix_new() const
BasicGhostTrackState::Proxy Base
GlobalError error() const
Definition: VertexState.h:55

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().

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 ProxyBase< T, Cloner >::data().

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

Definition at line 37 of file GhostTrackState.h.

References ProxyBase< T, Cloner >::data().

Referenced by vertexAtState().

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

Definition at line 88 of file GhostTrackState.cc.

References globalPosition().

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 ProxyBase< T, Cloner >::data().

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

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

Definition at line 58 of file GhostTrackState.cc.

References ProxyBase< T, Cloner >::data().

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

Definition at line 63 of file GhostTrackState.cc.

References ProxyBase< T, Cloner >::data().

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

Definition at line 40 of file GhostTrackState.h.

References ProxyBase< T, Cloner >::data().

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

40 { return data().lambda(); }
const T & data() const
Definition: ProxyBase.h:67
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_new(), reco::GhostTrackPrediction::rho2(), mathSSE::sqrt(), and vertexStateOnGhostTrack().

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_new() +
115  pvError.matrix_new()))
116  / pred.rho2());
117 }
Vertex vertexStateOnGhostTrack(const GhostTrackPrediction &pred, bool withMeasurementError=true) const
static HepMC::IO_HEPEVT conv
const AlgebraicSymMatrix33 & matrix_new() const
T sqrt(T t)
Definition: SSEVec.h:48
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 ProxyBase< T, Cloner >::unsharedData().

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

Definition at line 47 of file GhostTrackState.h.

References ProxyBase< T, Cloner >::unsharedData().

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

Definition at line 78 of file GhostTrackState.cc.

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

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

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

Definition at line 83 of file GhostTrackState.cc.

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

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

Definition at line 60 of file GhostTrackState.h.

References ProxyBase< T, Cloner >::data().

Referenced by lambdaError().

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

Definition at line 64 of file GhostTrackState.h.

References ProxyBase< T, Cloner >::data().

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