101 fRealPart(q.fRealPart), fVectorPart(q.fVectorPart) {}
104 : fRealPart(real), fVectorPart(vect) {}
129 Error(
"operator()(i)",
"bad index (%d) returning 0",i);
146 Error(
"operator()(i)",
"bad index (%d) returning &fRealPart",i);
219 Error(
"operator/(Double_t)",
"bad value (%f) ignored",real);
292 (*this) *= -(1./norm2);
294 Error(
"DivideLeft(const TVector3)",
"bad norm2 (%f) ignored",norm2);
307 (*this) *= - (1./norm2);
309 Error(
"operator/=(const TVector3 &)",
"bad norm2 (%f) ignored",norm2);
321 double invNorm2 = 1./norm2;
325 Error(
"LeftQuotient(const TVector3 &)",
"bad norm2 (%f) ignored",norm2);
337 double invNorm2 = 1./norm2;
341 Error(
"operator/(const TVector3 &)",
"bad norm2 (%f) ignored",norm2);
416 (*this) *= (1./norm2);
418 Error(
"DivideLeft(const TQuaternion &)",
"bad norm2 (%f) ignored",norm2);
432 (*this) *= (1./norm2);
434 Error(
"operator/=(const TQuaternion&)",
"bad norm2 (%f) ignored",norm2);
446 double invNorm2 = 1./norm2;
452 Error(
"LeftQuotient(const TQuaternion&)",
"bad norm2 (%f) ignored",norm2);
464 double invNorm2 = 1./norm2;
470 Error(
"operator/(const TQuaternion &)",
"bad norm2 (%f) ignored",norm2);
479 double norm2 =
Norm2();
481 double invNorm2 = 1./norm2;
484 Error(
"Invert()",
"bad norm2 (%f) ignored",norm2);
501 double norm2 =
Norm2();
518 Error(
"Rotation()",
"bad norm2 (%f) ignored",norm2);
528 Printf(
"%s %s (r,x,y,z)=(%f,%f,%f,%f) \n (alpha,rho,theta,phi)=(%f,%f,%f,%f)",
GetName(),
GetTitle(),
TQuaternion operator-() const
Quaternion is a 4-component mathematic object quite convenient when dealing with space rotation (or r...
TQuaternion & SetQAngle(Double_t angle)
Set angle of quaternion (rad) - keep quaternion norm N.B : this angle is half of the corresponding ro...
void Rotate(TVector3 &vect) const
rotate vect by current quaternion
TQuaternion & operator/=(Double_t real)
TQuaternion & DivideLeft(const TVector3 &vector)
left division
TVector3 is a general three vector class, which can be used for the description of different vectors ...
TVector3 Cross(const TVector3 &) const
TQuaternion & operator*=(Double_t real)
TQuaternion(Double_t real=0, Double_t X=0, Double_t Y=0, Double_t Z=0)
TQuaternion & SetAxisQAngle(TVector3 &v, Double_t QAngle)
set quaternion from vector and angle (rad) quaternion is set as unitary N.B : this angle is half of t...
Double_t Theta() const
Return the polar angle.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void Print(Option_t *option="") const
Print Quaternion parameters.
TQuaternion operator*(Double_t real) const
product of quaternion with a real
Double_t GetQAngle() const
Get angle of quaternion (rad) N.B : this angle is half of the corresponding rotation angle...
TQuaternion & MultiplyLeft(const TVector3 &vector)
left multiplication
TQuaternion Conjugate() const
TQuaternion operator/(Double_t real) const
division by a real
TVector3 Rotation(const TVector3 &vect) const
rotation of vect by current quaternion
TQuaternion Invert() const
invert
TQuaternion LeftQuotient(const TVector3 &vector) const
left quotient
TQuaternion operator+(Double_t real) const
sum of quaternion with a real
Mother of all ROOT objects.
virtual const char * GetTitle() const
Returns title of object.
Double_t Phi() const
Return the azimuth angle. Returns phi from -pi to pi.
Double_t operator()(int) const
dereferencing operator const
virtual const char * GetName() const
Returns name of object.
double norm(double *x, double *p)
TQuaternion LeftProduct(const TVector3 &vector) const
left product