CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GlobalTrajectoryParameters.cc
Go to the documentation of this file.
3 
5  const GlobalVector& direction,
6  double transverseCurvature, int,
7  const MagneticField* fieldProvider) :
8  theX(aX), theField(fieldProvider), hasCurvature_(true), cachedCurvature_(transverseCurvature)
9 {
10  double bza = -2.99792458e-3 * theField->inTesla(theX).z();
11  double qbp = transverseCurvature/bza*direction.perp();
12  theP = direction*fabs(1./qbp);
13  theCharge = qbp > 0. ? 1 : -1;
14 }
15 
17 {
18  if (!hasCurvature_) {
19  double bza = -2.99792458e-3 * theField->inTesla(theX).z();
21  hasCurvature_ = true;
22  }
23  return cachedCurvature_;
24 }
25 
27 {
28  return 2.99792458e-3 * theField->inTesla(x);
29 }
T perp() const
Definition: PV3DBase.h:66
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
GlobalVector magneticFieldInInverseGeV(const GlobalPoint &x) const
T z() const
Definition: PV3DBase.h:58
T theX
Definition: DDAxes.h:10