Documentation of
MARTY
A
M
odern
AR
tificial
T
heoretical ph
Y
sicist
sgl
include
gammaindex.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
#pragma once
24
25
#include "
generalizedindex.h
"
26
#include "
diracology.h
"
27
28
namespace
sgl
{
29
30
inline
csl::Space
const
* minkoSpace = &
csl::Minkowski
;
31
inline
csl::Expr
DMinko = csl::DMinko;
32
inline
csl::Space
const
* diracSpace = &mty::dirac4;
33
inline
std::map<int, csl::Index> m_easyIndex;
34
35
36
class
GammaIndex
:
public
AbstractGeneralizedIndex
{
37
38
public
:
39
40
GammaIndex
();
41
GammaIndex
(
csl::Index
const
&t_index);
42
GammaIndex
(std::vector<csl::Index>
const
&t_indices);
43
44
bool
isZero()
const override
;
45
csl::Expr
getFactor()
const override
;
46
GExpr
getTerm()
const override
;
47
48
bool
isDelta()
const
{
49
return
m_indices.empty();
50
}
51
bool
isGammaMu()
const
{
52
return
m_indices.size() == 1
53
&& (m_indices[0].getType() !=
cslIndex::Fixed
54
|| m_indices[0].getValue()
55
< diracSpace->
getDim
());
56
}
57
bool
isSigma()
const
{
58
return
m_indices.size() == 2;
59
}
60
bool
isGamma5()
const
{
61
return
m_indices.size() == 1
62
&& m_indices[0].getType() ==
cslIndex::Fixed
63
&& m_indices[0] == 5;
64
}
65
bool
isP_L()
const
{
66
return
m_indices.size() == 1
67
&& m_indices[0].getType() ==
cslIndex::Fixed
68
&& m_indices[0] == 6;
69
}
70
bool
isP_R()
const
{
71
return
m_indices.size() == 1
72
&& m_indices[0].getType() ==
cslIndex::Fixed
73
&& m_indices[0] == 7;
74
}
75
bool
isChiral()
const
{
76
return
isGamma5() || isP_L() || isP_R();
77
}
78
bool
isC()
const
{
79
return
m_indices.size() == 1
80
&& m_indices[0].getType() ==
cslIndex::Fixed
81
&& m_indices[0] == 8;
82
}
83
84
bool
leftOf(
GammaIndex
const
&other)
const
;
85
86
GExpr
copy()
const override
;
87
GExpr
refresh()
const override
;
88
89
csl::Expr
buildTensor(
90
TensorSet
const
&tensors,
91
csl::Index
const
&a,
92
csl::Index
const
&b)
const
;
93
94
csl::Expr
toCSL(
TensorSet
const
&)
const override
;
95
96
void
print(std::ostream &out = std::cout)
const override
;
97
98
bool
equalTo(
GammaIndex
const
&other)
const
;
99
};
100
101
GExpr
gammaindex_s();
102
GExpr
gammaindex_s(
csl::Index
const
&index);
103
GExpr
gammaindex_s(std::vector<csl::Index>
const
&indices);
104
}
sgl::TensorSet
Definition:
tensorset.h:30
csl::Index
sgl::GExpr
Definition:
abstractgammasym.h:87
sgl::AbstractGeneralizedIndex
Definition:
generalizedindex.h:29
sgl
Definition:
abstractgammasym.h:32
csl::Space::getDim
int getDim() const
diracology.h
generalizedindex.h
Base class for indexed obejcts in SGL.
cslIndex::Fixed
Fixed
csl::Space
sgl::GammaIndex
Definition:
gammaindex.h:36
csl::Minkowski
const Space & Minkowski
csl::Expr
Generated by
1.8.13