thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
Helicity
epsilon.h
1
// -*- C++ -*-
2
//
3
// epsilon.h is a part of ThePEG - Toolkit for HEP Event Generation
4
// Copyright (C) 2003-2019 Peter Richardson, 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_epsilon_H
10
#define ThePEG_epsilon_H
11
//
12
// This is the declaration of the epsilon class.
13
14
#include "
ThePEG/Vectors/LorentzVector.h
"
15
#include "LorentzTensor.h"
16
17
namespace
ThePEG
{
18
namespace
Helicity {
19
41
template
<
typename
A,
typename
B,
typename
C,
typename
D>
42
auto
epsilon
(
const
LorentzVector<A>
& a,
43
const
LorentzVector<B>
& b,
44
const
LorentzVector<C>
& c,
45
const
LorentzVector<D>
& d)
46
->
decltype
(a.x()*b.y()*c.z()*d.t())
47
{
48
auto
diffxy = a.x() * b.y() - a.y() * b.x();
49
auto
diffxz = a.x() * b.z() - a.z() * b.x();
50
auto
diffxt = a.x() * b.t() - a.t() * b.x();
51
auto
diffyz = a.y() * b.z() - a.z() * b.y();
52
auto
diffyt = a.y() * b.t() - a.t() * b.y();
53
auto
diffzt = a.z() * b.t() - a.t() * b.z();
54
55
auto
diff2xy = c.x() * d.y() - c.y() * d.x();
56
auto
diff2xz = c.x() * d.z() - c.z() * d.x();
57
auto
diff2xt = c.x() * d.t() - c.t() * d.x();
58
auto
diff2yz = c.y() * d.z() - c.z() * d.y();
59
auto
diff2yt = c.y() * d.t() - c.t() * d.y();
60
auto
diff2zt = c.z() * d.t() - c.t() * d.z();
61
62
return
63
diff2yz*diffxt + diff2zt*diffxy - diff2yt*diffxz -
64
diff2xz*diffyt + diff2xt*diffyz + diff2xy*diffzt;
65
}
66
76
template
<
typename
A,
typename
B,
typename
C>
77
auto
epsilon
(
const
LorentzVector<A>
& a,
78
const
LorentzVector<B>
& b,
79
const
LorentzVector<C>
& c)
80
->
LorentzVector
<
decltype
(a.x()*b.y()*c.z())>
81
{
82
auto
diffxy = a.x() * b.y() - a.y() * b.x();
83
auto
diffxz = a.x() * b.z() - a.z() * b.x();
84
auto
diffxt = a.x() * b.t() - a.t() * b.x();
85
auto
diffyz = a.y() * b.z() - a.z() * b.y();
86
auto
diffyt = a.y() * b.t() - a.t() * b.y();
87
auto
diffzt = a.z() * b.t() - a.t() * b.z();
88
89
using
ResultType =
LorentzVector
<
decltype
(a.x()*b.x()*c.x())>;
90
ResultType result;
91
result.setX( c.z() * diffyt - c.t() * diffyz - c.y() * diffzt);
92
result.setY( c.t() * diffxz - c.z() * diffxt + c.x() * diffzt);
93
result.setZ(-c.t() * diffxy + c.y() * diffxt - c.x() * diffyt);
94
result.setT(-c.z() * diffxy + c.y() * diffxz - c.x() * diffyz);
95
96
return
result;
97
}
98
107
template
<
typename
A,
typename
B>
108
auto
epsilon
(
const
LorentzVector
<complex<A> > & a,
109
const
LorentzVector
<complex<B> > & b)
110
->
LorentzTensor
<
decltype
(a.x().real()*b.y().real())>
111
{
112
auto
diffxy = a.x() * b.y() - a.y() * b.x();
113
auto
diffxz = a.x() * b.z() - a.z() * b.x();
114
auto
diffxt = a.x() * b.t() - a.t() * b.x();
115
auto
diffyz = a.y() * b.z() - a.z() * b.y();
116
auto
diffyt = a.y() * b.t() - a.t() * b.y();
117
auto
diffzt = a.z() * b.t() - a.t() * b.z();
118
complex<
decltype
(a.x().real()*b.x().real())> zero(
ZERO
);
119
120
using
ResultType =
LorentzTensor
<
decltype
(a.x().real()*b.x().real())>;
121
ResultType result;
122
result.
setTT
( zero ); result.setTX( diffyz); result.setTY(-diffxz); result.setTZ( diffxy);
123
result.setXT(-diffyz); result.setXX( zero ); result.setXY( diffzt); result.setXZ(-diffyt);
124
result.setYT( diffxz); result.setYX(-diffzt); result.setYY( zero ); result.setYZ( diffxt);
125
result.setZT(-diffxy); result.setZX( diffyt); result.setZY(-diffxt); result.setZZ( zero );
126
127
return
result;
128
}
129
138
template
<
typename
A,
typename
B>
139
auto
epsilon
(
const
LorentzVector<A>
& a,
140
const
LorentzVector
<complex<B> > & b)
141
->
LorentzTensor
<
decltype
(a.x()*b.y().real())>
142
{
143
auto
diffxy = a.x() * b.y() - a.y() * b.x();
144
auto
diffxz = a.x() * b.z() - a.z() * b.x();
145
auto
diffxt = a.x() * b.t() - a.t() * b.x();
146
auto
diffyz = a.y() * b.z() - a.z() * b.y();
147
auto
diffyt = a.y() * b.t() - a.t() * b.y();
148
auto
diffzt = a.z() * b.t() - a.t() * b.z();
149
complex<
decltype
(a.x()*b.x().real())> zero(
ZERO
);
150
151
using
ResultType =
LorentzTensor
<
decltype
(a.x()*b.x().real())>;
152
ResultType result;
153
result.
setTT
( zero ); result.setTX( diffyz); result.setTY(-diffxz); result.setTZ( diffxy);
154
result.setXT(-diffyz); result.setXX( zero ); result.setXY( diffzt); result.setXZ(-diffyt);
155
result.setYT( diffxz); result.setYX(-diffzt); result.setYY( zero ); result.setYZ( diffxt);
156
result.setZT(-diffxy); result.setZX( diffyt); result.setZY(-diffxt); result.setZZ( zero );
157
158
return
result;
159
}
160
169
template
<
typename
A,
typename
B>
170
auto
epsilon
(
const
LorentzVector
<complex<A> > & a,
171
const
LorentzVector<B>
& b)
172
->
LorentzTensor
<
decltype
(a.x().real()*b.y())>
173
{
174
auto
diffxy = a.x() * b.y() - a.y() * b.x();
175
auto
diffxz = a.x() * b.z() - a.z() * b.x();
176
auto
diffxt = a.x() * b.t() - a.t() * b.x();
177
auto
diffyz = a.y() * b.z() - a.z() * b.y();
178
auto
diffyt = a.y() * b.t() - a.t() * b.y();
179
auto
diffzt = a.z() * b.t() - a.t() * b.z();
180
complex<
decltype
(a.x().real()*b.x())> zero(
ZERO
);
181
182
using
ResultType =
LorentzTensor
<
decltype
(a.x().real()*b.x())>;
183
ResultType result;
184
result.
setTT
( zero ); result.setTX( diffyz); result.setTY(-diffxz); result.setTZ( diffxy);
185
result.setXT(-diffyz); result.setXX( zero ); result.setXY( diffzt); result.setXZ(-diffyt);
186
result.setYT( diffxz); result.setYX(-diffzt); result.setYY( zero ); result.setYZ( diffxt);
187
result.setZT(-diffxy); result.setZX( diffyt); result.setZY(-diffxt); result.setZZ( zero );
188
189
return
result;
190
}
191
200
template
<
typename
A,
typename
B>
201
auto
epsilon
(
const
LorentzVector<A>
& a,
202
const
LorentzVector<B>
& b)
203
->
LorentzTensor
<
decltype
(a.x()*b.y())>
204
{
205
auto
diffxy = a.x() * b.y() - a.y() * b.x();
206
auto
diffxz = a.x() * b.z() - a.z() * b.x();
207
auto
diffxt = a.x() * b.t() - a.t() * b.x();
208
auto
diffyz = a.y() * b.z() - a.z() * b.y();
209
auto
diffyt = a.y() * b.t() - a.t() * b.y();
210
auto
diffzt = a.z() * b.t() - a.t() * b.z();
211
complex<
decltype
(a.x()*b.x())> zero(
ZERO
);
212
213
using
ResultType =
LorentzTensor
<
decltype
(a.x()*b.x())>;
214
ResultType result;
215
result.
setTT
( zero ); result.setTX( diffyz); result.setTY(-diffxz); result.setTZ( diffxy);
216
result.setXT(-diffyz); result.setXX( zero ); result.setXY( diffzt); result.setXZ(-diffyt);
217
result.setYT( diffxz); result.setYX(-diffzt); result.setYY( zero ); result.setYZ( diffxt);
218
result.setZT(-diffxy); result.setZX( diffyt); result.setZY(-diffxt); result.setZZ( zero );
219
220
return
result;
221
}
222
223
224
}
225
}
226
227
#endif
/* ThePEG_epsilon_H */
LorentzVector.h
contains the LorentzVector class.
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::Helicity::LorentzTensor::setTT
void setTT(complex< Value > a)
Set t,t component.
Definition:
LorentzTensor.h:238
ThePEG::LorentzVector
A 4-component Lorentz vector.
Definition:
LorentzVector.h:44
ThePEG::Helicity::epsilon
auto epsilon(const LorentzVector< A > &a, const LorentzVector< B > &b, const LorentzVector< C > &c, const LorentzVector< D > &d) -> decltype(a.x() *b.y() *c.z() *d.t())
Return the product .
Definition:
epsilon.h:42
ThePEG
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
ThePEG::ZERO
constexpr ZeroUnit ZERO
ZERO can be used as zero for any unitful quantity.
Definition:
PhysicalQty.h:35
Generated on Thu Jun 20 2024 14:47:00 for ThePEG by
1.9.6