102 fRealPart(q.fRealPart), fVectorPart(q.fVectorPart) {}
130 Error(
"operator()(i)",
"bad index (%d) returning 0",i);
147 Error(
"operator()(i)",
"bad index (%d) returning &fRealPart",i);
166 Double_t norm =
Norm();
181 double norm = v.
Mag();
220 Error(
"operator/(Double_t)",
"bad value (%f) ignored",real);
289 Double_t norm2 = vect.
Mag2();
293 (*this) *= -(1./norm2);
295 Error(
"DivideLeft(const TVector3)",
"bad norm2 (%f) ignored",norm2);
304 Double_t norm2 = vect.
Mag2();
308 (*this) *= - (1./norm2);
310 Error(
"operator/=(const TVector3 &)",
"bad norm2 (%f) ignored",norm2);
319 Double_t norm2 = vect.
Mag2();
322 double invNorm2 = 1./norm2;
326 Error(
"LeftQuotient(const TVector3 &)",
"bad norm2 (%f) ignored",norm2);
335 Double_t norm2 = vect.
Mag2();
338 double invNorm2 = 1./norm2;
342 Error(
"operator/(const TVector3 &)",
"bad norm2 (%f) ignored",norm2);
413 Double_t norm2 = quaternion.
Norm2();
417 (*this) *= (1./norm2);
419 Error(
"DivideLeft(const TQuaternion &)",
"bad norm2 (%f) ignored",norm2);
428 Double_t norm2 = quaternion.
Norm2();
433 (*this) *= (1./norm2);
435 Error(
"operator/=(const TQuaternion&)",
"bad norm2 (%f) ignored",norm2);
444 Double_t norm2 = quaternion.
Norm2();
447 double invNorm2 = 1./norm2;
453 Error(
"LeftQuotient(const TQuaternion&)",
"bad norm2 (%f) ignored",norm2);
462 Double_t norm2 = quaternion.
Norm2();
465 double invNorm2 = 1./norm2;
471 Error(
"operator/(const TQuaternion &)",
"bad norm2 (%f) ignored",norm2);
480 double norm2 =
Norm2();
482 double invNorm2 = 1./norm2;
485 Error(
"Invert()",
"bad norm2 (%f) ignored",norm2);
502 double norm2 =
Norm2();
519 Error(
"Rotation()",
"bad norm2 (%f) ignored",norm2);
529 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.
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
constexpr Double_t RadToDeg()
Conversion from radian to degree: .
Double_t Phi() const
Return the azimuth angle. Returns phi from -pi to pi.
Double_t operator()(int) const
dereferencing operator const
constexpr Double_t PiOver2()
TQuaternion LeftProduct(const TVector3 &vector) const
left product