71 fB[0] =
fB[1] =
fB[2] = 0.;
94 fB[0] =
fB[1] =
fB[2] = 0.;
154 for (
Int_t i = 0; i < 3; i++)
183 Error(
"SetXYcurvature",
"Curvature %f not valid. Must be positive.",
fC);
187 Warning(
"SetXYcurvature",
"Curvature is zero. Helix is a straight line.");
198 Error(
"ctor",
"charge cannot be 0 - define it positive for a left-handed helix, negative otherwise");
220 for (
Int_t i = 0; i < 3; i++)
230 Error(
"ctor",
"Z step %f not valid. Must be positive.", step);
265 for (i = 0; i < 3; i++) {
301 dx = point[0] -
fPoint[0];
302 dy = point[1] -
fPoint[1];
303 dz = point[2] -
fPoint[2];
304 pdn = dx * norm[0] + dy * norm[1] + dz * norm[2];
305 ddn =
fDir[0] * norm[0] +
fDir[1] * norm[1] +
fDir[2] * norm[2];
308 if ((pdn * ddn) <= 0)
323 else if (safety > 2. *
r)
325 while (snext > safestep) {
329 dx = point[0] -
fPoint[0];
330 dy = point[1] -
fPoint[1];
331 dz = point[2] -
fPoint[2];
332 pdn = dx * norm[0] + dy * norm[1] + dz * norm[2];
333 ddn =
fDir[0] * norm[0] +
fDir[1] * norm[1] +
fDir[2] * norm[2];
339 else if (safety > 2. *
r) {
378 rot[0] = rot[4] * rot[8] - rot[7] * rot[5];
379 rot[3] = rot[7] * rot[2] - rot[1] * rot[8];
380 rot[6] = rot[1] * rot[5] - rot[4] * rot[2];
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Matrix class used for computing global transformations Should NOT be used for node definition.
void SetRotation(const Double_t *matrix)
void Clear(Option_t *option="") override
clear the data for this matrix
void SetTranslation(const Double_t *vect)
Class representing a helix curve.
Double_t ComputeSafeStep(Double_t epsil=1E-6) const
Compute safe linear step that can be made such that the error between linear-helix extrapolation is l...
~TGeoHelix() override
Destructor.
TGeoHelix()
Dummy constructor.
void InitDirection(Double_t dirx, Double_t diry, Double_t dirz, Bool_t is_normalized=kTRUE)
Initialize particle direction (tangent on the helix in initial point)
Double_t StepToPlane(Double_t *point, Double_t *norm)
Propagate initial point up to a given Z position in MARS.
Double_t GetTotalCurvature() const
Compute helix total curvature.
void SetXYcurvature(Double_t curvature)
Set XY curvature: c = 1/Rxy.
void SetHelixStep(Double_t hstep)
Set Z step of the helix on a complete turn. Positive or null.
void Step(Double_t step)
Make a step from current point along the helix and compute new point, direction and angle To reach a ...
void SetField(Double_t bx, Double_t by, Double_t bz, Bool_t is_normalized=kTRUE)
Initialize particle direction (tangent on the helix in initial point)
void SetCharge(Int_t charge)
Positive charge means left-handed helix.
void InitPoint(Double_t x0, Double_t y0, Double_t z0)
Initialize coordinates of a point on the helix.
void UpdateHelix()
Update the local helix matrix.
void ResetStep()
Reset current point/direction to initial values.
virtual void LocalToMasterVect(const Double_t *local, Double_t *master) const
convert a vector by multiplying its column vector (x, y, z, 1) to matrix inverse
virtual void LocalToMaster(const Double_t *local, Double_t *master) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix inverse
static Double_t Tolerance()
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Float_t Normalize(Float_t v[3])
Normalize a vector v in place.
T1 Sign(T1 a, T2 b)
Returns a value with the magnitude of a and the sign of b.
Double_t Sqrt(Double_t x)
Returns the square root of x.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.