thepeg is hosted by Hepforge, IPPP Durham
 ThePEG  2.1.5
LorentzRotation.h
1 // -*- C++ -*-
2 //
3 // LorentzRotation.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2017 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
18 namespace ThePEG {
19
28
32  friend LorentzRotation inverseOf ( const LorentzRotation & lt );
33
34 public:
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
124  _half.setBoostX(boost);
125  _one.setBoost(boost,0,0);
126  return *this;
127  }
128
134  _half.setBoostY(boost);
135  _one.setBoost(0,boost,0);
136  return *this;
137  }
138
144  _half.setBoostZ(boost);
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
419  _half.transform(lt._half);
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
512 private:
513
518
523
524 };
525
530  return lt.inverse();
531 }
532
536 inline 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
LorentzRotation & setBoostX(double boost)
Specify a boost by the given factor along the x-axis.
Complex s4s4() const
The component.
Complex s4s4() const
The component.
double xy() const
The xy component.
LorentzRotation(const Boost &b, double gamma=-1.)
Constructor giving the vector for a Lorentz boost.
LorentzRotation & setBoost(const Boost &b, double gamma=-1.)
Specify a Lorentz Boost as a vector.
double yy() const
The yy component.
SpinOneLorentzRotation & boostZ(double beta)
Pure boost along the z-axis; equivalent to LT = BoostX(beta) * LT.
double yt() const
The yt component.
A 4-component Lorentz vector.
Definition: LorentzVector.h:35
bool isIdentity() const
Returns true if the Identity matrix.
Complex s1s1() const
The component.
SpinHalfLorentzRotation & boostY(double beta)
Pure boost along the y-axis; equivalent to LT = BoostX(beta) * LT.
SpinOneLorentzRotation _one
The spin-1 rotation.
SpinHalfLorentzRotation & setBoostZ(double &boost)
Specify a boost by the given factor along the z-axis.
double xy() const
The xy component.
LorentzRotation & setRotate(double delta, const Axis &axis)
Specify a rotation about a general axis by the angle given.
double zt() const
The zt component.
SpinOneLorentzRotation & rotateZ(double delta)
Rotation around the z-axis; equivalent to LT = RotationZ(delta) * LT.
std::complex< double > Complex
ThePEG code should use Complex for all complex scalars.
Definition: Complex.h:23
bool isIdentity() const
Returns true if the Identity matrix.
SpinHalfLorentzRotation & rotateY(double delta)
Rotation around the y-axis; equivalent to LT = RotationY(delta) * LT.
Complex s1s4() const
The component.
LorentzRotation & rotate(double delta, const Axis &axis)
Rotation around specified vector - LT = Rotation(delta,axis)*LT.
SpinHalfLorentzRotation & setBoostY(double &boost)
Specify a boost by the given factor along the y-axis.
Complex s4s1() const
The component.
Complex s3s1() const
The component.
const SpinOneLorentzRotation & one() const
The spin-1 transformation.
LorentzRotation(double bx, double by, double bz, double gamma=-1.)
Constructor giving the components of a Lorentz boost.
A 3-component vector.
Definition: ThreeVector.h:34
LorentzRotation & setBoost(double bx, double by, double bz, double gamma=-1.)
Specify the components of a Lorentz Boost.
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
SpinOneLorentzRotation & setRotateX(double angle)
Specify a rotation by the given angle about the x-axis.
SpinHalfLorentzRotation inverse() const
Return the inverse.
SpinHalfLorentzRotation & rotateX(double delta)
Rotation around the x-axis; equivalent to LT = RotationX(delta) * LT.
Complex s2s4() const
The component.
LorentzRotation & rotateZ(double delta)
Rotation around the z-axis; equivalent to LT = RotationZ(delta) * LT.
LorentzRotation & rotateY(double delta)
Rotation around the y-axis; equivalent to LT = RotationY(delta) * LT.
Complex s4s1() const
The component.
SpinOneLorentzRotation & rotateX(double delta)
Rotation around the x-axis; equivalent to LT = RotationX(delta) * LT.
Complex s3s3() const
The component.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
Complex s2s3() const
The component.
double xz() const
The xz component.
LorentzRotation & boost(double bx, double by, double bz, double gamma=-1.)
boost equivalent to LT = Boost(bx,by,bz) * LT
SpinOneLorentzRotation & transform(const SpinOneLorentzRotation &lt)
Transform (similar to *= but a.transform(b) becomes a = b*a.
double zx() const
The zx component.
std::ostream & print(std::ostream &os) const
output operator
Complex s3s3() const
The component.
const SpinHalfLorentzRotation & half() const
The spin- transformation.
double yy() const
The yy component.
Complex s1s1() const
The component.
SpinHalfLorentzRotation & transform(const SpinHalfLorentzRotation &)
Transform (similar to *= but a.transform(b) becomes a = b*a.
SpinOneLorentzRotation & boostX(double beta)
Pure boost along the x-axis; equivalent to LT = BoostX(beta) * LT.
LorentzVector< Value > operator*(const LorentzVector< Value > &lv) const
Product with a LorentzVector simply returns the rotated vector.
LorentzRotation & setRotateY(double angle)
Specify a rotation by the given angle about the y-axis.
SpinOneLorentzRotation & setRotate(double delta, const Axis &axis)
Specify a rotation about a general axis by the angle given.
SpinHalfLorentzRotation & setBoostX(double &boost)
Specify a boost by the given factor along the x-axis.
Complex s4s2() const
The component.
friend LorentzRotation inverseOf(const LorentzRotation &lt)
The external inverseOf needs to be a friend.
double zy() const
The zy component.
LorentzRotation & invert()
Inverts the LorentzRotation matrix.
Complex s2s1() const
The component.
Lorentz5Vector< Value > operator*(const Lorentz5Vector< Value > &lv) const
Product with a Lorentz5Vector simply returns the rotated vector.
Complex s4s3() const
The component.
LorentzRotation & boostZ(double beta)
Pure boost along the z-axis; equivalent to LT = BoostX(beta) * LT.
SpinOneLorentzRotation & boost(double bx, double by, double bz, double gamma=-1.)
boost equivalent to LT = Boost(bx,by,bz) * LT
SpinOneLorentzRotation & rotateY(double delta)
Rotation around the y-axis; equivalent to LT = RotationY(delta) * LT.
SpinOneLorentzRotation & boostY(double beta)
Pure boost along the y-axis; equivalent to LT = BoostX(beta) * LT.
The SpinOneLorentzRotation class is ...
double xt() const
The xt component.
SpinOneLorentzRotation & rotate(double delta, const Axis &axis)
Rotation around specified vector - LT = Rotation(delta,axis)*LT.
SpinHalfLorentzRotation _half
The spin- rotation.
double xz() const
The xz component.
Complex s1s3() const
The component.
double yt() const
The yt component.
Complex s2s4() const
The component.
LorentzRotation & setBoostY(double boost)
Specify a boost by the given factor along the y-axis.
Complex s3s4() const
The component.
SpinHalfLorentzRotation & setRotateZ(double &angle)
Specify a rotation by the given angle about the z-axis.
double tt() const
The tt component.
LorentzRotation & setBoostZ(double boost)
Specify a boost by the given factor along the z-axis.
double yx() const
The yx component.
SpinHalfLorentzRotation & setRotate(double delta, const Axis &axis)
Specify a rotation about a general axis by the angle given.
double tz() const
The tz component.
double xx() const
The xx component.
LorentzRotation & setRotateX(double angle)
Specify a rotation by the given angle about the x-axis.
LorentzRotation & boost(const Boost &bv, double gamma=-1.)
boost equivalent to LT = Boost(bv) * LT
Complex s1s2() const
The component.
The Lorentz5Vector inherits from the LorentzVector class.
double tx() const
The tx component.
SpinHalfLorentzRotation & boostX(double beta)
Pure boost along the x-axis; equivalent to LT = BoostX(beta) * LT.
double xt() const
The xt component.
SpinHalfLorentzRotation & setRotateX(double &angle)
Specify a rotation by the given angle about the x-axis.
double yz() const
The yz component.
LorentzRotation & boostY(double beta)
Pure boost along the y-axis; equivalent to LT = BoostX(beta) * LT.
double zy() const
The zy component.
SpinHalfLorentzRotation & boostZ(double beta)
Pure boost along the z-axis; equivalent to LT = BoostX(beta) * LT.
double ty() const
The ty component.
Complex s4s2() const
The component.
Complex s1s4() const
The component.
Complex s2s1() const
The component.
SpinHalfLorentzRotation & boost(double bx, double by, double bz, double gamma=-1.)
General boost equivalent to LT = Boost(bx,by,bz) * LT.
LorentzRotation & rotateX(double delta)
Rotation around the x-axis; equivalent to LT = RotationX(delta) * LT.
Complex s3s4() const
The component.
LorentzRotation & transform(const LorentzRotation &lt)
Transform (similar to *= but a.transform(b) becomes a = b*a.
double ty() const
The ty component.
LorentzRotation & operator*=(const LorentzRotation &lt)
Multiply by and assign a*=b becomes a= a*b.
LorentzRotation inverse() const
Return the inverse.
SpinHalfLorentzRotation & rotateZ(double delta)
Rotation around the z-axis; equivalent to LT = RotationZ(delta) * LT.
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
double zt() const
The zt component.
The SpinHalfLorentzRotation class is designed to offer the same features as the HepLorentzRotation cl...
LorentzRotation()
Default constructor.
Complex s3s2() const
The component.
Complex s2s3() const
The component.
LorentzRotation & boostX(double beta)
Pure boost along the x-axis; equivalent to LT = BoostX(beta) * LT.
Complex s2s2() const
The component.
Complex s2s2() const
The component.
SpinHalfLorentzRotation & rotate(double delta, const Axis &axis)
Rotation around specified vector - LT = Rotation(delta,axis)*LT.
Complex s4s3() const
The component.
double zz() const
The zz component.
SpinOneLorentzRotation inverse() const
Return the inverse.
double xx() const
The xx component.
double zz() const
The zz component.
double yz() const
The yz component.
double tx() const
The tx component.
LorentzRotation & setRotateZ(double angle)
Specify a rotation by the given angle about the z-axis.
bool isIdentity() const
Returns true if the Identity matrix.
SpinHalfLorentzRotation & setBoost(double bx, double by, double bz, double gamma=-1.)
Specify the components of a Lorentz Boost.
double yx() const
The yx component.
double tt() const
The tt component.
SpinOneLorentzRotation & setRotateZ(double angle)
Specify a rotation by the given angle about the z-axis.
double tz() const
The tz component.
SpinOneLorentzRotation & setBoost(double bx, double by, double bz, double gamma=-1.)
Specify the components of a Lorentz Boost.
Complex s1s3() const
The component.
Complex s1s2() const
The component.
double zx() const
The zx component.
Complex s3s2() const
The component.
Complex s3s1() const
The component.