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 GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, const GlobalError &directionError)
 
 GhostTrackPrediction (const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, double coneRadius)
 
 GhostTrackPrediction (const GlobalTrajectoryParameters &trajectory, const CurvilinearTrajectoryError &error)
 
 GhostTrackPrediction (const Track &track)
 
 GhostTrackPrediction (const Vector &prediction, const Error &error)
 
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

Definition at line 30 of file GhostTrackPrediction.h.

◆ GhostTrackPrediction() [3/6]

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

Definition at line 94 of file GhostTrackPrediction.cc.

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 }

References UEAnalysisJets_cfi::coneRadius, direction(), init(), AlCaHLTBitMon_ParallelJobs::p, perp(), alignCSCRings::r, diffTwoXMLs::r2, mathSSE::sqrt(), and submitPVValidationJobs::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.

40  {
41  init(priorPosition, priorError, direction, directionError);
42  }

References direction(), and init().

◆ GhostTrackPrediction() [5/6]

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

Definition at line 120 of file GhostTrackPrediction.cc.

◆ GhostTrackPrediction() [6/6]

GhostTrackPrediction::GhostTrackPrediction ( const Track track)

Definition at line 124 of file GhostTrackPrediction.cc.

Member Function Documentation

◆ cartesianError()

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

Definition at line 146 of file GhostTrackPrediction.cc.

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 }

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

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

◆ cotTheta()

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

Definition at line 50 of file GhostTrackPrediction.h.

50 { return prediction_[2]; }

References prediction_.

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

◆ covariance()

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

◆ curvilinearError()

CurvilinearTrajectoryError GhostTrackPrediction::curvilinearError ( ) const

Definition at line 168 of file GhostTrackPrediction.cc.

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 }

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

Referenced by fts(), and track().

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

185  {
186  return FreeTrajectoryState(globalTrajectory(fieldProvider), curvilinearError());
187 }

References curvilinearError(), and globalTrajectory().

Referenced by transientGhostTrack().

◆ globalTrajectory()

GlobalTrajectoryParameters GhostTrackPrediction::globalTrajectory ( const MagneticField fieldProvider) const

Definition at line 164 of file GhostTrackPrediction.cc.

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

References direction(), and origin().

Referenced by fts().

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

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 }

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

Referenced by GhostTrackPrediction().

◆ ip()

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

Definition at line 49 of file GhostTrackPrediction.h.

49 { return prediction_[1]; }

References prediction_.

Referenced by cartesianError(), origin(), positionError(), and reco::SequentialGhostTrackFitter::stable().

◆ lambda()

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

◆ 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

◆ positionError()

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

Definition at line 131 of file GhostTrackPrediction.cc.

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 }

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

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

◆ prediction()

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

◆ rho()

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

Definition at line 54 of file GhostTrackPrediction.h.

54 { return std::sqrt(rho2()); }

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

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

◆ rho2()

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

◆ sz()

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

Definition at line 55 of file GhostTrackPrediction.h.

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

References rho(), and z().

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

◆ theta()

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

Definition at line 56 of file GhostTrackPrediction.h.

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

References cotTheta(), and M_PI_2.

Referenced by Tau.Tau::zImpact().

◆ track()

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

Definition at line 189 of file GhostTrackPrediction.cc.

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 }

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

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

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

Vector3DBase
Definition: Vector3DBase.h:8
DDAxes::y
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
reco::GhostTrackPrediction::rho
double rho() const
Definition: GhostTrackPrediction.h:54
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
reco::GhostTrackPrediction::covariance_
Error covariance_
Definition: GhostTrackPrediction.h:86
reco::TrackBase::vx
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:655
reco::TrackBase::px
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:640
reco::GhostTrackPrediction::phi
double phi() const
Definition: GhostTrackPrediction.h:51
GlobalErrorBase::matrix
const AlgebraicSymMatrix33 matrix() const
Definition: GlobalErrorBase.h:121
DDAxes::x
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
reco::GhostTrackPrediction::track
Track track(double ndof=0., double chi2=0.) const
Definition: GhostTrackPrediction.cc:189
perp
T perp() const
Magnitude of transverse component.
Definition: Basic3DVectorLD.h:133
relativeConstraints.error
error
Definition: relativeConstraints.py:53
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
ndof
Definition: HIMultiTrackSelector.h:49
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
reco::GhostTrackPrediction::prediction
const Vector & prediction() const
Definition: GhostTrackPrediction.h:59
CurvilinearTrajectoryError
Definition: CurvilinearTrajectoryError.h:27
reco::TrackBase::py
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:643
reco::TrackBase::vz
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:661
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
reco::Track
Definition: Track.h:27
reco::GhostTrackPrediction::ip
double ip() const
Definition: GhostTrackPrediction.h:49
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
reco::TrackBase::covariance
CovarianceMatrix covariance() const
return track covariance matrix
Definition: TrackBase.h:716
reco::GhostTrackPrediction::z
double z() const
Definition: GhostTrackPrediction.h:48
Point3DBase< float, GlobalTag >
qcdUeDQM_cfi.tip
tip
Definition: qcdUeDQM_cfi.py:23
fileCollector.convert
def convert(infile, ofile)
Definition: fileCollector.py:47
reco::GhostTrackPrediction::cotTheta
double cotTheta() const
Definition: GhostTrackPrediction.h:50
reco::GhostTrackPrediction::direction
const GlobalVector direction() const
Definition: GhostTrackPrediction.h:63
reco::GhostTrackPrediction::rho2
double rho2() const
Definition: GhostTrackPrediction.h:53
reco::GhostTrackPrediction::covariance
const Error & covariance() const
Definition: GhostTrackPrediction.h:60
diffTwoXMLs.r2
r2
Definition: diffTwoXMLs.py:73
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
GlobalErrorBase< double, ErrorMatrixTag >
perp2
T perp2() const
Squared magnitude of transverse component.
Definition: Basic3DVectorLD.h:130
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
alignCSCRings.r
r
Definition: alignCSCRings.py:93
reco::TrackBase::Point
math::XYZPoint Point
point in the space
Definition: TrackBase.h:80
reco::TrackBase::vy
double vy() const
y coordinate of the reference point on track
Definition: TrackBase.h:658
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
T
long double T
Definition: Basic3DVectorLD.h:48
reco::GhostTrackPrediction::origin
const GlobalPoint origin() const
Definition: GhostTrackPrediction.h:62
reco::GhostTrackPrediction::prediction_
Vector prediction_
Definition: GhostTrackPrediction.h:85
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
reco::TrackBase::pz
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:646
M_PI_2
#define M_PI_2
Definition: CSCGattiFunction.cc:6
P
std::pair< OmniClusterRef, TrackingParticleRef > P
Definition: BDHadronTrackMonitoringAnalyzer.cc:202
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
UEAnalysisJets_cfi.coneRadius
coneRadius
Definition: UEAnalysisJets_cfi.py:7
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23
reco::GhostTrackPrediction::globalTrajectory
GlobalTrajectoryParameters globalTrajectory(const MagneticField *fieldProvider) const
Definition: GhostTrackPrediction.cc:164
reco::GhostTrackPrediction::init
void init(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, const GlobalError &directionError)
Definition: GhostTrackPrediction.cc:58
reco::TrackBase::Vector
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:77
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
reco::GhostTrackPrediction::curvilinearError
CurvilinearTrajectoryError curvilinearError() const
Definition: GhostTrackPrediction.cc:168
reco::GhostTrackPrediction::lambda
double lambda(const GlobalPoint &point) const
Definition: GhostTrackPrediction.h:65