File indexing completed on 2026-08-06 09:38:33
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef ThePEG_SpinOneLorentzRotation_H
0010 #define ThePEG_SpinOneLorentzRotation_H
0011
0012 #include "ThePEG/Helicity/HelicityDefinitions.h"
0013 #include "ThePEG/Helicity/LorentzRank3Tensor.fh"
0014 #include "ThePEG/Helicity/LorentzTensor.fh"
0015 #include "ThePEG/Helicity/LorentzRSSpinor.fh"
0016 #include "ThePEG/Helicity/LorentzRSSpinorBar.fh"
0017 #include "ThreeVector.h"
0018 #include <vector>
0019
0020 namespace ThePEG {
0021
0022
0023
0024
0025 class SpinOneLorentzRotation {
0026 public:
0027
0028
0029
0030
0031
0032
0033
0034 SpinOneLorentzRotation() {
0035 xx_() = yy_() = zz_() = tt_() = 1.0;
0036 }
0037
0038
0039
0040
0041
0042
0043
0044
0045 SpinOneLorentzRotation (double bx, double by, double bz, double gamma=-1.)
0046 {
0047 setBoost(bx,by,bz,gamma);
0048 }
0049
0050
0051
0052
0053
0054
0055 explicit SpinOneLorentzRotation (const Boost & b, double gamma=-1.)
0056 {
0057 setBoost(b.x(), b.y(), b.z(),gamma);
0058 }
0059
0060
0061
0062
0063
0064 bool isIdentity() const;
0065
0066
0067
0068
0069 SpinOneLorentzRotation inverse() const;
0070
0071
0072
0073
0074 SpinOneLorentzRotation & invert() { return *this = inverse(); }
0075
0076
0077
0078
0079 std::ostream & print( std::ostream & os ) const;
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091 SpinOneLorentzRotation & setBoost (double bx, double by, double bz, double gamma=-1.);
0092
0093
0094
0095
0096
0097
0098 SpinOneLorentzRotation & setBoost (const Boost & b, double gamma=-1.) {
0099 return setBoost(b.x(), b.y(), b.z(),gamma);
0100 }
0101
0102
0103
0104
0105
0106
0107 SpinOneLorentzRotation & setRotate(double delta, const Axis & axis);
0108
0109
0110
0111
0112
0113 SpinOneLorentzRotation & setRotateX (double angle);
0114
0115
0116
0117
0118
0119 SpinOneLorentzRotation & setRotateY (double angle);
0120
0121
0122
0123
0124
0125 SpinOneLorentzRotation & setRotateZ (double angle);
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135 double xx() const { return matrix_[ 0]; }
0136
0137
0138
0139
0140 double xy() const { return matrix_[ 1]; }
0141
0142
0143
0144
0145 double xz() const { return matrix_[ 2]; }
0146
0147
0148
0149
0150 double xt() const { return matrix_[ 3]; }
0151
0152
0153
0154
0155 double yx() const { return matrix_[ 4]; }
0156
0157
0158
0159
0160 double yy() const { return matrix_[ 5]; }
0161
0162
0163
0164
0165 double yz() const { return matrix_[ 6]; }
0166
0167
0168
0169
0170 double yt() const { return matrix_[ 7]; }
0171
0172
0173
0174
0175 double zx() const { return matrix_[ 8]; }
0176
0177
0178
0179
0180 double zy() const { return matrix_[ 9]; }
0181
0182
0183
0184
0185 double zz() const { return matrix_[10]; }
0186
0187
0188
0189
0190 double zt() const { return matrix_[11]; }
0191
0192
0193
0194
0195 double tx() const { return matrix_[12]; }
0196
0197
0198
0199
0200 double ty() const { return matrix_[13]; }
0201
0202
0203
0204
0205 double tz() const { return matrix_[14]; }
0206
0207
0208
0209
0210 double tt() const { return matrix_[15]; }
0211
0212
0213
0214
0215
0216
0217
0218
0219 template <typename Value>
0220 LorentzVector<Value>
0221 operator*(const LorentzVector<Value> & v) const {
0222 return LorentzVector<Value>
0223 (xx()*v.x() + xy()*v.y() + xz()*v.z() + xt()*v.t(),
0224 yx()*v.x() + yy()*v.y() + yz()*v.z() + yt()*v.t(),
0225 zx()*v.x() + zy()*v.y() + zz()*v.z() + zt()*v.t(),
0226 tx()*v.x() + ty()*v.y() + tz()*v.z() + tt()*v.t());
0227 }
0228
0229
0230
0231
0232 template <typename Value>
0233 Lorentz5Vector<Value>
0234 operator*(const Lorentz5Vector<Value> & v) const {
0235 return Lorentz5Vector<Value>
0236 (xx()*v.x() + xy()*v.y() + xz()*v.z() + xt()*v.t(),
0237 yx()*v.x() + yy()*v.y() + yz()*v.z() + yt()*v.t(),
0238 zx()*v.x() + zy()*v.y() + zz()*v.z() + zt()*v.t(),
0239 tx()*v.x() + ty()*v.y() + tz()*v.z() + tt()*v.t());
0240 }
0241
0242
0243
0244
0245
0246 SpinOneLorentzRotation operator * (const SpinOneLorentzRotation & lt) const;
0247
0248
0249
0250
0251 SpinOneLorentzRotation & operator *= (const SpinOneLorentzRotation & lt) {
0252 return *this = *this * lt;
0253 }
0254
0255
0256
0257
0258 SpinOneLorentzRotation & transform (const SpinOneLorentzRotation & lt) {
0259 return *this = lt * *this;
0260 }
0261
0262
0263
0264
0265 SpinOneLorentzRotation & rotateX(double delta) {
0266 SpinOneLorentzRotation tmp;
0267 tmp.setRotateX(delta);
0268 return *this = tmp * *this;
0269 }
0270
0271
0272
0273
0274 SpinOneLorentzRotation & rotateY(double delta) {
0275 SpinOneLorentzRotation tmp;
0276 tmp.setRotateY(delta);
0277 return *this = tmp * *this;
0278 }
0279
0280
0281
0282
0283 SpinOneLorentzRotation & rotateZ(double delta) {
0284 SpinOneLorentzRotation tmp;
0285 tmp.setRotateZ(delta);
0286 return *this = tmp * *this;
0287 }
0288
0289
0290
0291
0292 SpinOneLorentzRotation & rotate(double delta, const Axis & axis) {
0293 SpinOneLorentzRotation tmp;
0294 tmp.setRotate(delta, axis);
0295 return *this = tmp * *this;
0296 }
0297
0298
0299
0300
0301 SpinOneLorentzRotation & boostX(double beta) {
0302 return *this = SpinOneLorentzRotation(beta,0,0) * *this;
0303 }
0304
0305
0306
0307
0308 SpinOneLorentzRotation & boostY(double beta) {
0309 return *this = SpinOneLorentzRotation(0,beta,0) * *this;
0310 }
0311
0312
0313
0314
0315 SpinOneLorentzRotation & boostZ(double beta) {
0316 return *this = SpinOneLorentzRotation(0,0,beta) * *this;
0317 }
0318
0319
0320
0321
0322
0323
0324
0325
0326 SpinOneLorentzRotation & boost(double bx, double by, double bz,
0327 double gamma=-1.) {
0328 return *this = SpinOneLorentzRotation(bx,by,bz,gamma) * *this;
0329 }
0330
0331
0332
0333
0334
0335
0336 SpinOneLorentzRotation & boost(const Boost & b, double gamma=-1.) {
0337 return *this = SpinOneLorentzRotation(b.x(),b.y(),b.z(),gamma) * *this;
0338 }
0339
0340
0341 private:
0342
0343 template<typename Value> friend class Helicity::LorentzTensor;
0344 template<typename Value> friend class Helicity::LorentzRank3Tensor;
0345 template<typename Value> friend class Helicity::LorentzRSSpinor;
0346 template<typename Value> friend class Helicity::LorentzRSSpinorBar;
0347
0348
0349 array<double,16> matrix_ = {};
0350
0351
0352 SpinOneLorentzRotation (double xx, double xy, double xz, double xt,
0353 double yx, double yy, double yz, double yt,
0354 double zx, double zy, double zz, double zt,
0355 double tx, double ty, double tz, double tt);
0356
0357
0358 double operator()(unsigned int i, unsigned int j) const {
0359 return matrix_[4*i + j];
0360 }
0361
0362
0363
0364 double & xx_() { return matrix_[ 0]; }
0365 double & xy_() { return matrix_[ 1]; }
0366 double & xz_() { return matrix_[ 2]; }
0367 double & xt_() { return matrix_[ 3]; }
0368
0369 double & yx_() { return matrix_[ 4]; }
0370 double & yy_() { return matrix_[ 5]; }
0371 double & yz_() { return matrix_[ 6]; }
0372 double & yt_() { return matrix_[ 7]; }
0373
0374 double & zx_() { return matrix_[ 8]; }
0375 double & zy_() { return matrix_[ 9]; }
0376 double & zz_() { return matrix_[10]; }
0377 double & zt_() { return matrix_[11]; }
0378
0379 double & tx_() { return matrix_[12]; }
0380 double & ty_() { return matrix_[13]; }
0381 double & tz_() { return matrix_[14]; }
0382 double & tt_() { return matrix_[15]; }
0383
0384 };
0385
0386
0387
0388
0389 inline std::ostream & operator<< ( std::ostream & os,
0390 const SpinOneLorentzRotation& lt ) {
0391 return lt.print(os);
0392 }
0393
0394 }
0395
0396 #endif