CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
reco::TrackGhostTrackState Class Reference

#include <TrackGhostTrackState.h>

Inheritance diagram for reco::TrackGhostTrackState:
reco::BasicGhostTrackState

Public Member Functions

CovarianceMatrix cartesianCovariance () const override
 
GlobalError cartesianError () const override
 
GlobalPoint globalPosition () const override
 
bool isValid () const override
 
bool linearize (const GhostTrackPrediction &pred, bool initial, double lambda) override
 
bool linearize (const GhostTrackPrediction &pred, double lambda) override
 
void reset () override
 
const TransientTracktrack () const
 
 TrackGhostTrackState (const TransientTrack &track)
 
const TrajectoryStateOnSurfacetsos () const
 
Vertex vertexStateOnGhostTrack (const GhostTrackPrediction &pred, bool withMeasurementError) const override
 
Vertex vertexStateOnMeasurement (const GhostTrackPrediction &pred, bool withGhostTrackError) const override
 
- Public Member Functions inherited from reco::BasicGhostTrackState
double lambda () const
 
void setWeight (double weight)
 
double weight () const
 
virtual ~BasicGhostTrackState ()
 

Private Member Functions

pointer clone () const override
 

Private Attributes

TransientTrack track_
 
TrajectoryStateOnSurface tsos_
 

Additional Inherited Members

- Public Types inherited from reco::BasicGhostTrackState
using BGTS = BasicGhostTrackState
 
typedef math::Error< 3 >::type CovarianceMatrix
 
using pointer = Proxy::pointer
 
using Proxy = ProxyBase11< BGTS >
 
typedef std::pair< GlobalPoint, GlobalErrorVertex
 
- Static Public Member Functions inherited from reco::BasicGhostTrackState
template<typename T , typename... Args>
static std::shared_ptr< BGTSbuild (Args &&...args)
 
- Protected Attributes inherited from reco::BasicGhostTrackState
double lambda_ = 0
 
double weight_ = 1.
 

Detailed Description

Definition at line 19 of file TrackGhostTrackState.h.

Constructor & Destructor Documentation

◆ TrackGhostTrackState()

reco::TrackGhostTrackState::TrackGhostTrackState ( const TransientTrack track)
inline

Definition at line 21 of file TrackGhostTrackState.h.

21 : track_(track) {}
const TransientTrack & track() const

Member Function Documentation

◆ cartesianCovariance()

CovarianceMatrix reco::TrackGhostTrackState::cartesianCovariance ( ) const
inlineoverridevirtual

Implements reco::BasicGhostTrackState.

Definition at line 30 of file TrackGhostTrackState.h.

References TrajectoryStateOnSurface::cartesianError(), CartesianTrajectoryError::matrix(), and tsos_.

30  {
31  return tsos_.cartesianError().matrix().Sub<CovarianceMatrix>(0, 0);
32  }
TrajectoryStateOnSurface tsos_
const CartesianTrajectoryError cartesianError() const
const AlgebraicSymMatrix66 & matrix() const

◆ cartesianError()

GlobalError reco::TrackGhostTrackState::cartesianError ( ) const
inlineoverridevirtual

Implements reco::BasicGhostTrackState.

Definition at line 29 of file TrackGhostTrackState.h.

References TrajectoryStateOnSurface::cartesianError(), CartesianTrajectoryError::position(), and tsos_.

29 { return tsos_.cartesianError().position(); }
TrajectoryStateOnSurface tsos_
const CartesianTrajectoryError cartesianError() const
const GlobalError position() const
Position error submatrix.

◆ clone()

pointer reco::TrackGhostTrackState::clone ( void  ) const
inlineoverrideprivatevirtual

Implements reco::BasicGhostTrackState.

Definition at line 42 of file TrackGhostTrackState.h.

42 { return build<TrackGhostTrackState>(*this); }

◆ globalPosition()

GlobalPoint reco::TrackGhostTrackState::globalPosition ( ) const
inlineoverridevirtual

Implements reco::BasicGhostTrackState.

Definition at line 28 of file TrackGhostTrackState.h.

References TrajectoryStateOnSurface::globalPosition(), and tsos_.

28 { return tsos_.globalPosition(); }
TrajectoryStateOnSurface tsos_
GlobalPoint globalPosition() const

◆ isValid()

bool reco::TrackGhostTrackState::isValid ( void  ) const
inlineoverridevirtual

◆ linearize() [1/2]

bool TrackGhostTrackState::linearize ( const GhostTrackPrediction pred,
bool  initial,
double  lambda 
)
overridevirtual

Reimplemented from reco::BasicGhostTrackState.

Definition at line 43 of file TrackGhostTrackState.cc.

References reco::GhostTrackPrediction::direction(), reco::TransientTrack::field(), TrajectoryStateOnSurface::globalPosition(), reco::TransientTrack::impactPointState(), isValid(), reco::BasicGhostTrackState::lambda(), reco::BasicGhostTrackState::lambda_, mps_splice::line, reco::GhostTrackPrediction::origin(), reco::GhostTrackPrediction::rho2(), track_, and tsos_.

43  {
45 
46  GlobalPoint origin = pred.origin();
47  GlobalVector direction = pred.direction();
48 
49  if (isValid() && !initial) {
50  GlobalPoint pca = origin + lambda_ * direction;
51  Line line(pca, direction);
52  tsos_ = extrap.extrapolate(tsos_, line);
53  } else {
54  GlobalPoint pca = origin + lambda * direction;
55  Line line(pca, direction);
56  tsos_ = extrap.extrapolate(track_.impactPointState(), line);
57  }
58 
59  if (!isValid())
60  return false;
61 
62  lambda_ = (tsos_.globalPosition() - origin) * direction / pred.rho2();
63 
64  return true;
65 }
bool isValid() const override
TrajectoryStateOnSurface tsos_
Definition: Line.h:10
const GlobalVector direction() const
GlobalPoint globalPosition() const
const MagneticField * field() const
const GlobalPoint origin() const
TrajectoryStateOnSurface impactPointState() const

◆ linearize() [2/2]

bool TrackGhostTrackState::linearize ( const GhostTrackPrediction pred,
double  lambda 
)
overridevirtual

Reimplemented from reco::BasicGhostTrackState.

Definition at line 67 of file TrackGhostTrackState.cc.

References reco::TransientTrack::field(), reco::TransientTrack::impactPointState(), isValid(), reco::BasicGhostTrackState::lambda(), reco::BasicGhostTrackState::lambda_, point, reco::GhostTrackPrediction::position(), track_, and tsos_.

67  {
69 
71 
72  tsos_ = extrap.extrapolate(track_.impactPointState(), point);
73  if (!isValid())
74  return false;
75 
76  lambda_ = lambda;
77 
78  return true;
79 }
bool isValid() const override
TrajectoryStateOnSurface tsos_
GlobalPoint position(double lambda=0.) const
const MagneticField * field() const
TrajectoryStateOnSurface impactPointState() const
*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

◆ reset()

void reco::TrackGhostTrackState::reset ( void  )
inlineoverridevirtual

Reimplemented from reco::BasicGhostTrackState.

Definition at line 34 of file TrackGhostTrackState.h.

References tsos_.

◆ track()

const TransientTrack& reco::TrackGhostTrackState::track ( ) const
inline

Definition at line 23 of file TrackGhostTrackState.h.

References track_.

Referenced by reco::GhostTrackState::track().

23 { return track_; }

◆ tsos()

const TrajectoryStateOnSurface& reco::TrackGhostTrackState::tsos ( ) const
inline

Definition at line 24 of file TrackGhostTrackState.h.

References tsos_.

Referenced by reco::GhostTrackState::tsos().

24 { return tsos_; }
TrajectoryStateOnSurface tsos_

◆ vertexStateOnGhostTrack()

BasicGhostTrackState::Vertex TrackGhostTrackState::vertexStateOnGhostTrack ( const GhostTrackPrediction pred,
bool  withMeasurementError 
) const
overridevirtual

Implements reco::BasicGhostTrackState.

Definition at line 81 of file TrackGhostTrackState.cc.

References b, reco::GhostTrackPrediction::cartesianError(), TrajectoryStateOnSurface::cartesianError(), conv, ztail::d, reco::GhostTrackPrediction::direction(), relativeConstraints::error, g, TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), isValid(), MainPageGenerator::l, reco::BasicGhostTrackState::lambda(), PV3DBase< T, PVType, FrameType >::mag(), CartesianTrajectoryError::matrix(), reco::GhostTrackPrediction::origin(), reco::GhostTrackPrediction::rho2(), funct::sqr(), mathSSE::sqrt(), and tsos_.

82  {
83  using namespace ROOT::Math;
84 
85  if (!isValid())
86  return Vertex();
87 
88  GlobalPoint origin = pred.origin();
89  GlobalVector direction = pred.direction();
90 
91  double rho2 = pred.rho2();
92  double rho = std::sqrt(rho2);
93  double lambda = (tsos_.globalPosition() - origin) * direction / rho2;
94  GlobalPoint pos = origin + lambda * direction;
95 
96  GlobalVector momentum = tsos_.globalMomentum();
97  double mom = momentum.mag();
98 
99  Vector3 b = conv(direction) / rho;
100  Vector3 d = conv(momentum) / mom;
101  double l = Dot(b, d);
102  double g = 1. / (1. - sqr(l));
103 
104  Vector3 ca = conv(pos - tsos_.globalPosition());
105  Vector3 bd = b - l * d;
106  b *= g;
107 
108  Matrix33 pA = TensorProd(b, bd);
109  Matrix33 pB = TensorProd(b, ca);
110 
111  Matrix36 jacobian;
112  jacobian.Place_at(-pA + Matrix33(SMatrixIdentity()), 0, 0);
113  jacobian.Place_at(pB / rho, 0, 3);
114  Matrix3S error = Similarity(jacobian, pred.cartesianError(lambda));
115 
116  if (withMeasurementError) {
117  jacobian.Place_at(pA, 0, 0);
118  jacobian.Place_at(-pB / mom, 0, 3);
119  error += Similarity(jacobian, tsos_.cartesianError().matrix());
120  }
121 
122  return Vertex(pos, error);
123 }
bool isValid() const override
std::pair< GlobalPoint, GlobalError > Vertex
TrajectoryStateOnSurface tsos_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
const CartesianTrajectoryError cartesianError() const
const GlobalVector direction() const
GlobalPoint globalPosition() const
T sqrt(T t)
Definition: SSEVec.h:19
T mag() const
Definition: PV3DBase.h:64
CartesianError cartesianError(double lambda=0.) const
d
Definition: ztail.py:151
const GlobalPoint origin() const
double b
Definition: hdecay.h:120
GlobalVector globalMomentum() const
EPOS::IO_EPOS conv
Square< F >::type sqr(const F &f)
Definition: Square.h:14
const AlgebraicSymMatrix66 & matrix() const

◆ vertexStateOnMeasurement()

BasicGhostTrackState::Vertex TrackGhostTrackState::vertexStateOnMeasurement ( const GhostTrackPrediction pred,
bool  withGhostTrackError 
) const
overridevirtual

Implements reco::BasicGhostTrackState.

Definition at line 125 of file TrackGhostTrackState.cc.

References b, reco::GhostTrackPrediction::cartesianError(), TrajectoryStateOnSurface::cartesianError(), conv, ztail::d, reco::GhostTrackPrediction::direction(), relativeConstraints::error, g, TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), isValid(), MainPageGenerator::l, reco::BasicGhostTrackState::lambda(), PV3DBase< T, PVType, FrameType >::mag(), CartesianTrajectoryError::matrix(), reco::GhostTrackPrediction::origin(), reco::GhostTrackPrediction::rho2(), funct::sqr(), mathSSE::sqrt(), and tsos_.

126  {
127  using namespace ROOT::Math;
128 
129  if (!isValid())
130  return Vertex();
131 
132  GlobalPoint origin = pred.origin();
133  GlobalVector direction = pred.direction();
134 
135  double rho2 = pred.rho2();
136  double rho = std::sqrt(rho2);
137  double lambda = (tsos_.globalPosition() - origin) * direction / rho2;
138  GlobalPoint pos = origin + lambda * direction;
139 
140  GlobalVector momentum = tsos_.globalMomentum();
141  double mom = momentum.mag();
142 
143  Vector3 b = conv(direction) / rho;
144  Vector3 d = conv(momentum) / mom;
145  double l = Dot(b, d);
146  double g = 1. / (1. - sqr(l));
147 
148  Vector3 ca = conv(tsos_.globalPosition() - pos);
149  Vector3 bd = l * b - d;
150  d *= g;
151 
152  Matrix33 pC = TensorProd(d, bd);
153  Matrix33 pD = TensorProd(d, ca);
154 
155  Matrix36 jacobian;
156  jacobian.Place_at(pC + Matrix33(SMatrixIdentity()), 0, 0);
157  jacobian.Place_at(pD / mom, 0, 3);
158  Matrix3S error = Similarity(jacobian, tsos_.cartesianError().matrix());
159 
160  if (withGhostTrackError) {
161  jacobian.Place_at(-pC, 0, 0);
162  jacobian.Place_at(-pD / rho, 0, 3);
163  error += Similarity(jacobian, pred.cartesianError(lambda));
164  }
165 
166  return Vertex(tsos_.globalPosition(), error);
167 }
bool isValid() const override
std::pair< GlobalPoint, GlobalError > Vertex
TrajectoryStateOnSurface tsos_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
const CartesianTrajectoryError cartesianError() const
const GlobalVector direction() const
GlobalPoint globalPosition() const
T sqrt(T t)
Definition: SSEVec.h:19
T mag() const
Definition: PV3DBase.h:64
CartesianError cartesianError(double lambda=0.) const
d
Definition: ztail.py:151
const GlobalPoint origin() const
double b
Definition: hdecay.h:120
GlobalVector globalMomentum() const
EPOS::IO_EPOS conv
Square< F >::type sqr(const F &f)
Definition: Square.h:14
const AlgebraicSymMatrix66 & matrix() const

Member Data Documentation

◆ track_

TransientTrack reco::TrackGhostTrackState::track_
private

Definition at line 45 of file TrackGhostTrackState.h.

Referenced by linearize(), and track().

◆ tsos_

TrajectoryStateOnSurface reco::TrackGhostTrackState::tsos_
private