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_BOOSTY_H
0020 #define HEP_BOOSTY_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 HepBoostY;
0030 inline HepBoostY inverseOf ( const HepBoostY & b );
0031 class HepBoost;
0032 class HepRotation;
0033
0034
0035
0036
0037
0038 class HepBoostY {
0039
0040 public:
0041
0042
0043
0044 inline HepBoostY();
0045
0046
0047 inline HepBoostY(const HepBoostY & b);
0048 inline HepBoostY(HepBoostY && b) = default;
0049
0050
0051 inline HepBoostY & operator = (const HepBoostY & m);
0052 inline HepBoostY & operator = (HepBoostY && m) = default;
0053
0054
0055 HepBoostY & set (double beta);
0056 inline HepBoostY (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
0105 void decompose (HepRotation & rotation, HepBoost & boost) const;
0106 void decompose (HepAxisAngle & rotation, Hep3Vector & boost) const;
0107
0108
0109 void decompose (HepBoost & boost, HepRotation & rotation) const;
0110 void decompose (Hep3Vector & boost, HepAxisAngle & rotation) const;
0111
0112
0113
0114
0115 inline int compare( const HepBoostY & b ) const;
0116
0117
0118
0119 inline bool operator == (const HepBoostY & b) const;
0120 inline bool operator != (const HepBoostY & b) const;
0121 inline bool operator <= (const HepBoostY & b) const;
0122 inline bool operator >= (const HepBoostY & b) const;
0123 inline bool operator < (const HepBoostY & b) const;
0124 inline bool operator > (const HepBoostY & b) const;
0125
0126
0127 inline bool isIdentity() const;
0128
0129
0130 inline double distance2( const HepBoostY & b ) const;
0131 double distance2( const HepBoost & b ) const;
0132
0133
0134 double distance2( const HepRotation & r ) const;
0135 double distance2( const HepLorentzRotation & lt ) const;
0136
0137
0138 inline double howNear( const HepBoostY & b ) const;
0139 inline double howNear( const HepBoost & b ) const;
0140 inline double howNear( const HepRotation & r ) const;
0141 inline double howNear( const HepLorentzRotation & lt ) const;
0142
0143 inline bool isNear( const HepBoostY & b,
0144 double epsilon=Hep4RotationInterface::tolerance) const;
0145 inline bool isNear( const HepBoost & b,
0146 double epsilon=Hep4RotationInterface::tolerance) const;
0147 bool isNear( const HepRotation & r,
0148 double epsilon=Hep4RotationInterface::tolerance) const;
0149 bool isNear( const HepLorentzRotation & lt,
0150 double epsilon=Hep4RotationInterface::tolerance) const;
0151
0152
0153
0154 inline double norm2() const;
0155
0156
0157 void rectify();
0158
0159
0160
0161
0162 inline HepLorentzVector operator()( const HepLorentzVector & w ) const;
0163
0164
0165 inline HepLorentzVector operator* ( const HepLorentzVector & w ) const;
0166
0167
0168
0169
0170 HepBoostY operator * (const HepBoostY & b) const;
0171 HepLorentzRotation operator * (const HepBoost & b) const;
0172 HepLorentzRotation operator * (const HepRotation & r) const;
0173 HepLorentzRotation operator * (const HepLorentzRotation & lt) const;
0174
0175
0176
0177
0178 inline HepBoostY inverse() const;
0179
0180
0181 inline friend HepBoostY inverseOf ( const HepBoostY & b );
0182
0183
0184 inline HepBoostY & invert();
0185
0186
0187
0188
0189 std::ostream & print( std::ostream & os ) const;
0190
0191
0192
0193
0194 static inline double getTolerance();
0195 static inline double setTolerance(double tol);
0196
0197 protected:
0198
0199 inline HepLorentzVector vectorMultiplication
0200 ( const HepLorentzVector & w ) const;
0201
0202
0203 HepLorentzRotation matrixMultiplication (const HepRep4x4 & m) const;
0204 HepLorentzRotation matrixMultiplication (const HepRep4x4Symmetric & m) const;
0205
0206 inline HepBoostY (double beta, double gamma);
0207
0208 double beta_;
0209 double gamma_;
0210
0211 };
0212
0213 inline
0214 std::ostream & operator <<
0215 ( std::ostream & os, const HepBoostY& b ) {return b.print(os);}
0216
0217 }
0218
0219 #include "CLHEP/Vector/BoostY.icc"
0220
0221 #ifdef ENABLE_BACKWARDS_COMPATIBILITY
0222
0223 using namespace CLHEP;
0224 #endif
0225
0226 #endif