Documentation of
MARTY
A
M
odern
AR
tificial
T
heoretical ph
Y
sicist
include
fermionCurrent.h
Go to the documentation of this file.
1
// This file is part of MARTY.
2
//
3
// MARTY is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation, either version 3 of the License, or
6
// (at your option) any later version.
7
//
8
// MARTY is distributed in the hope that it will be useful,
9
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
// GNU General Public License for more details.
12
//
13
// You should have received a copy of the GNU General Public License
14
// along with MARTY. If not, see <https://www.gnu.org/licenses/>.
15
23
#ifndef FERMION_CURRENT_H_INCLUDED
24
#define FERMION_CURRENT_H_INCLUDED
25
26
#include "
diracology.h
"
27
28
namespace
mty
{
29
30
struct
ParticleInsertion
{
31
ParticleInsertion
() =
default
;
32
ParticleInsertion
(
Particle
t_p): p(t_p) {}
33
ParticleInsertion
(
Particle
t_p,
bool
t_c): p(t_p), conjugate(t_c) {}
34
mty::Particle
p;
35
bool
conjugate {
false
};
36
};
37
38
class
FermionCurrent
{
39
40
public
:
41
42
enum
Type {
43
44
Scalar
,
// Id
45
PseudoScalar,
//gamma_chir
46
LScalar,
// P_L
47
RScalar,
// P_R
48
Vector
,
// gamma_mu
49
Axial,
// gamma_mu gamma_chir
50
LVector,
// gamma_mu P_L
51
RVector,
// gamma_mu P_R
52
Magnetic,
// gamma_mu gamma_nu
53
AMagnetic,
// gamma_mu gamma_nu gamma_chir
54
LMagnetic,
// gamma_mu gamma_nu P_L
55
RMagnetic,
// gamma_mu gamma_nu P_R
56
};
57
58
private
:
59
60
FermionCurrent
(std::vector<csl::Expr>
const
& t_tensors,
61
const
mty::DiracSpace
*t_diracSpace = &mty::dirac4);
62
63
public
:
64
65
friend
std::vector<FermionCurrent> parseChains(
66
csl::Expr
& product,
67
DiracSpace
const
* diracSpace,
68
bool
findAbrev);
69
70
Type getType()
const
;
71
void
setType(Type t_type);
72
73
csl::Expr
getExpression()
const
;
74
75
std::vector<csl::Expr>& getTensors();
76
std::vector<csl::Expr>
const
& getTensors()
const
;
77
78
csl::Index
getFirst()
const
;
79
csl::Index
getLast()
const
;
80
81
csl::Expr
getFactor()
const
;
82
csl::Expr
getLeft()
const
;
83
csl::Expr
getRight()
const
;
84
85
void
setFactor(
csl::Expr
const
& t_factor);
86
void
setLeft(
csl::Expr
const
& t_left);
87
void
setRight(
csl::Expr
const
& t_right);
88
89
Type determineTypeOfChain(std::vector<csl::Expr>
const
& tensors)
const
;
90
void
determineBorderIndices(std::vector<csl::Expr>
const
& tensors);
91
92
bool
operator==
(
FermionCurrent
const
& other)
const
;
93
bool
operator!=
(
FermionCurrent
const
& other)
const
;
94
bool
operator<
(
FermionCurrent
const
& other)
const
;
95
bool
operator>
(
FermionCurrent
const
& other)
const
;
96
bool
operator<=
(
FermionCurrent
const
& other)
const
;
97
bool
operator>=
(
FermionCurrent
const
& other)
const
;
98
99
friend
100
std::ostream&
operator<<
(std::ostream& out,
101
FermionCurrent
const
& current);
102
103
private
:
104
105
const
mty::DiracSpace
*diracSpace;
106
Type type;
107
csl::Index
first;
108
csl::Index
last;
109
csl::Expr
factor;
110
csl::Expr
left;
111
csl::Expr
right;
112
std::vector<csl::Expr> tensors;
113
};
114
115
std::vector<FermionCurrent> parseChains(
116
csl::Expr
&product,
117
DiracSpace
const
* diracSpace,
118
bool
findAbrev =
false
);
119
120
121
std::ostream&
operator<<
(std::ostream& out,
122
FermionCurrent::Type type);
123
124
}
125
126
#endif
csl::Index
operator<=
bool operator<=(const Expr &a, const Expr &b)
operator<<
std::ostream & operator<<(std::ostream &fout, csl::Type type)
mty::Particle
This class inherits from std::shared_ptr<QuantumFieldParent> and should be used instead of direct Qua...
Definition:
quantumField.h:1409
mty
Namespace of MARTY.
Definition:
2HDM.h:31
operator>
bool operator>(const Expr &a, const Expr &b)
operator>=
bool operator>=(const Expr &a, const Expr &b)
mty::ParticleInsertion
Definition:
fermionCurrent.h:30
mty::DiracSpace
Definition:
diracology.h:36
Type::Scalar
Type::Vector
diracology.h
operator==
bool operator==(const Expr &a, const Expr &b)
mty::FermionCurrent
Definition:
fermionCurrent.h:38
operator<
bool operator<(const Expr &a, const Expr &b)
operator!=
bool operator!=(const Expr &a, const Expr &b)
csl::Expr
Generated by
1.8.13