thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
SpinHalfLorentzRotation.h
1// -*- C++ -*-
2//
3// SpinHalfLorentzRotation.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_SpinHalfLorentzRotation_H
10#define THEPEG_SpinHalfLorentzRotation_H
11//
12// This is the declaration of the SpinHalfLorentzRotation class.
13//
15#include "ThreeVector.h"
16
17namespace ThePEG {
18
32
37
38public:
39
42
47
55 SpinHalfLorentzRotation (double bx, double by, double bz, double gamma=-1.);
56
62 SpinHalfLorentzRotation (const Boost & b,double gamma=-1.);
64
68 bool isIdentity() const;
69
74
78 SpinHalfLorentzRotation & invert() { return *this = inverse(); }
79
83 std::ostream & print( std::ostream & os ) const;
84
87
95 SpinHalfLorentzRotation & setBoost (double bx, double by, double bz,double gamma=-1.);
96
102 SpinHalfLorentzRotation & setBoost (const Boost & b,double gamma=-1.);
103
109
115
121
127 SpinHalfLorentzRotation & setRotate(double delta, const Axis & axis);
128
134
140
146
148
149
155 Complex s1s1() const { return _mx[0][0]; }
156
160 Complex s1s2() const { return _mx[0][1]; }
161
165 Complex s1s3() const { return _mx[0][2]; }
166
170 Complex s1s4() const { return _mx[0][3]; }
171
175 Complex s2s1() const { return _mx[1][0]; }
176
180 Complex s2s2() const { return _mx[1][1]; }
181
185 Complex s2s3() const { return _mx[1][2]; }
186
190 Complex s2s4() const { return _mx[1][3]; }
191
195 Complex s3s1() const { return _mx[2][0]; }
196
200 Complex s3s2() const { return _mx[2][1]; }
201
205 Complex s3s3() const { return _mx[2][2]; }
206
210 Complex s3s4() const { return _mx[2][3]; }
211
215 Complex s4s1() const { return _mx[3][0]; }
216
220 Complex s4s2() const { return _mx[3][1]; }
221
225 Complex s4s3() const { return _mx[3][2]; }
226
230 Complex s4s4() const { return _mx[3][3]; }
231
235 Complex operator()(unsigned int i, unsigned int j) const {
236 assert(i<=3 && j<=3);
237 return _mx[i][j];
238 }
240
241
244
250
255
260
265
270
275
279 SpinHalfLorentzRotation & rotate(double delta, const Axis & axis);
280
285
290
295
303 SpinHalfLorentzRotation & boost(double bx, double by, double bz, double gamma=-1.);
304
310 SpinHalfLorentzRotation & boost(const Boost & bv, double gamma=-1.);
312
313protected:
314
323
324private:
325
326 using MatrixT = array<array<Complex,4>,4>;
327
328 SpinHalfLorentzRotation(const MatrixT & m) : _mx(m) {}
329
333 MatrixT _mx;
334};
335
340 return lt.inverse();
341}
342
346inline std::ostream & operator<< ( std::ostream & os,
347 const SpinHalfLorentzRotation& lt ) {
348 return lt.print(os);
349}
350
351}
352
353#endif /* THEPEG_SpinHalfLorentzRotation_H */
This file contains enumerations used by LorentzSpinor and LorentzSpinorBar classes.
contains the ThreeVector class.
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 & invert()
Inverts the SpinHalfLorentzRotation matrix.
SpinHalfLorentzRotation & boostZ(double beta)
Pure boost along the z-axis; equivalent to LT = BoostX(beta) * LT.
SpinHalfLorentzRotation & operator*=(const SpinHalfLorentzRotation &)
Multiply by and assign a*=b becomes a= a*b.
SpinHalfLorentzRotation inverse() const
Return the inverse.
SpinHalfLorentzRotation & setRotateX(double &angle)
Specify a rotation by the given angle about the x-axis.
Complex operator()(unsigned int i, unsigned int j) const
Fortran style subscript operator.
Complex s2s3() const
The component.
SpinHalfLorentzRotation & setRotateY(double &angle)
Specify a rotation by the given angle about the y-axis.
Complex s4s4() const
The component.
SpinHalfLorentzRotation & transform(const SpinHalfLorentzRotation &)
Transform (similar to *= but a.transform(b) becomes a = b*a.
SpinHalfLorentzRotation(double bx, double by, double bz, double gamma=-1.)
Constructor giving the components of a Lorentz boost.
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.
std::ostream & print(std::ostream &os) const
output operator
SpinHalfLorentzRotation()
Default constructor.
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(const Boost &b, double gamma=-1.)
Constructor giving the vector for a Lorentz boost.
SpinHalfLorentzRotation operator*(const SpinHalfLorentzRotation &lt) const
Product of two SpinHalfLorentzRotations (this) * lt - matrix multiplication
SpinHalfLorentzRotation & setRotateZ(double &angle)
Specify a rotation by the given angle about the z-axis.
friend SpinHalfLorentzRotation inverseOf(const SpinHalfLorentzRotation &lt)
The external inverseOf needs to be a friend.
Complex s2s4() const
The component.
SpinHalfLorentzRotation(Complex s1s1, Complex s1s2, Complex s1s3, Complex s1s4, Complex s2s1, Complex s2s2, Complex s2s3, Complex s2s4, Complex s3s1, Complex s3s2, Complex s3s3, Complex s3s4, Complex s4s1, Complex s4s2, Complex s4s3, Complex s4s4)
Protected constructor giving all the members, no check it is a valid transformation.
MatrixT _mx
The members of the transformation matrix.
SpinHalfLorentzRotation & boostY(double beta)
Pure boost along the y-axis; equivalent to LT = BoostX(beta) * LT.
SpinHalfLorentzRotation & boost(const Boost &bv, double gamma=-1.)
General boost equivalent to LT = Boost(bv) * 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.
SpinHalfLorentzRotation & setBoost(const Boost &b, double gamma=-1.)
Specify a Lorentz Boost as a vector.
Complex s3s1() const
The component.
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.