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

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

Definition at line 27 of file GhostTrackPrediction.h.

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

Definition at line 26 of file GhostTrackPrediction.h.

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

Definition at line 25 of file GhostTrackPrediction.h.

Constructor & Destructor Documentation

reco::GhostTrackPrediction::GhostTrackPrediction ( )
inline

Definition at line 29 of file GhostTrackPrediction.h.

Referenced by GhostTrackPrediction().

29 {}
reco::GhostTrackPrediction::GhostTrackPrediction ( const Vector prediction,
const Error error 
)
inline
GhostTrackPrediction::GhostTrackPrediction ( const GlobalPoint priorPosition,
const GlobalError priorError,
const GlobalVector direction,
double  coneRadius 
)

Definition at line 94 of file GhostTrackPrediction.cc.

References UEAnalysisJets_cfi::coneRadius, init(), AlCaHLTBitMon_ParallelJobs::p, perp(), alignCSCRings::r, diffTwoXMLs::r2, mathSSE::sqrt(), and OrderedSet::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 }
T mag2() const
Definition: PV3DBase.h:63
T perp() const
Definition: PV3DBase.h:69
T y() const
Definition: PV3DBase.h:60
T sqrt(T t)
Definition: SSEVec.h:19
T z() const
Definition: PV3DBase.h:61
void init(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, const GlobalError &directionError)
std::pair< OmniClusterRef, TrackingParticleRef > P
T eta() const
Definition: PV3DBase.h:73
T perp() const
Magnitude of transverse component.
long double T
T x() const
Definition: PV3DBase.h:59
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 relativeConstraints::error, GhostTrackPrediction(), init(), and track().

40  {
41  init(priorPosition, priorError, direction, directionError);
42  }
void init(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, const GlobalError &directionError)
GhostTrackPrediction::GhostTrackPrediction ( const GlobalTrajectoryParameters trajectory,
const CurvilinearTrajectoryError error 
)

Definition at line 120 of file GhostTrackPrediction.cc.

GhostTrackPrediction::GhostTrackPrediction ( const Track track)

Definition at line 124 of file GhostTrackPrediction.cc.

125  : prediction_(convert(GlobalTrajectoryParameters(GlobalPoint(track.vx(), track.vy(), track.vz()),
126  GlobalVector(track.px(), track.py(), track.pz()),
127  0,
128  nullptr))),
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:605
CovarianceMatrix covariance() const
return track covariance matrix
Definition: TrackBase.h:677
def convert(infile, ofile)
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:611
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:626
double vy() const
y coordinate of the reference point on track
Definition: TrackBase.h:623
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:608
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:620
Global3DVector GlobalVector
Definition: GlobalVector.h:10

Member Function Documentation

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

Definition at line 146 of file GhostTrackPrediction.cc.

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

Referenced by position(), 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 }
double lambda(const GlobalPoint &point) const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
const Error & covariance() const
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]; }
const Error& reco::GhostTrackPrediction::covariance ( void  ) const
inline
CurvilinearTrajectoryError GhostTrackPrediction::curvilinearError ( ) const

Definition at line 168 of file GhostTrackPrediction.cc.

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

Referenced by fts(), position(), 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 
182  return CurvilinearTrajectoryError(err);
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
const GlobalVector reco::GhostTrackPrediction::direction ( ) const
inline
double reco::GhostTrackPrediction::eta ( void  ) const
inline
FreeTrajectoryState GhostTrackPrediction::fts ( const MagneticField fieldProvider) const

Definition at line 185 of file GhostTrackPrediction.cc.

References curvilinearError(), and globalTrajectory().

Referenced by position(), and transientGhostTrack().

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

Definition at line 164 of file GhostTrackPrediction.cc.

References direction(), and origin().

Referenced by fts(), and position().

164  {
165  return GlobalTrajectoryParameters(origin(), direction(), 0, fieldProvider);
166 }
const GlobalPoint origin() const
const GlobalVector direction() const
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, cmsLHEtoEOSManager::l, GlobalErrorBase< T, ErrorWeightType >::matrix(), perp2(), prediction_, mathSSE::sqrt(), and qcdUeDQM_cfi::tip.

Referenced by GhostTrackPrediction(), and position().

61  {
62  double perp2 = direction.perp2();
63  GlobalVector dir = direction / std::sqrt(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 }
const AlgebraicSymMatrix33 matrix() const
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
T y() const
Definition: PV3DBase.h:60
T perp2() const
Definition: PV3DBase.h:68
T sqrt(T t)
Definition: SSEVec.h:19
T z() const
Definition: PV3DBase.h:61
T perp2() const
Squared magnitude of transverse component.
T x() const
Definition: PV3DBase.h:59
double reco::GhostTrackPrediction::ip ( ) const
inline
double reco::GhostTrackPrediction::lambda ( const GlobalPoint point) const
inline
const GlobalPoint reco::GhostTrackPrediction::origin ( ) const
inline
double reco::GhostTrackPrediction::phi ( void  ) const
inline
GlobalPoint reco::GhostTrackPrediction::position ( double  lambda = 0.) const
inline
GlobalError GhostTrackPrediction::positionError ( double  lambda = 0.) const

Definition at line 131 of file GhostTrackPrediction.cc.

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

Referenced by position(), 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 }
double lambda(const GlobalPoint &point) const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
const Error & covariance() const
const Vector& reco::GhostTrackPrediction::prediction ( ) const
inline
double reco::GhostTrackPrediction::rho ( ) const
inline
double reco::GhostTrackPrediction::rho2 ( ) const
inline
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(); }
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 GhostTrackPrediction::track ( double  ndof = 0.,
double  chi2 = 0. 
) const

Definition at line 189 of file GhostTrackPrediction.cc.

References curvilinearError(), DeadROC_duringRun::dir, direction(), origin(), and point.

Referenced by GhostTrackPrediction(), reco::GhostTrack::operator Track(), and position().

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 GlobalPoint origin() const
T y() const
Definition: PV3DBase.h:60
T z() const
Definition: PV3DBase.h:61
math::XYZPoint Point
point in the space
Definition: TrackBase.h:80
CurvilinearTrajectoryError curvilinearError() const
T x() const
Definition: PV3DBase.h:59
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
const GlobalVector direction() const
double reco::GhostTrackPrediction::z ( ) const
inline

Member Data Documentation

Error reco::GhostTrackPrediction::covariance_
private

Definition at line 86 of file GhostTrackPrediction.h.

Referenced by covariance(), and init().

Vector reco::GhostTrackPrediction::prediction_
private

Definition at line 85 of file GhostTrackPrediction.h.

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