Documentation of
MARTY
A
M
odern
AR
tificial
T
heoretical ph
Y
sicist
include
insertion.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 INSERTION_H_INCLUDED
24
#define INSERTION_H_INCLUDED
25
26
#include <
csl.h
>
27
#include "
quantumField.h
"
28
29
namespace
mty
{
30
31
class
Particle;
32
33
class
Insertion
{
34
35
private
:
36
37
mutable
QuantumFieldParent
* field;
38
mutable
bool
validExpression {
false
};
39
mutable
csl::Expr
expression {
CSL_UNDEF
};
40
bool
incoming {
true
};
41
bool
particle {
true
};
42
bool
onShell {
true
};
43
bool
mediator {
false
};
44
PartnerShip
partnerShip;
45
46
public
:
47
48
Insertion
(
QuantumFieldParent
* t_field);
49
Insertion
(
Particle
t_field);
50
Insertion
(
csl::Expr
const
& t_field);
51
Insertion
(std::string_view name);
52
Insertion
(
const
char
name[]);
53
Insertion
(
Insertion
const
& other) =
default
;
54
Insertion
(
Insertion
&& other) =
default
;
55
Insertion
& operator=(
Insertion
const
& other) =
default
;
56
Insertion
& operator=(
Insertion
&& other) =
default
;
57
~
Insertion
() =
default
;
58
59
QuantumFieldParent
*getField()
const
;
60
void
setField(
QuantumFieldParent
*t_field);
61
62
bool
isIncoming()
const
{
63
return
incoming;
64
}
65
void
setIncoming(
bool
t_incoming);
66
67
bool
isParticle()
const
{
68
return
particle;
69
}
70
void
setParticle(
bool
t_particle);
71
72
bool
isIncomingParticle()
const
{
73
return
isIncoming() && isParticle();
74
}
75
bool
isIncomingAntiParticle()
const
{
76
return
isIncoming() && !isParticle();
77
}
78
bool
isOutgoingParticle()
const
{
79
return
!isIncoming() && isParticle();
80
}
81
bool
isOutgoingAntiParticle()
const
{
82
return
!isIncoming() && !isParticle();
83
}
84
85
void
setPartnerShip(
PartnerShip
const
&t_partnerShip);
86
87
bool
isOnShell()
const
{
88
return
onShell;
89
}
90
void
setOnShell(
bool
t_onShell);
91
92
bool
isMediator()
const
{
93
return
mediator;
94
}
95
void
setMediator(
bool
t_mediator) {
96
mediator = t_mediator;
97
if
(mediator)
98
setOnShell(
false
);
99
}
100
101
csl::Expr
getExpression()
const
;
102
103
bool
isEquivalent(
Insertion
const
&other)
const
;
104
105
bool
operator==(
Insertion
const
&other)
const
;
106
107
bool
operator!=(
Insertion
const
&other)
const
{
108
return
!(*
this
== other);
109
}
110
};
111
112
Insertion
OnShell (
Insertion
const
& init);
113
Insertion
OffShell(
Insertion
const
& init);
114
Insertion
Incoming(
Insertion
const
& init);
115
Insertion
Outgoing(
Insertion
const
& init);
116
Insertion
AntiPart(
Insertion
const
& init);
117
Insertion
Mediator(
Insertion
const
& init);
118
Insertion
Left
(
Insertion
const
& init);
119
Insertion
Right
(
Insertion
const
& init);
120
std::vector<Insertion> AntiPart(std::vector<Insertion>
const
&init);
121
csl::Expr
GetExpression(
Insertion
const
& init);
122
std::vector<csl::Expr> GetExpression(std::vector<Insertion>
const
& insertions);
123
std::vector<Insertion> GetInsertion(std::vector<csl::Expr>
const
& insertions);
124
125
}
126
127
#endif
CSL_UNDEF
const csl::Expr CSL_UNDEF
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
mty::Chirality::Right
mty::Insertion
Definition:
insertion.h:33
csl.h
mty::Chirality::Left
mty::PartnerShip
Structure containing data about fermion ordering.
Definition:
quantumField.h:120
mty::QuantumFieldParent
Base class for parents of QuantumField objects.
Definition:
quantumField.h:152
quantumField.h
Contains QuantumField and QuantumFieldParent, basic objects handling quantum fields as csl expression...
csl::Expr
Generated by
1.8.13