Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
EulerAngles.h
이 파일의 문서화 페이지로 가기
1 // -*- C++ -*-
2 // CLASSDOC OFF
3 // $Id:$
4 // ---------------------------------------------------------------------------
5 // CLASSDOC ON
6 //
7 // This file is a part of the CLHEP - a Class Library for High Energy Physics.
8 //
9 // ----------------------------------------------------------------------
10 //
11 // EulerAngles.h EulerAngles class --
12 // Support class for PhysicsVectors classes
13 //
14 // History:
15 // 09-Jan-1998 WEB FixedTypes is now found in ZMutility
16 // 12-Jan-1998 WEB PI is now found in ZMutility
17 // 15-Jun-1998 WEB Added namespace support
18 // 02-May-2000 WEB No global using
19 // 26-Jul-2000 MF CLHEP version
20 //
21 // ----------------------------------------------------------------------
22 
23 #ifndef HEP_EULERANGLES_H
24 #define HEP_EULERANGLES_H
25 
26 #include <iostream>
27 
28 namespace CLHEP {
29 
30 // Declarations of classes and global methods
31 class HepEulerAngles;
32 std::ostream & operator<<(std::ostream & os, const HepEulerAngles & aa);
33 std::istream & operator>>(std::istream & is, HepEulerAngles & aa);
34 
40 
41 protected:
42  typedef HepEulerAngles EA; // just an abbreviation
43  static double tolerance; // to determine relative nearness
44 
45 public:
46 
47  // ---------- Constructors:
48  inline HepEulerAngles();
49  inline HepEulerAngles( double phi, double theta, double psi );
50 
51  // ---------- Destructor, copy constructor, assignment:
52  // use C++ defaults
53 
54  // ---------- Accessors:
55 
56 public:
57  inline double getPhi() const;
58  inline double phi() const;
59  inline EA & setPhi( double phi );
60 
61  inline double getTheta() const;
62  inline double theta() const;
63  inline EA & setTheta( double theta );
64 
65  inline double getPsi() const;
66  inline double psi() const;
67  inline EA & setPsi( double psi );
68 
69  inline EA & set( double phi, double theta, double psi );
70 
71  // ---------- Operations:
72 
73  // comparisons:
74  inline int compare ( const EA & ea ) const;
75 
76  inline bool operator==( const EA & ea ) const;
77  inline bool operator!=( const EA & ea ) const;
78  inline bool operator< ( const EA & ea ) const;
79  inline bool operator<=( const EA & ea ) const;
80  inline bool operator> ( const EA & ea ) const;
81  inline bool operator>=( const EA & ea ) const;
82 
83  // relative comparison:
84  inline static double getTolerance();
85  inline static double setTolerance( double tol );
86 
87  bool isNear ( const EA & ea, double epsilon = tolerance ) const;
88  double howNear( const EA & ea ) const;
89 
90  // ---------- I/O:
91 
92  friend std::ostream & operator<<( std::ostream & os, const EA & ea );
93  friend std::istream & operator>>( std::istream & is, EA & ea );
94 
95  // ---------- Helper methods:
96 
97 protected:
98  double distance( const HepEulerAngles & ex ) const;
99 
100  // ---------- Data members:
101 protected:
102  double phi_;
103  double theta_;
104  double psi_;
105 
106 }; // HepEulerAngles
107 
108 } // namespace CLHEP
109 
110 #include "CLHEP/Vector/EulerAngles.icc"
111 
112 #endif // EULERANGLES_H
double distance(const HepEulerAngles &ex) const
Definition: EulerAngles.cc:64
bool operator>=(const EA &ea) const
double psi() const
std::ostream & operator<<(std::ostream &os, const HepRandom &dist)
Definition: Random.cc:216
bool operator>(const EA &ea) const
bool operator!=(const EA &ea) const
double getTheta() const
EA & setPhi(double phi)
EA & set(double phi, double theta, double psi)
double getPsi() const
bool isNear(const EA &ea, double epsilon=tolerance) const
Definition: EulerAngles.cc:83
static double setTolerance(double tol)
std::istream & operator>>(std::istream &is, HepRandom &dist)
Definition: Random.cc:220
double phi() const
friend std::ostream & operator<<(std::ostream &os, const EA &ea)
bool operator==(const EA &ea) const
int compare(const EA &ea) const
static double tolerance
Definition: EulerAngles.h:43
bool operator<=(const EA &ea) const
friend std::istream & operator>>(std::istream &is, EA &ea)
double theta() const
EA & setPsi(double psi)
double epsilon(double density, double temperature)
static double getTolerance()
double howNear(const EA &ea) const
Definition: EulerAngles.cc:90
HepEulerAngles EA
Definition: EulerAngles.h:42
double getPhi() const
bool operator<(const EA &ea) const
EA & setTheta(double theta)