thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
LorentzRotation.h
1// -*- C++ -*-
2//
3// LorentzRotation.h is a part of ThePEG - Toolkit for HEP Event Generation
4// Copyright (C) 1999-2019 Leif Lonnblad
5//
6// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8//
9#ifndef THEPEG_LorentzRotation_H
10#define THEPEG_LorentzRotation_H
11//
12// This is the declaration of the LorentzRotation class.
13//
14#include "SpinOneLorentzRotation.h"
15#include "SpinHalfLorentzRotation.h"
16#include "LorentzRotation.fh"
17
18namespace ThePEG {
19
28
32 friend LorentzRotation inverseOf ( const LorentzRotation & lt );
33
34public:
35
38
43
51 LorentzRotation (double bx, double by, double bz, double gamma=-1.)
52 : _half(bx,by,bz,gamma), _one(bx,by,bz,gamma) {}
53
59 LorentzRotation (const Boost & b, double gamma=-1.)
60 : _half(b,gamma), _one(b,gamma) {}
62
66 bool isIdentity() const {
67 return _half.isIdentity() && _one.isIdentity();
68 }
69
74 LorentzRotation output;
75 output._half = _half.inverse();
76 output._one = _one.inverse();
77 return output;
78 }
79
84 return *this=inverse();
85 }
86
90 std::ostream & print( std::ostream & os ) const;
91
94
102 LorentzRotation & setBoost (double bx, double by, double bz, double gamma=-1.) {
103 _half.setBoost(bx,by,bz,gamma);
104 _one.setBoost(bx,by,bz,gamma);
105 return *this;
106 }
107
113 LorentzRotation & setBoost (const Boost & b, double gamma=-1.) {
114 _half.setBoost(b,gamma);
115 _one.setBoost(b,gamma);
116 return *this;
117 }
118
125 _one.setBoost(boost,0,0);
126 return *this;
127 }
128
135 _one.setBoost(0,boost,0);
136 return *this;
137 }
138
145 _one.setBoost(0,0,boost);
146 return *this;
147 }
148
154 LorentzRotation & setRotate(double delta, const Axis & axis) {
155 _half.setRotate(delta,axis);
156 _one.setRotate(delta,axis);
157 return *this;
158 }
159
164 LorentzRotation & setRotateX (double angle) {
165 _half.setRotateX(angle);
166 _one.setRotateX(angle);
167 return *this;
168 }
169
174 LorentzRotation & setRotateY (double angle) {
175 _half.setRotateZ(angle);
176 _one.setRotateZ(angle);
177 return *this;
178 }
179
184 LorentzRotation & setRotateZ (double angle) {
185 _half.setRotateZ(angle);
186 _one.setRotateZ(angle);
187 return *this;
188 }
190
193
197 const SpinHalfLorentzRotation & half() const { return _half; }
198
202 const SpinOneLorentzRotation & one() const { return _one; }
203
207 operator const SpinOneLorentzRotation & () const { return _one; }
209
212
216 double xx() const { return _one.xx(); }
217
221 double xy() const { return _one.xy(); }
222
226 double xz() const { return _one.xz(); }
227
231 double xt() const { return _one.xt(); }
232
236 double yx() const { return _one.yx(); }
237
241 double yy() const { return _one.yy(); }
242
246 double yz() const { return _one.yz(); }
247
251 double yt() const { return _one.yt(); }
252
256 double zx() const { return _one.zx(); }
257
261 double zy() const { return _one.zy(); }
262
266 double zz() const { return _one.zz(); }
267
271 double zt() const { return _one.zt(); }
272
276 double tx() const { return _one.tx(); }
277
281 double ty() const { return _one.ty(); }
282
286 double tz() const { return _one.tz(); }
287
291 double tt() const { return _one.tt(); }
293
299 Complex s1s1() const { return _half.s1s1(); }
300
304 Complex s1s2() const { return _half.s1s2(); }
305
309 Complex s1s3() const { return _half.s1s3(); }
310
314 Complex s1s4() const { return _half.s1s4(); }
315
319 Complex s2s1() const { return _half.s2s1(); }
320
324 Complex s2s2() const { return _half.s2s2(); }
325
329 Complex s2s3() const { return _half.s2s3(); }
330
334 Complex s2s4() const { return _half.s2s4(); }
335
339 Complex s3s1() const { return _half.s3s1(); }
340
344 Complex s3s2() const { return _half.s3s2(); }
345
349 Complex s3s3() const { return _half.s3s3(); }
350
354 Complex s3s4() const { return _half.s3s4(); }
355
359 Complex s4s1() const { return _half.s4s1(); }
360
364 Complex s4s2() const { return _half.s4s2(); }
365
369 Complex s4s3() const { return _half.s4s3(); }
370
374 Complex s4s4() const { return _half.s4s4(); }
376
377
380
384 template <typename Value>
386 operator*(const LorentzVector<Value> & lv) const { return one()*lv; }
387
391 template <typename Value>
393 operator*(const Lorentz5Vector<Value> & lv) const { return one()*lv; }
394
400 LorentzRotation output;
401 output._half = _half * lt._half;
402 output._one = _one * lt._one;
403 return output;
404 }
405
410 _one *=lt._one;
411 _half*=lt._half;
412 return *this;
413 }
414
420 _one.transform(lt._one);
421 return *this;
422 }
423
427 LorentzRotation & rotateX(double delta) {
428 _half.rotateX(delta);
429 _one.rotateX(delta);
430 return *this;
431 }
432
436 LorentzRotation & rotateY(double delta) {
437 _half.rotateY(delta);
438 _one.rotateY(delta);
439 return *this;
440 }
441
445 LorentzRotation & rotateZ(double delta) {
446 _half.rotateZ(delta);
447 _one.rotateZ(delta);
448 return *this;
449 }
450
454 LorentzRotation & rotate(double delta, const Axis & axis) {
455 _half.rotate(delta,axis);
456 _one.rotate(delta,axis);
457 return *this;
458 }
459
463 LorentzRotation & boostX(double beta) {
464 _half.boostX(beta);
465 _one.boostX(beta);
466 return *this;
467 }
468
472 LorentzRotation & boostY(double beta) {
473 _half.boostY(beta);
474 _one.boostY(beta);
475 return *this;
476 }
477
481 LorentzRotation & boostZ(double beta) {
482 _half.boostZ(beta);
483 _one.boostZ(beta);
484 return *this;
485 }
486
494 LorentzRotation & boost(double bx, double by, double bz, double gamma=-1.) {
495 _half.boost(bx,by,bz,gamma);
496 _one.boost(bx,by,bz,gamma);
497 return *this;
498 }
499
505 LorentzRotation & boost(const Boost & bv, double gamma=-1.) {
506 _half.boost(bv,gamma);
507 _one.boost(bv,gamma);
508 return *this;
509 }
511
512private:
513
518
523
524};
525
530 return lt.inverse();
531}
532
536inline std::ostream & operator<< ( std::ostream & os,
537 const LorentzRotation& lt ) {
538 return lt.print(os);
539}
540
541}
542
543#endif /* THEPEG_LorentzRotation_H */
544
The Lorentz5Vector inherits from the LorentzVector class.
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
double zy() const
The zy component.
LorentzRotation & transform(const LorentzRotation &lt)
Transform (similar to *= but a.transform(b) becomes a = b*a.
Complex s4s4() const
The component.
Complex s2s3() const
The component.
double yz() const
The yz component.
double xx() const
The xx component.
double xz() const
The xz component.
Complex s1s2() const
The component.
double tz() const
The tz component.
Complex s1s3() const
The component.
Complex s1s1() const
The component.
double zt() const
The zt component.
LorentzRotation & boostX(double beta)
Pure boost along the x-axis; equivalent to LT = BoostX(beta) * LT.
double ty() const
The ty component.
double xy() const
The xy component.
double tx() const
The tx component.
LorentzRotation & setBoost(const Boost &b, double gamma=-1.)
Specify a Lorentz Boost as a vector.
LorentzRotation & setBoostX(double boost)
Specify a boost by the given factor along the x-axis.
Complex s2s4() const
The component.
LorentzRotation & setBoostY(double boost)
Specify a boost by the given factor along the y-axis.
Complex s4s3() const
The component.
LorentzVector< Value > operator*(const LorentzVector< Value > &lv) const
Product with a LorentzVector simply returns the rotated vector.
SpinHalfLorentzRotation _half
The spin- rotation.
Complex s3s1() const
The component.
double yx() const
The yx component.
Lorentz5Vector< Value > operator*(const Lorentz5Vector< Value > &lv) const
Product with a Lorentz5Vector simply returns the rotated vector.
LorentzRotation & setRotateY(double angle)
Specify a rotation by the given angle about the y-axis.
LorentzRotation & setBoostZ(double boost)
Specify a boost by the given factor along the z-axis.
LorentzRotation & rotateX(double delta)
Rotation around the x-axis; equivalent to LT = RotationX(delta) * LT.
LorentzRotation()
Default constructor.
bool isIdentity() const
Returns true if the Identity matrix.
Complex s3s3() const
The component.
LorentzRotation & boostZ(double beta)
Pure boost along the z-axis; equivalent to LT = BoostX(beta) * LT.
LorentzRotation(const Boost &b, double gamma=-1.)
Constructor giving the vector for a Lorentz boost.
LorentzRotation & setRotateZ(double angle)
Specify a rotation by the given angle about the z-axis.
double zz() const
The zz component.
const SpinOneLorentzRotation & one() const
The spin-1 transformation.
LorentzRotation & boost(double bx, double by, double bz, double gamma=-1.)
boost equivalent to LT = Boost(bx,by,bz) * LT
LorentzRotation & rotateZ(double delta)
Rotation around the z-axis; equivalent to LT = RotationZ(delta) * LT.
LorentzRotation & boostY(double beta)
Pure boost along the y-axis; equivalent to LT = BoostX(beta) * LT.
LorentzRotation & setBoost(double bx, double by, double bz, double gamma=-1.)
Specify the components of a Lorentz Boost.
Complex s2s2() const
The component.
Complex s3s4() const
The component.
std::ostream & print(std::ostream &os) const
output operator
LorentzRotation & invert()
Inverts the LorentzRotation matrix.
double yy() const
The yy component.
double xt() const
The xt component.
LorentzRotation & setRotateX(double angle)
Specify a rotation by the given angle about the x-axis.
Complex s4s2() const
The component.
const SpinHalfLorentzRotation & half() const
The spin- transformation.
SpinOneLorentzRotation _one
The spin-1 rotation.
Complex s2s1() const
The component.
Complex s1s4() const
The component.
LorentzRotation & boost(const Boost &bv, double gamma=-1.)
boost equivalent to LT = Boost(bv) * LT
LorentzRotation & rotate(double delta, const Axis &axis)
Rotation around specified vector - LT = Rotation(delta,axis)*LT.
LorentzRotation & rotateY(double delta)
Rotation around the y-axis; equivalent to LT = RotationY(delta) * LT.
LorentzRotation(double bx, double by, double bz, double gamma=-1.)
Constructor giving the components of a Lorentz boost.
friend LorentzRotation inverseOf(const LorentzRotation &lt)
The external inverseOf needs to be a friend.
Complex s4s1() const
The component.
double yt() const
The yt component.
LorentzRotation & setRotate(double delta, const Axis &axis)
Specify a rotation about a general axis by the angle given.
Complex s3s2() const
The component.
double tt() const
The tt component.
LorentzRotation & operator*=(const LorentzRotation &lt)
Multiply by and assign a*=b becomes a= a*b.
double zx() const
The zx component.
LorentzRotation inverse() const
Return the inverse.
A 4-component Lorentz vector.
Definition: LorentzVector.h:44
The SpinHalfLorentzRotation class is designed to offer the same features as the HepLorentzRotation cl...
Complex s4s1() const
The component.
Complex s4s3() const
The component.
SpinHalfLorentzRotation & boostZ(double beta)
Pure boost along the z-axis; equivalent to LT = BoostX(beta) * LT.
SpinHalfLorentzRotation inverse() const
Return the inverse.
SpinHalfLorentzRotation & setRotateX(double &angle)
Specify a rotation by the given angle about the x-axis.
Complex s2s3() const
The component.
Complex s4s4() const
The component.
SpinHalfLorentzRotation & transform(const SpinHalfLorentzRotation &)
Transform (similar to *= but a.transform(b) becomes a = b*a.
Complex s2s1() const
The component.
bool isIdentity() const
Returns true if the Identity matrix.
Complex s1s1() const
The component.
Complex s4s2() const
The component.
Complex s1s3() const
The component.
SpinHalfLorentzRotation & rotateX(double delta)
Rotation around the x-axis; equivalent to LT = RotationX(delta) * LT.
Complex s3s4() const
The component.
Complex s2s2() const
The component.
SpinHalfLorentzRotation & setBoost(double bx, double by, double bz, double gamma=-1.)
Specify the components of a Lorentz Boost.
SpinHalfLorentzRotation & rotateY(double delta)
Rotation around the y-axis; equivalent to LT = RotationY(delta) * LT.
SpinHalfLorentzRotation & setRotate(double delta, const Axis &axis)
Specify a rotation about a general axis by the angle given.
Complex s1s2() const
The component.
SpinHalfLorentzRotation & rotateZ(double delta)
Rotation around the z-axis; equivalent to LT = RotationZ(delta) * LT.
Complex s3s3() const
The component.
SpinHalfLorentzRotation & setBoostX(double &boost)
Specify a boost by the given factor along the x-axis.
Complex s1s4() const
The component.
Complex s3s2() const
The component.
SpinHalfLorentzRotation & rotate(double delta, const Axis &axis)
Rotation around specified vector - LT = Rotation(delta,axis)*LT.
SpinHalfLorentzRotation & boost(double bx, double by, double bz, double gamma=-1.)
General boost equivalent to LT = Boost(bx,by,bz) * LT.
SpinHalfLorentzRotation & boostX(double beta)
Pure boost along the x-axis; equivalent to LT = BoostX(beta) * LT.
SpinHalfLorentzRotation & setRotateZ(double &angle)
Specify a rotation by the given angle about the z-axis.
Complex s2s4() const
The component.
SpinHalfLorentzRotation & boostY(double beta)
Pure boost along the y-axis; equivalent to LT = BoostX(beta) * LT.
SpinHalfLorentzRotation & setBoostY(double &boost)
Specify a boost by the given factor along the y-axis.
SpinHalfLorentzRotation & setBoostZ(double &boost)
Specify a boost by the given factor along the z-axis.
Complex s3s1() const
The component.
The SpinOneLorentzRotation class is ...
double xx() const
The xx component.
SpinOneLorentzRotation & rotate(double delta, const Axis &axis)
Rotation around specified vector - LT = Rotation(delta,axis)*LT.
bool isIdentity() const
Returns true if the Identity matrix.
SpinOneLorentzRotation & setRotateX(double angle)
Specify a rotation by the given angle about the x-axis.
SpinOneLorentzRotation & rotateY(double delta)
Rotation around the y-axis; equivalent to LT = RotationY(delta) * LT.
SpinOneLorentzRotation & transform(const SpinOneLorentzRotation &lt)
Transform (similar to *= but a.transform(b) becomes a = b*a.
double yx() const
The yx component.
double zz() const
The zz component.
double xz() const
The xz component.
SpinOneLorentzRotation & rotateZ(double delta)
Rotation around the z-axis; equivalent to LT = RotationZ(delta) * LT.
double zx() const
The zx component.
SpinOneLorentzRotation & boostY(double beta)
Pure boost along the y-axis; equivalent to LT = BoostX(beta) * LT.
double ty() const
The ty component.
double xy() const
The xy component.
double zy() const
The zy component.
double tz() const
The tz component.
double xt() const
The xt component.
double tt() const
The tt component.
SpinOneLorentzRotation inverse() const
Return the inverse.
SpinOneLorentzRotation & setRotate(double delta, const Axis &axis)
Specify a rotation about a general axis by the angle given.
double zt() const
The zt component.
double yy() const
The yy component.
double yz() const
The yz component.
SpinOneLorentzRotation & boostX(double beta)
Pure boost along the x-axis; equivalent to LT = BoostX(beta) * LT.
SpinOneLorentzRotation & rotateX(double delta)
Rotation around the x-axis; equivalent to LT = RotationX(delta) * LT.
double yt() const
The yt component.
SpinOneLorentzRotation & setBoost(double bx, double by, double bz, double gamma=-1.)
Specify the components of a Lorentz Boost.
SpinOneLorentzRotation & boost(double bx, double by, double bz, double gamma=-1.)
boost equivalent to LT = Boost(bx,by,bz) * LT
double tx() const
The tx component.
SpinOneLorentzRotation & setRotateZ(double angle)
Specify a rotation by the given angle about the z-axis.
SpinOneLorentzRotation & boostZ(double beta)
Pure boost along the z-axis; equivalent to LT = BoostX(beta) * LT.
A 3-component vector.
Definition: ThreeVector.h:35
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
std::complex< double > Complex
ThePEG code should use Complex for all complex scalars.
Definition: Complex.h:23
vector< T > & operator<<(vector< T > &tv, const U &u)
Overload the left shift operator for vector to push_back objects to a vector.
Definition: Containers.h:179
LorentzRotation inverseOf(const LorentzRotation &lt)
Global method to get the inverse.