17 #ifndef ROOT_Math_GenVector_AxisAngle 18 #define ROOT_Math_GenVector_AxisAngle 1 62 template<
class AnyVector>
92 template <
class OtherRotation>
99 template <
class OtherRotation>
121 IT
a = begin; IT
b = ++begin; IT c = ++begin;
124 assert (++begin==end);
127 if (tot > 0)
fAxis /= tot;
140 IT
a = begin; IT
b = ++begin; IT c = ++begin;
143 assert (++begin==end);
163 template<
class AnyVector>
174 template<
class AnyVector>
201 template <
class CoordSystem,
class Tag>
207 vNew.
SetXYZ( rxyz.
X(), rxyz.
Y(), rxyz.
Z() );
214 template <
class CoordSystem,
class Tag>
225 template <
class CoordSystem>
240 template <
class ForeignVector>
245 return ForeignVector ( rxyz.
X(), rxyz.
Y(), rxyz.
Z() );
251 template <
class AVector>
314 static double Pi() {
return 3.14159265358979323; }
Class describing a generic LorentzVector in the 4D space-time, using the specified coordinate system ...
double dist(Rotation3D const &r1, Rotation3D const &r2)
DisplacementVector3D< CoordSystem, Tag > & SetCoordinates(const Scalar src[])
Set internal data based on a C-style array of 3 Scalar numbers.
Scalar R() const
Polar R, converting if necessary from internal coordinate system.
DisplacementVector3D< Cartesian3D< Scalar > > AxisVector
definition of vector axis
DisplacementVector3D< CoordSystem, Tag > & SetXYZ(Scalar a, Scalar b, Scalar c)
set the values of the vector from the cartesian components (x,y,z) (if the vector is held in polar or...
Namespace for new ROOT classes and functions.
AVector operator*(const AVector &v) const
Overload operator * for rotation on a vector.
AxisAngle()
Default constructor (axis is z and angle is zero)
Rotation class representing a 3D rotation about the Z axis by the angle of rotation.
void SetComponents(const AnyVector &v, Scalar angle)
Set components from a non-zero vector (x,y,z) and an angle.
bool operator!=(const AxisAngle &rhs) const
Class describing a generic position vector (point) in 3 dimensions.
Rotation class with the (3D) rotation represented by angles describing first a rotation of an angle p...
AxisAngle(const OtherRotation &r)
Construct from another supported rotation type (see gv_detail::convert )
Rotation class with the (3D) rotation represented by a unit quaternion (u, i, j, k).
void GetComponents(IT begin, IT end) const
Get the axis and then the angle into data specified by an iterator begin and another to the end of th...
std::ostream & operator<<(std::ostream &os, const AxisAngle &a)
Stream Output and Input.
AxisAngle class describing rotation represented with direction axis (3D Vector) and an angle of rotat...
Scalar X() const
Cartesian X, converting if necessary from internal coordinate system.
Rotation class representing a 3D rotation about the Y axis by the angle of rotation.
AxisAngle(const AnyVector &v, Scalar angle)
Construct from a non-zero vector (x,y,z) and an angle.
void SetComponents(IT begin, IT end)
Set the axis and then the angle given a pair of pointers or iterators defining the beginning and end ...
Scalar Z() const
Cartesian Z, converting if necessary from internal coordinate system.
Scalar Y() const
Cartesian Y, converting if necessary from internal coordinate system.
DisplacementVector3D< Cartesian3D< double >, DefaultCoordinateSystemTag > XYZVector
Rotation operation on a cartesian vector.
Scalar E() const
return 4-th component (time, or energy for a 4-momentum vector)
AxisAngle & operator*=(const R &r)
Post-Multiply (on right) by another rotation : T = T*R.
AxisVector Axis() const
accesss to rotation axis
void Rectify()
Re-adjust components to eliminate small deviations from the axis being a unit vector and angles out o...
Class describing a generic displacement vector in 3 dimensions.
Scalar Angle() const
access to rotation angle
DisplacementVector3D unit() const
unsigned int r1[N_CITIES]
Rotation class representing a 3D rotation about the X axis by the angle of rotation.
void Invert()
Invert an AxisAngle rotation in place.
Rotation class with the (3D) rotation represented by a 3x3 orthogonal matrix.
void convert(R1 const &, R2 const)
void GetCoordinates(Scalar &a, Scalar &b, Scalar &c) const
get internal data into 3 Scalar numbers
void GetComponents(IT begin) const
Get the axis and then the angle into data specified by an iterator begin.
bool operator==(const AxisAngle &rhs) const
Equality/inequality operators.
EulerAngles class describing rotation as three angles (Euler Angles).
XYZVector operator()(const XYZVector &v) const
AxisAngle(IT begin, IT end)
Construct given a pair of pointers or iterators defining the beginning and end of an array of four Sc...
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
void GetComponents(AnyVector &axis, Scalar &angle) const
Set components into a non-zero vector (x,y,z) and an angle.
Namespace for new Math classes and functions.
AxisAngle Inverse() const
Return inverse of an AxisAngle rotation.
Scalar Distance(const R &r) const
Distance between two rotations.
AxisAngle & operator=(OtherRotation const &r)
Assign from another supported rotation type (see gv_detail::convert )
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
DefaultCoordinateSystemTag Default tag for identifying any coordinate system.
::ROOT::Math::DisplacementVector3D< Cartesian3D< Scalar > > Vect() const
get the spatial components of the Vector in a DisplacementVector based on Cartesian Coordinates ...
unsigned int r2[N_CITIES]