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 104 of file GhostTrackPrediction.cc.

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

109 {
110  double dTheta = std::cosh((double)direction.eta()) * coneRadius;
111 
112  double r2 = direction.mag2();
113  double r = std::sqrt(r2);
114  double perp = direction.perp();
115  double P = direction.x() / perp;
116  double p = direction.y() / perp;
117  double T = direction.z() / r;
118  double t = perp / r;
119  double h2 = dTheta * dTheta;
120  double d2 = coneRadius * coneRadius;
121 
122  GlobalError cov(r2 * (T*T * P*P * h2 + t*t * p*p * d2),
123  r2 * p*P * (T*T * h2 - t*t * d2),
124  r2 * (T*T * p*p * h2 + t*t * P*P * d2),
125  -r2 * t*T * P * h2,
126  -r2 * t*T * p * h2,
127  r2 * t*t * h2);
128 
129  init(priorPosition, priorError, direction, cov);
130 }
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:48
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 133 of file GhostTrackPrediction.cc.

135  :
136  prediction_(convert(trajectory)),
138 {
139 }
void convert(uint32 i, char_uint32 v)
Definition: MsgTools.h:46
GhostTrackPrediction::GhostTrackPrediction ( const Track track)

Definition at line 141 of file GhostTrackPrediction.cc.

141  :
144  GlobalPoint(track.vx(), track.vy(), track.vz()),
145  GlobalVector(track.px(), track.py(), track.pz()),
146  0, 0))),
148 {
149 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:133
void convert(uint32 i, char_uint32 v)
Definition: MsgTools.h:46
CovarianceMatrix covariance() const
return track covariance matrix
Definition: TrackBase.h:182
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:137
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:147
double vy() const
y coordinate of the reference point on track
Definition: TrackBase.h:145
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:135
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:143
Global3DVector GlobalVector
Definition: GlobalVector.h:10

Member Function Documentation

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

Definition at line 167 of file GhostTrackPrediction.cc.

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

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

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

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

Referenced by fts(), and track().

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

References curvilinearError(), and globalTrajectory().

Referenced by transientGhostTrack().

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

Definition at line 187 of file GhostTrackPrediction.cc.

References direction(), and origin().

Referenced by fts().

187  {
189  0, fieldProvider);
190 }
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 65 of file GhostTrackPrediction.cc.

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

Referenced by GhostTrackPrediction().

70 {
71 
72  double perp2 = direction.perp2();
73  GlobalVector dir = direction / std::sqrt(perp2);
74  double tip = priorPosition.y() * dir.x() - priorPosition.x() * dir.y();
75  double l = priorPosition.x() * dir.x() + priorPosition.y() * dir.y();
76 
77  prediction_[0] = priorPosition.z() - dir.z() * l;
78  prediction_[1] = tip;
79  prediction_[2] = dir.z();
80  prediction_[3] = dir.phi();
81 
82  Matrix46 jacobian;
83  jacobian(0, 0) = -dir.x() * dir.z();
84  jacobian(1, 0) = -dir.y();
85  jacobian(0, 1) = -dir.y() * dir.z();
86  jacobian(1, 1) = dir.x();
87  jacobian(0, 2) = 1.;
88  jacobian(0, 3) = -dir.z() * priorPosition.x();
89  jacobian(1, 3) = priorPosition.y();
90  jacobian(3, 3) = -dir.y();
91  jacobian(0, 4) = -dir.z() * priorPosition.y();
92  jacobian(1, 4) = -priorPosition.x();
93  jacobian(3, 4) = dir.x();
94  jacobian(0, 5) = -l;
95  jacobian(2, 5) = 1.;
96 
97  Matrix6S origCov;
98  origCov.Place_at(priorError.matrix_new(), 0, 0);
99  origCov.Place_at(directionError.matrix_new() / perp2, 3, 3);
100 
101  covariance_ = ROOT::Math::Similarity(jacobian, origCov);
102 }
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:48
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(), TrackIPProducer::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 151 of file GhostTrackPrediction.cc.

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

Referenced by TrackIPProducer::produce(), and vertexAtState().

152 {
153  double x = std::cos(phi());
154  double y = std::sin(phi());
155 
156  Matrix34 jacobian;
157  jacobian(0, 1) = -y;
158  jacobian(0, 3) = -y * lambda - x * ip();
159  jacobian(1, 1) = x;
160  jacobian(1, 3) = x * lambda - y * ip();
161  jacobian(2, 0) = 1.;
162  jacobian(2, 2) = lambda;
163 
164  return ROOT::Math::Similarity(jacobian, covariance());
165 }
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
Definition: DDAxes.h:10
const Vector& reco::GhostTrackPrediction::prediction ( ) const
inline
double reco::GhostTrackPrediction::rho ( ) const
inline

Definition at line 58 of file GhostTrackPrediction.h.

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

Referenced by eta(), reco::PositiveSideGhostTrackFitter::fit(), and sz().

58 { return std::sqrt(rho2()); }
T sqrt(T t)
Definition: SSEVec.h:48
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.

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 216 of file GhostTrackPrediction.cc.

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

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

217 {
218  GlobalPoint origin = this->origin();
219  GlobalVector dir = direction().unit();
220 
221  Track::Point point(origin.x(), origin.y(), origin.z());
222  Track::Vector vector(dir.x(), dir.y(), dir.z());
223 
224  return Track(chi2, ndof, point, vector, 0, curvilinearError());
225 }
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:76
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:74
*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().