thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
Vectors
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
12
#include "
ThePEG/Helicity/HelicityDefinitions.h
"
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
20
namespace
ThePEG
{
21
25
class
SpinOneLorentzRotation
{
26
public
:
27
30
34
SpinOneLorentzRotation
() {
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
69
SpinOneLorentzRotation
inverse
()
const
;
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
113
SpinOneLorentzRotation
&
setRotateX
(
double
angle);
114
119
SpinOneLorentzRotation
&
setRotateY
(
double
angle);
120
125
SpinOneLorentzRotation
&
setRotateZ
(
double
angle);
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>
220
LorentzVector<Value>
221
operator*
(
const
LorentzVector<Value>
& v)
const
{
222
return
LorentzVector<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>
233
Lorentz5Vector<Value>
234
operator*
(
const
Lorentz5Vector<Value>
& v)
const
{
235
return
Lorentz5Vector<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
246
SpinOneLorentzRotation
operator *
(
const
SpinOneLorentzRotation
& lt)
const
;
247
251
SpinOneLorentzRotation
&
operator *=
(
const
SpinOneLorentzRotation
& lt) {
252
return
*
this
= *
this
* lt;
253
}
254
258
SpinOneLorentzRotation
&
transform
(
const
SpinOneLorentzRotation
& lt) {
259
return
*
this
= lt * *
this
;
260
}
261
265
SpinOneLorentzRotation
&
rotateX
(
double
delta) {
266
SpinOneLorentzRotation
tmp;
267
tmp.
setRotateX
(delta);
268
return
*
this
= tmp * *
this
;
269
}
270
274
SpinOneLorentzRotation
&
rotateY
(
double
delta) {
275
SpinOneLorentzRotation
tmp;
276
tmp.
setRotateY
(delta);
277
return
*
this
= tmp * *
this
;
278
}
279
283
SpinOneLorentzRotation
&
rotateZ
(
double
delta) {
284
SpinOneLorentzRotation
tmp;
285
tmp.
setRotateZ
(delta);
286
return
*
this
= tmp * *
this
;
287
}
288
292
SpinOneLorentzRotation
&
rotate
(
double
delta,
const
Axis
& axis) {
293
SpinOneLorentzRotation
tmp;
294
tmp.
setRotate
(delta, axis);
295
return
*
this
= tmp * *
this
;
296
}
297
301
SpinOneLorentzRotation
&
boostX
(
double
beta) {
302
return
*
this
=
SpinOneLorentzRotation
(beta,0,0) * *
this
;
303
}
304
308
SpinOneLorentzRotation
&
boostY
(
double
beta) {
309
return
*
this
=
SpinOneLorentzRotation
(0,beta,0) * *
this
;
310
}
311
315
SpinOneLorentzRotation
&
boostZ
(
double
beta) {
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
341
private
:
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
389
inline
std::ostream &
operator<<
( std::ostream & os,
390
const
SpinOneLorentzRotation
& lt ) {
391
return
lt.
print
(os);
392
}
393
394
}
395
396
#endif
/* ThePEG_SpinOneLorentzRotation_H */
HelicityDefinitions.h
This file contains enumerations used by LorentzSpinor and LorentzSpinorBar classes.
ThreeVector.h
contains the ThreeVector class.
ThePEG::Helicity::LorentzRSSpinorBar
The LorentzRSSpinorBar class implements the storage of a barred Lorentz Rarita-Schwinger Spinor for a...
Definition:
LorentzRSSpinorBar.h:38
ThePEG::Helicity::LorentzRSSpinor
The LorentzRSSpinor class is designed to store a Rarita-Schwinger spinor for a spin-3/2 particle.
Definition:
LorentzRSSpinor.h:73
ThePEG::Helicity::LorentzRank3Tensor
The LorentzRank3Tensor class is designed to implement the storage of a complex tensor to be used to r...
Definition:
LorentzRank3Tensor.h:37
ThePEG::Helicity::LorentzTensor
The LorentzTensor class is designed to implement the storage of a complex tensor to be used to repres...
Definition:
LorentzTensor.h:37
ThePEG::Lorentz5Vector
The Lorentz5Vector inherits from the LorentzVector class.
Definition:
Lorentz5Vector.h:42
ThePEG::LorentzVector
A 4-component Lorentz vector.
Definition:
LorentzVector.h:44
ThePEG::SpinOneLorentzRotation
The SpinOneLorentzRotation class is ...
Definition:
SpinOneLorentzRotation.h:25
ThePEG::SpinOneLorentzRotation::xx
double xx() const
The xx component.
Definition:
SpinOneLorentzRotation.h:135
ThePEG::SpinOneLorentzRotation::rotate
SpinOneLorentzRotation & rotate(double delta, const Axis &axis)
Rotation around specified vector - LT = Rotation(delta,axis)*LT.
Definition:
SpinOneLorentzRotation.h:292
ThePEG::SpinOneLorentzRotation::isIdentity
bool isIdentity() const
Returns true if the Identity matrix.
ThePEG::SpinOneLorentzRotation::print
std::ostream & print(std::ostream &os) const
output operator
ThePEG::SpinOneLorentzRotation::matrix_
array< double, 16 > matrix_
Matrix components, order: .
Definition:
SpinOneLorentzRotation.h:349
ThePEG::SpinOneLorentzRotation::setRotateX
SpinOneLorentzRotation & setRotateX(double angle)
Specify a rotation by the given angle about the x-axis.
ThePEG::SpinOneLorentzRotation::SpinOneLorentzRotation
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.
ThePEG::SpinOneLorentzRotation::SpinOneLorentzRotation
SpinOneLorentzRotation()
Default constructor.
Definition:
SpinOneLorentzRotation.h:34
ThePEG::SpinOneLorentzRotation::rotateY
SpinOneLorentzRotation & rotateY(double delta)
Rotation around the y-axis; equivalent to LT = RotationY(delta) * LT.
Definition:
SpinOneLorentzRotation.h:274
ThePEG::SpinOneLorentzRotation::SpinOneLorentzRotation
SpinOneLorentzRotation(double bx, double by, double bz, double gamma=-1.)
Constructor giving the components of a Lorentz boost.
Definition:
SpinOneLorentzRotation.h:45
ThePEG::SpinOneLorentzRotation::transform
SpinOneLorentzRotation & transform(const SpinOneLorentzRotation <)
Transform (similar to *= but a.transform(b) becomes a = b*a.
Definition:
SpinOneLorentzRotation.h:258
ThePEG::SpinOneLorentzRotation::boost
SpinOneLorentzRotation & boost(const Boost &b, double gamma=-1.)
boost equivalent to LT = Boost(bv) * LT
Definition:
SpinOneLorentzRotation.h:336
ThePEG::SpinOneLorentzRotation::invert
SpinOneLorentzRotation & invert()
Inverts the SpinOneLorentzRotation matrix.
Definition:
SpinOneLorentzRotation.h:74
ThePEG::SpinOneLorentzRotation::yx
double yx() const
The yx component.
Definition:
SpinOneLorentzRotation.h:155
ThePEG::SpinOneLorentzRotation::zz
double zz() const
The zz component.
Definition:
SpinOneLorentzRotation.h:185
ThePEG::SpinOneLorentzRotation::xz
double xz() const
The xz component.
Definition:
SpinOneLorentzRotation.h:145
ThePEG::SpinOneLorentzRotation::operator()
double operator()(unsigned int i, unsigned int j) const
Component access by index: x=0, t=3.
Definition:
SpinOneLorentzRotation.h:358
ThePEG::SpinOneLorentzRotation::operator*
LorentzVector< Value > operator*(const LorentzVector< Value > &v) const
Product with a LorentzVector simply returns the rotated vector.
Definition:
SpinOneLorentzRotation.h:221
ThePEG::SpinOneLorentzRotation::rotateZ
SpinOneLorentzRotation & rotateZ(double delta)
Rotation around the z-axis; equivalent to LT = RotationZ(delta) * LT.
Definition:
SpinOneLorentzRotation.h:283
ThePEG::SpinOneLorentzRotation::operator*
Lorentz5Vector< Value > operator*(const Lorentz5Vector< Value > &v) const
Product with a Lorentz5Vector simply returns the rotated vector.
Definition:
SpinOneLorentzRotation.h:234
ThePEG::SpinOneLorentzRotation::zx
double zx() const
The zx component.
Definition:
SpinOneLorentzRotation.h:175
ThePEG::SpinOneLorentzRotation::boostY
SpinOneLorentzRotation & boostY(double beta)
Pure boost along the y-axis; equivalent to LT = BoostX(beta) * LT.
Definition:
SpinOneLorentzRotation.h:308
ThePEG::SpinOneLorentzRotation::ty
double ty() const
The ty component.
Definition:
SpinOneLorentzRotation.h:200
ThePEG::SpinOneLorentzRotation::xy
double xy() const
The xy component.
Definition:
SpinOneLorentzRotation.h:140
ThePEG::SpinOneLorentzRotation::zy
double zy() const
The zy component.
Definition:
SpinOneLorentzRotation.h:180
ThePEG::SpinOneLorentzRotation::operator*=
SpinOneLorentzRotation & operator*=(const SpinOneLorentzRotation <)
Multiply by and assign a*=b becomes a= a*b.
Definition:
SpinOneLorentzRotation.h:251
ThePEG::SpinOneLorentzRotation::tz
double tz() const
The tz component.
Definition:
SpinOneLorentzRotation.h:205
ThePEG::SpinOneLorentzRotation::xt
double xt() const
The xt component.
Definition:
SpinOneLorentzRotation.h:150
ThePEG::SpinOneLorentzRotation::tt
double tt() const
The tt component.
Definition:
SpinOneLorentzRotation.h:210
ThePEG::SpinOneLorentzRotation::inverse
SpinOneLorentzRotation inverse() const
Return the inverse.
ThePEG::SpinOneLorentzRotation::setRotateY
SpinOneLorentzRotation & setRotateY(double angle)
Specify a rotation by the given angle about the y-axis.
ThePEG::SpinOneLorentzRotation::setRotate
SpinOneLorentzRotation & setRotate(double delta, const Axis &axis)
Specify a rotation about a general axis by the angle given.
ThePEG::SpinOneLorentzRotation::zt
double zt() const
The zt component.
Definition:
SpinOneLorentzRotation.h:190
ThePEG::SpinOneLorentzRotation::SpinOneLorentzRotation
SpinOneLorentzRotation(const Boost &b, double gamma=-1.)
Constructor giving the vector for a Lorentz boost.
Definition:
SpinOneLorentzRotation.h:55
ThePEG::SpinOneLorentzRotation::yy
double yy() const
The yy component.
Definition:
SpinOneLorentzRotation.h:160
ThePEG::SpinOneLorentzRotation::yz
double yz() const
The yz component.
Definition:
SpinOneLorentzRotation.h:165
ThePEG::SpinOneLorentzRotation::boostX
SpinOneLorentzRotation & boostX(double beta)
Pure boost along the x-axis; equivalent to LT = BoostX(beta) * LT.
Definition:
SpinOneLorentzRotation.h:301
ThePEG::SpinOneLorentzRotation::rotateX
SpinOneLorentzRotation & rotateX(double delta)
Rotation around the x-axis; equivalent to LT = RotationX(delta) * LT.
Definition:
SpinOneLorentzRotation.h:265
ThePEG::SpinOneLorentzRotation::yt
double yt() const
The yt component.
Definition:
SpinOneLorentzRotation.h:170
ThePEG::SpinOneLorentzRotation::setBoost
SpinOneLorentzRotation & setBoost(double bx, double by, double bz, double gamma=-1.)
Specify the components of a Lorentz Boost.
ThePEG::SpinOneLorentzRotation::setBoost
SpinOneLorentzRotation & setBoost(const Boost &b, double gamma=-1.)
Specify a Lorentz Boost as a vector.
Definition:
SpinOneLorentzRotation.h:98
ThePEG::SpinOneLorentzRotation::boost
SpinOneLorentzRotation & boost(double bx, double by, double bz, double gamma=-1.)
boost equivalent to LT = Boost(bx,by,bz) * LT
Definition:
SpinOneLorentzRotation.h:326
ThePEG::SpinOneLorentzRotation::tx
double tx() const
The tx component.
Definition:
SpinOneLorentzRotation.h:195
ThePEG::SpinOneLorentzRotation::setRotateZ
SpinOneLorentzRotation & setRotateZ(double angle)
Specify a rotation by the given angle about the z-axis.
ThePEG::SpinOneLorentzRotation::boostZ
SpinOneLorentzRotation & boostZ(double beta)
Pure boost along the z-axis; equivalent to LT = BoostX(beta) * LT.
Definition:
SpinOneLorentzRotation.h:315
ThePEG::ThreeVector
A 3-component vector.
Definition:
ThreeVector.h:35
ThePEG
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
ThePEG::operator<<
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
Generated on Thu Jun 20 2024 14:47:02 for ThePEG by
1.9.6