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