102 fRealPart(q.fRealPart), fVectorPart(q.fVectorPart) {}
105 : fRealPart(real), fVectorPart(vect) {}
130 Error(
"operator()(i)",
"bad index (%d) returning 0",i);
147 Error(
"operator()(i)",
"bad index (%d) returning &fRealPart",i);
220 Error(
"operator/(Double_t)",
"bad value (%f) ignored",real);
293 (*this) *= -(1./norm2);
295 Error(
"DivideLeft(const TVector3)",
"bad norm2 (%f) ignored",norm2);
308 (*this) *= - (1./norm2);
310 Error(
"operator/=(const TVector3 &)",
"bad norm2 (%f) ignored",norm2);
322 double invNorm2 = 1./norm2;
326 Error(
"LeftQuotient(const TVector3 &)",
"bad norm2 (%f) ignored",norm2);
338 double invNorm2 = 1./norm2;
342 Error(
"operator/(const TVector3 &)",
"bad norm2 (%f) ignored",norm2);
417 (*this) *= (1./norm2);
419 Error(
"DivideLeft(const TQuaternion &)",
"bad norm2 (%f) ignored",norm2);
433 (*this) *= (1./norm2);
435 Error(
"operator/=(const TQuaternion&)",
"bad norm2 (%f) ignored",norm2);
447 double invNorm2 = 1./norm2;
453 Error(
"LeftQuotient(const TQuaternion&)",
"bad norm2 (%f) ignored",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.
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.
constexpr Double_t RadToDeg()
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)
constexpr Double_t PiOver2()
TQuaternion LeftProduct(const TVector3 &vector) const
left product