CMS 3D CMS Logo

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

#include <GhostTrackPrediction.h>

Public Types

typedef ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > CartesianError
 
typedef ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > Error
 
typedef ROOT::Math::SVector< double, 4 > Vector
 

Public Member Functions

CartesianError cartesianError (double lambda=0.) const
 
double cotTheta () const
 
const Errorcovariance () const
 
CurvilinearTrajectoryError curvilinearError () const
 
const GlobalVector direction () const
 
double eta () const
 
FreeTrajectoryState fts (const MagneticField *fieldProvider) const
 
 GhostTrackPrediction ()
 
 GhostTrackPrediction (const Vector &prediction, const Error &error)
 
 GhostTrackPrediction (const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, double coneRadius)
 
 GhostTrackPrediction (const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, const GlobalError &directionError)
 
 GhostTrackPrediction (const GlobalTrajectoryParameters &trajectory, const CurvilinearTrajectoryError &error)
 
 GhostTrackPrediction (const Track &track)
 
GlobalTrajectoryParameters globalTrajectory (const MagneticField *fieldProvider) const
 
double ip () const
 
double lambda (const GlobalPoint &point) const
 
const GlobalPoint origin () const
 
double phi () const
 
GlobalPoint position (double lambda=0.) const
 
GlobalError positionError (double lambda=0.) const
 
const Vectorprediction () const
 
double rho () const
 
double rho2 () const
 
double sz () const
 
double theta () const
 
Track track (double ndof=0., double chi2=0.) const
 
double z () const
 

Private Member Functions

void init (const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, const GlobalError &directionError)
 

Private Attributes

Error covariance_
 
Vector prediction_
 

Detailed Description

Definition at line 21 of file GhostTrackPrediction.h.

Member Typedef Documentation

◆ CartesianError

typedef ROOT::Math::SMatrix<double, 6, 6, ROOT::Math::MatRepSym<double, 6> > reco::GhostTrackPrediction::CartesianError

Definition at line 27 of file GhostTrackPrediction.h.

◆ Error

typedef ROOT::Math::SMatrix<double, 4, 4, ROOT::Math::MatRepSym<double, 4> > reco::GhostTrackPrediction::Error

Definition at line 26 of file GhostTrackPrediction.h.

◆ Vector

typedef ROOT::Math::SVector<double, 4> reco::GhostTrackPrediction::Vector

Definition at line 25 of file GhostTrackPrediction.h.

Constructor & Destructor Documentation

◆ GhostTrackPrediction() [1/6]

reco::GhostTrackPrediction::GhostTrackPrediction ( )
inline

Definition at line 29 of file GhostTrackPrediction.h.

29 {}

◆ GhostTrackPrediction() [2/6]

reco::GhostTrackPrediction::GhostTrackPrediction ( const Vector prediction,
const Error error 
)
inline

◆ GhostTrackPrediction() [3/6]

GhostTrackPrediction::GhostTrackPrediction ( const GlobalPoint priorPosition,
const GlobalError priorError,
const GlobalVector direction,
double  coneRadius 
)

Definition at line 94 of file GhostTrackPrediction.cc.

References direction(), init(), AlCaHLTBitMon_ParallelJobs::p, perp(), diffTwoXMLs::r2, mathSSE::sqrt(), and submitPVValidationJobs::t.

97  {
98  double dTheta = std::cosh((double)direction.eta()) * coneRadius;
99 
100  double r2 = direction.mag2();
101  double r = std::sqrt(r2);
102  double perp = direction.perp();
103  double P = direction.x() / perp;
104  double p = direction.y() / perp;
105  double T = direction.z() / r;
106  double t = perp / r;
107  double h2 = dTheta * dTheta;
108  double d2 = coneRadius * coneRadius;
109 
110  GlobalError cov(r2 * (T * T * P * P * h2 + t * t * p * p * d2),
111  r2 * p * P * (T * T * h2 - t * t * d2),
112  r2 * (T * T * p * p * h2 + t * t * P * P * d2),
113  -r2 * t * T * P * h2,
114  -r2 * t * T * p * h2,
115  r2 * t * t * h2);
116 
117  init(priorPosition, priorError, direction, cov);
118 }
const GlobalVector direction() const
T sqrt(T t)
Definition: SSEVec.h:19
void init(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, const GlobalError &directionError)
T perp() const
Magnitude of transverse component.
std::pair< OmniClusterRef, TrackingParticleRef > P
long double T

◆ GhostTrackPrediction() [4/6]

reco::GhostTrackPrediction::GhostTrackPrediction ( const GlobalPoint priorPosition,
const GlobalError priorError,
const GlobalVector direction,
const GlobalError directionError 
)
inline

Definition at line 37 of file GhostTrackPrediction.h.

References direction(), and init().

40  {
41  init(priorPosition, priorError, direction, directionError);
42  }
const GlobalVector direction() const
void init(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, const GlobalError &directionError)

◆ GhostTrackPrediction() [5/6]

GhostTrackPrediction::GhostTrackPrediction ( const GlobalTrajectoryParameters trajectory,
const CurvilinearTrajectoryError error 
)

◆ GhostTrackPrediction() [6/6]

GhostTrackPrediction::GhostTrackPrediction ( const Track track)

Definition at line 124 of file GhostTrackPrediction.cc.

126  GlobalVector(track.px(), track.py(), track.pz()),
127  0,
128  nullptr))),
Track track(double ndof=0., double chi2=0.) const
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:655
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:640
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:643
CovarianceMatrix covariance() const
return track covariance matrix
Definition: TrackBase.h:716
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:661
def convert(infile, ofile)
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:646
double vy() const
y coordinate of the reference point on track
Definition: TrackBase.h:658
Global3DVector GlobalVector
Definition: GlobalVector.h:10

Member Function Documentation

◆ cartesianError()

Matrix6S GhostTrackPrediction::cartesianError ( double  lambda = 0.) const

Definition at line 146 of file GhostTrackPrediction.cc.

References funct::cos(), covariance(), ip(), lambda(), phi(), funct::sin(), and x.

Referenced by reco::VertexGhostTrackState::vertexStateOnGhostTrack(), reco::TrackGhostTrackState::vertexStateOnGhostTrack(), and reco::TrackGhostTrackState::vertexStateOnMeasurement().

146  {
147  double x = std::cos(phi());
148  double y = std::sin(phi());
149 
150  Matrix64 jacobian;
151  jacobian(0, 1) = -y;
152  jacobian(0, 3) = -y * lambda - x * ip();
153  jacobian(1, 1) = x;
154  jacobian(1, 3) = x * lambda - y * ip();
155  jacobian(2, 0) = 1.;
156  jacobian(2, 2) = lambda;
157  jacobian(3, 3) = -y;
158  jacobian(4, 3) = x;
159  jacobian(5, 2) = 1.;
160 
161  return ROOT::Math::Similarity(jacobian, covariance());
162 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double lambda(const GlobalPoint &point) const
const Error & covariance() const

◆ cotTheta()

double reco::GhostTrackPrediction::cotTheta ( ) const
inline

Definition at line 50 of file GhostTrackPrediction.h.

References prediction_.

Referenced by curvilinearError(), direction(), eta(), rho2(), and theta().

50 { return prediction_[2]; }

◆ covariance()

const Error& reco::GhostTrackPrediction::covariance ( void  ) const
inline

◆ curvilinearError()

CurvilinearTrajectoryError GhostTrackPrediction::curvilinearError ( ) const

Definition at line 168 of file GhostTrackPrediction.cc.

References cotTheta(), covariance(), submitPVResolutionJobs::err, rho2(), mathSSE::sqrt(), and z().

Referenced by fts(), and track().

168  {
169  double rho2I = 1. / rho2();
170  double rhoI = std::sqrt(rho2I);
171 
172  Matrix54 jacobian;
173  jacobian(1, 2) = rho2I;
174  jacobian(2, 3) = 1.;
175  jacobian(3, 1) = 1.;
176  jacobian(4, 0) = rhoI;
177  jacobian(4, 2) = -z() * rhoI * cotTheta() * rho2I;
178 
179  AlgebraicSymMatrix55 err = Similarity(jacobian, covariance());
180  err(0, 0) = 1.;
181 
183 }
T sqrt(T t)
Definition: SSEVec.h:19
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
const Error & covariance() const

◆ direction()

const GlobalVector reco::GhostTrackPrediction::direction ( ) const
inline

◆ eta()

double reco::GhostTrackPrediction::eta ( void  ) const
inline

◆ fts()

FreeTrajectoryState GhostTrackPrediction::fts ( const MagneticField fieldProvider) const

Definition at line 185 of file GhostTrackPrediction.cc.

References curvilinearError(), and globalTrajectory().

Referenced by transientGhostTrack().

185  {
186  return FreeTrajectoryState(globalTrajectory(fieldProvider), curvilinearError());
187 }
GlobalTrajectoryParameters globalTrajectory(const MagneticField *fieldProvider) const
CurvilinearTrajectoryError curvilinearError() const

◆ globalTrajectory()

GlobalTrajectoryParameters GhostTrackPrediction::globalTrajectory ( const MagneticField fieldProvider) const

Definition at line 164 of file GhostTrackPrediction.cc.

References direction(), and origin().

Referenced by fts().

164  {
165  return GlobalTrajectoryParameters(origin(), direction(), 0, fieldProvider);
166 }
const GlobalVector direction() const
const GlobalPoint origin() const

◆ init()

void GhostTrackPrediction::init ( const GlobalPoint priorPosition,
const GlobalError priorError,
const GlobalVector direction,
const GlobalError directionError 
)
private

Definition at line 58 of file GhostTrackPrediction.cc.

References covariance_, DeadROC_duringRun::dir, direction(), MainPageGenerator::l, GlobalErrorBase< T, ErrorWeightType >::matrix(), perp2(), prediction_, mathSSE::sqrt(), and reco::tip().

Referenced by GhostTrackPrediction().

61  {
62  double perp2 = direction.perp2();
64  double tip = priorPosition.y() * dir.x() - priorPosition.x() * dir.y();
65  double l = priorPosition.x() * dir.x() + priorPosition.y() * dir.y();
66 
67  prediction_[0] = priorPosition.z() - dir.z() * l;
68  prediction_[1] = tip;
69  prediction_[2] = dir.z();
70  prediction_[3] = dir.phi();
71 
72  Matrix46 jacobian;
73  jacobian(0, 0) = -dir.x() * dir.z();
74  jacobian(1, 0) = -dir.y();
75  jacobian(0, 1) = -dir.y() * dir.z();
76  jacobian(1, 1) = dir.x();
77  jacobian(0, 2) = 1.;
78  jacobian(0, 3) = -dir.z() * priorPosition.x();
79  jacobian(1, 3) = priorPosition.y();
80  jacobian(3, 3) = -dir.y();
81  jacobian(0, 4) = -dir.z() * priorPosition.y();
82  jacobian(1, 4) = -priorPosition.x();
83  jacobian(3, 4) = dir.x();
84  jacobian(0, 5) = -l;
85  jacobian(2, 5) = 1.;
86 
87  Matrix6S origCov;
88  origCov.Place_at(priorError.matrix(), 0, 0);
89  origCov.Place_at(directionError.matrix() / perp2, 3, 3);
90 
91  covariance_ = ROOT::Math::Similarity(jacobian, origCov);
92 }
T z() const
Definition: PV3DBase.h:61
T perp2() const
Squared magnitude of transverse component.
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float tip(ConstView const &tracks, int32_t i)
Definition: TracksSoA.h:85
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
const GlobalVector direction() const
T sqrt(T t)
Definition: SSEVec.h:19
const AlgebraicSymMatrix33 matrix() const

◆ ip()

double reco::GhostTrackPrediction::ip ( ) const
inline

◆ lambda()

double reco::GhostTrackPrediction::lambda ( const GlobalPoint point) const
inline

Definition at line 65 of file GhostTrackPrediction.h.

References direction(), origin(), point, and rho2().

Referenced by cartesianError(), reco::PositiveSideGhostTrackFitter::fit(), reco::GhostTrack::GhostTrack(), position(), positionError(), and IPProducer< Container, Base, Helper >::produce().

65 { return (point - origin()) * direction() / rho2(); }
const GlobalVector direction() const
const GlobalPoint origin() 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

◆ origin()

const GlobalPoint reco::GhostTrackPrediction::origin ( ) const
inline

◆ phi()

double reco::GhostTrackPrediction::phi ( void  ) const
inline

◆ position()

GlobalPoint reco::GhostTrackPrediction::position ( double  lambda = 0.) const
inline

Definition at line 67 of file GhostTrackPrediction.h.

References direction(), lambda(), and origin().

Referenced by reco::TrackGhostTrackState::linearize(), IPProducer< Container, Base, Helper >::produce(), and vertexAtState().

67 { return origin() + lambda * direction(); }
const GlobalVector direction() const
const GlobalPoint origin() const
double lambda(const GlobalPoint &point) const

◆ positionError()

GlobalError GhostTrackPrediction::positionError ( double  lambda = 0.) const

Definition at line 131 of file GhostTrackPrediction.cc.

References funct::cos(), covariance(), ip(), lambda(), phi(), funct::sin(), and x.

Referenced by IPProducer< Container, Base, Helper >::produce(), and vertexAtState().

131  {
132  double x = std::cos(phi());
133  double y = std::sin(phi());
134 
135  Matrix34 jacobian;
136  jacobian(0, 1) = -y;
137  jacobian(0, 3) = -y * lambda - x * ip();
138  jacobian(1, 1) = x;
139  jacobian(1, 3) = x * lambda - y * ip();
140  jacobian(2, 0) = 1.;
141  jacobian(2, 2) = lambda;
142 
143  return ROOT::Math::Similarity(jacobian, covariance());
144 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double lambda(const GlobalPoint &point) const
const Error & covariance() const

◆ prediction()

const Vector& reco::GhostTrackPrediction::prediction ( ) const
inline

◆ rho()

double reco::GhostTrackPrediction::rho ( ) const
inline

Definition at line 54 of file GhostTrackPrediction.h.

References rho2(), and mathSSE::sqrt().

Referenced by Lepton.Lepton::absIsoFromEA(), Muon.Muon::absIsoWithFSR(), eta(), and sz().

54 { return std::sqrt(rho2()); }
T sqrt(T t)
Definition: SSEVec.h:19

◆ rho2()

double reco::GhostTrackPrediction::rho2 ( ) const
inline

◆ sz()

double reco::GhostTrackPrediction::sz ( ) const
inline

Definition at line 55 of file GhostTrackPrediction.h.

References rho(), and z().

Referenced by reco::SequentialGhostTrackFitter::stable().

55 { return z() / rho(); }

◆ theta()

double reco::GhostTrackPrediction::theta ( void  ) const
inline

Definition at line 56 of file GhostTrackPrediction.h.

References cotTheta(), and M_PI_2.

Referenced by Tau.Tau::zImpact().

56 { return M_PI_2 - std::atan(cotTheta()); }
#define M_PI_2

◆ track()

Track GhostTrackPrediction::track ( double  ndof = 0.,
double  chi2 = 0. 
) const

Definition at line 189 of file GhostTrackPrediction.cc.

References nano_mu_local_reco_cff::chi2, curvilinearError(), DeadROC_duringRun::dir, direction(), ndof, origin(), point, and trackerHitRTTI::vector.

Referenced by reco::GhostTrack::operator Track().

189  {
190  GlobalPoint origin = this->origin();
191  GlobalVector dir = direction().unit();
192 
193  Track::Point point(origin.x(), origin.y(), origin.z());
194  Track::Vector vector(dir.x(), dir.y(), dir.z());
195 
196  return Track(chi2, ndof, point, vector, 0, curvilinearError());
197 }
const GlobalVector direction() const
math::XYZPoint Point
point in the space
Definition: TrackBase.h:80
CurvilinearTrajectoryError curvilinearError() const
const GlobalPoint origin() const
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:77
*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

◆ z()

double reco::GhostTrackPrediction::z ( ) const
inline

Member Data Documentation

◆ covariance_

Error reco::GhostTrackPrediction::covariance_
private

Definition at line 86 of file GhostTrackPrediction.h.

Referenced by covariance(), and init().

◆ prediction_

Vector reco::GhostTrackPrediction::prediction_
private

Definition at line 85 of file GhostTrackPrediction.h.

Referenced by cotTheta(), init(), ip(), phi(), prediction(), and z().