CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 29 of file GhostTrackPrediction.h.

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

Definition at line 27 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 31 of file GhostTrackPrediction.h.

31 {}
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 105 of file GhostTrackPrediction.cc.

References init(), P, AlCaHLTBitMon_ParallelJobs::p, perp(), alignCSCRings::r, diffTwoXMLs::r2, mathSSE::sqrt(), and lumiQTWidget::t.

110 {
111  double dTheta = std::cosh((double)direction.eta()) * coneRadius;
112 
113  double r2 = direction.mag2();
114  double r = std::sqrt(r2);
115  double perp = direction.perp();
116  double P = direction.x() / perp;
117  double p = direction.y() / perp;
118  double T = direction.z() / r;
119  double t = perp / r;
120  double h2 = dTheta * dTheta;
121  double d2 = coneRadius * coneRadius;
122 
123  GlobalError cov(r2 * (T*T * P*P * h2 + t*t * p*p * d2),
124  r2 * p*P * (T*T * h2 - t*t * d2),
125  r2 * (T*T * p*p * h2 + t*t * P*P * d2),
126  -r2 * t*T * P * h2,
127  -r2 * t*T * p * h2,
128  r2 * t*t * h2);
129 
130  init(priorPosition, priorError, direction, cov);
131 }
T mag2() const
Definition: PV3DBase.h:66
T perp() const
Definition: PV3DBase.h:72
T y() const
Definition: PV3DBase.h:63
#define P
T sqrt(T t)
Definition: SSEVec.h:18
T z() const
Definition: PV3DBase.h:64
void init(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, const GlobalError &directionError)
T eta() const
Definition: PV3DBase.h:76
T perp() const
Magnitude of transverse component.
long double T
T x() const
Definition: PV3DBase.h:62
reco::GhostTrackPrediction::GhostTrackPrediction ( const GlobalPoint priorPosition,
const GlobalError priorError,
const GlobalVector direction,
const GlobalError directionError 
)
inline

Definition at line 41 of file GhostTrackPrediction.h.

References init().

45  { init(priorPosition, priorError, direction, directionError); }
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 134 of file GhostTrackPrediction.cc.

136  :
137  prediction_(convert(trajectory)),
139 {
140 }
GhostTrackPrediction::GhostTrackPrediction ( const Track track)

Definition at line 142 of file GhostTrackPrediction.cc.

142  :
145  GlobalPoint(track.vx(), track.vy(), track.vz()),
146  GlobalVector(track.px(), track.py(), track.pz()),
147  0, 0))),
149 {
150 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:622
CovarianceMatrix covariance() const
return track covariance matrix
Definition: TrackBase.h:726
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:634
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:664
double vy() const
y coordinate of the reference point on track
Definition: TrackBase.h:658
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:628
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:652
Global3DVector GlobalVector
Definition: GlobalVector.h:10

Member Function Documentation

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

Definition at line 168 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().

169 {
170  double x = std::cos(phi());
171  double y = std::sin(phi());
172 
173  Matrix64 jacobian;
174  jacobian(0, 1) = -y;
175  jacobian(0, 3) = -y * lambda - x * ip();
176  jacobian(1, 1) = x;
177  jacobian(1, 3) = x * lambda - y * ip();
178  jacobian(2, 0) = 1.;
179  jacobian(2, 2) = lambda;
180  jacobian(3, 3) = -y;
181  jacobian(4, 3) = x;
182  jacobian(5, 2) = 1.;
183 
184  return ROOT::Math::Similarity(jacobian, covariance());
185 }
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 54 of file GhostTrackPrediction.h.

References prediction_.

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

54 { return prediction_[2]; }
const Error& reco::GhostTrackPrediction::covariance ( void  ) const
inline
CurvilinearTrajectoryError GhostTrackPrediction::curvilinearError ( ) const

Definition at line 193 of file GhostTrackPrediction.cc.

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

Referenced by fts(), and track().

194 {
195  double rho2I = 1. / rho2();
196  double rhoI = std::sqrt(rho2I);
197 
198  Matrix54 jacobian;
199  jacobian(1, 2) = rho2I;
200  jacobian(2, 3) = 1.;
201  jacobian(3, 1) = 1.;
202  jacobian(4, 0) = rhoI;
203  jacobian(4, 2) = - z() * rhoI * cotTheta() * rho2I;
204 
205  AlgebraicSymMatrix55 err = Similarity(jacobian, covariance());
206  err(0, 0) = 1.;
207 
208  return CurvilinearTrajectoryError(err);
209 }
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
T sqrt(T t)
Definition: SSEVec.h:18
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 211 of file GhostTrackPrediction.cc.

References curvilinearError(), and globalTrajectory().

Referenced by transientGhostTrack().

212 {
213  return FreeTrajectoryState(globalTrajectory(fieldProvider),
214  curvilinearError());
215 }
GlobalTrajectoryParameters globalTrajectory(const MagneticField *fieldProvider) const
CurvilinearTrajectoryError curvilinearError() const
GlobalTrajectoryParameters GhostTrackPrediction::globalTrajectory ( const MagneticField fieldProvider) const

Definition at line 188 of file GhostTrackPrediction.cc.

References direction(), and origin().

Referenced by fts().

188  {
190  0, fieldProvider);
191 }
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 66 of file GhostTrackPrediction.cc.

References covariance_, dir, cmsLHEtoEOSManager::l, GlobalErrorBase< T, ErrorWeightType >::matrix_new(), perp2(), prediction_, mathSSE::sqrt(), and HLT_25ns10e33_v2_cff::tip.

Referenced by GhostTrackPrediction().

71 {
72 
73  double perp2 = direction.perp2();
74  GlobalVector dir = direction / std::sqrt(perp2);
75  double tip = priorPosition.y() * dir.x() - priorPosition.x() * dir.y();
76  double l = priorPosition.x() * dir.x() + priorPosition.y() * dir.y();
77 
78  prediction_[0] = priorPosition.z() - dir.z() * l;
79  prediction_[1] = tip;
80  prediction_[2] = dir.z();
81  prediction_[3] = dir.phi();
82 
83  Matrix46 jacobian;
84  jacobian(0, 0) = -dir.x() * dir.z();
85  jacobian(1, 0) = -dir.y();
86  jacobian(0, 1) = -dir.y() * dir.z();
87  jacobian(1, 1) = dir.x();
88  jacobian(0, 2) = 1.;
89  jacobian(0, 3) = -dir.z() * priorPosition.x();
90  jacobian(1, 3) = priorPosition.y();
91  jacobian(3, 3) = -dir.y();
92  jacobian(0, 4) = -dir.z() * priorPosition.y();
93  jacobian(1, 4) = -priorPosition.x();
94  jacobian(3, 4) = dir.x();
95  jacobian(0, 5) = -l;
96  jacobian(2, 5) = 1.;
97 
98  Matrix6S origCov;
99  origCov.Place_at(priorError.matrix_new(), 0, 0);
100  origCov.Place_at(directionError.matrix_new() / perp2, 3, 3);
101 
102  covariance_ = ROOT::Math::Similarity(jacobian, origCov);
103 }
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
T y() const
Definition: PV3DBase.h:63
T perp2() const
Definition: PV3DBase.h:71
const AlgebraicSymMatrix33 & matrix_new() const
T sqrt(T t)
Definition: SSEVec.h:18
T z() const
Definition: PV3DBase.h:64
T perp2() const
Squared magnitude of transverse component.
dbl *** dir
Definition: mlp_gen.cc:35
T x() const
Definition: PV3DBase.h:62
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

Definition at line 74 of file GhostTrackPrediction.h.

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

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

75  { return origin() + lambda * direction(); }
const GlobalPoint origin() const
double lambda(const GlobalPoint &point) const
const GlobalVector direction() const
GlobalError GhostTrackPrediction::positionError ( double  lambda = 0.) const

Definition at line 152 of file GhostTrackPrediction.cc.

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

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

153 {
154  double x = std::cos(phi());
155  double y = std::sin(phi());
156 
157  Matrix34 jacobian;
158  jacobian(0, 1) = -y;
159  jacobian(0, 3) = -y * lambda - x * ip();
160  jacobian(1, 1) = x;
161  jacobian(1, 3) = x * lambda - y * ip();
162  jacobian(2, 0) = 1.;
163  jacobian(2, 2) = lambda;
164 
165  return ROOT::Math::Similarity(jacobian, covariance());
166 }
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 59 of file GhostTrackPrediction.h.

References rho(), and z().

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

59 { return z() / rho(); }
double reco::GhostTrackPrediction::theta ( void  ) const
inline

Definition at line 60 of file GhostTrackPrediction.h.

References cotTheta(), and M_PI_2.

Referenced by Tau.Tau::zImpact().

60 { return M_PI_2 - std::atan(cotTheta()); }
#define M_PI_2
Track GhostTrackPrediction::track ( double  ndof = 0.,
double  chi2 = 0. 
) const

Definition at line 217 of file GhostTrackPrediction.cc.

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

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

218 {
219  GlobalPoint origin = this->origin();
220  GlobalVector dir = direction().unit();
221 
222  Track::Point point(origin.x(), origin.y(), origin.z());
223  Track::Vector vector(dir.x(), dir.y(), dir.z());
224 
225  return Track(chi2, ndof, point, vector, 0, curvilinearError());
226 }
const GlobalPoint origin() const
T y() const
Definition: PV3DBase.h:63
T z() const
Definition: PV3DBase.h:64
math::XYZPoint Point
point in the space
Definition: TrackBase.h:83
CurvilinearTrajectoryError curvilinearError() const
dbl *** dir
Definition: mlp_gen.cc:35
T x() const
Definition: PV3DBase.h:62
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:80
*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

Definition at line 52 of file GhostTrackPrediction.h.

References prediction_.

Referenced by curvilinearError(), origin(), geometryXMLparser.Alignable::pos(), and sz().

52 { return prediction_[0]; }

Member Data Documentation

Error reco::GhostTrackPrediction::covariance_
private

Definition at line 95 of file GhostTrackPrediction.h.

Referenced by covariance(), and init().

Vector reco::GhostTrackPrediction::prediction_
private

Definition at line 94 of file GhostTrackPrediction.h.

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