Back to home page

EIC code displayed by LXR

 
 

    


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 // EulerAngles.icc - Inline methods for EulerAngles class.
0009 //
0010 // History:
0011 //    9-Apr-1997  MF    Split off from original angles.hh.  Content-free.
0012 //   26-Jan-1998  WEB   Fleshed out.
0013 //   12-Mar-1998  WEB   Gave default constructor proper default values
0014 //   13-Mar-1998  WEB   Simplified compare()
0015 //   17-Jun-1998  WEB   Added namespace support
0016 //   27-Jul-2000  MF    CLHEP version
0017 //
0018 // ----------------------------------------------------------------------
0019 
0020 namespace CLHEP  {
0021 
0022 
0023 inline HepEulerAngles::HepEulerAngles()
0024 : phi_( 0.0 ), theta_( 0.0 ), psi_( 0.0 )
0025 {}  // HepEulerAngles::HepEulerAngles()
0026 
0027 inline HepEulerAngles::HepEulerAngles ( 
0028                 double phi1, double ttheta, double psi1 )
0029                 : phi_( phi1 ), theta_( ttheta ), psi_( psi1 )
0030 {}  // HepEulerAngles::HepEulerAngles()
0031 
0032 inline double HepEulerAngles::getPhi() const {
0033   return  phi_;
0034 }  // HepEulerAngles::getPhi()
0035 
0036 inline double HepEulerAngles::phi() const {
0037   return  phi_;
0038 }  // HepEulerAngles::phi()
0039 
0040 inline HepEulerAngles & HepEulerAngles::setPhi( double phi1 ) {
0041   phi_ = phi1;
0042   return  *this;
0043 }  // HepEulerAngles::setPhi()
0044 
0045 inline double HepEulerAngles::getTheta() const {
0046   return  theta_;
0047 }  // HepEulerAngles::getTheta()
0048 
0049 inline double HepEulerAngles::theta() const {
0050   return  theta_;
0051 }  // HepEulerAngles::theta()
0052 
0053 inline HepEulerAngles & HepEulerAngles::setTheta( double ttheta ) {
0054   theta_ = ttheta;
0055   return  *this;
0056 }  // HepEulerAngles::setTheta()
0057 
0058 inline double HepEulerAngles::getPsi() const {
0059   return  psi_;
0060 }  // HepEulerAngles::getPsi()
0061 
0062 inline double HepEulerAngles::psi() const {
0063   return  psi_;
0064 }  // HepEulerAngles::psi()
0065 
0066 inline HepEulerAngles & HepEulerAngles::setPsi( double psi1 ) {
0067   psi_ = psi1;
0068   return  *this;
0069 }  // HepEulerAngles::setPsi()
0070 
0071 inline HepEulerAngles & 
0072     HepEulerAngles::set( double phi1, double ttheta, double psi1 ) {
0073   phi_ = phi1, theta_ = ttheta, psi_ = psi1;
0074   return *this;
0075 }  // HepEulerAngles::set()
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 }  // HepEulerAngles::compare()
0089 
0090 
0091 inline bool HepEulerAngles::operator==( const HepEulerAngles & ea ) const {
0092   return  ( compare( ea ) == 0 );
0093 }  // HepEulerAngles::operator==()
0094 
0095 inline bool HepEulerAngles::operator!=( const HepEulerAngles & ea ) const {
0096   return  ( compare( ea ) != 0 );
0097 }  // HepEulerAngles::operator!=()
0098 
0099 inline bool HepEulerAngles::operator<( const HepEulerAngles & ea ) const {
0100   return  ( compare( ea ) < 0 );
0101 }  // HepEulerAngles::operator<()
0102 
0103 inline bool HepEulerAngles::operator<=( const HepEulerAngles & ea ) const {
0104   return  ( compare( ea ) <= 0 );
0105 }  // HepEulerAngles::operator<=()
0106 
0107 inline bool HepEulerAngles::operator>( const HepEulerAngles & ea ) const {
0108   return  ( compare( ea ) > 0 );
0109 }  // HepEulerAngles::operator>()
0110 
0111 inline bool HepEulerAngles::operator>=( const HepEulerAngles & ea ) const {
0112   return  ( compare( ea ) >= 0 );
0113 }  // HepEulerAngles::operator>=()
0114 
0115 inline double HepEulerAngles::getTolerance() {
0116   return  tolerance;
0117 }  // HepEulerAngles::getTolerance()
0118 
0119 inline double HepEulerAngles::setTolerance( double tol ) {
0120   double oldTolerance( tolerance );
0121   tolerance = tol;
0122   return  oldTolerance;
0123 }  // HepEulerAngles::setTolerance()
0124 
0125 }  // namespace CLHEP