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_BOOST_H
0020 #define HEP_BOOST_H
0021
0022 #include "CLHEP/Vector/defs.h"
0023 #include "CLHEP/Vector/RotationInterfaces.h"
0024 #include "CLHEP/Vector/BoostX.h"
0025 #include "CLHEP/Vector/BoostY.h"
0026 #include "CLHEP/Vector/BoostZ.h"
0027 #include "CLHEP/Vector/LorentzVector.h"
0028
0029 namespace CLHEP {
0030
0031
0032 class HepBoost;
0033 inline HepBoost inverseOf ( const HepBoost & lt );
0034
0035
0036
0037
0038
0039 class HepBoost {
0040
0041 public:
0042
0043
0044
0045 inline HepBoost();
0046
0047
0048 inline HepBoost(const HepBoost & m);
0049 inline HepBoost(HepBoost && m) = default;
0050
0051
0052 inline HepBoost & operator = (const HepBoost & m);
0053 inline HepBoost & operator = (HepBoost && m) = default;
0054
0055
0056 HepBoost & set (double betaX, double betaY, double betaZ);
0057 inline HepBoost (double betaX, double betaY, double betaZ);
0058
0059
0060 HepBoost & set (const HepRep4x4Symmetric & m);
0061 inline HepBoost (const HepRep4x4Symmetric & m);
0062
0063
0064 HepBoost & set (Hep3Vector direction, double beta);
0065 inline HepBoost (Hep3Vector direction, double beta);
0066
0067
0068 HepBoost & set (const Hep3Vector & boost);
0069 inline HepBoost (const Hep3Vector & boost);
0070
0071
0072 inline HepBoost & set (const HepBoostX & boost);
0073 inline HepBoost & set (const HepBoostY & boost);
0074 inline HepBoost & set (const HepBoostZ & boost);
0075 inline HepBoost (const HepBoostX & boost);
0076 inline HepBoost (const HepBoostY & boost);
0077 inline HepBoost (const HepBoostZ & boost);
0078
0079
0080
0081 inline double beta() const;
0082 inline double gamma() const;
0083 inline Hep3Vector boostVector() const;
0084 inline Hep3Vector getDirection() const;
0085 inline Hep3Vector direction() const;
0086
0087 inline double xx() const;
0088 inline double xy() const;
0089 inline double xz() const;
0090 inline double xt() const;
0091 inline double yx() const;
0092 inline double yy() const;
0093 inline double yz() const;
0094 inline double yt() const;
0095 inline double zx() const;
0096 inline double zy() const;
0097 inline double zz() const;
0098 inline double zt() const;
0099 inline double tx() const;
0100 inline double ty() const;
0101 inline double tz() const;
0102 inline double tt() const;
0103
0104
0105 inline HepLorentzVector col1() const;
0106 inline HepLorentzVector col2() const;
0107 inline HepLorentzVector col3() const;
0108 inline HepLorentzVector col4() const;
0109
0110
0111 inline HepLorentzVector row1() const;
0112 inline HepLorentzVector row2() const;
0113 inline HepLorentzVector row3() const;
0114 inline HepLorentzVector row4() const;
0115
0116
0117 inline HepRep4x4 rep4x4() const;
0118
0119
0120 inline HepRep4x4Symmetric rep4x4Symmetric() const;
0121
0122
0123
0124
0125 void decompose (HepRotation & rotation, HepBoost & boost) const;
0126 void decompose (HepAxisAngle & rotation, Hep3Vector & boost) const;
0127
0128
0129 void decompose (HepBoost & boost, HepRotation & rotation) const;
0130 void decompose (Hep3Vector & boost, HepAxisAngle & rotation) const;
0131
0132
0133
0134
0135 inline int compare( const HepBoost & b ) const;
0136
0137
0138
0139 inline bool operator == (const HepBoost & b) const;
0140 inline bool operator != (const HepBoost & b) const;
0141 inline bool operator <= (const HepBoost & b) const;
0142 inline bool operator >= (const HepBoost & b) const;
0143 inline bool operator < (const HepBoost & b) const;
0144 inline bool operator > (const HepBoost & b) const;
0145
0146
0147 inline bool isIdentity() const;
0148
0149
0150 inline double distance2( const HepBoost & b ) const;
0151 inline double distance2( const HepBoostX & bx ) const;
0152 inline double distance2( const HepBoostY & by ) const;
0153 inline double distance2( const HepBoostZ & bz ) const;
0154
0155
0156 double distance2( const HepRotation & r ) const;
0157 double distance2( const HepLorentzRotation & lt ) const;
0158
0159
0160 inline double howNear( const HepBoost & b ) const;
0161 inline bool isNear( const HepBoost & b,
0162 double epsilon=Hep4RotationInterface::tolerance) const;
0163
0164 double howNear( const HepRotation & r ) const;
0165 double howNear( const HepLorentzRotation & lt ) const;
0166
0167 bool isNear( const HepRotation & r,
0168 double epsilon=Hep4RotationInterface::tolerance) const;
0169 bool isNear( const HepLorentzRotation & lt,
0170 double epsilon=Hep4RotationInterface::tolerance) const;
0171
0172
0173
0174 double norm2() const;
0175
0176
0177 void rectify();
0178
0179
0180
0181
0182 inline HepLorentzVector operator()( const HepLorentzVector & p ) const;
0183
0184
0185 inline HepLorentzVector operator* ( const HepLorentzVector & p ) const;
0186
0187
0188
0189
0190 HepLorentzRotation operator * (const HepBoost & b) const;
0191 HepLorentzRotation operator * (const HepRotation & r) const;
0192 HepLorentzRotation operator * (const HepLorentzRotation & lt) const;
0193
0194
0195
0196 inline HepBoost inverse() const;
0197
0198
0199 inline friend HepBoost inverseOf ( const HepBoost & lt );
0200
0201
0202 inline HepBoost & invert();
0203
0204
0205
0206
0207 std::ostream & print( std::ostream & os ) const;
0208
0209
0210
0211
0212 static inline double getTolerance();
0213 static inline double setTolerance(double tol);
0214
0215 protected:
0216
0217 inline HepLorentzVector vectorMultiplication
0218 ( const HepLorentzVector & w ) const;
0219
0220
0221 HepLorentzRotation matrixMultiplication (const HepRep4x4 & m) const;
0222 HepLorentzRotation matrixMultiplication (const HepRep4x4Symmetric & m) const;
0223
0224 inline HepBoost
0225 (double xx, double xy, double xz, double xt,
0226 double yy, double yz, double yt,
0227 double zz, double zt,
0228 double tt);
0229
0230
0231
0232 inline void setBoost(double bx, double by, double bz);
0233
0234 HepRep4x4Symmetric rep_;
0235
0236 };
0237
0238 inline
0239 std::ostream & operator <<
0240 ( std::ostream & os, const HepBoost& b ) {return b.print(os);}
0241
0242 }
0243
0244 #include "CLHEP/Vector/Boost.icc"
0245
0246 #ifdef ENABLE_BACKWARDS_COMPATIBILITY
0247
0248 using namespace CLHEP;
0249 #endif
0250
0251 #endif