12 #include <TRotation.h>
46 void set(
const TVector3& position,
const TVector3& momentum,
double charge,
double Bz);
125 double alpha = acos(cosAlpha);
128 double ta = std::min(t1, t2);
129 double tb = std::max(t1 -
m_T0, t2 -
m_T0);
130 double t = (abs(ta) < abs(tb)) ? ta : tb;
137 if (t < 0) t +=
m_T0;
Utility for propagation of a particle along helix.
TVector3 getDirection(double length) const
Returns particle direction at given length.
TVector3 getPosition(double length) const
Returns particle position at given length.
double m_phi0
phi of reference position
void set(const TVector3 &position, const TVector3 &momentum, double charge, double Bz)
Sets the helix.
void moveReferencePosition(double length)
Moves reference position along helix by length.
double withinSingleTurn(double t) const
Returns helix length within a single turn.
double & kx
direction in x for zero magnetic field
double getDistanceToPlane(const TVector3 &point, const TVector3 &normal) const
Returns the distance along helix to the nearest intersection with a plane nearly parallel to z axis.
double & ky
direction in y for zero magnetic field
double & z0
z of reference position for zero magnetic field
double & kz
direction in z for zero magnetic field
HelixSwimmer()
default constructor
double & y0
y of reference position for zero magnetic field
double shortestDistance(double cosAlpha, double phi) const
Returns shortest distance.
double m_yc
helix axis position in y
TVector3 m_translation
translation vector
double m_omega
angular speed [1/cm]
double m_T0
helix length of single turn
double m_z0
z of reference position
void setTransformation(const TRotation &rotation, const TVector3 &translation)
Sets transformation from the frame in which helix is constructed to module local frame.
double m_xc
helix axis position in x
TRotation m_rotationInv
inverse of rotation matrix
double & x0
x of reference position for zero magnetic field
Abstract base class for different kinds of events.