File indexing completed on 2025-01-18 09:54:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #ifndef HEP_BOOSTX_H
0020 #define HEP_BOOSTX_H
0021
0022 #include "CLHEP/Vector/defs.h"
0023 #include "CLHEP/Vector/RotationInterfaces.h"
0024 #include "CLHEP/Vector/LorentzVector.h"
0025
0026 namespace CLHEP {
0027
0028
0029 class HepBoostX;
0030 inline HepBoostX inverseOf ( const HepBoostX & b );
0031 class HepBoost;
0032 class HepRotation;
0033
0034
0035
0036
0037
0038 class HepBoostX {
0039
0040 public:
0041
0042
0043
0044 inline HepBoostX();
0045
0046
0047 inline HepBoostX(const HepBoostX & b);
0048 inline HepBoostX(HepBoostX && b) = default;
0049
0050
0051 inline HepBoostX & operator = (const HepBoostX & m);
0052 inline HepBoostX & operator = (HepBoostX && m) = default;
0053
0054
0055 HepBoostX & set (double beta);
0056 inline HepBoostX (double beta);
0057
0058
0059
0060
0061 inline double beta() const;
0062 inline double gamma() const;
0063 inline Hep3Vector boostVector() const;
0064 inline Hep3Vector getDirection() const;
0065
0066 inline double xx() const;
0067 inline double xy() const;
0068 inline double xz() const;
0069 inline double xt() const;
0070 inline double yx() const;
0071 inline double yy() const;
0072 inline double yz() const;
0073 inline double yt() const;
0074 inline double zx() const;
0075 inline double zy() const;
0076 inline double zz() const;
0077 inline double zt() const;
0078 inline double tx() const;
0079 inline double ty() const;
0080 inline double tz() const;
0081 inline double tt() const;
0082
0083
0084 inline HepLorentzVector col1() const;
0085 inline HepLorentzVector col2() const;
0086 inline HepLorentzVector col3() const;
0087 inline HepLorentzVector col4() const;
0088
0089
0090 inline HepLorentzVector row1() const;
0091 inline HepLorentzVector row2() const;
0092 inline HepLorentzVector row3() const;
0093 inline HepLorentzVector row4() const;
0094
0095
0096 HepRep4x4 rep4x4() const;
0097
0098
0099 HepRep4x4Symmetric rep4x4Symmetric() const;
0100
0101
0102
0103
0104 void decompose (HepRotation & rotation, HepBoost & boost) const;
0105 void decompose (HepAxisAngle & rotation, Hep3Vector & boost) const;
0106
0107
0108 void decompose ( HepBoost & boost, HepRotation & rotation) const;
0109 void decompose (Hep3Vector & boost, HepAxisAngle & rotation) const;
0110
0111
0112
0113
0114 inline int compare( const HepBoostX & b ) const;
0115
0116
0117
0118 inline bool operator == (const HepBoostX & b) const;
0119 inline bool operator != (const HepBoostX & b) const;
0120 inline bool operator <= (const HepBoostX & b) const;
0121 inline bool operator >= (const HepBoostX & b) const;
0122 inline bool operator < (const HepBoostX & b) const;
0123 inline bool operator > (const HepBoostX & b) const;
0124
0125
0126 inline bool isIdentity() const;
0127
0128
0129 inline double distance2( const HepBoostX & b ) const;
0130 double distance2( const HepBoost & b ) const;
0131
0132
0133 double distance2( const HepRotation & r ) const;
0134 double distance2( const HepLorentzRotation & lt ) const;
0135
0136
0137 inline double howNear( const HepBoostX & b ) const;
0138 inline double howNear( const HepBoost & b ) const;
0139 inline double howNear( const HepRotation & r ) const;
0140 inline double howNear( const HepLorentzRotation & lt ) const;
0141
0142 inline bool isNear( const HepBoostX & b,
0143 double epsilon=Hep4RotationInterface::tolerance) const;
0144 inline bool isNear( const HepBoost & b,
0145 double epsilon=Hep4RotationInterface::tolerance) const;
0146 bool isNear( const HepRotation & r,
0147 double epsilon=Hep4RotationInterface::tolerance) const;
0148 bool isNear( const HepLorentzRotation & lt,
0149 double epsilon=Hep4RotationInterface::tolerance) const;
0150
0151
0152
0153 inline double norm2() const;
0154
0155
0156 void rectify();
0157
0158
0159
0160
0161 inline HepLorentzVector operator()( const HepLorentzVector & w ) const;
0162
0163
0164 inline HepLorentzVector operator* ( const HepLorentzVector & w ) const;
0165
0166
0167
0168
0169 HepBoostX operator * (const HepBoostX & b) const;
0170 HepLorentzRotation operator * (const HepBoost & b) const;
0171 HepLorentzRotation operator * (const HepRotation & r) const;
0172 HepLorentzRotation operator * (const HepLorentzRotation & lt) const;
0173
0174
0175
0176
0177 inline HepBoostX inverse() const;
0178
0179
0180 inline friend HepBoostX inverseOf ( const HepBoostX & b );
0181
0182
0183 inline HepBoostX & invert();
0184
0185
0186
0187
0188 std::ostream & print( std::ostream & os ) const;
0189
0190
0191
0192
0193 static inline double getTolerance();
0194 static inline double setTolerance(double tol);
0195
0196 protected:
0197
0198 inline HepLorentzVector vectorMultiplication
0199 ( const HepLorentzVector & w ) const;
0200
0201
0202 HepLorentzRotation matrixMultiplication (const HepRep4x4 & m) const;
0203 HepLorentzRotation matrixMultiplication (const HepRep4x4Symmetric & m) const;
0204
0205 inline HepBoostX (double beta, double gamma);
0206
0207 double beta_;
0208 double gamma_;
0209
0210 };
0211
0212 inline
0213 std::ostream & operator <<
0214 ( std::ostream & os, const HepBoostX& b ) {return b.print(os);}
0215
0216 }
0217
0218 #include "CLHEP/Vector/BoostX.icc"
0219
0220 #ifdef ENABLE_BACKWARDS_COMPATIBILITY
0221
0222 using namespace CLHEP;
0223 #endif
0224
0225 #endif