Documentation of MARTY
A Modern ARtificial Theoretical phYsicist
gauge.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 GAUGE_H_INCLUDED
24 #define GAUGE_H_INCLUDED
25 
26 #include "group.h"
27 #include "gaugedGroup.h"
28 
29 namespace mty {
30 
31 class GaugeIrrep;
32 class SumGaugeIrrep;
33 class GaugedGroup;
34 class QuantumField;
35 class Particle;
36 class Gauge {
37 
38  using iterator
39  = std::vector<std::unique_ptr<SemiSimpleGroup>>::iterator;
40  using const_iterator
41  = std::vector<std::unique_ptr<SemiSimpleGroup>>::const_iterator;
42  using reverse_iterator
43  = std::vector<std::unique_ptr<SemiSimpleGroup>>::reverse_iterator;
44  using const_reverse_iterator
45  = std::vector<std::unique_ptr<SemiSimpleGroup>>::const_reverse_iterator;
46 
47  protected:
48 
49  std::string name;
50 
51  std::vector<std::unique_ptr<SemiSimpleGroup>> groups;
52 
53  std::vector<std::unique_ptr<GaugedGroup>> gaugedGroups;
54 
55  public:
56 
57  explicit
58  Gauge(std::string const& t_name = "");
59 
60  ~Gauge();
61 
62  void addGroup(std::unique_ptr<SemiSimpleGroup>& t_group,
63  const csl::Expr& coupling = nullptr);
64 
65  void addGroup(std::unique_ptr<SemiSimpleGroup>& t_group,
66  std::string const& nameBoson,
67  const csl::Expr& coupling = nullptr);
68 
69  void addGroup(std::unique_ptr<SemiSimpleGroup>& t_group,
70  std::string const& nameBoson,
71  bool addGhost,
72  const csl::Expr& coupling = nullptr);
73 
74  void addGroup(
75  group::Type type,
76  std::string const& name,
77  int dim = -1
78  )
79  {
80  auto group = createGroup(type, name, dim);
81  addGroup(group);
82  }
83 
84  GaugeIrrep getRepresentation(
85  const std::vector<std::vector<int> >& highestWeights);
86 
87  GaugeIrrep getTrivialRep();
88 
89  bool containsTrivialRep(std::vector<QuantumField> const &fields) const;
90 
91  SumGaugeIrrep tensorProduct(const GaugeIrrep& A,
92  const GaugeIrrep& B) const;
93 
94  csl::Expr covariantDerivative(QuantumFieldParent& field,
95  const csl::Index& mu,
96  const std::vector<csl::Index>& fieldIndices,
97  csl::Tensor& point);
98 
99  csl::Expr covariantDerivative(const csl::Expr& field,
100  const csl::Index& mu);
101 
102  std::optional<csl::Expr> getCoupling(const std::string& t_name) const;
103 
104  std::vector<Particle> getVectorBosons() const;
105 
106  std::vector<Particle> getGhosts() const;
107 
108  GaugedGroup* getGaugedGroup(size_t pos) const;
109 
110  void setGaugeChoice(size_t pos,
111  gauge::Type choice);
112 
113  size_t size() const;
114 
115  iterator begin();
116 
117  const_iterator begin() const;
118 
119  reverse_iterator rbegin();
120 
121  const_reverse_iterator rbegin() const;
122 
123  iterator end();
124 
125  const_iterator end() const;
126 
127  reverse_iterator rend();
128 
129  const_reverse_iterator rend() const;
130 
131  SemiSimpleGroup* operator[](int i) const;
132 
133  friend
134  std::ostream& operator<<(std::ostream& fout, const Gauge& obj);
135 };
136 
137 class GaugeIrrep {
138 
139  IMPLEMENTS_STD_VECTOR(Irrep, rep);
140 
141  protected:
142 
143  Gauge* gauge;
144  std::vector<mty::Irrep> rep;
145 
146  public:
147 
148  GaugeIrrep(): gauge(nullptr){}
149 
150  explicit
151  GaugeIrrep(Gauge* gauge);
152 
153  explicit
154  GaugeIrrep(Gauge* t_gauge,
155  const std::vector<Irrep>& t_rep);
156 
157  ~GaugeIrrep(){};
158 
159  bool isTrivial() const;
160 
161  friend std::ostream& operator<<(std::ostream& fout,
162  const GaugeIrrep& irrep);
163 
164  GaugeIrrep getConjugatedRep() const;
165 
166  Gauge* getGauge() const;
167 
168  SumGaugeIrrep operator*(const GaugeIrrep& other) const;
169 
170  SumGaugeIrrep operator*(const SumGaugeIrrep& other) const;
171 
172  bool operator==(const GaugeIrrep& other) const;
173 };
174 
175 class SumGaugeIrrep: public std::vector<GaugeIrrep> {
176 
177  protected:
178 
179  Gauge* gauge;
180 
181  public:
182 
183  SumGaugeIrrep();
184  explicit SumGaugeIrrep(Gauge* t_gauge,
185  const std::vector<std::vector<Irrep> >& irreps
186  = {});
187  explicit SumGaugeIrrep(const std::vector<GaugeIrrep>& irreps);
188  SumGaugeIrrep(const SumGaugeIrrep& other) = default;
189  ~SumGaugeIrrep(){};
190 
191  int find(const GaugeIrrep& irrep) const;
192  bool containsTrivialRep() const;
193 
194  SumGaugeIrrep operator*(const GaugeIrrep& other) const;
195  SumGaugeIrrep operator*(const SumGaugeIrrep& other) const;
196  SumGaugeIrrep operator+(const SumGaugeIrrep& other) const;
197 
198  friend std::ostream& operator<<(std::ostream& fout,
199  const SumGaugeIrrep& irrep);
200 };
201 
202 } // End of namespace mty
203 
204 #endif
Definition: gaugedGroup.h:194
Definition: gauge.h:175
Definition: gauge.h:36
Base class for all Semi simple groups, i.e. groups that has a SemiSimpleAlgebra.
Definition: group.h:219
std::unique_ptr< mty::SemiSimpleGroup > createGroup(group::Type type, std::string const &name, int dim=-1)
Dynamically allocates a new group of type type and returns a pointer to it (in a std::unique_ptr).
Definition: group.cpp:552
Group objects handling different possible symmetry groups. For now only semi-simple groups have repre...
csl::Expr mu
mu parameter.
Definition: MSSM.h:83
std::ostream & operator<<(std::ostream &fout, csl::Type type)
Namespace of MARTY.
Definition: 2HDM.h:31
Expr operator+(const Expr &a, const Expr &b)
Definition: gauge.h:137
File containing classes handling gauge groups.
Expr operator*(const Expr &a, const Expr &b)
bool operator==(const Expr &a, const Expr &b)
Handles the irreducible representation of a given semi-simple algebra.
Definition: representation.h:42
Type
Different types of gauge ficing parameter for gauge boson propagators.
Definition: gaugedGroup.h:92
Base class for parents of QuantumField objects.
Definition: quantumField.h:152
Type
Enumeration of types of semi simple Lie groups. The names being very small, we use a namespace to avo...
Definition: group.h:44