00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 namespace CLHEP {
00021
00022 inline HepEulerAngles::HepEulerAngles()
00023 : phi_( 0.0 ), theta_( 0.0 ), psi_( 0.0 )
00024 {}
00025
00026 inline HepEulerAngles::HepEulerAngles (
00027 double phi1, double theta1, double psi1 )
00028 : phi_( phi1 ), theta_( theta1 ), psi_( psi1 )
00029 {}
00030
00031 inline double HepEulerAngles::getPhi() const {
00032 return phi_;
00033 }
00034
00035 inline double HepEulerAngles::phi() const {
00036 return phi_;
00037 }
00038
00039 inline HepEulerAngles & HepEulerAngles::setPhi( double phi1 ) {
00040 phi_ = phi1;
00041 return *this;
00042 }
00043
00044 inline double HepEulerAngles::getTheta() const {
00045 return theta_;
00046 }
00047
00048 inline double HepEulerAngles::theta() const {
00049 return theta_;
00050 }
00051
00052 inline HepEulerAngles & HepEulerAngles::setTheta( double theta1 ) {
00053 theta_ = theta1;
00054 return *this;
00055 }
00056
00057 inline double HepEulerAngles::getPsi() const {
00058 return psi_;
00059 }
00060
00061 inline double HepEulerAngles::psi() const {
00062 return psi_;
00063 }
00064
00065 inline HepEulerAngles & HepEulerAngles::setPsi( double psi1 ) {
00066 psi_ = psi1;
00067 return *this;
00068 }
00069
00070 inline HepEulerAngles &
00071 HepEulerAngles::set( double phi1, double theta1, double psi1 ) {
00072 phi_ = phi1, theta_ = theta1, psi_ = psi1;
00073 return *this;
00074 }
00075
00076
00077 inline int HepEulerAngles::compare( const HepEulerAngles & ea ) const {
00078
00079 return phi_ < ea.phi_ ? -1
00080 : phi_ > ea.phi_ ? +1
00081 : theta_ < ea.theta_ ? -1
00082 : theta_ > ea.theta_ ? +1
00083 : psi_ < ea.psi_ ? -1
00084 : psi_ > ea.psi_ ? +1
00085 : 0;
00086
00087 }
00088
00089
00090 inline bool HepEulerAngles::operator==( const HepEulerAngles & ea ) const {
00091 return ( compare( ea ) == 0 );
00092 }
00093
00094 inline bool HepEulerAngles::operator!=( const HepEulerAngles & ea ) const {
00095 return ( compare( ea ) != 0 );
00096 }
00097
00098 inline bool HepEulerAngles::operator<( const HepEulerAngles & ea ) const {
00099 return ( compare( ea ) < 0 );
00100 }
00101
00102 inline bool HepEulerAngles::operator<=( const HepEulerAngles & ea ) const {
00103 return ( compare( ea ) <= 0 );
00104 }
00105
00106 inline bool HepEulerAngles::operator>( const HepEulerAngles & ea ) const {
00107 return ( compare( ea ) > 0 );
00108 }
00109
00110 inline bool HepEulerAngles::operator>=( const HepEulerAngles & ea ) const {
00111 return ( compare( ea ) >= 0 );
00112 }
00113
00114 inline double HepEulerAngles::getTolerance() {
00115 return tolerance;
00116 }
00117
00118 inline double HepEulerAngles::setTolerance( double tol ) {
00119 double oldTolerance( tolerance );
00120 tolerance = tol;
00121 return oldTolerance;
00122 }
00123
00124 }