28 const HepGeom::Point3D<double> &PositionCm,
31 double CotTheta = 0.0;
37 if (BFieldTesla != 0.0 &&
q != 0.0) {
38 double CurvatureConstant = 0.0029979;
39 double Helicity = -1.0 * fabs(BFieldTesla) * fabs(
q) / (BFieldTesla *
q);
40 double Radius = fabs(MomentumGev.perp() / (CurvatureConstant * BFieldTesla *
q));
46 double phi1 = MomentumGev.phi();
47 double x = PositionCm.x(),
y = PositionCm.y(),
z = PositionCm.z();
48 double sinPhi1 =
sin(phi1), cosPhi1 =
cos(phi1);
49 double gamma = atan((
x * cosPhi1 +
y * sinPhi1) / (
x * sinPhi1 -
y * cosPhi1 - 1 / W));
52 Phi0 = Phi0 - 2.0 *
M_PI;
54 Phi0 = Phi0 + 2.0 *
M_PI;
55 D0 = ((1 / W +
y * cosPhi1 -
x * sinPhi1) /
cos(
gamma) - 1 / W);
56 CotTheta = MomentumGev.z() / MomentumGev.perp();
59 CLHEP::Hep3Vector direction = MomentumGev.unit();
60 CLHEP::Hep3Vector projectedDirection = CLHEP::Hep3Vector(direction.x(), direction.y(), 0.0).unit();
61 double s = projectedDirection.dot(PositionCm);
62 double sprime =
s /
sin(direction.theta());
63 Z0 = (PositionCm - sprime * direction).
z();
64 Phi0 = MomentumGev.phi();
65 CotTheta = MomentumGev.z() / MomentumGev.perp();
67 D0 = (PositionCm.y() *
cos(Phi0) - PositionCm.x() *
sin(Phi0));
134 return HepGeom::Point3D<double>(
137 return HepGeom::Point3D<double>(
152 return HepGeom::Vector3D<double>(xtan, ytan, ztan);
192 double rad = (
rho *
rho -
d *
d) / (1.0 + 2.0 *
c *
d);
199 if (
c * rprime > 1.0 ||
c * rprime < -1.0) {
202 L2D = asin(
c * rprime) /
c;