CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

Vector/CLHEP/Vector/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 #ifdef GNUPRAGMA
23 #pragma interface
24 #endif
25 
26 #include "CLHEP/Vector/defs.h"
27 #include "CLHEP/Vector/RotationInterfaces.h"
28 #include "CLHEP/Vector/LorentzVector.h"
29 
30 namespace CLHEP {
31 
32 // Declarations of classes and global methods
33 class HepBoostY;
34 inline HepBoostY inverseOf ( const HepBoostY & b );
35 class HepBoost;
36 class HepRotation;
37 
42 class HepBoostY {
43 
44 public:
45 
46  // ---------- Constructors and Assignment:
47 
48  inline HepBoostY();
49  // Default constructor. Gives a boost of 0.
50 
51  inline HepBoostY(const HepBoostY & b);
52  // Copy constructor.
53 
54  inline HepBoostY & operator = (const HepBoostY & m);
55  // Assignment.
56 
57  HepBoostY & set (double beta);
58  inline HepBoostY (double beta);
59  // Constructor from beta
60 
61  // ---------- Accessors:
62 
63  inline double beta() const;
64  inline double gamma() const;
65  inline Hep3Vector boostVector() const;
66  inline Hep3Vector getDirection() const;
67 
68  inline double xx() const;
69  inline double xy() const;
70  inline double xz() const;
71  inline double xt() const;
72  inline double yx() const;
73  inline double yy() const;
74  inline double yz() const;
75  inline double yt() const;
76  inline double zx() const;
77  inline double zy() const;
78  inline double zz() const;
79  inline double zt() const;
80  inline double tx() const;
81  inline double ty() const;
82  inline double tz() const;
83  inline double tt() const;
84  // Elements of the matrix.
85 
86  inline HepLorentzVector col1() const;
87  inline HepLorentzVector col2() const;
88  inline HepLorentzVector col3() const;
89  inline HepLorentzVector col4() const;
90  // orthosymplectic column vectors
91 
92  inline HepLorentzVector row1() const;
93  inline HepLorentzVector row2() const;
94  inline HepLorentzVector row3() const;
95  inline HepLorentzVector row4() const;
96  // orthosymplectic row vectors
97 
98  HepRep4x4 rep4x4() const;
99  // 4x4 representation:
100 
101  HepRep4x4Symmetric rep4x4Symmetric() const;
102  // Symmetric 4x4 representation.
103 
104 
105  // ---------- Decomposition:
106 
107  void decompose (HepRotation & rotation, HepBoost & boost) const;
108  void decompose (HepAxisAngle & rotation, Hep3Vector & boost) const;
109  // Find R and B such that L = R*B -- trivial, since R is identity
110 
111  void decompose (HepBoost & boost, HepRotation & rotation) const;
112  void decompose (Hep3Vector & boost, HepAxisAngle & rotation) const;
113  // Find R and B such that L = B*R -- trivial, since R is identity
114 
115  // ---------- Comparisons:
116 
117  inline int compare( const HepBoostY & b ) const;
118  // Dictionary-order comparison, in order of beta.
119  // Used in operator<, >, <=, >=
120 
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  inline bool operator > (const HepBoostY & b) const;
127  // Comparisons.
128 
129  inline bool isIdentity() const;
130  // Returns true if a null boost.
131 
132  inline double distance2( const HepBoostY & b ) const;
133  double distance2( const HepBoost & b ) const;
134  // Defined as the distance2 between the vectors (gamma*betaVector)
135 
136  double distance2( const HepRotation & r ) const;
137  double distance2( const HepLorentzRotation & lt ) const;
138  // Decompose lt = B*R; add norm2 to distance2 to between boosts.
139 
140  inline double howNear( const HepBoostY & b ) const;
141  inline double howNear( const HepBoost & b ) const;
142  inline double howNear( const HepRotation & r ) const;
143  inline double howNear( const HepLorentzRotation & lt ) const;
144 
145  inline bool isNear( const HepBoostY & b,
146  double epsilon=Hep4RotationInterface::tolerance) const;
147  inline bool isNear( const HepBoost & b,
148  double epsilon=Hep4RotationInterface::tolerance) const;
149  bool isNear( const HepRotation & r,
150  double epsilon=Hep4RotationInterface::tolerance) const;
151  bool isNear( const HepLorentzRotation & lt,
152  double epsilon=Hep4RotationInterface::tolerance) const;
153 
154  // ---------- Properties:
155 
156  inline double norm2() const;
157  // distance2 (IDENTITY), which is beta^2 * gamma^2
158 
159  void rectify();
160  // sets according to the stored beta
161 
162  // ---------- Application:
163 
164  inline HepLorentzVector operator()( const HepLorentzVector & w ) const;
165  // Transform a Lorentz Vector.
166 
167  inline HepLorentzVector operator* ( const HepLorentzVector & w ) const;
168  // Multiplication with a Lorentz Vector.
169 
170  // ---------- Operations in the group of 4-Rotations
171 
172  HepBoostY operator * (const HepBoostY & b) const;
173  HepLorentzRotation operator * (const HepBoost & b) const;
174  HepLorentzRotation operator * (const HepRotation & r) const;
175  HepLorentzRotation operator * (const HepLorentzRotation & lt) const;
176  // Product of two Lorentz Rotations (this) * lt - matrix multiplication
177  // Notice that the product of two pure boosts in different directions
178  // is no longer a pure boost.
179 
180  inline HepBoostY inverse() const;
181  // Return the inverse.
182 
183  inline friend HepBoostY inverseOf ( const HepBoostY & b );
184  // global methods to invert.
185 
186  inline HepBoostY & invert();
187  // Inverts the Boost matrix.
188 
189  // ---------- I/O:
190 
191  std::ostream & print( std::ostream & os ) const;
192  // Output form is BOOSTY (beta=..., gamma=...);
193 
194  // ---------- Tolerance
195 
196  static inline double getTolerance();
197  static inline double setTolerance(double tol);
198 
199 protected:
200 
201  inline HepLorentzVector vectorMultiplication
202  ( const HepLorentzVector & w ) const;
203  // Multiplication with a Lorentz Vector.
204 
205  HepLorentzRotation matrixMultiplication (const HepRep4x4 & m) const;
206  HepLorentzRotation matrixMultiplication (const HepRep4x4Symmetric & m) const;
207 
208  inline HepBoostY (double beta, double gamma);
209 
210  double beta_;
211  double gamma_;
212 
213 }; // HepBoostY
214 
215 inline
216 std::ostream & operator <<
217  ( std::ostream & os, const HepBoostY& b ) {return b.print(os);}
218 
219 } // namespace CLHEP
220 
221 #include "CLHEP/Vector/BoostY.icc"
222 
223 #ifdef ENABLE_BACKWARDS_COMPATIBILITY
224 // backwards compatibility will be enabled ONLY in CLHEP 1.9
225 using namespace CLHEP;
226 #endif
227 
228 #endif /* HEP_BOOSTY_H */
CLHEP::HepBoostY::setTolerance
static double setTolerance(double tol)
CLHEP::HepBoostY::xx
double xx() const
CLHEP::HepBoostY::beta_
double beta_
Definition: Geometry/CLHEP/Vector/BoostY.h:210
CLHEP::HepBoostY::col3
HepLorentzVector col3() const
CLHEP::HepBoostY::row1
HepLorentzVector row1() const
CLHEP::HepBoostY::col1
HepLorentzVector col1() const
CLHEP::HepBoostY::xt
double xt() const
HepBoost
namespace and inside the zmpv namespace it typedef s UnitVector to be HepUnit3Vector The conversion which provide those methods available for GETTING INFORMATION if an object might be either a Rotation or a since RI has methods a routine can be passed a RI &and take because anything you wish to ask about a LT you could equally well ask about a Rotation From one derives Rotation and its special cases RotationX etc We can t derive RotationX from from one derives HepLorentzRotation along with HepBoost
Definition: keyMergeIssues.doc:304
CLHEP::HepBoostY::operator>
bool operator>(const HepBoostY &b) const
b
@ b
Definition: testCategories.cc:125
CLHEP::HepBoostY::set
HepBoostY & set(double beta)
Definition: BoostY.cc:24
CLHEP::HepBoostY::zz
double zz() const
CLHEP::HepBoostY::xy
double xy() const
CLHEP::HepBoostY::rectify
void rectify()
Definition: BoostY.cc:123
CLHEP::HepBoostY::operator!=
bool operator!=(const HepBoostY &b) const
CLHEP::HepBoostY::inverse
HepBoostY inverse() const
CLHEP::HepBoostY::print
std::ostream & print(std::ostream &os) const
Definition: BoostY.cc:158
CLHEP::HepBoostY::gamma_
double gamma_
Definition: Geometry/CLHEP/Vector/BoostY.h:211
CLHEP::Hep4RotationInterface::tolerance
static double tolerance
Definition: Geometry/CLHEP/Vector/RotationInterfaces.h:118
CLHEP::HepBoostY::xz
double xz() const
CLHEP::HepBoostY::yz
double yz() const
CLHEP::HepBoostY::operator()
HepLorentzVector operator()(const HepLorentzVector &w) const
CLHEP::HepBoostY::decompose
void decompose(HepRotation &rotation, HepBoost &boost) const
Definition: BoostY.cc:58
CLHEP::HepBoostY::distance2
double distance2(const HepBoostY &b) const
CLHEP::HepBoostY::rep4x4
HepRep4x4 rep4x4() const
Definition: BoostY.cc:40
CLHEP::HepBoostY::zt
double zt() const
CLHEP::HepBoostY::col4
HepLorentzVector col4() const
CLHEP::HepBoostY::operator<=
bool operator<=(const HepBoostY &b) const
CLHEP::HepBoostY::compare
int compare(const HepBoostY &b) const
CLHEP::HepBoostY::norm2
double norm2() const
CLHEP
Definition: ClhepVersion.h:13
CLHEP::HepBoostY::yx
double yx() const
CLHEP::HepBoostY::getTolerance
static double getTolerance()
CLHEP::HepBoostY::zx
double zx() const
CLHEP::HepBoostY::boostVector
Hep3Vector boostVector() const
CLHEP::HepBoostY::getDirection
Hep3Vector getDirection() const
CLHEP::HepBoostY::howNear
double howNear(const HepBoostY &b) const
CLHEP::HepBoostY::gamma
double gamma() const
Hep3Vector
Issues Concerning the PhysicsVectors CLHEP Vector Merge The merge of ZOOM PhysicsVdectors and the CLHEP Vector package is completed The purpose of this document is to list the major issues that affected the merge of these and where relevant describe the resolutions More detailed documents describe more minor issues General Approach As agreed at the June CLHEP the approach is to combine the features of each ZOOM class with the corresponding CLHEP class expanding the interface to create a single lingua franca of what a Hep3Vector(for example) means. We are not forming SpaceVector as an class derived from Hep3Vector and enhancing it in that way. Another rule imposed by the agreement is to avoid using the Exceptions package(even though that will later go into CLHEP for other uses). A desirable goal is to avoid cluttering the interface and enlarging the code linked in when ordinary CLHEP Vector functionallity is used. To this end
CLHEP::HepBoostY::operator*
HepLorentzVector operator*(const HepLorentzVector &w) const
CLHEP::HepBoostY::isNear
bool isNear(const HepBoostY &b, double epsilon=Hep4RotationInterface::tolerance) const
CLHEP::HepBoostY::HepBoostY
HepBoostY()
CLHEP::HepBoostY::tz
double tz() const
CLHEP::HepBoostY::operator=
HepBoostY & operator=(const HepBoostY &m)
CLHEP::inverseOf
HepBoost inverseOf(const HepBoost &lt)
CLHEP::HepBoostY::row4
HepLorentzVector row4() const
CLHEP::HepBoostY::rep4x4Symmetric
HepRep4x4Symmetric rep4x4Symmetric() const
Definition: BoostY.cc:48
CLHEP::HepBoostY::invert
HepBoostY & invert()
CLHEP::HepBoostY::matrixMultiplication
HepLorentzRotation matrixMultiplication(const HepRep4x4 &m) const
CLHEP::HepBoostY::zy
double zy() const
CLHEP::HepBoostY::tt
double tt() const
CLHEP::HepBoostY::yy
double yy() const
CLHEP::HepBoostY::vectorMultiplication
HepLorentzVector vectorMultiplication(const HepLorentzVector &w) const
CLHEP::HepBoostY::col2
HepLorentzVector col2() const
CLHEP::HepBoostY::ty
double ty() const
CLHEP::HepBoostY::yt
double yt() const
CLHEP::HepBoostY::operator==
bool operator==(const HepBoostY &b) const
CLHEP::HepBoostY::row3
HepLorentzVector row3() const
CLHEP::HepBoostY::row2
HepLorentzVector row2() const
CLHEP::HepBoostY::operator<
bool operator<(const HepBoostY &b) const
CLHEP::HepBoostY::operator>=
bool operator>=(const HepBoostY &b) const
CLHEP::HepBoostY::isIdentity
bool isIdentity() const
CLHEP::HepBoostY::inverseOf
friend HepBoostY inverseOf(const HepBoostY &b)
CLHEP::HepBoostY::tx
double tx() const
CLHEP::HepBoostY::beta
double beta() const