CMS 3D CMS Logo

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

#include <VertexGhostTrackState.h>

Inheritance diagram for reco::VertexGhostTrackState:
reco::BasicGhostTrackState BasicReferenceCounted

Public Member Functions

CovarianceMatrix cartesianCovariance () const
 
GlobalError cartesianError () const
 
GlobalPoint globalPosition () const
 
 VertexGhostTrackState (const GlobalPoint &pos, const CovarianceMatrix &cov)
 
Vertex vertexStateOnGhostTrack (const GhostTrackPrediction &pred, bool withMeasurementError) const
 
Vertex vertexStateOnMeasurement (const GhostTrackPrediction &pred, bool withGhostTrackError) const
 
- Public Member Functions inherited from reco::BasicGhostTrackState
 BasicGhostTrackState ()
 
virtual bool isValid () const
 
double lambda () const
 
virtual bool linearize (const GhostTrackPrediction &pred, bool initial, double lambda)
 
virtual bool linearize (const GhostTrackPrediction &pred, double lambda)
 
virtual void reset ()
 
void setWeight (double weight)
 
double weight () const
 
virtual ~BasicGhostTrackState ()
 
- Public Member Functions inherited from BasicReferenceCounted
void addReference () const
 
 BasicReferenceCounted ()
 
 BasicReferenceCounted (const BasicReferenceCounted &)
 
 BasicReferenceCounted (BasicReferenceCounted &&)=default
 
BasicReferenceCountedoperator= (BasicReferenceCounted &&)=default
 
BasicReferenceCountedoperator= (const BasicReferenceCounted &)
 
unsigned int references () const
 
void removeReference () const
 
virtual ~BasicReferenceCounted ()
 

Private Member Functions

BasicGhostTrackStateclone () const
 

Private Attributes

CovarianceMatrix covariance_
 
GlobalPoint position_
 

Additional Inherited Members

- Public Types inherited from reco::BasicGhostTrackState
typedef BasicGhostTrackState BGTS
 
typedef math::Error< 3 >::type CovarianceMatrix
 
typedef ProxyBase< BGTS,
CopyUsingClone< BGTS > > 
Proxy
 
typedef std::pair< GlobalPoint,
GlobalError
Vertex
 
- Protected Attributes inherited from reco::BasicGhostTrackState
double lambda_
 
double weight_
 

Detailed Description

Definition at line 15 of file VertexGhostTrackState.h.

Constructor & Destructor Documentation

reco::VertexGhostTrackState::VertexGhostTrackState ( const GlobalPoint pos,
const CovarianceMatrix cov 
)
inline

Definition at line 17 of file VertexGhostTrackState.h.

Referenced by clone().

18  :
19  position_(pos), covariance_(cov) {}

Member Function Documentation

CovarianceMatrix reco::VertexGhostTrackState::cartesianCovariance ( ) const
inlinevirtual

Implements reco::BasicGhostTrackState.

Definition at line 23 of file VertexGhostTrackState.h.

References covariance_.

23 { return covariance_; }
GlobalError reco::VertexGhostTrackState::cartesianError ( ) const
inlinevirtual

Implements reco::BasicGhostTrackState.

Definition at line 22 of file VertexGhostTrackState.h.

References covariance_.

22 { return covariance_; }
BasicGhostTrackState* reco::VertexGhostTrackState::clone ( void  ) const
inlineprivatevirtual

Implements reco::BasicGhostTrackState.

Definition at line 31 of file VertexGhostTrackState.h.

References VertexGhostTrackState().

32  { return new VertexGhostTrackState(*this); }
VertexGhostTrackState(const GlobalPoint &pos, const CovarianceMatrix &cov)
GlobalPoint reco::VertexGhostTrackState::globalPosition ( ) const
inlinevirtual

Implements reco::BasicGhostTrackState.

Definition at line 21 of file VertexGhostTrackState.h.

References position_.

21 { return position_; }
BasicGhostTrackState::Vertex VertexGhostTrackState::vertexStateOnGhostTrack ( const GhostTrackPrediction pred,
bool  withMeasurementError 
) const
virtual

Implements reco::BasicGhostTrackState.

Definition at line 38 of file VertexGhostTrackState.cc.

References b, reco::GhostTrackPrediction::cartesianError(), conv, covariance_, reco::GhostTrackPrediction::direction(), relativeConstraints::error, reco::BasicGhostTrackState::lambda(), reco::GhostTrackPrediction::origin(), position_, rho, reco::GhostTrackPrediction::rho2(), and mathSSE::sqrt().

40 {
41  using namespace ROOT::Math;
42 
43  GlobalPoint origin = pred.origin();
44  GlobalVector direction = pred.direction();
45 
46  double rho2 = pred.rho2();
47  double rho = std::sqrt(rho2);
48  double lambda = (position_ - origin) * direction / rho2;
49  GlobalPoint pos = origin + lambda * direction;
50 
51  Vector3 b = conv(direction) / rho;
52  Vector3 ca = conv(position_ - pos);
53 
54  Matrix33 pA = TensorProd(b, b);
55  Matrix33 pB = TensorProd(b, ca);
56 
57  Matrix36 jacobian;
58  jacobian.Place_at(-pA + Matrix33(SMatrixIdentity()), 0, 0);
59  jacobian.Place_at(pB / rho, 0, 3);
60  Matrix3S error = Similarity(jacobian, pred.cartesianError(lambda));
61 
62  if (withMeasurementError)
63  error += Similarity(pA, covariance_);
64 
65  return Vertex(pos, error);
66 }
std::pair< GlobalPoint, GlobalError > Vertex
const GlobalPoint origin() const
static HepMC::IO_HEPEVT conv
T sqrt(T t)
Definition: SSEVec.h:18
CartesianError cartesianError(double lambda=0.) const
double b
Definition: hdecay.h:120
const GlobalVector direction() const
BasicGhostTrackState::Vertex VertexGhostTrackState::vertexStateOnMeasurement ( const GhostTrackPrediction pred,
bool  withGhostTrackError 
) const
virtual

Implements reco::BasicGhostTrackState.

Definition at line 68 of file VertexGhostTrackState.cc.

References covariance_, and position_.

70 {
71  return Vertex(position_, covariance_);
72 }
std::pair< GlobalPoint, GlobalError > Vertex

Member Data Documentation

CovarianceMatrix reco::VertexGhostTrackState::covariance_
private
GlobalPoint reco::VertexGhostTrackState::position_
private