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) {}

Member Function Documentation

◆ cartesianCovariance()

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

◆ cartesianError()

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

◆ 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.

28 { return tsos_.globalPosition(); }

References TrajectoryStateOnSurface::globalPosition(), and tsos_.

◆ 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.

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 }

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_.

◆ linearize() [2/2]

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

◆ 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.

23 { return track_; }

References track_.

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

◆ tsos()

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

Definition at line 24 of file TrackGhostTrackState.h.

24 { return tsos_; }

References tsos_.

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

◆ vertexStateOnGhostTrack()

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

Implements reco::BasicGhostTrackState.

Definition at line 81 of file TrackGhostTrackState.cc.

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 }

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

◆ vertexStateOnMeasurement()

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

Implements reco::BasicGhostTrackState.

Definition at line 125 of file TrackGhostTrackState.cc.

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 }

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

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
Vector3DBase
Definition: Vector3DBase.h:8
TrajectoryStateOnSurface::cartesianError
const CartesianTrajectoryError cartesianError() const
Definition: TrajectoryStateOnSurface.h:71
conv
static HepMC::IO_HEPEVT conv
Definition: BeamHaloProducer.cc:48
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
pos
Definition: PixelAliasList.h:18
ZElectronSkim_cff.rho
rho
Definition: ZElectronSkim_cff.py:38
sqr
int sqr(const T &t)
Definition: pfalgo_common_ref.h:9
CovarianceMatrix
Definition: CovarianceMatrix.h:27
relativeConstraints.error
error
Definition: relativeConstraints.py:53
reco::BasicGhostTrackState::lambda_
double lambda_
Definition: BasicGhostTrackState.h:62
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
Point3DBase< float, GlobalTag >
b
double b
Definition: hdecay.h:118
ROOT::Math
Definition: Transform3DPJ.h:41
reco::BasicGhostTrackState::Vertex
std::pair< GlobalPoint, GlobalError > Vertex
Definition: BasicGhostTrackState.h:27
AnalyticalImpactPointExtrapolator
Definition: AnalyticalImpactPointExtrapolator.h:26
reco::GhostTrackPrediction::direction
const GlobalVector direction() const
Definition: GhostTrackPrediction.h:63
reco::GhostTrackPrediction::position
GlobalPoint position(double lambda=0.) const
Definition: GhostTrackPrediction.h:67
reco::GhostTrackPrediction::rho2
double rho2() const
Definition: GhostTrackPrediction.h:53
reco::TransientTrack::impactPointState
TrajectoryStateOnSurface impactPointState() const
Definition: TransientTrack.h:98
Line
Definition: Line.h:10
reco::TrackGhostTrackState::tsos_
TrajectoryStateOnSurface tsos_
Definition: TrackGhostTrackState.h:44
reco::TrackGhostTrackState::isValid
bool isValid() const override
Definition: TrackGhostTrackState.h:26
reco::TransientTrack::field
const MagneticField * field() const
Definition: TransientTrack.h:110
CartesianTrajectoryError::matrix
const AlgebraicSymMatrix66 & matrix() const
Definition: CartesianTrajectoryError.h:28
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition: TrajectoryStateOnSurface.h:66
reco::TrackGhostTrackState::track_
TransientTrack track_
Definition: TrackGhostTrackState.h:45
reco::TrackGhostTrackState::track
const TransientTrack & track() const
Definition: TrackGhostTrackState.h:23
reco::GhostTrackPrediction::origin
const GlobalPoint origin() const
Definition: GhostTrackPrediction.h:62
reco::GhostTrackPrediction::cartesianError
CartesianError cartesianError(double lambda=0.) const
Definition: GhostTrackPrediction.cc:146
reco::BasicGhostTrackState::lambda
double lambda() const
Definition: BasicGhostTrackState.h:40
ztail.d
d
Definition: ztail.py:151
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
mps_splice.line
line
Definition: mps_splice.py:76
AnalyticalTrajectoryExtrapolatorToLine
Definition: AnalyticalTrajectoryExtrapolatorToLine.h:28
CartesianTrajectoryError::position
const GlobalError position() const
Position error submatrix.
Definition: CartesianTrajectoryError.h:41
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
g
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