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