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;
HepGeom::Point3D< double > getPosition(double s=0.0) const
double getSinTheta() const
Sin< T >::type sin(const T &t)
void _refreshCache() const
void setCurvature(double curvature)
T curvature(T InversePt, const MagneticField &field)
void setPhi0(double phi0)
double getPathLengthAtRhoEquals(double rho) const
Cos< T >::type cos(const T &t)
double getZAtR(double r) const
double getPathLengthAtZ(double z) const
double getCurvature() const
double getCotTheta() const
double getSinPhi0() const
void getGflashTrajectoryPoint(GflashTrajectoryPoint &point, double s) const
void _cacheSinesAndCosines(double s) const
double getL2DAtR(double r) const
static constexpr float d0
HepGeom::Vector3D< double > getDirection(double s=0.0) const
double getCosPhi0() const
Geom::Theta< T > theta() const
double getCosTheta() const
*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
void setCotTheta(double cotTheta)
void initializeTrajectory(const HepGeom::Vector3D< double > &, const HepGeom::Point3D< double > &, double q, double Field)