File indexing completed on 2025-01-18 09:54:40
0001 #ifndef EULERANGLES_ICC
0002 #error "EulerAngles.icc included without EulerAngles.h"
0003 #endif
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 namespace CLHEP {
0021
0022
0023 inline HepEulerAngles::HepEulerAngles()
0024 : phi_( 0.0 ), theta_( 0.0 ), psi_( 0.0 )
0025 {}
0026
0027 inline HepEulerAngles::HepEulerAngles (
0028 double phi1, double ttheta, double psi1 )
0029 : phi_( phi1 ), theta_( ttheta ), psi_( psi1 )
0030 {}
0031
0032 inline double HepEulerAngles::getPhi() const {
0033 return phi_;
0034 }
0035
0036 inline double HepEulerAngles::phi() const {
0037 return phi_;
0038 }
0039
0040 inline HepEulerAngles & HepEulerAngles::setPhi( double phi1 ) {
0041 phi_ = phi1;
0042 return *this;
0043 }
0044
0045 inline double HepEulerAngles::getTheta() const {
0046 return theta_;
0047 }
0048
0049 inline double HepEulerAngles::theta() const {
0050 return theta_;
0051 }
0052
0053 inline HepEulerAngles & HepEulerAngles::setTheta( double ttheta ) {
0054 theta_ = ttheta;
0055 return *this;
0056 }
0057
0058 inline double HepEulerAngles::getPsi() const {
0059 return psi_;
0060 }
0061
0062 inline double HepEulerAngles::psi() const {
0063 return psi_;
0064 }
0065
0066 inline HepEulerAngles & HepEulerAngles::setPsi( double psi1 ) {
0067 psi_ = psi1;
0068 return *this;
0069 }
0070
0071 inline HepEulerAngles &
0072 HepEulerAngles::set( double phi1, double ttheta, double psi1 ) {
0073 phi_ = phi1, theta_ = ttheta, psi_ = psi1;
0074 return *this;
0075 }
0076
0077
0078 inline int HepEulerAngles::compare( const HepEulerAngles & ea ) const {
0079
0080 return phi_ < ea.phi_ ? -1
0081 : phi_ > ea.phi_ ? +1
0082 : theta_ < ea.theta_ ? -1
0083 : theta_ > ea.theta_ ? +1
0084 : psi_ < ea.psi_ ? -1
0085 : psi_ > ea.psi_ ? +1
0086 : 0;
0087
0088 }
0089
0090
0091 inline bool HepEulerAngles::operator==( const HepEulerAngles & ea ) const {
0092 return ( compare( ea ) == 0 );
0093 }
0094
0095 inline bool HepEulerAngles::operator!=( const HepEulerAngles & ea ) const {
0096 return ( compare( ea ) != 0 );
0097 }
0098
0099 inline bool HepEulerAngles::operator<( const HepEulerAngles & ea ) const {
0100 return ( compare( ea ) < 0 );
0101 }
0102
0103 inline bool HepEulerAngles::operator<=( const HepEulerAngles & ea ) const {
0104 return ( compare( ea ) <= 0 );
0105 }
0106
0107 inline bool HepEulerAngles::operator>( const HepEulerAngles & ea ) const {
0108 return ( compare( ea ) > 0 );
0109 }
0110
0111 inline bool HepEulerAngles::operator>=( const HepEulerAngles & ea ) const {
0112 return ( compare( ea ) >= 0 );
0113 }
0114
0115 inline double HepEulerAngles::getTolerance() {
0116 return tolerance;
0117 }
0118
0119 inline double HepEulerAngles::setTolerance( double tol ) {
0120 double oldTolerance( tolerance );
0121 tolerance = tol;
0122 return oldTolerance;
0123 }
0124
0125 }