thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
SpinOneLorentzRotation.h
1// -*- C++ -*-
2//
3// SpinOneLorentzRotation.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_SpinOneLorentzRotation_H
10#define ThePEG_SpinOneLorentzRotation_H
11
13#include "ThePEG/Helicity/LorentzRank3Tensor.fh"
14#include "ThePEG/Helicity/LorentzTensor.fh"
15#include "ThePEG/Helicity/LorentzRSSpinor.fh"
16#include "ThePEG/Helicity/LorentzRSSpinorBar.fh"
17#include "ThreeVector.h"
18#include <vector>
19
20namespace ThePEG {
21
26public:
27
30
35 xx_() = yy_() = zz_() = tt_() = 1.0;
36 }
37
45 SpinOneLorentzRotation (double bx, double by, double bz, double gamma=-1.)
46 {
47 setBoost(bx,by,bz,gamma);
48 }
49
55 explicit SpinOneLorentzRotation (const Boost & b, double gamma=-1.)
56 {
57 setBoost(b.x(), b.y(), b.z(),gamma);
58 }
60
64 bool isIdentity() const;
65
70
74 SpinOneLorentzRotation & invert() { return *this = inverse(); }
75
79 std::ostream & print( std::ostream & os ) const;
80
83
91 SpinOneLorentzRotation & setBoost (double bx, double by, double bz, double gamma=-1.);
92
98 SpinOneLorentzRotation & setBoost (const Boost & b, double gamma=-1.) {
99 return setBoost(b.x(), b.y(), b.z(),gamma);
100 }
101
107 SpinOneLorentzRotation & setRotate(double delta, const Axis & axis);
108
114
120
126
128
131
135 double xx() const { return matrix_[ 0]; }
136
140 double xy() const { return matrix_[ 1]; }
141
145 double xz() const { return matrix_[ 2]; }
146
150 double xt() const { return matrix_[ 3]; }
151
155 double yx() const { return matrix_[ 4]; }
156
160 double yy() const { return matrix_[ 5]; }
161
165 double yz() const { return matrix_[ 6]; }
166
170 double yt() const { return matrix_[ 7]; }
171
175 double zx() const { return matrix_[ 8]; }
176
180 double zy() const { return matrix_[ 9]; }
181
185 double zz() const { return matrix_[10]; }
186
190 double zt() const { return matrix_[11]; }
191
195 double tx() const { return matrix_[12]; }
196
200 double ty() const { return matrix_[13]; }
201
205 double tz() const { return matrix_[14]; }
206
210 double tt() const { return matrix_[15]; }
212
215
219 template <typename Value>
223 (xx()*v.x() + xy()*v.y() + xz()*v.z() + xt()*v.t(),
224 yx()*v.x() + yy()*v.y() + yz()*v.z() + yt()*v.t(),
225 zx()*v.x() + zy()*v.y() + zz()*v.z() + zt()*v.t(),
226 tx()*v.x() + ty()*v.y() + tz()*v.z() + tt()*v.t());
227 }
228
232 template <typename Value>
236 (xx()*v.x() + xy()*v.y() + xz()*v.z() + xt()*v.t(),
237 yx()*v.x() + yy()*v.y() + yz()*v.z() + yt()*v.t(),
238 zx()*v.x() + zy()*v.y() + zz()*v.z() + zt()*v.t(),
239 tx()*v.x() + ty()*v.y() + tz()*v.z() + tt()*v.t());
240 }
241
247
252 return *this = *this * lt;
253 }
254
259 return *this = lt * *this;
260 }
261
267 tmp.setRotateX(delta);
268 return *this = tmp * *this;
269 }
270
276 tmp.setRotateY(delta);
277 return *this = tmp * *this;
278 }
279
285 tmp.setRotateZ(delta);
286 return *this = tmp * *this;
287 }
288
292 SpinOneLorentzRotation & rotate(double delta, const Axis & axis) {
294 tmp.setRotate(delta, axis);
295 return *this = tmp * *this;
296 }
297
302 return *this = SpinOneLorentzRotation(beta,0,0) * *this;
303 }
304
309 return *this = SpinOneLorentzRotation(0,beta,0) * *this;
310 }
311
316 return *this = SpinOneLorentzRotation(0,0,beta) * *this;
317 }
318
326 SpinOneLorentzRotation & boost(double bx, double by, double bz,
327 double gamma=-1.) {
328 return *this = SpinOneLorentzRotation(bx,by,bz,gamma) * *this;
329 }
330
336 SpinOneLorentzRotation & boost(const Boost & b, double gamma=-1.) {
337 return *this = SpinOneLorentzRotation(b.x(),b.y(),b.z(),gamma) * *this;
338 }
340
341private:
342
343 template<typename Value> friend class Helicity::LorentzTensor;
344 template<typename Value> friend class Helicity::LorentzRank3Tensor;
345 template<typename Value> friend class Helicity::LorentzRSSpinor;
346 template<typename Value> friend class Helicity::LorentzRSSpinorBar;
347
349 array<double,16> matrix_ = {};
350
352 SpinOneLorentzRotation (double xx, double xy, double xz, double xt,
353 double yx, double yy, double yz, double yt,
354 double zx, double zy, double zz, double zt,
355 double tx, double ty, double tz, double tt);
356
358 double operator()(unsigned int i, unsigned int j) const {
359 return matrix_[4*i + j];
360 }
361
363
364 double & xx_() { return matrix_[ 0]; }
365 double & xy_() { return matrix_[ 1]; }
366 double & xz_() { return matrix_[ 2]; }
367 double & xt_() { return matrix_[ 3]; }
368
369 double & yx_() { return matrix_[ 4]; }
370 double & yy_() { return matrix_[ 5]; }
371 double & yz_() { return matrix_[ 6]; }
372 double & yt_() { return matrix_[ 7]; }
373
374 double & zx_() { return matrix_[ 8]; }
375 double & zy_() { return matrix_[ 9]; }
376 double & zz_() { return matrix_[10]; }
377 double & zt_() { return matrix_[11]; }
378
379 double & tx_() { return matrix_[12]; }
380 double & ty_() { return matrix_[13]; }
381 double & tz_() { return matrix_[14]; }
382 double & tt_() { return matrix_[15]; }
384};
385
389inline std::ostream & operator<< ( std::ostream & os,
390 const SpinOneLorentzRotation& lt ) {
391 return lt.print(os);
392}
393
394}
395
396#endif /* ThePEG_SpinOneLorentzRotation_H */
This file contains enumerations used by LorentzSpinor and LorentzSpinorBar classes.
contains the ThreeVector class.
The LorentzRSSpinorBar class implements the storage of a barred Lorentz Rarita-Schwinger Spinor for a...
The LorentzRSSpinor class is designed to store a Rarita-Schwinger spinor for a spin-3/2 particle.
The LorentzRank3Tensor class is designed to implement the storage of a complex tensor to be used to r...
The LorentzTensor class is designed to implement the storage of a complex tensor to be used to repres...
Definition: LorentzTensor.h:37
The Lorentz5Vector inherits from the LorentzVector class.
A 4-component Lorentz vector.
Definition: LorentzVector.h:44
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.
std::ostream & print(std::ostream &os) const
output operator
array< double, 16 > matrix_
Matrix components, order: .
SpinOneLorentzRotation & setRotateX(double angle)
Specify a rotation by the given angle about the x-axis.
SpinOneLorentzRotation(double xx, double xy, double xz, double xt, double yx, double yy, double yz, double yt, double zx, double zy, double zz, double zt, double tx, double ty, double tz, double tt)
Constructor from doubles.
SpinOneLorentzRotation()
Default constructor.
SpinOneLorentzRotation & rotateY(double delta)
Rotation around the y-axis; equivalent to LT = RotationY(delta) * LT.
SpinOneLorentzRotation(double bx, double by, double bz, double gamma=-1.)
Constructor giving the components of a Lorentz boost.
SpinOneLorentzRotation & transform(const SpinOneLorentzRotation &lt)
Transform (similar to *= but a.transform(b) becomes a = b*a.
SpinOneLorentzRotation & boost(const Boost &b, double gamma=-1.)
boost equivalent to LT = Boost(bv) * LT
SpinOneLorentzRotation & invert()
Inverts the SpinOneLorentzRotation matrix.
double yx() const
The yx component.
double zz() const
The zz component.
double xz() const
The xz component.
double operator()(unsigned int i, unsigned int j) const
Component access by index: x=0, t=3.
LorentzVector< Value > operator*(const LorentzVector< Value > &v) const
Product with a LorentzVector simply returns the rotated vector.
SpinOneLorentzRotation & rotateZ(double delta)
Rotation around the z-axis; equivalent to LT = RotationZ(delta) * LT.
Lorentz5Vector< Value > operator*(const Lorentz5Vector< Value > &v) const
Product with a Lorentz5Vector simply returns the rotated vector.
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.
SpinOneLorentzRotation & operator*=(const SpinOneLorentzRotation &lt)
Multiply by and assign a*=b becomes a= a*b.
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 & 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.
double zt() const
The zt component.
SpinOneLorentzRotation(const Boost &b, double gamma=-1.)
Constructor giving the vector for a Lorentz boost.
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 & setBoost(const Boost &b, double gamma=-1.)
Specify a Lorentz Boost as a vector.
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
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