Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
BoostY.h
이 파일의 문서화 페이지로 가기
1 // -*- C++ -*-
2 //
3 // This file is a part of the CLHEP - a Class Library for High Energy Physics.
4 //
5 // This is the definition of the HepBoostY class for performing specialized
6 // Lorentz transformations which are pure boosts in the Y direction, on
7 // objects of the HepLorentzVector class.
8 //
9 // HepLorentzRotation is a concrete implementation of Hep4RotationInterface.
10 //
11 // .SS See Also
12 // RotationInterfaces.h
13 // LorentzVector.h LorentzRotation.h
14 // Boost.h
15 //
16 // .SS Author
17 // Mark Fischler
18 
19 #ifndef HEP_BOOSTY_H
20 #define HEP_BOOSTY_H
21 
22 #ifdef GNUPRAGMA
23 #pragma interface
24 #endif
25 
28 
29 namespace CLHEP {
30 
31 // Declarations of classes and global methods
32 class HepBoostY;
33 inline HepBoostY inverseOf ( const HepBoostY & b );
34 class HepBoost;
35 class HepRotation;
36 
41 class HepBoostY {
42 
43 public:
44 
45  // ---------- Constructors and Assignment:
46 
47  inline HepBoostY();
48  // Default constructor. Gives a boost of 0.
49 
50  inline HepBoostY(const HepBoostY & b);
51  // Copy constructor.
52 
53  inline HepBoostY & operator = (const HepBoostY & m);
54  // Assignment.
55 
56  HepBoostY & set (double beta);
57  inline HepBoostY (double beta);
58  // Constructor from beta
59 
60  // ---------- Accessors:
61 
62  inline double beta() const;
63  inline double gamma() const;
64  inline Hep3Vector boostVector() const;
65  inline Hep3Vector getDirection() const;
66 
67  inline double xx() const;
68  inline double xy() const;
69  inline double xz() const;
70  inline double xt() const;
71  inline double yx() const;
72  inline double yy() const;
73  inline double yz() const;
74  inline double yt() const;
75  inline double zx() const;
76  inline double zy() const;
77  inline double zz() const;
78  inline double zt() const;
79  inline double tx() const;
80  inline double ty() const;
81  inline double tz() const;
82  inline double tt() const;
83  // Elements of the matrix.
84 
85  inline HepLorentzVector col1() const;
86  inline HepLorentzVector col2() const;
87  inline HepLorentzVector col3() const;
88  inline HepLorentzVector col4() const;
89  // orthosymplectic column vectors
90 
91  inline HepLorentzVector row1() const;
92  inline HepLorentzVector row2() const;
93  inline HepLorentzVector row3() const;
94  inline HepLorentzVector row4() const;
95  // orthosymplectic row vectors
96 
97  HepRep4x4 rep4x4() const;
98  // 4x4 representation:
99 
101  // Symmetric 4x4 representation.
102 
103 
104  // ---------- Decomposition:
105 
106  void decompose (HepRotation & rotation, HepBoost & boost) const;
107  void decompose (HepAxisAngle & rotation, Hep3Vector & boost) const;
108  // Find R and B such that L = R*B -- trivial, since R is identity
109 
110  void decompose (HepBoost & boost, HepRotation & rotation) const;
111  void decompose (Hep3Vector & boost, HepAxisAngle & rotation) const;
112  // Find R and B such that L = B*R -- trivial, since R is identity
113 
114  // ---------- Comparisons:
115 
116  inline int compare( const HepBoostY & b ) const;
117  // Dictionary-order comparison, in order of beta.
118  // Used in operator<, >, <=, >=
119 
120  inline bool operator == (const HepBoostY & b) const;
121  inline bool operator != (const HepBoostY & b) const;
122  inline bool operator <= (const HepBoostY & b) const;
123  inline bool operator >= (const HepBoostY & b) const;
124  inline bool operator < (const HepBoostY & b) const;
125  inline bool operator > (const HepBoostY & b) const;
126  // Comparisons.
127 
128  inline bool isIdentity() const;
129  // Returns true if a null boost.
130 
131  inline double distance2( const HepBoostY & b ) const;
132  double distance2( const HepBoost & b ) const;
133  // Defined as the distance2 between the vectors (gamma*betaVector)
134 
135  double distance2( const HepRotation & r ) const;
136  double distance2( const HepLorentzRotation & lt ) const;
137  // Decompose lt = B*R; add norm2 to distance2 to between boosts.
138 
139  inline double howNear( const HepBoostY & b ) const;
140  inline double howNear( const HepBoost & b ) const;
141  inline double howNear( const HepRotation & r ) const;
142  inline double howNear( const HepLorentzRotation & lt ) const;
143 
144  inline bool isNear( const HepBoostY & b,
146  inline bool isNear( const HepBoost & b,
148  bool isNear( const HepRotation & r,
150  bool isNear( const HepLorentzRotation & lt,
152 
153  // ---------- Properties:
154 
155  inline double norm2() const;
156  // distance2 (IDENTITY), which is beta^2 * gamma^2
157 
158  void rectify();
159  // sets according to the stored beta
160 
161  // ---------- Application:
162 
163  inline HepLorentzVector operator()( const HepLorentzVector & w ) const;
164  // Transform a Lorentz Vector.
165 
166  inline HepLorentzVector operator* ( const HepLorentzVector & w ) const;
167  // Multiplication with a Lorentz Vector.
168 
169  // ---------- Operations in the group of 4-Rotations
170 
171  HepBoostY operator * (const HepBoostY & b) const;
172  HepLorentzRotation operator * (const HepBoost & b) const;
173  HepLorentzRotation operator * (const HepRotation & r) const;
175  // Product of two Lorentz Rotations (this) * lt - matrix multiplication
176  // Notice that the product of two pure boosts in different directions
177  // is no longer a pure boost.
178 
179  inline HepBoostY inverse() const;
180  // Return the inverse.
181 
182  inline friend HepBoostY inverseOf ( const HepBoostY & b );
183  // global methods to invert.
184 
185  inline HepBoostY & invert();
186  // Inverts the Boost matrix.
187 
188  // ---------- I/O:
189 
190  std::ostream & print( std::ostream & os ) const;
191  // Output form is BOOSTY (beta=..., gamma=...);
192 
193  // ---------- Tolerance
194 
195  static inline double getTolerance();
196  static inline double setTolerance(double tol);
197 
198 protected:
199 
201  ( const HepLorentzVector & w ) const;
202  // Multiplication with a Lorentz Vector.
203 
206 
207  inline HepBoostY (double beta, double gamma);
208 
209  double beta_;
210  double gamma_;
211 
212 }; // HepBoostY
213 
214 inline
215 std::ostream & operator <<
216  ( std::ostream & os, const HepBoostY& b ) {return b.print(os);}
217 
218 } // namespace CLHEP
219 
220 #include "CLHEP/Vector/BoostY.icc"
221 
222 #endif /* HEP_BOOSTY_H */
HepBoostY & set(double beta)
Definition: BoostY.cc:22
HepLorentzVector row1() const
bool operator<(const HepBoostY &b) const
bool operator==(const HepBoostY &b) const
HepLorentzVector operator*(const HepLorentzVector &w) const
bool operator>(const HepBoostY &b) const
double norm2() const
HepLorentzRotation matrixMultiplication(const HepRep4x4 &m) const
HepBoostY & invert()
double yx() const
double xz() const
double tx() const
double ty() const
double tz() const
HepLorentzVector row4() const
bool operator<=(const HepBoostY &b) const
HepLorentzVector col1() const
double howNear(const HepBoostY &b) const
double tt() const
HepBoostY inverse() const
bool operator>=(const HepBoostY &b) const
HepBoostY & operator=(const HepBoostY &m)
HepLorentzVector operator()(const HepLorentzVector &w) const
double zy() const
double yz() const
double zt() const
friend HepBoostY inverseOf(const HepBoostY &b)
HepLorentzVector vectorMultiplication(const HepLorentzVector &w) const
HepBoost inverseOf(const HepBoost &lt)
int compare(const HepBoostY &b) const
double distance2(const HepBoostY &b) const
HepLorentzVector col3() const
static constexpr double m
double epsilon(double density, double temperature)
double xy() const
bool operator!=(const HepBoostY &b) const
HepRep4x4 rep4x4() const
Definition: BoostY.cc:38
double zz() const
double xt() const
bool isIdentity() const
HepLorentzVector row3() const
Hep3Vector getDirection() const
HepLorentzVector row2() const
bool isNear(const HepBoostY &b, double epsilon=Hep4RotationInterface::tolerance) const
double beta_
Definition: BoostY.h:209
double yy() const
Hep3Vector boostVector() const
double xx() const
double yt() const
HepLorentzVector col2() const
double zx() const
void decompose(HepRotation &rotation, HepBoost &boost) const
Definition: BoostY.cc:56
void rectify()
Definition: BoostY.cc:121
HepRep4x4Symmetric rep4x4Symmetric() const
Definition: BoostY.cc:46
double gamma() const
static double setTolerance(double tol)
std::ostream & print(std::ostream &os) const
Definition: BoostY.cc:156
static DLL_API double tolerance
double gamma_
Definition: BoostY.h:210
static double getTolerance()
double beta() const
HepLorentzVector col4() const