00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef THEPEG_LorentzRotation_H
00010 #define THEPEG_LorentzRotation_H
00011
00012
00013
00014 #include "SpinOneLorentzRotation.h"
00015 #include "SpinHalfLorentzRotation.h"
00016 #include "LorentzRotation.fh"
00017
00018 namespace ThePEG {
00019
00027 class LorentzRotation {
00028
00032 friend LorentzRotation inverseOf ( const LorentzRotation & lt );
00033
00034 public:
00035
00038
00042 LorentzRotation() : _half(), _one() {}
00043
00051 LorentzRotation (double bx, double by, double bz, double gamma=-1.)
00052 : _half(bx,by,bz,gamma), _one(bx,by,bz,gamma) {}
00053
00059 LorentzRotation (const Boost & b, double gamma=-1.)
00060 : _half(b,gamma), _one(b,gamma) {}
00062
00066 bool isIdentity() const {
00067 return _half.isIdentity() && _one.isIdentity();
00068 }
00069
00073 LorentzRotation inverse() const {
00074 LorentzRotation output;
00075 output._half = _half.inverse();
00076 output._one = _one.inverse();
00077 return output;
00078 }
00079
00083 LorentzRotation & invert() {
00084 return *this=inverse();
00085 }
00086
00090 std::ostream & print( std::ostream & os ) const;
00091
00094
00102 LorentzRotation & setBoost (double bx, double by, double bz, double gamma=-1.) {
00103 _half.setBoost(bx,by,bz,gamma);
00104 _one.setBoost(bx,by,bz,gamma);
00105 return *this;
00106 }
00107
00113 LorentzRotation & setBoost (const Boost & b, double gamma=-1.) {
00114 _half.setBoost(b,gamma);
00115 _one.setBoost(b,gamma);
00116 return *this;
00117 }
00118
00123 LorentzRotation & setBoostX (double boost) {
00124 _half.setBoostX(boost);
00125 _one.setBoost(boost,0,0);
00126 return *this;
00127 }
00128
00133 LorentzRotation & setBoostY (double boost) {
00134 _half.setBoostY(boost);
00135 _one.setBoost(0,boost,0);
00136 return *this;
00137 }
00138
00143 LorentzRotation & setBoostZ (double boost) {
00144 _half.setBoostZ(boost);
00145 _one.setBoost(0,0,boost);
00146 return *this;
00147 }
00148
00154 LorentzRotation & setRotate(double delta, const Axis & axis) {
00155 _half.setRotate(delta,axis);
00156 _one.setRotate(delta,axis);
00157 return *this;
00158 }
00159
00164 LorentzRotation & setRotateX (double angle) {
00165 _half.setRotateX(angle);
00166 _one.setRotateX(angle);
00167 return *this;
00168 }
00169
00174 LorentzRotation & setRotateY (double angle) {
00175 _half.setRotateZ(angle);
00176 _one.setRotateZ(angle);
00177 return *this;
00178 }
00179
00184 LorentzRotation & setRotateZ (double angle) {
00185 _half.setRotateZ(angle);
00186 _one.setRotateZ(angle);
00187 return *this;
00188 }
00190
00193
00197 const SpinHalfLorentzRotation & half() const { return _half; }
00198
00202 const SpinOneLorentzRotation & one() const { return _one; }
00203
00207 operator const SpinOneLorentzRotation & () const { return _one; }
00209
00212
00216 double xx() const { return _one.xx(); }
00217
00221 double xy() const { return _one.xy(); }
00222
00226 double xz() const { return _one.xz(); }
00227
00231 double xt() const { return _one.xt(); }
00232
00236 double yx() const { return _one.yx(); }
00237
00241 double yy() const { return _one.yy(); }
00242
00246 double yz() const { return _one.yz(); }
00247
00251 double yt() const { return _one.yt(); }
00252
00256 double zx() const { return _one.zx(); }
00257
00261 double zy() const { return _one.zy(); }
00262
00266 double zz() const { return _one.zz(); }
00267
00271 double zt() const { return _one.zt(); }
00272
00276 double tx() const { return _one.tx(); }
00277
00281 double ty() const { return _one.ty(); }
00282
00286 double tz() const { return _one.tz(); }
00287
00291 double tt() const { return _one.tt(); }
00293
00299 Complex s1s1() const { return _half.s1s1(); }
00300
00304 Complex s1s2() const { return _half.s1s2(); }
00305
00309 Complex s1s3() const { return _half.s1s3(); }
00310
00314 Complex s1s4() const { return _half.s1s4(); }
00315
00319 Complex s2s1() const { return _half.s2s1(); }
00320
00324 Complex s2s2() const { return _half.s2s2(); }
00325
00329 Complex s2s3() const { return _half.s2s3(); }
00330
00334 Complex s2s4() const { return _half.s2s4(); }
00335
00339 Complex s3s1() const { return _half.s3s1(); }
00340
00344 Complex s3s2() const { return _half.s3s2(); }
00345
00349 Complex s3s3() const { return _half.s3s3(); }
00350
00354 Complex s3s4() const { return _half.s3s4(); }
00355
00359 Complex s4s1() const { return _half.s4s1(); }
00360
00364 Complex s4s2() const { return _half.s4s2(); }
00365
00369 Complex s4s3() const { return _half.s4s3(); }
00370
00374 Complex s4s4() const { return _half.s4s4(); }
00376
00377
00380
00384 template <typename Value>
00385 LorentzVector<Value>
00386 operator*(const LorentzVector<Value> & lv) const { return one()*lv; }
00387
00391 template <typename Value>
00392 Lorentz5Vector<Value>
00393 operator*(const Lorentz5Vector<Value> & lv) const { return one()*lv; }
00394
00399 LorentzRotation operator * (const LorentzRotation & lt) const {
00400 LorentzRotation output;
00401 output._half = _half * lt._half;
00402 output._one = _one * lt._one;
00403 return output;
00404 }
00405
00409 LorentzRotation & operator *= (const LorentzRotation & lt) {
00410 _one *=lt._one;
00411 _half*=lt._half;
00412 return *this;
00413 }
00414
00418 LorentzRotation & transform(const LorentzRotation & lt) {
00419 _half.transform(lt._half);
00420 _one.transform(lt._one);
00421 return *this;
00422 }
00423
00427 LorentzRotation & rotateX(double delta) {
00428 _half.rotateX(delta);
00429 _one.rotateX(delta);
00430 return *this;
00431 }
00432
00436 LorentzRotation & rotateY(double delta) {
00437 _half.rotateY(delta);
00438 _one.rotateY(delta);
00439 return *this;
00440 }
00441
00445 LorentzRotation & rotateZ(double delta) {
00446 _half.rotateZ(delta);
00447 _one.rotateZ(delta);
00448 return *this;
00449 }
00450
00454 LorentzRotation & rotate(double delta, const Axis & axis) {
00455 _half.rotate(delta,axis);
00456 _one.rotate(delta,axis);
00457 return *this;
00458 }
00459
00463 LorentzRotation & boostX(double beta) {
00464 _half.boostX(beta);
00465 _one.boostX(beta);
00466 return *this;
00467 }
00468
00472 LorentzRotation & boostY(double beta) {
00473 _half.boostY(beta);
00474 _one.boostY(beta);
00475 return *this;
00476 }
00477
00481 LorentzRotation & boostZ(double beta) {
00482 _half.boostZ(beta);
00483 _one.boostZ(beta);
00484 return *this;
00485 }
00486
00494 LorentzRotation & boost(double bx, double by, double bz, double gamma=-1.) {
00495 _half.boost(bx,by,bz,gamma);
00496 _one.boost(bx,by,bz,gamma);
00497 return *this;
00498 }
00499
00505 LorentzRotation & boost(const Boost & bv, double gamma=-1.) {
00506 _half.boost(bv,gamma);
00507 _one.boost(bv,gamma);
00508 return *this;
00509 }
00511
00512 private:
00513
00517 SpinHalfLorentzRotation _half;
00518
00522 SpinOneLorentzRotation _one;
00523
00524 };
00525
00529 inline LorentzRotation inverseOf ( const LorentzRotation & lt ) {
00530 return lt.inverse();
00531 }
00532
00536 inline std::ostream & operator<< ( std::ostream & os,
00537 const LorentzRotation& lt ) {
00538 return lt.print(os);
00539 }
00540
00541 }
00542
00543 #endif
00544