00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef HEP_BOOST_H
00020 #define HEP_BOOST_H
00021
00022 #ifdef GNUPRAGMA
00023 #pragma interface
00024 #endif
00025
00026 #ifdef HEP_NO_INLINE_IN_DECLARATION
00027 #define inline
00028 #endif
00029
00030 #include "CLHEP/Vector/RotationInterfaces.h"
00031 #include "CLHEP/Vector/BoostX.h"
00032 #include "CLHEP/Vector/BoostY.h"
00033 #include "CLHEP/Vector/BoostZ.h"
00034 #include "CLHEP/Vector/LorentzVector.h"
00035
00036
00037 class HepBoost;
00038 inline HepBoost inverseOf ( const HepBoost & lt );
00039
00044 class HepBoost {
00045
00046 public:
00047
00048
00049
00050 inline HepBoost();
00051
00052
00053 inline HepBoost(const HepBoost & m);
00054
00055
00056 inline HepBoost & operator = (const HepBoost & m);
00057
00058
00059 HepBoost & set (double betaX, double betaY, double betaZ);
00060 inline HepBoost (double betaX, double betaY, double betaZ);
00061
00062
00063 HepBoost & set (const HepRep4x4Symmetric & m);
00064 inline HepBoost (const HepRep4x4Symmetric & m);
00065
00066
00067 HepBoost & set (Hep3Vector direction, double beta);
00068 inline HepBoost (Hep3Vector direction, double beta);
00069
00070
00071 HepBoost & set (const Hep3Vector & boost);
00072 inline HepBoost (const Hep3Vector & boost);
00073
00074
00075
00076
00077 inline double beta() const;
00078 inline double gamma() const;
00079 inline Hep3Vector boostVector() const;
00080 inline Hep3Vector getDirection() const;
00081 inline Hep3Vector direction() const;
00082
00083 inline double xx() const;
00084 inline double xy() const;
00085 inline double xz() const;
00086 inline double xt() const;
00087 inline double yx() const;
00088 inline double yy() const;
00089 inline double yz() const;
00090 inline double yt() const;
00091 inline double zx() const;
00092 inline double zy() const;
00093 inline double zz() const;
00094 inline double zt() const;
00095 inline double tx() const;
00096 inline double ty() const;
00097 inline double tz() const;
00098 inline double tt() const;
00099
00100
00101 inline HepLorentzVector col1() const;
00102 inline HepLorentzVector col2() const;
00103 inline HepLorentzVector col3() const;
00104 inline HepLorentzVector col4() const;
00105
00106
00107 inline HepLorentzVector row1() const;
00108 inline HepLorentzVector row2() const;
00109 inline HepLorentzVector row3() const;
00110 inline HepLorentzVector row4() const;
00111
00112
00113 inline HepRep4x4 rep4x4() const;
00114
00115
00116 inline HepRep4x4Symmetric rep4x4Symmetric() const;
00117
00118
00119
00120
00121 void decompose (HepRotation & rotation, HepBoost & boost) const;
00122 void decompose (HepAxisAngle & rotation, Hep3Vector & boost) const;
00123
00124
00125 void decompose (HepBoost & boost, HepRotation & rotation) const;
00126 void decompose (Hep3Vector & boost, HepAxisAngle & rotation) const;
00127
00128
00129
00130
00131 inline int compare( const HepBoost & b ) const;
00132
00133
00134
00135 inline bool operator == (const HepBoost & b) const;
00136 inline bool operator != (const HepBoost & b) const;
00137 inline bool operator <= (const HepBoost & b) const;
00138 inline bool operator >= (const HepBoost & b) const;
00139 inline bool operator < (const HepBoost & b) const;
00140 inline bool operator > (const HepBoost & b) const;
00141
00142
00143 inline bool isIdentity() const;
00144
00145
00146 inline double distance2( const HepBoost & b ) const;
00147 inline double distance2( const HepBoostX & bx ) const;
00148 inline double distance2( const HepBoostY & by ) const;
00149 inline double distance2( const HepBoostZ & bz ) const;
00150
00151
00152 double distance2( const HepRotation & r ) const;
00153 double distance2( const HepLorentzRotation & lt ) const;
00154
00155
00156 inline double howNear( const HepBoost & b ) const;
00157 inline bool isNear( const HepBoost & b,
00158 double epsilon=Hep4RotationInterface::tolerance) const;
00159
00160 double howNear( const HepRotation & r ) const;
00161 double howNear( const HepLorentzRotation & lt ) const;
00162
00163 bool isNear( const HepRotation & r,
00164 double epsilon=Hep4RotationInterface::tolerance) const;
00165 bool isNear( const HepLorentzRotation & lt,
00166 double epsilon=Hep4RotationInterface::tolerance) const;
00167
00168
00169
00170 double norm2() const;
00171
00172
00173 void rectify();
00174
00175
00176
00177
00178 inline HepLorentzVector operator()( const HepLorentzVector & p ) const;
00179
00180
00181 inline HepLorentzVector operator* ( const HepLorentzVector & p ) const;
00182
00183
00184
00185
00186 HepLorentzRotation operator * (const HepBoost & b) const;
00187 HepLorentzRotation operator * (const HepRotation & r) const;
00188 HepLorentzRotation operator * (const HepLorentzRotation & lt) const;
00189
00190
00191
00192 inline HepBoost inverse() const;
00193
00194
00195 inline friend HepBoost inverseOf ( const HepBoost & lt );
00196
00197
00198 inline HepBoost & invert();
00199
00200
00201
00202
00203 HepStd::ostream & print( HepStd::ostream & os ) const;
00204
00205
00206
00207
00208 static inline double getTolerance();
00209 static inline double setTolerance(double tol);
00210
00211 protected:
00212
00213 inline HepLorentzVector vectorMultiplication
00214 ( const HepLorentzVector & w ) const;
00215
00216
00217 HepLorentzRotation matrixMultiplication (const HepRep4x4 & m) const;
00218 HepLorentzRotation matrixMultiplication (const HepRep4x4Symmetric & m) const;
00219
00220 inline HepBoost
00221 (double xx, double xy, double xz, double xt,
00222 double yy, double yz, double yt,
00223 double zz, double zt,
00224 double tt);
00225
00226
00227
00228 inline void setBoost(double bx, double by, double bz);
00229
00230 HepRep4x4Symmetric rep_;
00231
00232 };
00233
00234 #ifdef HEP_NO_INLINE_IN_DECLARATION
00235 #undef inline
00236 #endif
00237
00238 #ifdef HEP_SHORT_NAMES
00239 typedef HepBoost LBoost;
00240 #endif
00241
00242 #ifndef HEP_DEBUG_INLINE
00243 #include "CLHEP/Vector/Boost.icc"
00244 #endif
00245
00246 #endif