File indexing completed on 2025-01-30 10:03:32
0001 #ifndef HEP_EULERANGLES_H
0002 #define HEP_EULERANGLES_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #include <iostream>
0019 #include "CLHEP/Vector/defs.h"
0020
0021 namespace CLHEP {
0022
0023
0024 class HepEulerAngles;
0025 std::ostream & operator<<(std::ostream & os, const HepEulerAngles & aa);
0026 std::istream & operator>>(std::istream & is, HepEulerAngles & aa);
0027
0028
0029
0030
0031
0032 class HepEulerAngles {
0033
0034 protected:
0035 typedef HepEulerAngles EA;
0036 static double tolerance;
0037
0038 public:
0039
0040
0041 inline HepEulerAngles();
0042 inline HepEulerAngles( double phi, double theta, double psi );
0043
0044
0045
0046
0047
0048
0049 public:
0050 inline double getPhi() const;
0051 inline double phi() const;
0052 inline EA & setPhi( double phi );
0053
0054 inline double getTheta() const;
0055 inline double theta() const;
0056 inline EA & setTheta( double theta );
0057
0058 inline double getPsi() const;
0059 inline double psi() const;
0060 inline EA & setPsi( double psi );
0061
0062 inline EA & set( double phi, double theta, double psi );
0063
0064
0065
0066
0067 inline int compare ( const EA & ea ) const;
0068
0069 inline bool operator==( const EA & ea ) const;
0070 inline bool operator!=( const EA & ea ) const;
0071 inline bool operator< ( const EA & ea ) const;
0072 inline bool operator<=( const EA & ea ) const;
0073 inline bool operator> ( const EA & ea ) const;
0074 inline bool operator>=( const EA & ea ) const;
0075
0076
0077 inline static double getTolerance();
0078 inline static double setTolerance( double tol );
0079
0080 bool isNear ( const EA & ea, double epsilon = tolerance ) const;
0081 double howNear( const EA & ea ) const;
0082
0083
0084
0085 friend std::ostream & operator<<( std::ostream & os, const EA & ea );
0086 friend std::istream & operator>>( std::istream & is, EA & ea );
0087
0088
0089
0090 protected:
0091 double distance( const HepEulerAngles & ex ) const;
0092
0093
0094 protected:
0095 double phi_;
0096 double theta_;
0097 double psi_;
0098
0099 };
0100
0101 }
0102
0103
0104 namespace zmpv {
0105
0106 typedef CLHEP::HepEulerAngles EulerAngles;
0107
0108 }
0109
0110 #define EULERANGLES_ICC
0111 #include "CLHEP/Vector/EulerAngles.icc"
0112 #undef EULERANGLES_ICC
0113
0114 #ifdef ENABLE_BACKWARDS_COMPATIBILITY
0115
0116 using namespace CLHEP;
0117 #endif
0118
0119
0120 #endif