AliFmHelix: a helper helix class Includes all the operations and specifications of the helix. Can be used to determine path lengths, distance of closest approach etc.
AliFmHelix(const AliFmHelix&) | |
AliFmHelix(double c, double dip, double phase, const AliFmThreeVector<double>& o, int h = -1) | |
virtual | ~AliFmHelix() |
AliFmThreeVector<double> | At(double s) const |
int | Bad(double WorldSize = 1.e+5) const |
double | Curvature() const |
double | DipAngle() const |
double | Distance(const AliFmThreeVector<double>& p, bool scanPeriods = true) const |
int | H() const |
virtual void | MoveOrigin(double s) |
AliFmHelix& | operator=(const AliFmHelix&) |
const AliFmThreeVector<double>& | Origin() const |
pair<double,double> | PathLength(double r) const |
double | PathLength(const AliFmThreeVector<double>& p, bool scanPeriods = true) const |
double | PathLength(const AliFmThreeVector<double>& r, const AliFmThreeVector<double>& n) const |
double | PathLength(double x, double y) const |
pair<double,double> | PathLength(double r, double x, double y, bool scanPeriods = true) |
pair<double,double> | PathLengths(const AliFmHelix& h, bool scanPeriods = true) const |
double | Period() const |
double | Phase() const |
void | SetParameters(double c, double dip, double phase, const AliFmThreeVector<double>& o, int h) |
bool | Valid(double world = 1.e+5) const |
double | X(double s) const |
double | XCenter() const |
double | Y(double s) const |
double | YCenter() const |
double | Z(double s) const |
AliFmHelix() | |
double | FudgePathLength(const AliFmThreeVector<double>& v) const |
void | SetCurvature(double d) |
void | SetDipAngle(double d) |
void | SetPhase(double d) |
double | fCosDipAngle | cosine of the dip angle |
double | fCosPhase | cosine of the phase |
double | fCurvature | curvature |
double | fDipAngle | Helix dip angle |
int | fH | -sign(q*B); |
AliFmThreeVector<double> | fOrigin | Helix origin |
double | fPhase | phase |
double | fSinDipAngle | sine of the dip angle |
double | fSinPhase | sine of the phase |
bool | fSingularity | true for straight line case (B=0) |
Inheritance Chart: | |||||||||
|
Constructor with helix parameters
The order in which the parameters are set is important since setCurvature might have to adjust the others.
calculate distance between origin an p along the helix
Returns the path length at the distance of closest approach between the helix and point p. For the case of B=0 (straight line) the path length can be calculated analytically. For B>0 there is unfortunately no easy solution to the problem. Here we use the Newton method to find the root of the referring equation. The 'fudgePathLength' serves as a starting value.
The math is taken from Maple with C(expr,optimized) and some hand-editing. It is not very nice but efficient. 'first' is the smallest of the two solutions (may be negative) 'second' is the other.
Vector 'r' defines the position of the center and vector 'n' the normal vector of the plane. For a straight line there is a simple analytical solution. For curvatures > 0 the root is determined by Newton method. In case no valid s can be found the max. largest value for s is returned.
Cannot handle case where one is a helix and the other one is a straight line.
curvature, dip angle, phase, origin, h