File indexing completed on 2025-01-18 09:54:41
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #ifndef HEP_ROTATIONX_H
0021 #define HEP_ROTATIONX_H
0022
0023 #include "CLHEP/Vector/defs.h"
0024 #include "CLHEP/Vector/RotationInterfaces.h"
0025
0026 namespace CLHEP {
0027
0028 class HepRotationX;
0029
0030 class HepRotation;
0031 class HepBoost;
0032
0033 inline HepRotationX inverseOf(const HepRotationX & r);
0034
0035
0036
0037
0038
0039
0040 class HepRotationX {
0041
0042 public:
0043
0044
0045
0046 inline HepRotationX();
0047
0048
0049 HepRotationX(double delta);
0050
0051
0052 inline HepRotationX(const HepRotationX & orig);
0053 inline HepRotationX(HepRotationX && orig) = default;
0054
0055
0056 inline HepRotationX & operator = (const HepRotationX & r);
0057 inline HepRotationX & operator = (HepRotationX && r) = default;
0058
0059
0060 HepRotationX & set ( double delta );
0061
0062
0063 inline ~HepRotationX();
0064
0065
0066
0067
0068 inline Hep3Vector colX() const;
0069 inline Hep3Vector colY() const;
0070 inline Hep3Vector colZ() const;
0071
0072
0073 inline Hep3Vector rowX() const;
0074 inline Hep3Vector rowY() const;
0075 inline Hep3Vector rowZ() const;
0076
0077
0078 inline double xx() const;
0079 inline double xy() const;
0080 inline double xz() const;
0081 inline double yx() const;
0082 inline double yy() const;
0083 inline double yz() const;
0084 inline double zx() const;
0085 inline double zy() const;
0086 inline double zz() const;
0087
0088
0089 inline HepRep3x3 rep3x3() const;
0090
0091
0092
0093 inline double getPhi () const;
0094 inline double getTheta() const;
0095 inline double getPsi () const;
0096 double phi () const;
0097 double theta() const;
0098 double psi () const;
0099 HepEulerAngles eulerAngles() const;
0100
0101
0102 inline double getDelta() const;
0103 inline Hep3Vector getAxis () const;
0104 inline double delta() const;
0105 inline Hep3Vector axis () const;
0106 inline HepAxisAngle axisAngle() const;
0107 inline void getAngleAxis(double & delta, Hep3Vector & axis) const;
0108
0109
0110
0111 double phiX() const;
0112 double phiY() const;
0113 double phiZ() const;
0114 double thetaX() const;
0115 double thetaY() const;
0116 double thetaZ() const;
0117
0118
0119
0120
0121 inline HepLorentzVector col1() const;
0122 inline HepLorentzVector col2() const;
0123 inline HepLorentzVector col3() const;
0124
0125
0126 inline HepLorentzVector col4() const;
0127
0128
0129 inline HepLorentzVector row1() const;
0130 inline HepLorentzVector row2() const;
0131 inline HepLorentzVector row3() const;
0132
0133
0134 inline HepLorentzVector row4() const;
0135
0136
0137 inline double xt() const;
0138 inline double yt() const;
0139 inline double zt() const;
0140 inline double tx() const;
0141 inline double ty() const;
0142 inline double tz() const;
0143
0144
0145 inline double tt() const;
0146
0147
0148 inline HepRep4x4 rep4x4() const;
0149
0150
0151
0152
0153 void setDelta (double delta);
0154
0155
0156
0157
0158 void decompose (HepAxisAngle & rotation, Hep3Vector & boost) const;
0159 void decompose (Hep3Vector & boost, HepAxisAngle & rotation) const;
0160 void decompose (HepRotation & rotation, HepBoost & boost) const;
0161 void decompose (HepBoost & boost, HepRotation & rotation) const;
0162
0163
0164
0165
0166 inline bool isIdentity() const;
0167
0168
0169 inline int compare( const HepRotationX & r ) const;
0170
0171
0172
0173 inline bool operator== ( const HepRotationX & r ) const;
0174 inline bool operator!= ( const HepRotationX & r ) const;
0175 inline bool operator< ( const HepRotationX & r ) const;
0176 inline bool operator> ( const HepRotationX & r ) const;
0177 inline bool operator<= ( const HepRotationX & r ) const;
0178 inline bool operator>= ( const HepRotationX & r ) const;
0179
0180 double distance2( const HepRotationX & r ) const;
0181
0182
0183 double distance2( const HepRotation & r ) const;
0184
0185
0186 double howNear( const HepRotationX & r ) const;
0187 double howNear( const HepRotation & r ) const;
0188 bool isNear( const HepRotationX & r,
0189 double epsilon=Hep4RotationInterface::tolerance) const;
0190 bool isNear( const HepRotation & r,
0191 double epsilon=Hep4RotationInterface::tolerance) const;
0192
0193 double distance2( const HepBoost & lt ) const;
0194
0195 double distance2( const HepLorentzRotation & lt ) const;
0196
0197
0198 double howNear( const HepBoost & lt ) const;
0199 double howNear( const HepLorentzRotation & lt ) const;
0200 bool isNear( const HepBoost & lt,
0201 double epsilon=Hep4RotationInterface::tolerance) const;
0202 bool isNear( const HepLorentzRotation & lt,
0203 double epsilon=Hep4RotationInterface::tolerance) const;
0204
0205
0206
0207 double norm2() const;
0208
0209
0210 inline void rectify();
0211
0212
0213
0214
0215 inline Hep3Vector operator() (const Hep3Vector & p) const;
0216
0217
0218 inline Hep3Vector operator * (const Hep3Vector & p) const;
0219
0220
0221 inline HepLorentzVector operator()( const HepLorentzVector & w ) const;
0222
0223
0224 inline HepLorentzVector operator* ( const HepLorentzVector & w ) const;
0225
0226
0227
0228
0229 inline HepRotationX operator * (const HepRotationX & rx) const;
0230
0231
0232 inline HepRotationX & operator *= (const HepRotationX & r);
0233 inline HepRotationX & transform (const HepRotationX & r);
0234
0235
0236
0237
0238 inline HepRotationX inverse() const;
0239
0240
0241 friend HepRotationX inverseOf(const HepRotationX & r);
0242
0243
0244 inline HepRotationX & invert();
0245
0246
0247
0248
0249 std::ostream & print( std::ostream & os ) const;
0250
0251
0252
0253
0254 static inline double getTolerance();
0255 static inline double setTolerance(double tol);
0256
0257 protected:
0258
0259 double its_d;
0260
0261
0262 double its_s;
0263 double its_c;
0264
0265
0266 inline HepRotationX ( double dd, double ss, double cc );
0267
0268
0269 static inline double proper (double delta);
0270
0271
0272 };
0273
0274
0275 inline
0276 std::ostream & operator <<
0277 ( std::ostream & os, const HepRotationX & r ) {return r.print(os);}
0278
0279 }
0280
0281 #include "CLHEP/Vector/RotationX.icc"
0282
0283 #ifdef ENABLE_BACKWARDS_COMPATIBILITY
0284
0285 using namespace CLHEP;
0286 #endif
0287
0288 #endif