# class ROOT::Math::EulerAngles

```
EulerAngles class describing rotation as three angles (Euler Angles).
The Euler angles definition matches that of Classical Mechanics (Goldstein).
It is also the same convention defined in
<A HREF="http://mathworld.wolfram.com/EulerAngles.html">mathworld</A>
and used in Mathematica and CLHEP. Note that the ROOT class TRotation defines
a slightly different convention.

@ingroup GenVector

```

## Function Members (Methods)

public:
 ~EulerAngles() ROOT::Math::EulerAngles EulerAngles() ROOT::Math::EulerAngles EulerAngles(const ROOT::Math::EulerAngles&) ROOT::Math::EulerAngles EulerAngles(ROOT::Math::EulerAngles::Scalar phi, ROOT::Math::EulerAngles::Scalar theta, ROOT::Math::EulerAngles::Scalar psi) void GetComponents(double* begin) const void GetComponents(ROOT::Math::EulerAngles::Scalar& phi, ROOT::Math::EulerAngles::Scalar& theta, ROOT::Math::EulerAngles::Scalar& psi) const ROOT::Math::EulerAngles Inverse() const void Invert() bool operator!=(const ROOT::Math::EulerAngles& rhs) const ROOT::Math::EulerAngles operator*(const ROOT::Math::Rotation3D& r) const ROOT::Math::EulerAngles operator*(const ROOT::Math::AxisAngle& a) const ROOT::Math::EulerAngles operator*(const ROOT::Math::EulerAngles& e) const ROOT::Math::EulerAngles operator*(const ROOT::Math::Quaternion& q) const ROOT::Math::EulerAngles operator*(const ROOT::Math::RotationX& rx) const ROOT::Math::EulerAngles operator*(const ROOT::Math::RotationY& ry) const ROOT::Math::EulerAngles operator*(const ROOT::Math::RotationZ& rz) const ROOT::Math::PositionVector3D,ROOT::Math::DefaultCoordinateSystemTag> operator*(const ROOT::Math::PositionVector3D,ROOT::Math::DefaultCoordinateSystemTag>& v) const ROOT::Math::DisplacementVector3D,ROOT::Math::DefaultCoordinateSystemTag> operator*(const ROOT::Math::DisplacementVector3D,ROOT::Math::DefaultCoordinateSystemTag>& v) const ROOT::Math::LorentzVector > operator*(const ROOT::Math::LorentzVector >& v) const ROOT::Math::EulerAngles& operator=(ROOT::Math::Rotation3D const& r) ROOT::Math::EulerAngles& operator=(ROOT::Math::Quaternion const& r) ROOT::Math::EulerAngles& operator=(ROOT::Math::RotationX const& r) ROOT::Math::EulerAngles& operator=(ROOT::Math::RotationY const& r) ROOT::Math::EulerAngles& operator=(ROOT::Math::RotationZ const& r) ROOT::Math::EulerAngles& operator=(const ROOT::Math::EulerAngles&) bool operator==(const ROOT::Math::EulerAngles& rhs) const ROOT::Math::EulerAngles::Scalar Phi() const ROOT::Math::EulerAngles::Scalar Psi() const void Rectify() void SetComponents(double* begin, double* end) void SetComponents(ROOT::Math::EulerAngles::Scalar phi, ROOT::Math::EulerAngles::Scalar theta, ROOT::Math::EulerAngles::Scalar psi) void SetPhi(ROOT::Math::EulerAngles::Scalar phi) void SetPsi(ROOT::Math::EulerAngles::Scalar psi) void SetTheta(ROOT::Math::EulerAngles::Scalar theta) ROOT::Math::EulerAngles::Scalar Theta() const
private:
 static double Pi()

## Data Members

private:
 double fPhi Z rotation angle (first) defined in [-PI,PI] double fPsi Z rotation angle (third) defined in [-PI,PI] double fTheta X rotation angle (second) defined only [0,PI]

## Function documentation

```     Default constructor

```
`{ }`
EulerAngles(ROOT::Math::EulerAngles::Scalar phi, ROOT::Math::EulerAngles::Scalar theta, ROOT::Math::EulerAngles::Scalar psi)
```      Constructor from phi, theta and psi

```
`{Rectify();}`
EulerAngles(IT begin, IT end)
```      Construct given a pair of pointers or iterators defining the
beginning and end of an array of three Scalars, to be treated as
the angles phi, theta and psi.

```
`{ SetComponents(begin,end); }`
void Rectify()
``` The compiler-generated copy ctor, copy assignment, and dtor are OK.

Re-adjust components place angles in canonical ranges

```
EulerAngles & operator=( OtherRotation const & r )
```      Assign from any other rotation (see gv_detail::convert )

```
operator=( AxisAngle const & a )
```      Assign from an AxisAngle

```
`{ return operator=(EulerAngles(a)); }`
operator=( Quaternion const & q )
```      Assign from a Quaternion

```
`{return operator=(EulerAngles(q)); }`
operator=( RotationZ const & r )
```      Assign from an axial rotation

```
`{ return operator=(EulerAngles(r)); }`
operator=( RotationY const & r )
`{ return operator=(EulerAngles(r)); }`
operator=( RotationX const & r )
`{ return operator=(EulerAngles(r)); }`
void SetComponents(double* begin, double* end)
``` ======== Components ==============

Set the three Euler angles given a pair of pointers or iterators
defining the beginning and end of an array of three Scalars.

```
void GetComponents(IT begin, IT end)
```      Get the axis and then the angle into data specified by an iterator begin
and another to the end of the desired data (4 past start).

```
void GetComponents(double* begin) const
```      Get the axis and then the angle into data specified by an iterator begin

```
void SetComponents(ROOT::Math::EulerAngles::Scalar phi, ROOT::Math::EulerAngles::Scalar theta, ROOT::Math::EulerAngles::Scalar psi)
```      Set the components phi, theta, psi based on three Scalars.

```
void SetPhi(ROOT::Math::EulerAngles::Scalar phi)
```      Set Phi Euler angle		// JMM 30 Jan. 2006

```
`{ fPhi=phi; Rectify(); }`
Scalar Phi() const
```      Return Phi Euler angle

```
`{ return fPhi; }`
void SetTheta(ROOT::Math::EulerAngles::Scalar theta)
```      Set Theta Euler angle		// JMM 30 Jan. 2006

```
`{ fTheta=theta; Rectify(); }`
Scalar Theta() const
```      Return Theta Euler angle

```
`{ return fTheta; }`
void SetPsi(ROOT::Math::EulerAngles::Scalar psi)
```      Set Psi Euler angle		// JMM 30 Jan. 2006

```
`{ fPsi=psi; Rectify(); }`
Scalar Psi() const
```      Return Psi Euler angle

```
`{ return fPsi; }`
AVector operator*(const AVector & v)
```      Overload operator * for rotation on a vector

```
void Invert()
```      Invert a rotation in place

theta stays the same and negative rotation in Theta is done via a rotation
of + PI in phi and Psi
```
EulerAngles Inverse() const
```      Return inverse of a rotation

```
`{ return EulerAngles(-fPsi + Pi(), fTheta, -fPhi + Pi()); }`
return ! operator==(rhs)
double Pi()
`{ return M_PI; }`
EulerAngles operator*(RotationX const & r1, EulerAngles const & r2)
```   Multiplication of an axial rotation by an AxisAngle

```
EulerAngles operator*(RotationY const & r1, EulerAngles const & r2)
EulerAngles operator*(RotationZ const & r1, EulerAngles const & r2)