00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef HEP_ROTATIONX_H
00021 #define HEP_ROTATIONX_H
00022
00023 #ifdef GNUPRAGMA
00024 #pragma interface
00025 #endif
00026
00027 #include "CLHEP/Vector/RotationInterfaces.h"
00028
00029 #ifdef HEP_NO_INLINE_IN_DECLARATION
00030 #define inline
00031 #endif
00032
00033 class HepRotationX;
00034
00035 class HepRotation;
00036 class HepBoost;
00037
00038 inline HepRotationX inverseOf(const HepRotationX & r);
00039
00040
00045 class HepRotationX {
00046
00047 public:
00048
00049
00050
00051 inline HepRotationX();
00052
00053
00054 HepRotationX(double delta);
00055
00056
00057 inline HepRotationX(const HepRotationX & orig);
00058
00059
00060 inline HepRotationX & operator = (const HepRotationX & r);
00061
00062
00063 HepRotationX & set ( double delta );
00064
00065
00066 inline ~HepRotationX();
00067
00068
00069
00070
00071 inline Hep3Vector colX() const;
00072 inline Hep3Vector colY() const;
00073 inline Hep3Vector colZ() const;
00074
00075
00076 inline Hep3Vector rowX() const;
00077 inline Hep3Vector rowY() const;
00078 inline Hep3Vector rowZ() const;
00079
00080
00081 inline double xx() const;
00082 inline double xy() const;
00083 inline double xz() const;
00084 inline double yx() const;
00085 inline double yy() const;
00086 inline double yz() const;
00087 inline double zx() const;
00088 inline double zy() const;
00089 inline double zz() const;
00090
00091
00092 inline HepRep3x3 rep3x3() const;
00093
00094
00095
00096 inline double getPhi () const;
00097 inline double getTheta() const;
00098 inline double getPsi () const;
00099 double phi () const;
00100 double theta() const;
00101 double psi () const;
00102 HepEulerAngles eulerAngles() const;
00103
00104
00105 inline double getDelta() const;
00106 inline Hep3Vector getAxis () const;
00107 inline double delta() const;
00108 inline Hep3Vector axis () const;
00109 inline HepAxisAngle axisAngle() const;
00110 inline void getAngleAxis(double & delta, Hep3Vector & axis) const;
00111
00112
00113
00114 double phiX() const;
00115 double phiY() const;
00116 double phiZ() const;
00117 double thetaX() const;
00118 double thetaY() const;
00119 double thetaZ() const;
00120
00121
00122
00123
00124 inline HepLorentzVector col1() const;
00125 inline HepLorentzVector col2() const;
00126 inline HepLorentzVector col3() const;
00127
00128
00129 inline HepLorentzVector col4() const;
00130
00131
00132 inline HepLorentzVector row1() const;
00133 inline HepLorentzVector row2() const;
00134 inline HepLorentzVector row3() const;
00135
00136
00137 inline HepLorentzVector row4() const;
00138
00139
00140 inline double xt() const;
00141 inline double yt() const;
00142 inline double zt() const;
00143 inline double tx() const;
00144 inline double ty() const;
00145 inline double tz() const;
00146
00147
00148 inline double tt() const;
00149
00150
00151 inline HepRep4x4 rep4x4() const;
00152
00153
00154
00155
00156 void setDelta (double delta);
00157
00158
00159
00160
00161 void decompose (HepAxisAngle & rotation, Hep3Vector & boost) const;
00162 void decompose (Hep3Vector & boost, HepAxisAngle & rotation) const;
00163 void decompose (HepRotation & rotation, HepBoost & boost) const;
00164 void decompose (HepBoost & boost, HepRotation & rotation) const;
00165
00166
00167
00168
00169 inline bool isIdentity() const;
00170
00171
00172 inline int compare( const HepRotationX & r ) const;
00173
00174
00175
00176 inline bool operator== ( const HepRotationX & r ) const;
00177 inline bool operator!= ( const HepRotationX & r ) const;
00178 inline bool operator< ( const HepRotationX & r ) const;
00179 inline bool operator> ( const HepRotationX & r ) const;
00180 inline bool operator<= ( const HepRotationX & r ) const;
00181 inline bool operator>= ( const HepRotationX & r ) const;
00182
00183 double distance2( const HepRotationX & r ) const;
00184
00185
00186 double distance2( const HepRotation & r ) const;
00187
00188
00189 double howNear( const HepRotationX & r ) const;
00190 double howNear( const HepRotation & r ) const;
00191 bool isNear( const HepRotationX & r,
00192 double epsilon=Hep4RotationInterface::tolerance) const;
00193 bool isNear( const HepRotation & r,
00194 double epsilon=Hep4RotationInterface::tolerance) const;
00195
00196 double distance2( const HepBoost & lt ) const;
00197
00198 double distance2( const HepLorentzRotation & lt ) const;
00199
00200
00201 double howNear( const HepBoost & lt ) const;
00202 double howNear( const HepLorentzRotation & lt ) const;
00203 bool isNear( const HepBoost & lt,
00204 double epsilon=Hep4RotationInterface::tolerance) const;
00205 bool isNear( const HepLorentzRotation & lt,
00206 double epsilon=Hep4RotationInterface::tolerance) const;
00207
00208
00209
00210 double norm2() const;
00211
00212
00213 inline void rectify();
00214
00215
00216
00217
00218 inline Hep3Vector operator() (const Hep3Vector & p) const;
00219
00220
00221 inline Hep3Vector operator * (const Hep3Vector & p) const;
00222
00223
00224 inline HepLorentzVector operator()( const HepLorentzVector & w ) const;
00225
00226
00227 inline HepLorentzVector operator* ( const HepLorentzVector & w ) const;
00228
00229
00230
00231
00232 inline HepRotationX operator * (const HepRotationX & rx) const;
00233
00234
00235 inline HepRotationX & operator *= (const HepRotationX & r);
00236 inline HepRotationX & transform (const HepRotationX & r);
00237
00238
00239
00240
00241 inline HepRotationX inverse() const;
00242
00243
00244 friend HepRotationX inverseOf(const HepRotationX & r);
00245
00246
00247 inline HepRotationX & invert();
00248
00249
00250
00251
00252 HepStd::ostream & print( HepStd::ostream & os ) const;
00253
00254
00255
00256
00257 static inline double getTolerance();
00258 static inline double setTolerance(double tol);
00259
00260 protected:
00261
00262 double d;
00263
00264
00265 double s;
00266 double c;
00267
00268
00269 inline HepRotationX ( double dd, double ss, double cc );
00270
00271
00272 static inline double proper (double delta);
00273
00274
00275 };
00276
00277
00278 inline
00279 HepStd::ostream & operator <<
00280 ( HepStd::ostream & os, const HepRotationX & r ) {return r.print(os);}
00281
00282 #ifdef HEP_NO_INLINE_IN_DECLARATION
00283 #undef inline
00284 #endif
00285
00286 #ifndef HEP_DEBUG_INLINE
00287 #include "CLHEP/Vector/RotationX.icc"
00288 #endif
00289
00290 #endif
00291