File indexing completed on 2026-08-06 09:38:33
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef THEPEG_LorentzRotation_H
0010 #define THEPEG_LorentzRotation_H
0011
0012
0013
0014 #include "SpinOneLorentzRotation.h"
0015 #include "SpinHalfLorentzRotation.h"
0016 #include "LorentzRotation.fh"
0017
0018 namespace ThePEG {
0019
0020
0021
0022
0023
0024
0025
0026
0027 class LorentzRotation {
0028
0029
0030
0031
0032 friend LorentzRotation inverseOf ( const LorentzRotation & lt );
0033
0034 public:
0035
0036
0037
0038
0039
0040
0041
0042 LorentzRotation() : _half(), _one() {}
0043
0044
0045
0046
0047
0048
0049
0050
0051 LorentzRotation (double bx, double by, double bz, double gamma=-1.)
0052 : _half(bx,by,bz,gamma), _one(bx,by,bz,gamma) {}
0053
0054
0055
0056
0057
0058
0059 LorentzRotation (const Boost & b, double gamma=-1.)
0060 : _half(b,gamma), _one(b,gamma) {}
0061
0062
0063
0064
0065
0066 bool isIdentity() const {
0067 return _half.isIdentity() && _one.isIdentity();
0068 }
0069
0070
0071
0072
0073 LorentzRotation inverse() const {
0074 LorentzRotation output;
0075 output._half = _half.inverse();
0076 output._one = _one.inverse();
0077 return output;
0078 }
0079
0080
0081
0082
0083 LorentzRotation & invert() {
0084 return *this=inverse();
0085 }
0086
0087
0088
0089
0090 std::ostream & print( std::ostream & os ) const;
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102 LorentzRotation & setBoost (double bx, double by, double bz, double gamma=-1.) {
0103 _half.setBoost(bx,by,bz,gamma);
0104 _one.setBoost(bx,by,bz,gamma);
0105 return *this;
0106 }
0107
0108
0109
0110
0111
0112
0113 LorentzRotation & setBoost (const Boost & b, double gamma=-1.) {
0114 _half.setBoost(b,gamma);
0115 _one.setBoost(b,gamma);
0116 return *this;
0117 }
0118
0119
0120
0121
0122
0123 LorentzRotation & setBoostX (double boost) {
0124 _half.setBoostX(boost);
0125 _one.setBoost(boost,0,0);
0126 return *this;
0127 }
0128
0129
0130
0131
0132
0133 LorentzRotation & setBoostY (double boost) {
0134 _half.setBoostY(boost);
0135 _one.setBoost(0,boost,0);
0136 return *this;
0137 }
0138
0139
0140
0141
0142
0143 LorentzRotation & setBoostZ (double boost) {
0144 _half.setBoostZ(boost);
0145 _one.setBoost(0,0,boost);
0146 return *this;
0147 }
0148
0149
0150
0151
0152
0153
0154 LorentzRotation & setRotate(double delta, const Axis & axis) {
0155 _half.setRotate(delta,axis);
0156 _one.setRotate(delta,axis);
0157 return *this;
0158 }
0159
0160
0161
0162
0163
0164 LorentzRotation & setRotateX (double angle) {
0165 _half.setRotateX(angle);
0166 _one.setRotateX(angle);
0167 return *this;
0168 }
0169
0170
0171
0172
0173
0174 LorentzRotation & setRotateY (double angle) {
0175 _half.setRotateZ(angle);
0176 _one.setRotateZ(angle);
0177 return *this;
0178 }
0179
0180
0181
0182
0183
0184 LorentzRotation & setRotateZ (double angle) {
0185 _half.setRotateZ(angle);
0186 _one.setRotateZ(angle);
0187 return *this;
0188 }
0189
0190
0191
0192
0193
0194
0195
0196
0197 const SpinHalfLorentzRotation & half() const { return _half; }
0198
0199
0200
0201
0202 const SpinOneLorentzRotation & one() const { return _one; }
0203
0204
0205
0206
0207 operator const SpinOneLorentzRotation & () const { return _one; }
0208
0209
0210
0211
0212
0213
0214
0215
0216 double xx() const { return _one.xx(); }
0217
0218
0219
0220
0221 double xy() const { return _one.xy(); }
0222
0223
0224
0225
0226 double xz() const { return _one.xz(); }
0227
0228
0229
0230
0231 double xt() const { return _one.xt(); }
0232
0233
0234
0235
0236 double yx() const { return _one.yx(); }
0237
0238
0239
0240
0241 double yy() const { return _one.yy(); }
0242
0243
0244
0245
0246 double yz() const { return _one.yz(); }
0247
0248
0249
0250
0251 double yt() const { return _one.yt(); }
0252
0253
0254
0255
0256 double zx() const { return _one.zx(); }
0257
0258
0259
0260
0261 double zy() const { return _one.zy(); }
0262
0263
0264
0265
0266 double zz() const { return _one.zz(); }
0267
0268
0269
0270
0271 double zt() const { return _one.zt(); }
0272
0273
0274
0275
0276 double tx() const { return _one.tx(); }
0277
0278
0279
0280
0281 double ty() const { return _one.ty(); }
0282
0283
0284
0285
0286 double tz() const { return _one.tz(); }
0287
0288
0289
0290
0291 double tt() const { return _one.tt(); }
0292
0293
0294
0295
0296
0297
0298
0299 Complex s1s1() const { return _half.s1s1(); }
0300
0301
0302
0303
0304 Complex s1s2() const { return _half.s1s2(); }
0305
0306
0307
0308
0309 Complex s1s3() const { return _half.s1s3(); }
0310
0311
0312
0313
0314 Complex s1s4() const { return _half.s1s4(); }
0315
0316
0317
0318
0319 Complex s2s1() const { return _half.s2s1(); }
0320
0321
0322
0323
0324 Complex s2s2() const { return _half.s2s2(); }
0325
0326
0327
0328
0329 Complex s2s3() const { return _half.s2s3(); }
0330
0331
0332
0333
0334 Complex s2s4() const { return _half.s2s4(); }
0335
0336
0337
0338
0339 Complex s3s1() const { return _half.s3s1(); }
0340
0341
0342
0343
0344 Complex s3s2() const { return _half.s3s2(); }
0345
0346
0347
0348
0349 Complex s3s3() const { return _half.s3s3(); }
0350
0351
0352
0353
0354 Complex s3s4() const { return _half.s3s4(); }
0355
0356
0357
0358
0359 Complex s4s1() const { return _half.s4s1(); }
0360
0361
0362
0363
0364 Complex s4s2() const { return _half.s4s2(); }
0365
0366
0367
0368
0369 Complex s4s3() const { return _half.s4s3(); }
0370
0371
0372
0373
0374 Complex s4s4() const { return _half.s4s4(); }
0375
0376
0377
0378
0379
0380
0381
0382
0383
0384 template <typename Value>
0385 LorentzVector<Value>
0386 operator*(const LorentzVector<Value> & lv) const { return one()*lv; }
0387
0388
0389
0390
0391 template <typename Value>
0392 Lorentz5Vector<Value>
0393 operator*(const Lorentz5Vector<Value> & lv) const { return one()*lv; }
0394
0395
0396
0397
0398
0399 LorentzRotation operator * (const LorentzRotation & lt) const {
0400 LorentzRotation output;
0401 output._half = _half * lt._half;
0402 output._one = _one * lt._one;
0403 return output;
0404 }
0405
0406
0407
0408
0409 LorentzRotation & operator *= (const LorentzRotation & lt) {
0410 _one *=lt._one;
0411 _half*=lt._half;
0412 return *this;
0413 }
0414
0415
0416
0417
0418 LorentzRotation & transform(const LorentzRotation & lt) {
0419 _half.transform(lt._half);
0420 _one.transform(lt._one);
0421 return *this;
0422 }
0423
0424
0425
0426
0427 LorentzRotation & rotateX(double delta) {
0428 _half.rotateX(delta);
0429 _one.rotateX(delta);
0430 return *this;
0431 }
0432
0433
0434
0435
0436 LorentzRotation & rotateY(double delta) {
0437 _half.rotateY(delta);
0438 _one.rotateY(delta);
0439 return *this;
0440 }
0441
0442
0443
0444
0445 LorentzRotation & rotateZ(double delta) {
0446 _half.rotateZ(delta);
0447 _one.rotateZ(delta);
0448 return *this;
0449 }
0450
0451
0452
0453
0454 LorentzRotation & rotate(double delta, const Axis & axis) {
0455 _half.rotate(delta,axis);
0456 _one.rotate(delta,axis);
0457 return *this;
0458 }
0459
0460
0461
0462
0463 LorentzRotation & boostX(double beta) {
0464 _half.boostX(beta);
0465 _one.boostX(beta);
0466 return *this;
0467 }
0468
0469
0470
0471
0472 LorentzRotation & boostY(double beta) {
0473 _half.boostY(beta);
0474 _one.boostY(beta);
0475 return *this;
0476 }
0477
0478
0479
0480
0481 LorentzRotation & boostZ(double beta) {
0482 _half.boostZ(beta);
0483 _one.boostZ(beta);
0484 return *this;
0485 }
0486
0487
0488
0489
0490
0491
0492
0493
0494 LorentzRotation & boost(double bx, double by, double bz, double gamma=-1.) {
0495 _half.boost(bx,by,bz,gamma);
0496 _one.boost(bx,by,bz,gamma);
0497 return *this;
0498 }
0499
0500
0501
0502
0503
0504
0505 LorentzRotation & boost(const Boost & bv, double gamma=-1.) {
0506 _half.boost(bv,gamma);
0507 _one.boost(bv,gamma);
0508 return *this;
0509 }
0510
0511
0512 private:
0513
0514
0515
0516
0517 SpinHalfLorentzRotation _half;
0518
0519
0520
0521
0522 SpinOneLorentzRotation _one;
0523
0524 };
0525
0526
0527
0528
0529 inline LorentzRotation inverseOf ( const LorentzRotation & lt ) {
0530 return lt.inverse();
0531 }
0532
0533
0534
0535
0536 inline std::ostream & operator<< ( std::ostream & os,
0537 const LorentzRotation& lt ) {
0538 return lt.print(os);
0539 }
0540
0541 }
0542
0543 #endif
0544