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

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

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

Implements reco::BasicGhostTrackState.

Definition at line 32 of file TrackGhostTrackState.h.

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

33  { return tsos_.cartesianError().matrix().Sub<CovarianceMatrix>(0, 0); }
TrajectoryStateOnSurface tsos_
const CartesianTrajectoryError cartesianError() const
const AlgebraicSymMatrix66 & matrix() const
GlobalError reco::TrackGhostTrackState::cartesianError ( ) const
inlineoverridevirtual

Implements reco::BasicGhostTrackState.

Definition at line 30 of file TrackGhostTrackState.h.

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

31  { return tsos_.cartesianError().position(); }
TrajectoryStateOnSurface tsos_
const CartesianTrajectoryError cartesianError() const
const GlobalError position() const
Position error submatrix.
pointer reco::TrackGhostTrackState::clone ( void  ) const
inlineoverrideprivatevirtual

Implements reco::BasicGhostTrackState.

Definition at line 46 of file TrackGhostTrackState.h.

47  { return build<TrackGhostTrackState>(*this); }
GlobalPoint reco::TrackGhostTrackState::globalPosition ( ) const
inlineoverridevirtual

Implements reco::BasicGhostTrackState.

Definition at line 28 of file TrackGhostTrackState.h.

References TrajectoryStateOnSurface::globalPosition(), and tsos_.

29  { return tsos_.globalPosition(); }
TrajectoryStateOnSurface tsos_
GlobalPoint globalPosition() const
bool reco::TrackGhostTrackState::isValid ( void  ) const
inlineoverridevirtual
bool TrackGhostTrackState::linearize ( const GhostTrackPrediction pred,
bool  initial,
double  lambda 
)
overridevirtual

Reimplemented from reco::BasicGhostTrackState.

Definition at line 44 of file TrackGhostTrackState.cc.

References reco::GhostTrackPrediction::direction(), mps_splice::line, reco::GhostTrackPrediction::origin(), and reco::GhostTrackPrediction::rho2().

Referenced by reset().

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

Reimplemented from reco::BasicGhostTrackState.

Definition at line 70 of file TrackGhostTrackState.cc.

References point, and reco::GhostTrackPrediction::position().

72 {
74 
76 
77  tsos_ = extrap.extrapolate(track_.impactPointState(), point);
78  if (!isValid())
79  return false;
80 
81  lambda_ = lambda;
82 
83  return true;
84 }
TrajectoryStateOnSurface tsos_
const MagneticField * field() const
bool isValid() const override
GlobalPoint position(double lambda=0.) 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
void reco::TrackGhostTrackState::reset ( void  )
inlineoverridevirtual
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_; }
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_
BasicGhostTrackState::Vertex TrackGhostTrackState::vertexStateOnGhostTrack ( const GhostTrackPrediction pred,
bool  withMeasurementError 
) const
overridevirtual

Implements reco::BasicGhostTrackState.

Definition at line 86 of file TrackGhostTrackState.cc.

References b, reco::GhostTrackPrediction::cartesianError(), conv, edmIntegrityCheck::d, reco::GhostTrackPrediction::direction(), relativeConstraints::error, g, checklumidiff::l, reco::GhostTrackPrediction::origin(), reco::GhostTrackPrediction::rho2(), funct::sqr(), and mathSSE::sqrt().

Referenced by reset().

88 {
89  using namespace ROOT::Math;
90 
91  if (!isValid())
92  return Vertex();
93 
94  GlobalPoint origin = pred.origin();
95  GlobalVector direction = pred.direction();
96 
97  double rho2 = pred.rho2();
98  double rho = std::sqrt(rho2);
99  double lambda = (tsos_.globalPosition() - origin) * direction / rho2;
100  GlobalPoint pos = origin + lambda * direction;
101 
102  GlobalVector momentum = tsos_.globalMomentum();
103  double mom = momentum.mag();
104 
105  Vector3 b = conv(direction) / rho;
106  Vector3 d = conv(momentum) / mom;
107  double l = Dot(b, d);
108  double g = 1. / (1. - sqr(l));
109 
110  Vector3 ca = conv(pos - tsos_.globalPosition());
111  Vector3 bd = b - l * d;
112  b *= g;
113 
114  Matrix33 pA = TensorProd(b, bd);
115  Matrix33 pB = TensorProd(b, ca);
116 
117  Matrix36 jacobian;
118  jacobian.Place_at(-pA + Matrix33(SMatrixIdentity()), 0, 0);
119  jacobian.Place_at(pB / rho, 0, 3);
120  Matrix3S error = Similarity(jacobian, pred.cartesianError(lambda));
121 
122  if (withMeasurementError) {
123  jacobian.Place_at(pA, 0, 0);
124  jacobian.Place_at(-pB / mom, 0, 3);
125  error += Similarity(jacobian, tsos_.cartesianError().matrix());
126  }
127 
128  return Vertex(pos, error);
129 }
std::pair< GlobalPoint, GlobalError > Vertex
TrajectoryStateOnSurface tsos_
const GlobalPoint origin() const
static HepMC::IO_HEPEVT conv
const CartesianTrajectoryError cartesianError() const
GlobalPoint globalPosition() const
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
T mag() const
Definition: PV3DBase.h:67
bool isValid() const override
T sqrt(T t)
Definition: SSEVec.h:18
CartesianError cartesianError(double lambda=0.) const
const AlgebraicSymMatrix66 & matrix() const
double b
Definition: hdecay.h:120
GlobalVector globalMomentum() const
Square< F >::type sqr(const F &f)
Definition: Square.h:13
const GlobalVector direction() const
BasicGhostTrackState::Vertex TrackGhostTrackState::vertexStateOnMeasurement ( const GhostTrackPrediction pred,
bool  withGhostTrackError 
) const
overridevirtual

Implements reco::BasicGhostTrackState.

Definition at line 131 of file TrackGhostTrackState.cc.

References b, reco::GhostTrackPrediction::cartesianError(), conv, edmIntegrityCheck::d, reco::GhostTrackPrediction::direction(), relativeConstraints::error, g, checklumidiff::l, reco::GhostTrackPrediction::origin(), reco::GhostTrackPrediction::rho2(), funct::sqr(), and mathSSE::sqrt().

Referenced by reset().

133 {
134  using namespace ROOT::Math;
135 
136  if (!isValid())
137  return Vertex();
138 
139  GlobalPoint origin = pred.origin();
140  GlobalVector direction = pred.direction();
141 
142  double rho2 = pred.rho2();
143  double rho = std::sqrt(rho2);
144  double lambda = (tsos_.globalPosition() - origin) * direction / rho2;
145  GlobalPoint pos = origin + lambda * direction;
146 
147  GlobalVector momentum = tsos_.globalMomentum();
148  double mom = momentum.mag();
149 
150  Vector3 b = conv(direction) / rho;
151  Vector3 d = conv(momentum) / mom;
152  double l = Dot(b, d);
153  double g = 1. / (1. - sqr(l));
154 
155  Vector3 ca = conv(tsos_.globalPosition() - pos);
156  Vector3 bd = l * b - d;
157  d *= g;
158 
159  Matrix33 pC = TensorProd(d, bd);
160  Matrix33 pD = TensorProd(d, ca);
161 
162  Matrix36 jacobian;
163  jacobian.Place_at(pC + Matrix33(SMatrixIdentity()), 0, 0);
164  jacobian.Place_at(pD / mom, 0, 3);
165  Matrix3S error = Similarity(jacobian, tsos_.cartesianError().matrix());
166 
167  if (withGhostTrackError) {
168  jacobian.Place_at(-pC, 0, 0);
169  jacobian.Place_at(-pD / rho, 0, 3);
170  error += Similarity(jacobian, pred.cartesianError(lambda));
171  }
172 
173  return Vertex(tsos_.globalPosition(), error);
174 }
std::pair< GlobalPoint, GlobalError > Vertex
TrajectoryStateOnSurface tsos_
const GlobalPoint origin() const
static HepMC::IO_HEPEVT conv
const CartesianTrajectoryError cartesianError() const
GlobalPoint globalPosition() const
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
T mag() const
Definition: PV3DBase.h:67
bool isValid() const override
T sqrt(T t)
Definition: SSEVec.h:18
CartesianError cartesianError(double lambda=0.) const
const AlgebraicSymMatrix66 & matrix() const
double b
Definition: hdecay.h:120
GlobalVector globalMomentum() const
Square< F >::type sqr(const F &f)
Definition: Square.h:13
const GlobalVector direction() const

Member Data Documentation

TransientTrack reco::TrackGhostTrackState::track_
private

Definition at line 50 of file TrackGhostTrackState.h.

Referenced by track().

TrajectoryStateOnSurface reco::TrackGhostTrackState::tsos_
private