EvtGen
2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Toggle main menu visibility
Loading...
Searching...
No Matches
EvtGenBase
EvtGammaMatrix.hh
Go to the documentation of this file.
1
2
/***********************************************************************
3
* Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4
* *
5
* This file is part of EvtGen. *
6
* *
7
* EvtGen is free software: you can redistribute it and/or modify *
8
* it under the terms of the GNU General Public License as published by *
9
* the Free Software Foundation, either version 3 of the License, or *
10
* (at your option) any later version. *
11
* *
12
* EvtGen is distributed in the hope that it will be useful, *
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15
* GNU General Public License for more details. *
16
* *
17
* You should have received a copy of the GNU General Public License *
18
* along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19
***********************************************************************/
20
21
#ifndef EVTGAMMAMATRIX_HH
22
#define EVTGAMMAMATRIX_HH
23
24
#include "
EvtGenBase/EvtComplex.hh
"
25
#include "
EvtGenBase/EvtDiracSpinor.hh
"
// needed for adjoint
26
//#include <iostream.h>
27
#include <iosfwd>
28
class
EvtGammaMatrix
;
29
class
EvtVector4C
;
30
31
namespace
EvtGenFunctions
{
32
// slash or Feynman slash a 4-vector
33
EvtGammaMatrix
slash
(
const
EvtVector4C
& p );
34
EvtGammaMatrix
slash
(
const
EvtVector4R
& p );
35
}
// namespace EvtGenFunctions
36
37
// Description: Class to manipulate gamma matrices. The reperesentation
38
// used is the "standard" Dirac representation.
39
40
class
EvtGammaMatrix
final {
41
friend
EvtGammaMatrix
operator*
(
const
EvtComplex
& c,
42
const
EvtGammaMatrix
&
g
);
43
friend
EvtGammaMatrix
operator*
(
const
EvtGammaMatrix
&
g
,
44
const
EvtComplex
& c );
45
friend
EvtGammaMatrix
operator/
(
const
EvtGammaMatrix
&
g
,
const
double
d );
46
friend
EvtDiracSpinor
operator*
(
const
EvtGammaMatrix
&
g
,
47
const
EvtDiracSpinor
& d );
48
friend
EvtGammaMatrix
operator+
(
const
EvtGammaMatrix
&
g1
,
49
const
EvtGammaMatrix
&
g2
);
50
friend
EvtGammaMatrix
operator-
(
const
EvtGammaMatrix
&
g1
,
51
const
EvtGammaMatrix
&
g2
);
52
friend
EvtGammaMatrix
operator*
(
const
EvtGammaMatrix
&
g1
,
53
const
EvtGammaMatrix
&
g2
);
54
friend
std::ostream&
operator<<
( std::ostream& s,
const
EvtGammaMatrix
& v );
55
friend
EvtDiracSpinor
EvtDiracSpinor::adjoint
()
const
;
56
57
public
:
58
EvtGammaMatrix
();
59
EvtGammaMatrix
(
const
EvtGammaMatrix
& gm );
60
EvtGammaMatrix
&
operator=
(
const
EvtGammaMatrix
& gm );
61
62
void
init
();
63
static
const
EvtGammaMatrix
&
g
(
int
);
64
static
const
EvtGammaMatrix
&
g0
();
65
static
const
EvtGammaMatrix
&
g1
();
66
static
const
EvtGammaMatrix
&
g2
();
67
static
const
EvtGammaMatrix
&
g3
();
68
static
const
EvtGammaMatrix
&
g5
();
69
static
const
EvtGammaMatrix
&
id
();
70
static
const
EvtGammaMatrix
&
va0
();
71
static
const
EvtGammaMatrix
&
va1
();
72
static
const
EvtGammaMatrix
&
va2
();
73
static
const
EvtGammaMatrix
&
va3
();
74
static
const
EvtGammaMatrix
&
v0
();
75
static
const
EvtGammaMatrix
&
v1
();
76
static
const
EvtGammaMatrix
&
v2
();
77
static
const
EvtGammaMatrix
&
v3
();
78
// Dirac sigma matrix with upper or lower indices (only one element)
79
static
const
EvtGammaMatrix
&
sigmaUpper
(
unsigned
int
mu,
unsigned
int
nu );
80
static
const
EvtGammaMatrix
&
sigmaLower
(
unsigned
int
mu,
unsigned
int
nu );
81
82
EvtGammaMatrix
&
operator+=
(
const
EvtGammaMatrix
&
g
);
83
EvtGammaMatrix
&
operator-=
(
const
EvtGammaMatrix
&
g
);
84
EvtGammaMatrix
&
operator*=
(
const
EvtGammaMatrix
&
g
);
85
86
private
:
87
EvtComplex
m_gamma
[4][4];
88
};
89
90
inline
EvtGammaMatrix
operator+
(
const
EvtGammaMatrix
&
g1
,
91
const
EvtGammaMatrix
&
g2
)
92
{
93
return
EvtGammaMatrix
(
g1
) +=
g2
;
94
}
95
96
inline
EvtGammaMatrix
operator-
(
const
EvtGammaMatrix
&
g1
,
97
const
EvtGammaMatrix
&
g2
)
98
{
99
return
EvtGammaMatrix
(
g1
) -=
g2
;
100
}
101
102
inline
EvtGammaMatrix
operator*
(
const
EvtGammaMatrix
&
g1
,
103
const
EvtGammaMatrix
&
g2
)
104
{
105
return
EvtGammaMatrix
(
g1
) *=
g2
;
106
}
107
108
inline
EvtGammaMatrix
operator/
(
const
EvtGammaMatrix
&
g
,
const
double
d )
109
{
110
return
g
*
EvtComplex
( 1 / d, 0 );
111
}
112
113
#endif
EvtComplex.hh
EvtDiracSpinor.hh
operator*
EvtGammaMatrix operator*(const EvtGammaMatrix &g1, const EvtGammaMatrix &g2)
Definition
EvtGammaMatrix.hh:102
operator/
EvtGammaMatrix operator/(const EvtGammaMatrix &g, const double d)
Definition
EvtGammaMatrix.hh:108
operator-
EvtGammaMatrix operator-(const EvtGammaMatrix &g1, const EvtGammaMatrix &g2)
Definition
EvtGammaMatrix.hh:96
operator+
EvtGammaMatrix operator+(const EvtGammaMatrix &g1, const EvtGammaMatrix &g2)
Definition
EvtGammaMatrix.hh:90
EvtComplex
Definition
EvtComplex.hh:29
EvtDiracSpinor
Definition
EvtDiracSpinor.hh:32
EvtDiracSpinor::adjoint
EvtDiracSpinor adjoint() const
Definition
EvtDiracSpinor.cpp:327
EvtGammaMatrix
Definition
EvtGammaMatrix.hh:40
EvtGammaMatrix::m_gamma
EvtComplex m_gamma[4][4]
Definition
EvtGammaMatrix.hh:87
EvtGammaMatrix::sigmaLower
static const EvtGammaMatrix & sigmaLower(unsigned int mu, unsigned int nu)
Definition
EvtGammaMatrix.cpp:595
EvtGammaMatrix::operator*
friend EvtGammaMatrix operator*(const EvtComplex &c, const EvtGammaMatrix &g)
Definition
EvtGammaMatrix.cpp:54
EvtGammaMatrix::va1
static const EvtGammaMatrix & va1()
Definition
EvtGammaMatrix.cpp:147
EvtGammaMatrix::operator/
friend EvtGammaMatrix operator/(const EvtGammaMatrix &g, const double d)
Definition
EvtGammaMatrix.hh:108
EvtGammaMatrix::operator-
friend EvtGammaMatrix operator-(const EvtGammaMatrix &g1, const EvtGammaMatrix &g2)
Definition
EvtGammaMatrix.hh:96
EvtGammaMatrix::v0
static const EvtGammaMatrix & v0()
Definition
EvtGammaMatrix.cpp:372
EvtGammaMatrix::id
static const EvtGammaMatrix & id()
Definition
EvtGammaMatrix.cpp:468
EvtGammaMatrix::sigmaUpper
static const EvtGammaMatrix & sigmaUpper(unsigned int mu, unsigned int nu)
Definition
EvtGammaMatrix.cpp:556
EvtGammaMatrix::init
void init()
Definition
EvtGammaMatrix.cpp:106
EvtGammaMatrix::g0
static const EvtGammaMatrix & g0()
Definition
EvtGammaMatrix.cpp:231
EvtGammaMatrix::g2
static const EvtGammaMatrix & g2()
Definition
EvtGammaMatrix.cpp:280
EvtGammaMatrix::operator<<
friend std::ostream & operator<<(std::ostream &s, const EvtGammaMatrix &v)
EvtGammaMatrix::operator-=
EvtGammaMatrix & operator-=(const EvtGammaMatrix &g)
Definition
EvtGammaMatrix.cpp:504
EvtGammaMatrix::g
static const EvtGammaMatrix & g(int)
Definition
EvtGammaMatrix.cpp:352
EvtGammaMatrix::g1
static const EvtGammaMatrix & g1()
Definition
EvtGammaMatrix.cpp:256
EvtGammaMatrix::va3
static const EvtGammaMatrix & va3()
Definition
EvtGammaMatrix.cpp:203
EvtGammaMatrix::g3
static const EvtGammaMatrix & g3()
Definition
EvtGammaMatrix.cpp:304
EvtGammaMatrix::v2
static const EvtGammaMatrix & v2()
Definition
EvtGammaMatrix.cpp:420
EvtGammaMatrix::va0
static const EvtGammaMatrix & va0()
Definition
EvtGammaMatrix.cpp:119
EvtGammaMatrix::va2
static const EvtGammaMatrix & va2()
Definition
EvtGammaMatrix.cpp:175
EvtGammaMatrix::g5
static const EvtGammaMatrix & g5()
Definition
EvtGammaMatrix.cpp:328
EvtGammaMatrix::v1
static const EvtGammaMatrix & v1()
Definition
EvtGammaMatrix.cpp:396
EvtGammaMatrix::v3
static const EvtGammaMatrix & v3()
Definition
EvtGammaMatrix.cpp:444
EvtGammaMatrix::operator*=
EvtGammaMatrix & operator*=(const EvtGammaMatrix &g)
Definition
EvtGammaMatrix.cpp:516
EvtGammaMatrix::operator=
EvtGammaMatrix & operator=(const EvtGammaMatrix &gm)
Definition
EvtGammaMatrix.cpp:94
EvtGammaMatrix::operator+=
EvtGammaMatrix & operator+=(const EvtGammaMatrix &g)
Definition
EvtGammaMatrix.cpp:492
EvtGammaMatrix::operator+
friend EvtGammaMatrix operator+(const EvtGammaMatrix &g1, const EvtGammaMatrix &g2)
Definition
EvtGammaMatrix.hh:90
EvtGammaMatrix::EvtGammaMatrix
EvtGammaMatrix()
Definition
EvtGammaMatrix.cpp:36
EvtVector4C
Definition
EvtVector4C.hh:30
EvtVector4R
Definition
EvtVector4R.hh:29
EvtGenFunctions
Definition
EvtGammaMatrix.hh:31
EvtGenFunctions::slash
EvtGammaMatrix slash(const EvtVector4C &p)
Definition
EvtGammaMatrix.cpp:620
Generated by
1.17.0