70 fB[0] =
fB[1] =
fB[2] = 0.;
93 fB[0] =
fB[1] =
fB[2] = 0.;
153 for (
Int_t i = 0; i < 3; i++)
182 Error(
"SetXYcurvature",
"Curvature %f not valid. Must be positive.",
fC);
186 Warning(
"SetXYcurvature",
"Curvature is zero. Helix is a straight line.");
197 Error(
"ctor",
"charge cannot be 0 - define it positive for a left-handed helix, negative otherwise");
219 for (
Int_t i = 0; i < 3; i++)
229 Error(
"ctor",
"Z step %f not valid. Must be positive.", step);
264 for (i = 0; i < 3; i++) {
300 dx = point[0] -
fPoint[0];
301 dy = point[1] -
fPoint[1];
302 dz = point[2] -
fPoint[2];
303 pdn = dx * norm[0] + dy * norm[1] + dz * norm[2];
304 ddn =
fDir[0] * norm[0] +
fDir[1] * norm[1] +
fDir[2] * norm[2];
307 if ((pdn * ddn) <= 0)
322 else if (safety > 2. *
r)
324 while (snext > safestep) {
328 dx = point[0] -
fPoint[0];
329 dy = point[1] -
fPoint[1];
330 dz = point[2] -
fPoint[2];
331 pdn = dx * norm[0] + dy * norm[1] + dz * norm[2];
332 ddn =
fDir[0] * norm[0] +
fDir[1] * norm[1] +
fDir[2] * norm[2];
338 else if (safety > 2. *
r) {
377 rot[0] = rot[4] * rot[8] - rot[7] * rot[5];
378 rot[3] = rot[7] * rot[2] - rot[1] * rot[8];
379 rot[6] = rot[1] * rot[5] - rot[4] * rot[2];
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
Matrix class used for computing global transformations Should NOT be used for node definition.
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.
static Double_t Tolerance()
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.