10#include <framework/datastore/RelationsObject.h>
12#include <Math/Vector3D.h>
13#include <TMatrixDfwd.h>
23 namespace HelixParameterIndex {
25 enum HelixParameterIndex {
75 Helix(
const ROOT::Math::XYZVector& position,
76 const ROOT::Math::XYZVector&
momentum,
77 const short int charge,
90 Helix(
const double& d0,
94 const double& tanLambda);
97 friend std::ostream&
operator<<(std::ostream& output,
const Helix& helix);
138 ROOT::Math::XYZVector
getMomentum(
const double bZ)
const;
153 double getKappa(
const double bZ)
const;
156 static double getAlpha(
const double bZ);
207 const double& nX,
const double& nY)
const;
256 double passiveMoveBy(
const double& byX,
271 TMatrixD calcPassiveMoveByJacobian(
const ROOT::Math::XYZVector& by,
const double expandBelowChi = M_PI / 8)
const;
295 void calcPassiveMoveByJacobian(
const double& byX,
298 const double expandBelowChi = M_PI / 8)
const;
408 void setCartesian(
const ROOT::Math::XYZVector& position,
409 const ROOT::Math::XYZVector&
momentum,
410 const short int charge,
double phi0(void) const
Return helix parameter phi0.
double dr(void) const
Return helix parameter dr.
Hep3Vector momentum(double dPhi=0.) const
returns momentum vector after rotating angle dPhi in phi direction.
HepPoint3D x(double dPhi=0.) const
returns position after rotating angle dPhi in phi direction.
Double32_t m_tanLambda
Memory for the slope of the track in the z coordinate over the two dimensional arc length (dz/ds)
double getPerigeeX() const
Calculates the x coordinate of the perigee point.
double getSinPhi0() const
Getter for the cosine of the azimuth angle of travel direction at the perigee.
double getMomentumZ(const double bZ) const
Calculates the z momentum of the particle at the perigee point.
Double32_t m_omega
Memory for the curvature of the signed curvature.
double getMomentumY(const double bZ) const
Calculates the y momentum of the particle at the perigee point.
void reverse()
Reverses the direction of travel of the helix in place.
double getCosPhi0() const
Getter for the cosine of the azimuth angle of travel direction at the perigee.
double getArcLength2DAtCylindricalR(const double &cylindricalR) const
Calculates the transverse travel distance at the point the helix first reaches the given cylindrical ...
static double calcASinXDividedByX(const double &x)
Implementation of the function asin(x) / x which handles small x values smoothly.
static double reversePhi(const double &phi)
Reverses an azimuthal angle to the opposite direction.
short getChargeSign() const
Return track charge sign (1, 0 or -1).
double getArcLength2DAtXY(const double &x, const double &y) const
Calculates the two dimensional arc length at which the circle in the xy projection is closest to the ...
Double32_t m_z0
Memory for the z coordinate of the perigee.
static double getAlpha(const double bZ)
Calculates the alpha value for a given magnetic field in Tesla.
double getCotTheta() const
Getter for cot theta, which is the z over two dimensional arc length slope of the track.
double getOmega() const
Getter for omega, which is a signed curvature measure of the track.
ROOT::Math::XYZVector getDirection() const
Getter for unit vector of momentum at the perigee position.
ROOT::Math::XYZVector getTangentialAtArcLength2D(const double &arcLength2D) const
Calculates the tangential vector to the helix curve at the given two dimensional arc length.
ROOT::Math::XYZVector getPositionAtArcLength2D(const double &arcLength2D) const
Calculates the position on the helix at the given two dimensional arc length.
Double32_t m_d0
Memory for the signed distance to the perigee.
ROOT::Math::XYZVector getUnitTangentialAtArcLength2D(const double &arcLength2D) const
Calculates the unit tangential vector to the helix curve at the given two dimensional arc length.
double getPerigeeZ() const
Calculates the z coordinate of the perigee point.
double getD0() const
Getter for d0, which is the signed distance to the perigee in the r-phi plane.
ROOT::Math::XYZVector getMomentum(const double bZ) const
Getter for vector of momentum at the perigee position.
void calcArcLength2DAndDrAtXY(const double &x, const double &y, double &arcLength2D, double &dr) const
Helper method to calculate the signed two dimensional arc length and the signed distance to the circl...
double passiveMoveBy(const ROOT::Math::XYZVector &by)
Moves origin of the coordinate system (passive transformation) by the given vector.
double getArcLength2DAtNormalPlane(const double &x, const double &y, const double &nX, const double &nY) const
Calculates the arc length to reach a plane parallel to the z axes.
double getMomentumX(const double bZ) const
Calculates the x momentum of the particle at the perigee point.
double getTanLambda() const
Getter for tan lambda, which is the z over two dimensional arc length slope of the track.
double getPerigeeY() const
Calculates the y coordinate of the perigee point.
double calcSecantLengthToArcLength2DFactor(const double &secantLength2D) const
Helper function to calculate the factor between the dimensional secant length and the two dimensional...
Double32_t m_phi0
Memory for the azimuth angle between the transverse momentum and the x axis, which is in [-pi,...
double calcArcLength2DAtDeltaCylindricalRAndDr(const double &deltaCylindricalR, const double &dr) const
Helper method to calculate the two dimensional arc length from the perigee to a point at cylindrical ...
double calcArcLength2DFromSecantLength(const double &secantLength2D) const
Helper function to calculate the two dimensional arc length from the length of a secant.
double getZ0() const
Getter for z0, which is the z coordinate of the perigee.
double getKappa(const double bZ) const
Getter for kappa, which is charge / transverse momentum or equivalently omega * alpha.
static double calcDerivativeOfATanXDividedByX(const double &x)
Implementation of the function d / dx (atan(x) / x) which handles small x values smoothly.
Helix()
Constructor initializing all perigee parameters to zero.
ClassDef(Helix, 2)
This class represents an ideal helix in perigee parameterization.
ROOT::Math::XYZVector getMomentumAtArcLength2D(const double &arcLength2D, const double &bz) const
Calculates the momentum vector at the given two dimensional arc length.
ROOT::Math::XYZVector getPerigee() const
Getter for the perigee position.
double getTransverseMomentum(const double bZ) const
Getter for the absolute value of the transverse momentum at the perigee.
double getPhi0() const
Getter for phi0, which is the azimuth angle of the transverse momentum at the perigee.
static double calcATanXDividedByX(const double &x)
Implementation of the function atan(x) / x which handles small x values smoothly.
Defines interface for accessing relations of objects in StoreArray.
std::ostream & operator<<(std::ostream &output, const IntervalOfValidity &iov)
Abstract base class for different kinds of events.