GooFit  v2.1.3
SpinHelper.h
Go to the documentation of this file.
1 /*
2 04/22/2016 Christoph Hasse
3 GPU Adaptation of classes provided in the MINT2 package by Jonas Rademacker.
4 They are needed for the calculation of the spin factors.
5 DISCLAIMER:
6 This code is not sufficently tested yet and still under heavy development!
7 */
8 
9 #pragma once
10 
12 
13 namespace GooFit {
14 
15 class __align__(16) gpuLVec {
16  private:
17  fptype X;
18  fptype Y;
19  fptype Z;
20  fptype E;
21 
22  public:
23  __device__ gpuLVec() { X = Y = Z = E = 0; };
24  __device__ gpuLVec(fptype x, fptype y, fptype z, fptype e)
25  : X(x)
26  , Y(y)
27  , Z(z)
28  , E(e){};
29 
30  __device__ void SetXYZE(fptype x, fptype y, fptype z, fptype e) {
31  X = x;
32  Y = y;
33  Z = z;
34  E = e;
35  }
36 
37  __device__ fptype Dot(const gpuLVec &rhs) const { return E * rhs.E - X * rhs.X - Y * rhs.Y - Z * rhs.Z; }
38  __device__ inline fptype GetX() const { return X; }
39  __device__ inline fptype GetY() const { return Y; }
40  __device__ inline fptype GetZ() const { return Z; }
41  __device__ inline fptype GetE() const { return E; }
42 
43  __device__ inline fptype Mag2() const { return this->Dot(*this); }
44  __device__ inline fptype M() const { return sqrt(this->Mag2()); }
45  __device__ inline void SetX(fptype a) { X = a; }
46  __device__ inline void SetY(fptype a) { Y = a; }
47  __device__ inline void SetZ(fptype a) { Z = a; }
48  __device__ inline void SetE(fptype a) { E = a; }
49 
50  __device__ gpuLVec &operator+=(const gpuLVec &rhs) {
51  X += rhs.X;
52  Y += rhs.Y;
53  Z += rhs.Z;
54  E += rhs.E;
55  return *this;
56  }
57  __device__ gpuLVec &operator-=(const gpuLVec &rhs) {
58  X -= rhs.X;
59  Y -= rhs.Y;
60  Z -= rhs.Z;
61  E -= rhs.E;
62  return *this;
63  }
64  __device__ gpuLVec &operator*=(const fptype rhs) {
65  X *= rhs;
66  Y *= rhs;
67  Z *= rhs;
68  E *= rhs;
69  return *this;
70  }
71 };
72 __device__ gpuLVec operator+(gpuLVec lhs, const gpuLVec &rhs) { return lhs += rhs; }
73 __device__ gpuLVec operator-(gpuLVec lhs, const gpuLVec &rhs) { return lhs -= rhs; }
74 __device__ gpuLVec operator*(gpuLVec lhs, fptype rhs) { return lhs *= rhs; }
75 __device__ gpuLVec operator*(fptype lhs, gpuLVec rhs) { return rhs *= lhs; }
76 
77 class ZTspin1 : public gpuLVec {
78  public:
79  // in decay D -> AB: q = p(A) - p(B), p = p(A) + p(B)
80  __device__ ZTspin1(const gpuLVec &q, const gpuLVec &p, fptype mR)
81  : gpuLVec(q - q.Dot(p) * p * (1. / (mR * mR))) {}
82 
83  __device__ fptype Contract(const gpuLVec &rhs) const { return this->Dot(rhs); }
84 };
85 
86 class SpinSumV { // spin sum for Vector->PP
87  protected:
88  gpuLVec _p; // pA + pB (pA, pB are the 4-mom of dgtrs)
89  fptype _mR; // nominal mass of resonance.
90  public:
91  __device__ SpinSumV(const gpuLVec &p, fptype mR)
92  : _p(p)
93  , _mR(mR) {}
94 
95  __device__ gpuLVec Dot(const gpuLVec &rhs) const { return -1.0 * rhs + _p * (_p.Dot(rhs) / (_mR * _mR)); }
96  __device__ fptype Sandwich(const gpuLVec &lhs, const gpuLVec &rhs) const { return lhs.Dot(this->Dot(rhs)); }
97 };
98 
99 class SpinSumT {
100  protected:
102 
103  public:
104  __device__ SpinSumT(const gpuLVec &p, fptype mR)
105  : _sv(p, mR) {}
106  __device__ fptype Sandwich(const gpuLVec &lm, const gpuLVec &ln, const gpuLVec &ra, const gpuLVec &rb) {
107  fptype manb = _sv.Sandwich(lm, ra) * _sv.Sandwich(ln, rb);
108  fptype mbna = _sv.Sandwich(lm, rb) * _sv.Sandwich(ln, ra);
109  fptype mnab = _sv.Sandwich(lm, ln) * _sv.Sandwich(ra, rb);
110 
111  return (1. / 2.) * (manb + mbna) - (1. / 3.) * mnab;
112  }
113 };
114 
116  protected:
117  gpuLVec _v[4];
118  // we'll follow the x, y, z, E convention, i.e. E is 4
119  __device__ bool makeZero() {
120  X().SetXYZE(0, 0, 0, 0);
121  Y().SetXYZE(0, 0, 0, 0);
122  Z().SetXYZE(0, 0, 0, 0);
123  E().SetXYZE(0, 0, 0, 0);
124  return true;
125  }
126 
127  public:
128  __device__ const gpuLVec &v(int i) const { return _v[i]; }
129 
130  __device__ LorentzMatrix() = default;
131 
132  __device__ LorentzMatrix(const gpuLVec p[4]) {
133  for(int i = 0; i < 4; i++)
134  _v[i] = p[i];
135  }
136  __device__ LorentzMatrix(const LorentzMatrix &other) {
137  for(int i = 0; i < 4; i++)
138  _v[i] = other._v[i];
139  }
140  __device__ const gpuLVec &X() const { return _v[0]; }
141  __device__ const gpuLVec &Y() const { return _v[1]; }
142  __device__ const gpuLVec &Z() const { return _v[2]; }
143  __device__ const gpuLVec &E() const { return _v[3]; }
144 
145  __device__ gpuLVec &X() { return _v[0]; }
146  __device__ gpuLVec &Y() { return _v[1]; }
147  __device__ gpuLVec &Z() { return _v[2]; }
148  __device__ gpuLVec &E() { return _v[3]; }
149 
150  __device__ const gpuLVec &operator[](int i) const { return _v[i]; }
151  __device__ gpuLVec &operator[](int i) { return _v[i]; }
152 
153  __device__ LorentzMatrix &add(const LorentzMatrix &other) {
154  for(int i = 0; i < 4; i++)
155  _v[i] += other._v[i];
156 
157  return *this;
158  }
159  __device__ LorentzMatrix &subtract(const LorentzMatrix &other) {
160  for(int i = 0; i < 4; i++)
161  _v[i] -= other._v[i];
162 
163  return *this;
164  }
165  __device__ LorentzMatrix &mult(fptype s) {
166  for(auto &i : _v)
167  i *= s;
168 
169  return *this;
170  }
171  __device__ LorentzMatrix &div(fptype s) {
172  for(auto &i : _v)
173  i *= (1. / s);
174 
175  return *this;
176  }
177 
178  __device__ LorentzMatrix &operator+=(const LorentzMatrix &rhs) { return add(rhs); }
179  __device__ LorentzMatrix &operator*=(fptype rhs) { return mult(rhs); }
180  __device__ LorentzMatrix &operator-=(const LorentzMatrix &rhs) { return subtract(rhs); }
181  __device__ LorentzMatrix &operator/=(fptype rhs) { return div(rhs); }
182  __device__ LorentzMatrix &operator=(const LorentzMatrix &other) {
183  for(int i = 0; i < 4; i++)
184  _v[i] = other._v[i];
185 
186  return *this;
187  }
188  __device__ LorentzMatrix operator+(const LorentzMatrix &rhs) const {
189  LorentzMatrix returnVal(*this);
190  returnVal += rhs;
191  return returnVal;
192  }
193  __device__ LorentzMatrix operator-(const LorentzMatrix &rhs) const {
194  LorentzMatrix returnVal(*this);
195  returnVal -= rhs;
196  return returnVal;
197  }
198  __device__ LorentzMatrix operator*(fptype rhs) const {
199  LorentzMatrix returnVal(*this);
200  returnVal *= rhs;
201  return returnVal;
202  }
203  __device__ LorentzMatrix operator/(fptype rhs) const {
204  LorentzMatrix returnVal(*this);
205  returnVal /= rhs;
206  return returnVal;
207  }
208 };
209 
211  protected:
212  // SymmLorentzMatrix __gmunu;
213 
214  // we'll follow the x, y, z, E convention, i.e. E is 4
215  __device__ bool symmetrize() {
216  // clumsy but save
217  X().SetY(Y().GetX());
218  X().SetZ(Z().GetX());
219  X().SetE(E().GetX());
220 
221  Y().SetX(X().GetY());
222  Y().SetZ(Z().GetY());
223  Y().SetE(E().GetY());
224 
225  Z().SetX(X().GetZ());
226  Z().SetY(Y().GetZ());
227  Z().SetE(E().GetZ());
228 
229  E().SetX(X().GetE());
230  E().SetY(Y().GetE());
231  E().SetZ(Z().GetE());
232  return true;
233  }
234  __device__ bool makeZero() {
235  X().SetXYZE(0, 0, 0, 0);
236  Y().SetXYZE(0, 0, 0, 0);
237  Z().SetXYZE(0, 0, 0, 0);
238  E().SetXYZE(0, 0, 0, 0);
239  return true;
240  }
241 
242  public:
243  __device__ void makeGmunu() {
244  X().SetXYZE(-1, 0, 0, 0);
245  Y().SetXYZE(0, -1, 0, 0);
246  Z().SetXYZE(0, 0, -1, 0);
247  E().SetXYZE(0, 0, 0, 1);
248  }
249  __device__ const SymmLorentzMatrix &gmunu();
250  __device__ SymmLorentzMatrix()
251  : LorentzMatrix() {}
252  __device__ SymmLorentzMatrix(const gpuLVec p[4])
253  : LorentzMatrix(p){};
254 
255  __device__ SymmLorentzMatrix(const gpuLVec p) {
256  X().SetX(p.GetX() * p.GetX());
257  X().SetY(p.GetX() * p.GetY());
258  X().SetZ(p.GetX() * p.GetZ());
259  X().SetE(p.GetX() * p.GetE());
260 
261  Y().SetX(p.GetY() * p.GetX());
262  Y().SetY(p.GetY() * p.GetY());
263  Y().SetZ(p.GetY() * p.GetZ());
264  Y().SetE(p.GetY() * p.GetE());
265 
266  Z().SetX(p.GetZ() * p.GetX());
267  Z().SetY(p.GetZ() * p.GetY());
268  Z().SetZ(p.GetZ() * p.GetZ());
269  Z().SetE(p.GetZ() * p.GetE());
270 
271  E().SetX(p.GetE() * p.GetX());
272  E().SetY(p.GetE() * p.GetY());
273  E().SetZ(p.GetE() * p.GetZ());
274  E().SetE(p.GetE() * p.GetE());
275  }
276  __device__ SymmLorentzMatrix(const SymmLorentzMatrix &other) = default;
277 
278  __device__ SymmLorentzMatrix &add(const SymmLorentzMatrix &other) {
279  for(int i = 0; i < 4; i++)
280  _v[i] += other._v[i];
281 
282  return *this;
283  }
284  __device__ SymmLorentzMatrix &subtract(const SymmLorentzMatrix &other) {
285  for(int i = 0; i < 4; i++)
286  _v[i] -= other._v[i];
287 
288  return *this;
289  }
290  __device__ SymmLorentzMatrix &mult(fptype s) {
291  for(auto &i : _v)
292  i *= s;
293 
294  return *this;
295  }
296  __device__ SymmLorentzMatrix &div(fptype s) {
297  for(auto &i : _v)
298  i *= (1. / s);
299 
300  return *this;
301  }
302  __device__ gpuLVec Contract(const gpuLVec &vec) {
303  // M^{mu nu} g_{nu alpha} v^{alpha}
304  // M^{mu nu} v_{alpha}
305  return vec.GetE() * E() - vec.GetX() * X() - vec.GetY() * Y() - vec.GetZ() * Z();
306  }
308  // One pair of indices gets contracted. Since
309  // both matrices are symmetric, it doesnt matter which.
310  //
311  // O^{mu alpha} g_{alpha beta} M^{beta nu} = R^{mu nu}
312  // O^{mu alpha} M_{beta}^{nu}
313  LorentzMatrix R;
314  R.X() = this->Contract(M.X());
315  R.Y() = this->Contract(M.Y());
316  R.Z() = this->Contract(M.Z());
317  R.E() = this->Contract(M.E()); // signs?
318 
319  return R;
320  }
321  __device__ fptype Contract_2(const SymmLorentzMatrix &M) {
322  // Both pairs of indices are contracted.
323  // since the matrices are symmetric, it does
324  // not matter which index from this with which form M.
325  //
326  // O^{mu alpha} g_{alpha beta} M^{beta nu} g_{mu nu}
327  LorentzMatrix R(Contract_1(M));
328  // R^{mu nu} R_{mu nu}
329  fptype xx = R.X().GetX(); // Dot(R.X());
330  fptype yy = R.Y().GetY(); // Dot(R.Y());
331  fptype zz = R.Z().GetZ(); // Dot(R.Z());
332  fptype tt = R.E().GetE(); // Dot(R.E());
333 
334  return tt - xx - yy - zz; // signs?
335  }
336 
337  __device__ SymmLorentzMatrix &operator+=(const SymmLorentzMatrix &rhs) { return add(rhs); }
338  __device__ SymmLorentzMatrix &operator*=(fptype rhs) { return mult(rhs); }
339  __device__ SymmLorentzMatrix &operator-=(const SymmLorentzMatrix &rhs) { return subtract(rhs); }
340  __device__ SymmLorentzMatrix &operator/=(fptype rhs) { return div(rhs); }
341  __device__ SymmLorentzMatrix &operator=(const SymmLorentzMatrix &other) {
342  for(int i = 0; i < 4; i++)
343  _v[i] = other._v[i];
344 
345  return *this;
346  }
347  __device__ SymmLorentzMatrix operator+(const SymmLorentzMatrix &rhs) const {
348  SymmLorentzMatrix returnVal(*this);
349  returnVal += rhs;
350  return returnVal;
351  }
352  __device__ SymmLorentzMatrix operator-(const SymmLorentzMatrix &rhs) const {
353  SymmLorentzMatrix returnVal(*this);
354  returnVal -= rhs;
355  return returnVal;
356  }
357  __device__ SymmLorentzMatrix operator*(fptype rhs) const {
358  SymmLorentzMatrix returnVal(*this);
359  returnVal *= rhs;
360  return returnVal;
361  }
362  __device__ SymmLorentzMatrix operator/(fptype rhs) const {
363  SymmLorentzMatrix returnVal(*this);
364  returnVal /= rhs;
365  return returnVal;
366  }
367 };
368 
369 // __device__ SymmLorentzMatrix operator*(fptype lhs, const SymmLorentzMatrix& rhs);
370 // __device__ SymmLorentzMatrix operator/(fptype lhs, const SymmLorentzMatrix& rhs);
371 
373  SymmLorentzMatrix returnVal(rhs);
374  returnVal *= lhs;
375  return returnVal;
376 }
378  SymmLorentzMatrix returnVal(rhs);
379  returnVal /= lhs;
380  return returnVal;
381 }
382 
383 class ZTspin2 : public SymmLorentzMatrix {
384  public:
385  // in decay D -> AB: q = p(A) - p(B), p = p(A) + p(B)
386  __device__ ZTspin2(const gpuLVec &q, const gpuLVec &p, fptype mR) {
387  ZTspin1 t(q, p, mR);
388  SymmLorentzMatrix tt(t);
389  SymmLorentzMatrix uu(p);
390  uu /= (mR * mR);
391  auto gmunu = SymmLorentzMatrix();
392  gmunu.makeGmunu();
393  // printf("%f %f %f %f\n",gmunu.X().GetX(), gmunu.Y().GetY(), gmunu.Z().GetZ(), gmunu.E().GetE() );
394  *this = tt - (1. / 3.) * t.Mag2() * (gmunu - uu);
395  // eq 6 in PhysRevD.51.2247
396  }
397 
398  __device__ ZTspin2 &operator=(const SymmLorentzMatrix &other) {
399  for(int i = 0; i < 4; i++)
400  _v[i] = other.v(i);
401 
402  return *this;
403  }
404 };
405 
406 __device__ fptype LeviCivita(const gpuLVec &p1, const gpuLVec &p2, const gpuLVec &p3, const gpuLVec &p4) {
407  // this calculates the determinant of the 4x4 matrix build out of p1,p2,p3,p4
408  return p1.GetZ() * p2.GetY() * p3.GetX() * p4.GetE() - p1.GetY() * p2.GetZ() * p3.GetX() * p4.GetE()
409  - p1.GetZ() * p2.GetX() * p3.GetY() * p4.GetE() + p1.GetX() * p2.GetZ() * p3.GetY() * p4.GetE()
410  + p1.GetY() * p2.GetX() * p3.GetZ() * p4.GetE() - p1.GetX() * p2.GetY() * p3.GetZ() * p4.GetE()
411  - p1.GetZ() * p2.GetY() * p3.GetE() * p4.GetX() + p1.GetY() * p2.GetZ() * p3.GetE() * p4.GetX()
412  + p1.GetZ() * p2.GetE() * p3.GetY() * p4.GetX() - p1.GetE() * p2.GetZ() * p3.GetY() * p4.GetX()
413  - p1.GetY() * p2.GetE() * p3.GetZ() * p4.GetX() + p1.GetE() * p2.GetY() * p3.GetZ() * p4.GetX()
414  + p1.GetZ() * p2.GetX() * p3.GetE() * p4.GetY() - p1.GetX() * p2.GetZ() * p3.GetE() * p4.GetY()
415  - p1.GetZ() * p2.GetE() * p3.GetX() * p4.GetY() + p1.GetE() * p2.GetZ() * p3.GetX() * p4.GetY()
416  + p1.GetX() * p2.GetE() * p3.GetZ() * p4.GetY() - p1.GetE() * p2.GetX() * p3.GetZ() * p4.GetY()
417  - p1.GetY() * p2.GetX() * p3.GetE() * p4.GetZ() + p1.GetX() * p2.GetY() * p3.GetE() * p4.GetZ()
418  + p1.GetY() * p2.GetE() * p3.GetX() * p4.GetZ() - p1.GetE() * p2.GetY() * p3.GetX() * p4.GetZ()
419  - p1.GetX() * p2.GetE() * p3.GetY() * p4.GetZ() + p1.GetE() * p2.GetX() * p3.GetY() * p4.GetZ();
420 }
421 
422 __device__ inline gpuLVec LeviCivita(const gpuLVec &a, const gpuLVec &b, const gpuLVec &c) {
423  gpuLVec v;
424 
425  v.SetE(-1. * a.GetX() * (b.GetY() * c.GetZ() - b.GetZ() * c.GetY())
426  - a.GetY() * (b.GetZ() * c.GetX() - b.GetX() * c.GetZ())
427  - a.GetZ() * (b.GetX() * c.GetY() - b.GetY() * c.GetX()));
428 
429  v.SetZ(a.GetX() * (b.GetE() * c.GetY() - b.GetY() * c.GetE())
430  + a.GetY() * (b.GetX() * c.GetE() - b.GetE() * c.GetX())
431  + a.GetE() * (b.GetY() * c.GetX() - b.GetX() * c.GetY()));
432 
433  v.SetY(a.GetX() * (b.GetZ() * c.GetE() - b.GetE() * c.GetZ())
434  + a.GetZ() * (b.GetE() * c.GetX() - b.GetX() * c.GetE())
435  + a.GetE() * (b.GetX() * c.GetZ() - b.GetZ() * c.GetX()));
436 
437  v.SetX(a.GetY() * (b.GetE() * c.GetZ() - b.GetZ() * c.GetE())
438  + a.GetZ() * (b.GetY() * c.GetE() - b.GetE() * c.GetY())
439  + a.GetE() * (b.GetZ() * c.GetY() - b.GetY() * c.GetZ()));
440 
441  return v;
442 }
443 
444 } // namespace GooFit
__device__ LorentzMatrix & operator=(const LorentzMatrix &other)
Definition: SpinHelper.h:182
__device__ SymmLorentzMatrix & mult(fptype s)
Definition: SpinHelper.h:290
__device__ SymmLorentzMatrix & subtract(const SymmLorentzMatrix &other)
Definition: SpinHelper.h:284
__device__ SymmLorentzMatrix & add(const SymmLorentzMatrix &other)
Definition: SpinHelper.h:278
__device__ SpinSumT(const gpuLVec &p, fptype mR)
Definition: SpinHelper.h:104
__device__ gpuLVec & Z()
Definition: SpinHelper.h:147
__device__ fptype Contract(const gpuLVec &rhs) const
Definition: SpinHelper.h:83
double fptype
__device__ LorentzMatrix operator+(const LorentzMatrix &rhs) const
Definition: SpinHelper.h:188
__device__ gpuLVec Dot(const gpuLVec &rhs) const
Definition: SpinHelper.h:95
__device__ SpinSumV(const gpuLVec &p, fptype mR)
Definition: SpinHelper.h:91
__device__ SymmLorentzMatrix & operator*=(fptype rhs)
Definition: SpinHelper.h:338
__device__ fptype Sandwich(const gpuLVec &lhs, const gpuLVec &rhs) const
Definition: SpinHelper.h:96
__device__ gpuLVec & E()
Definition: SpinHelper.h:148
__device__ SymmLorentzMatrix operator+(const SymmLorentzMatrix &rhs) const
Definition: SpinHelper.h:347
__device__ const gpuLVec & Y() const
Definition: SpinHelper.h:141
__device__ LorentzMatrix(const gpuLVec p[4])
Definition: SpinHelper.h:132
__device__ gpuLVec Contract(const gpuLVec &vec)
Definition: SpinHelper.h:302
__device__ LorentzMatrix & add(const LorentzMatrix &other)
Definition: SpinHelper.h:153
__device__ LorentzMatrix & operator/=(fptype rhs)
Definition: SpinHelper.h:181
__device__ const gpuLVec & E() const
Definition: SpinHelper.h:143
__device__ SymmLorentzMatrix & div(fptype s)
Definition: SpinHelper.h:296
__device__ SymmLorentzMatrix operator-(const SymmLorentzMatrix &rhs) const
Definition: SpinHelper.h:352
__device__ gpuLVec & Y()
Definition: SpinHelper.h:146
__device__ fptype LeviCivita(const gpuLVec &p1, const gpuLVec &p2, const gpuLVec &p3, const gpuLVec &p4)
Definition: SpinHelper.h:406
__device__ const gpuLVec & X() const
Definition: SpinHelper.h:140
__device__ SymmLorentzMatrix operator/(fptype rhs) const
Definition: SpinHelper.h:362
__device__ const gpuLVec & operator[](int i) const
Definition: SpinHelper.h:150
__device__ SymmLorentzMatrix operator/(fptype lhs, const SymmLorentzMatrix &rhs)
Definition: SpinHelper.h:377
__device__ SymmLorentzMatrix & operator/=(fptype rhs)
Definition: SpinHelper.h:340
__device__ SymmLorentzMatrix operator*(fptype rhs) const
Definition: SpinHelper.h:357
__device__ LorentzMatrix operator-(const LorentzMatrix &rhs) const
Definition: SpinHelper.h:193
__device__ bool makeZero()
Definition: SpinHelper.h:234
__device__ SymmLorentzMatrix(const gpuLVec p)
Definition: SpinHelper.h:255
__device__ gpuLVec operator*(gpuLVec lhs, fptype rhs)
Definition: SpinHelper.h:74
__device__ fptype Contract_2(const SymmLorentzMatrix &M)
Definition: SpinHelper.h:321
__device__ LorentzMatrix & operator-=(const LorentzMatrix &rhs)
Definition: SpinHelper.h:180
__device__ LorentzMatrix & mult(fptype s)
Definition: SpinHelper.h:165
__device__ LorentzMatrix & subtract(const LorentzMatrix &other)
Definition: SpinHelper.h:159
__device__ gpuLVec operator-(gpuLVec lhs, const gpuLVec &rhs)
Definition: SpinHelper.h:73
__device__ bool makeZero()
Definition: SpinHelper.h:119
__device__ gpuLVec operator+(gpuLVec lhs, const gpuLVec &rhs)
Definition: SpinHelper.h:72
__device__ SymmLorentzMatrix & operator-=(const SymmLorentzMatrix &rhs)
Definition: SpinHelper.h:339
__device__ gpuLVec & X()
Definition: SpinHelper.h:145
__device__ LorentzMatrix operator/(fptype rhs) const
Definition: SpinHelper.h:203
__device__ LorentzMatrix & operator*=(fptype rhs)
Definition: SpinHelper.h:179
__device__ LorentzMatrix Contract_1(const SymmLorentzMatrix &M)
Definition: SpinHelper.h:307
__device__ const gpuLVec & v(int i) const
Definition: SpinHelper.h:128
__device__ LorentzMatrix & operator+=(const LorentzMatrix &rhs)
Definition: SpinHelper.h:178
__device__ fptype Sandwich(const gpuLVec &lm, const gpuLVec &ln, const gpuLVec &ra, const gpuLVec &rb)
Definition: SpinHelper.h:106
__device__ SymmLorentzMatrix & operator=(const SymmLorentzMatrix &other)
Definition: SpinHelper.h:341
__device__ bool symmetrize()
Definition: SpinHelper.h:215
__device__ ZTspin2(const gpuLVec &q, const gpuLVec &p, fptype mR)
Definition: SpinHelper.h:386
__device__ LorentzMatrix & div(fptype s)
Definition: SpinHelper.h:171
__device__ ZTspin2 & operator=(const SymmLorentzMatrix &other)
Definition: SpinHelper.h:398
__device__ gpuLVec & operator[](int i)
Definition: SpinHelper.h:151
__device__ void makeGmunu()
Definition: SpinHelper.h:243
__device__ SymmLorentzMatrix & operator+=(const SymmLorentzMatrix &rhs)
Definition: SpinHelper.h:337
class __align__(16) gpuLVec
Definition: SpinHelper.h:15
__device__ SymmLorentzMatrix()
Definition: SpinHelper.h:250
__device__ SymmLorentzMatrix(const gpuLVec p[4])
Definition: SpinHelper.h:252
__device__ LorentzMatrix(const LorentzMatrix &other)
Definition: SpinHelper.h:136
__device__ ZTspin1(const gpuLVec &q, const gpuLVec &p, fptype mR)
Definition: SpinHelper.h:80
__device__ LorentzMatrix operator*(fptype rhs) const
Definition: SpinHelper.h:198
__device__ const gpuLVec & Z() const
Definition: SpinHelper.h:142