CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
BoostY.h
Go to the documentation of this file.
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#include "CLHEP/Vector/defs.h"
23#include "CLHEP/Vector/RotationInterfaces.h"
24#include "CLHEP/Vector/LorentzVector.h"
25
26namespace CLHEP {
27
28// Declarations of classes and global methods
29class HepBoostY;
30inline HepBoostY inverseOf ( const HepBoostY & b );
31class HepBoost;
32class HepRotation;
33
34/**
35 * @author
36 * @ingroup vector
37 */
38class HepBoostY {
39
40public:
41
42 // ---------- Constructors and Assignment:
43
44 inline HepBoostY();
45 // Default constructor. Gives a boost of 0.
46
47 inline HepBoostY(const HepBoostY & b);
48 inline HepBoostY(HepBoostY && b) = default;
49 // Copy and move constructors.
50
51 inline HepBoostY & operator = (const HepBoostY & m);
52 inline HepBoostY & operator = (HepBoostY && m) = default;
53 // Copy and move assignment operators.
54
55 HepBoostY & set (double beta);
56 inline HepBoostY (double beta);
57 // Constructor from beta
58
59 // ---------- Accessors:
60
61 inline double beta() const;
62 inline double gamma() const;
63 inline Hep3Vector boostVector() const;
64 inline Hep3Vector getDirection() const;
65
66 inline double xx() const;
67 inline double xy() const;
68 inline double xz() const;
69 inline double xt() const;
70 inline double yx() const;
71 inline double yy() const;
72 inline double yz() const;
73 inline double yt() const;
74 inline double zx() const;
75 inline double zy() const;
76 inline double zz() const;
77 inline double zt() const;
78 inline double tx() const;
79 inline double ty() const;
80 inline double tz() const;
81 inline double tt() const;
82 // Elements of the matrix.
83
84 inline HepLorentzVector col1() const;
85 inline HepLorentzVector col2() const;
86 inline HepLorentzVector col3() const;
87 inline HepLorentzVector col4() const;
88 // orthosymplectic column vectors
89
90 inline HepLorentzVector row1() const;
91 inline HepLorentzVector row2() const;
92 inline HepLorentzVector row3() const;
93 inline HepLorentzVector row4() const;
94 // orthosymplectic row vectors
95
96 HepRep4x4 rep4x4() const;
97 // 4x4 representation:
98
100 // Symmetric 4x4 representation.
101
102
103 // ---------- Decomposition:
104
105 void decompose (HepRotation & rotation, HepBoost & boost) const;
106 void decompose (HepAxisAngle & rotation, Hep3Vector & boost) const;
107 // Find R and B such that L = R*B -- trivial, since R is identity
108
109 void decompose (HepBoost & boost, HepRotation & rotation) const;
110 void decompose (Hep3Vector & boost, HepAxisAngle & rotation) const;
111 // Find R and B such that L = B*R -- trivial, since R is identity
112
113 // ---------- Comparisons:
114
115 inline int compare( const HepBoostY & b ) const;
116 // Dictionary-order comparison, in order of beta.
117 // Used in operator<, >, <=, >=
118
119 inline bool operator == (const HepBoostY & b) const;
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 // Comparisons.
126
127 inline bool isIdentity() const;
128 // Returns true if a null boost.
129
130 inline double distance2( const HepBoostY & b ) const;
131 double distance2( const HepBoost & b ) const;
132 // Defined as the distance2 between the vectors (gamma*betaVector)
133
134 double distance2( const HepRotation & r ) const;
135 double distance2( const HepLorentzRotation & lt ) const;
136 // Decompose lt = B*R; add norm2 to distance2 to between boosts.
137
138 inline double howNear( const HepBoostY & b ) const;
139 inline double howNear( const HepBoost & b ) const;
140 inline double howNear( const HepRotation & r ) const;
141 inline double howNear( const HepLorentzRotation & lt ) const;
142
143 inline bool isNear( const HepBoostY & b,
144 double epsilon=Hep4RotationInterface::tolerance) const;
145 inline bool isNear( const HepBoost & b,
146 double epsilon=Hep4RotationInterface::tolerance) const;
147 bool isNear( const HepRotation & r,
148 double epsilon=Hep4RotationInterface::tolerance) const;
149 bool isNear( const HepLorentzRotation & lt,
150 double epsilon=Hep4RotationInterface::tolerance) const;
151
152 // ---------- Properties:
153
154 inline double norm2() const;
155 // distance2 (IDENTITY), which is beta^2 * gamma^2
156
157 void rectify();
158 // sets according to the stored beta
159
160 // ---------- Application:
161
163 // Transform a Lorentz Vector.
164
166 // Multiplication with a Lorentz Vector.
167
168 // ---------- Operations in the group of 4-Rotations
169
170 HepBoostY operator * (const HepBoostY & b) const;
171 HepLorentzRotation operator * (const HepBoost & b) const;
174 // Product of two Lorentz Rotations (this) * lt - matrix multiplication
175 // Notice that the product of two pure boosts in different directions
176 // is no longer a pure boost.
177
178 inline HepBoostY inverse() const;
179 // Return the inverse.
180
181 inline friend HepBoostY inverseOf ( const HepBoostY & b );
182 // global methods to invert.
183
184 inline HepBoostY & invert();
185 // Inverts the Boost matrix.
186
187 // ---------- I/O:
188
189 std::ostream & print( std::ostream & os ) const;
190 // Output form is BOOSTY (beta=..., gamma=...);
191
192 // ---------- Tolerance
193
194 static inline double getTolerance();
195 static inline double setTolerance(double tol);
196
197protected:
198
200 ( const HepLorentzVector & w ) const;
201 // Multiplication with a Lorentz Vector.
202
205
206 inline HepBoostY (double beta, double gamma);
207
208 double beta_;
209 double gamma_;
210
211}; // HepBoostY
212
213inline
214std::ostream & operator <<
215 ( std::ostream & os, const HepBoostY& b ) {return b.print(os);}
216
217} // namespace CLHEP
218
219#include "CLHEP/Vector/BoostY.icc"
220
221#ifdef ENABLE_BACKWARDS_COMPATIBILITY
222// backwards compatibility will be enabled ONLY in CLHEP 1.9
223using namespace CLHEP;
224#endif
225
226#endif /* HEP_BOOSTY_H */
double tz() const
bool isIdentity() const
bool operator<(const HepBoostY &b) const
double beta() const
double tx() const
HepLorentzVector row4() const
bool operator<=(const HepBoostY &b) const
HepLorentzRotation matrixMultiplication(const HepRep4x4Symmetric &m) const
HepBoostY & invert()
double xy() const
bool operator>(const HepBoostY &b) const
HepLorentzVector vectorMultiplication(const HepLorentzVector &w) const
HepRep4x4 rep4x4() const
Definition: BoostY.cc:39
double gamma() const
HepLorentzVector col2() const
HepBoostY(double beta, double gamma)
Hep3Vector getDirection() const
int compare(const HepBoostY &b) const
double yy() const
HepLorentzRotation matrixMultiplication(const HepRep4x4 &m) const
double gamma_
Definition: BoostY.h:209
double ty() const
double xt() const
friend HepBoostY inverseOf(const HepBoostY &b)
double howNear(const HepRotation &r) const
HepLorentzVector row1() const
HepBoostY & operator=(const HepBoostY &m)
double zt() const
bool isNear(const HepBoostY &b, double epsilon=Hep4RotationInterface::tolerance) const
HepBoostY & set(double beta)
Definition: BoostY.cc:23
double tt() const
HepLorentzVector col3() const
void decompose(HepRotation &rotation, HepBoost &boost) const
Definition: BoostY.cc:57
HepRep4x4Symmetric rep4x4Symmetric() const
Definition: BoostY.cc:47
HepLorentzVector col4() const
double yx() const
double distance2(const HepBoostY &b) const
void rectify()
Definition: BoostY.cc:122
bool operator!=(const HepBoostY &b) const
HepBoostY(HepBoostY &&b)=default
HepLorentzVector row2() const
double beta_
Definition: BoostY.h:208
double howNear(const HepBoost &b) const
HepLorentzVector row3() const
HepLorentzVector operator()(const HepLorentzVector &w) const
HepBoostY(const HepBoostY &b)
HepBoostY inverse() const
double yz() const
HepBoostY(double beta)
bool operator>=(const HepBoostY &b) const
static double getTolerance()
double zx() const
HepLorentzVector operator*(const HepLorentzVector &w) const
double norm2() const
bool isNear(const HepBoost &b, double epsilon=Hep4RotationInterface::tolerance) const
double zy() const
double yt() const
double xx() const
bool operator==(const HepBoostY &b) const
std::ostream & print(std::ostream &os) const
Definition: BoostY.cc:157
Hep3Vector boostVector() const
double zz() const
double howNear(const HepLorentzRotation &lt) const
HepLorentzVector col1() const
static double setTolerance(double tol)
double howNear(const HepBoostY &b) const
double xz() const
HepBoost inverseOf(const HepBoost &lt)