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 GhostTrackPrediction &pred) const
 
double axisDistance (const GlobalPoint &point, const GlobalVector &dir) const
 
CovarianceMatrix cartesianCovariance () const
 
GlobalError cartesianError () const
 
double flightDistance (const GlobalPoint &point, const GlobalVector &dir) const
 
 GhostTrackState (const GlobalPoint &pos, const CovarianceMatrix &cov)
 
 GhostTrackState (const GlobalPoint &pos, const GlobalError &error)
 
 GhostTrackState (const TransientTrack &track)
 
 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
 
ProxyBase11operator= (const ProxyBase11 &other)=default
 
ProxyBase11operator= (ProxyBase11 &&other) noexcept=default
 
template<typename U >
ProxyBase11operator= (std::shared_ptr< U > p)
 
 ProxyBase11 ()
 
 ProxyBase11 (ProxyBase11 &&other) noexcept=default
 
 ProxyBase11 (ProxyBase11 const &other)=default
 
template<typename U >
 ProxyBase11 (std::shared_ptr< U > p)
 
 ProxyBase11 (T *p)
 
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

◆ Base

Definition at line 22 of file GhostTrackState.h.

◆ CovarianceMatrix

Definition at line 25 of file GhostTrackState.h.

◆ Vertex

Definition at line 26 of file GhostTrackState.h.

Constructor & Destructor Documentation

◆ GhostTrackState() [1/4]

GhostTrackState::GhostTrackState ( const TransientTrack track)

Definition at line 34 of file GhostTrackState.cc.

◆ GhostTrackState() [2/4]

GhostTrackState::GhostTrackState ( const GlobalPoint pos,
const CovarianceMatrix cov 
)

Definition at line 36 of file GhostTrackState.cc.

37  : Base(new VertexGhostTrackState(pos, cov)) {}

◆ GhostTrackState() [3/4]

GhostTrackState::GhostTrackState ( const GlobalPoint pos,
const GlobalError error 
)

Definition at line 39 of file GhostTrackState.cc.

40  : Base(new VertexGhostTrackState(pos, error.matrix())) {}

◆ GhostTrackState() [4/4]

GhostTrackState::GhostTrackState ( const VertexState state)

Definition at line 42 of file GhostTrackState.cc.

43  : Base(new VertexGhostTrackState(state.position(), state.error().matrix())) {}

Member Function Documentation

◆ axisDistance() [1/2]

double GhostTrackState::axisDistance ( const GhostTrackPrediction pred) const

Definition at line 68 of file GhostTrackState.cc.

68  {
69  return axisDistance(pred.origin(), pred.direction());
70 }

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

◆ axisDistance() [2/2]

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

Definition at line 64 of file GhostTrackState.cc.

64  {
65  return (globalPosition() - point).cross(dir.unit()).mag();
66 }

References DeadROC_duringRun::dir, globalPosition(), mag(), and point.

Referenced by axisDistance().

◆ cartesianCovariance()

CovarianceMatrix reco::GhostTrackState::cartesianCovariance ( ) const
inline

Definition at line 38 of file GhostTrackState.h.

38 { return data().cartesianCovariance(); }

References ProxyBase11< T >::data().

◆ cartesianError()

GlobalError reco::GhostTrackState::cartesianError ( ) const
inline

Definition at line 37 of file GhostTrackState.h.

37 { return data().cartesianError(); }

References ProxyBase11< T >::data().

◆ flightDistance()

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

Definition at line 60 of file GhostTrackState.cc.

60  {
61  return (globalPosition() - point).dot(dir.unit());
62 }

References DeadROC_duringRun::dir, globalPosition(), and point.

◆ globalPosition()

GlobalPoint reco::GhostTrackState::globalPosition ( ) const
inline

Definition at line 36 of file GhostTrackState.h.

36 { return data().globalPosition(); }

References ProxyBase11< T >::data().

Referenced by axisDistance(), and flightDistance().

◆ isTrack()

bool GhostTrackState::isTrack ( ) const

Definition at line 45 of file GhostTrackState.cc.

45 { return dynamic_cast<const TrackGhostTrackState *>(&data()) != nullptr; }

References ProxyBase11< T >::data().

◆ isValid()

bool reco::GhostTrackState::isValid ( void  ) const
inline

◆ isVertex()

bool GhostTrackState::isVertex ( ) const

Definition at line 47 of file GhostTrackState.cc.

47 { return dynamic_cast<const VertexGhostTrackState *>(&data()) != nullptr; }

References ProxyBase11< T >::data().

◆ lambda()

double reco::GhostTrackState::lambda ( ) const
inline

Definition at line 40 of file GhostTrackState.h.

40 { return data().lambda(); }

References ProxyBase11< T >::data().

Referenced by linearize().

◆ lambdaError()

double GhostTrackState::lambdaError ( const GhostTrackPrediction pred,
const GlobalError pvError = GlobalError() 
) const

Definition at line 72 of file GhostTrackState.cc.

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 }

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

◆ linearize() [1/2]

bool reco::GhostTrackState::linearize ( const GhostTrackPrediction pred,
bool  initial = false,
double  lambda = 0. 
)
inline

Definition at line 47 of file GhostTrackState.h.

47  {
48  return unsharedData().linearize(pred, initial, lambda);
49  }

References lambda(), and ProxyBase11< T >::unsharedData().

Referenced by reco::PositiveSideGhostTrackFitter::fit(), and TemplatedSecondaryVertexProducer< IPTI, VTX >::produce().

◆ linearize() [2/2]

bool reco::GhostTrackState::linearize ( const GhostTrackPrediction pred,
double  lambda 
)
inline

Definition at line 50 of file GhostTrackState.h.

50 { return unsharedData().linearize(pred, lambda); }

References lambda(), and ProxyBase11< T >::unsharedData().

◆ reset()

void reco::GhostTrackState::reset ( void  )
inline

Definition at line 46 of file GhostTrackState.h.

46 { unsharedData().reset(); }

References ProxyBase11< T >::unsharedData().

◆ setWeight()

void reco::GhostTrackState::setWeight ( double  weight)
inline

Definition at line 64 of file GhostTrackState.h.

64 { unsharedData().setWeight(weight); }

References ProxyBase11< T >::unsharedData().

Referenced by TemplatedSecondaryVertexProducer< IPTI, VTX >::produce().

◆ track()

const TransientTrack & GhostTrackState::track ( ) const

Definition at line 56 of file GhostTrackState.cc.

56 { return getTrack(&data())->track(); }

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

◆ tsos()

const TrajectoryStateOnSurface & GhostTrackState::tsos ( ) const

Definition at line 58 of file GhostTrackState.cc.

58 { return getTrack(&data())->tsos(); }

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

◆ vertexStateOnGhostTrack()

Vertex reco::GhostTrackState::vertexStateOnGhostTrack ( const GhostTrackPrediction pred,
bool  withMeasurementError = true 
) const
inline

Definition at line 56 of file GhostTrackState.h.

56  {
57  return data().vertexStateOnGhostTrack(pred, withMeasurementError);
58  }

References ProxyBase11< T >::data().

Referenced by lambdaError().

◆ vertexStateOnMeasurement()

Vertex reco::GhostTrackState::vertexStateOnMeasurement ( const GhostTrackPrediction pred,
bool  withGhostTrackError = true 
) const
inline

Definition at line 59 of file GhostTrackState.h.

59  {
60  return data().vertexStateOnMeasurement(pred, withGhostTrackError);
61  }

References ProxyBase11< T >::data().

◆ weight()

double reco::GhostTrackState::weight ( ) const
inline

Definition at line 63 of file GhostTrackState.h.

63 { return data().weight(); }

References ProxyBase11< T >::data().

reco::TrackGhostTrackState::tsos
const TrajectoryStateOnSurface & tsos() const
Definition: TrackGhostTrackState.h:24
reco::GhostTrackState::isValid
bool isValid() const
Definition: GhostTrackState.h:42
conv
static HepMC::IO_HEPEVT conv
Definition: BeamHaloProducer.cc:48
reco::GhostTrackState::track
const TransientTrack & track() const
Definition: GhostTrackState.cc:56
pos
Definition: PixelAliasList.h:18
GlobalErrorBase::matrix
const AlgebraicSymMatrix33 matrix() const
Definition: GlobalErrorBase.h:121
reco::GhostTrackState::vertexStateOnGhostTrack
Vertex vertexStateOnGhostTrack(const GhostTrackPrediction &pred, bool withMeasurementError=true) const
Definition: GhostTrackState.h:56
relativeConstraints.error
error
Definition: relativeConstraints.py:53
reco::GhostTrackState::globalPosition
GlobalPoint globalPosition() const
Definition: GhostTrackState.h:36
reco::GhostTrackState::lambda
double lambda() const
Definition: GhostTrackState.h:40
reco::GhostTrackState::axisDistance
double axisDistance(const GlobalPoint &point, const GlobalVector &dir) const
Definition: GhostTrackState.cc:64
reco::TrackGhostTrackState
Definition: TrackGhostTrackState.h:19
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
reco::GhostTrackPrediction::direction
const GlobalVector direction() const
Definition: GhostTrackPrediction.h:63
reco::GhostTrackPrediction::rho2
double rho2() const
Definition: GhostTrackPrediction.h:53
ProxyBase11::unsharedData
T & unsharedData()
Definition: ProxyBase11.h:56
ProxyBase11::isValid
bool isValid() const
Definition: ProxyBase11.h:69
getTrack
static const TrackGhostTrackState * getTrack(const BasicGhostTrackState *basic)
Definition: GhostTrackState.cc:49
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: Basic3DVectorLD.h:127
RunInfoPI::state
state
Definition: RunInfoPayloadInspectoHelper.h:16
reco::GhostTrackState::Base
BasicGhostTrackState::Proxy Base
Definition: GhostTrackState.h:22
ProxyBase11::data
const T & data() const
Definition: ProxyBase11.h:51
reco::TrackGhostTrackState::track
const TransientTrack & track() const
Definition: TrackGhostTrackState.h:23
reco::GhostTrackPrediction::origin
const GlobalPoint origin() const
Definition: GhostTrackPrediction.h:62
reco::VertexGhostTrackState
Definition: VertexGhostTrackState.h:15
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
weight
Definition: weight.py:1
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23