Documentation of MARTY
A Modern ARtificial Theoretical phYsicist
fermionicField.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 
24 #ifndef FERMIONIC_FIELD_H_INCLUDED
25 #define FERMIONIC_FIELD_H_INCLUDED
26 
27 #include "quantumField.h"
28 
29 namespace mty {
30 
31 class DiracFermion;
32 class Model;
33 
42 
43  friend class DiracFermion;
44 
45  private:
46 
51 
59  std::weak_ptr<DiracFermion> diracParent;
60 
61  public:
62 
63  WeylFermion();
64 
65  WeylFermion(WeylFermion const& other) = default;
66 
67  WeylFermion(std::weak_ptr<DiracFermion> parent,
68  Chirality chirality = Chirality::Left);
69 
70  WeylFermion(const std::string& t_name,
71  Model const& t_model,
72  Chirality chirality = Chirality::Left);
73 
74  WeylFermion(const std::string& t_name,
75  Gauge* t_gauge,
76  Chirality chirality = Chirality::Left);
77 
78  WeylFermion(const std::string& t_name,
79  const GaugeIrrep& irrep,
80  Chirality chirality = Chirality::Left);
81 
82  WeylFermion(const std::string& t_name,
83  Gauge* t_gauge,
84  bool t_isSelfConjugate,
85  Chirality chirality = Chirality::Left);
86 
87  WeylFermion(const std::string& t_name,
88  const GaugeIrrep& irrep,
89  bool t_isSelfConjugate,
90  Chirality chirality = Chirality::Left);
91 
92  WeylFermion(const std::string& t_name,
93  const GaugeIrrep& irrep,
94  const FlavorIrrep& flavorRep,
95  Chirality chirality = Chirality::Left);
96 
97  WeylFermion(const std::string& t_name,
98  const WeylFermion* other);
99 
100  ~WeylFermion() {}
101 
102  void printDefinition(
103  std::ostream &out = std::cout,
104  int indentSize = 4,
105  bool header = false
106  ) const override;
107 
108  ParticleType getParticleType() const override {
109  return ParticleType::WeylFermion;
110  }
111 
112  bool isChiral() const override;
113 
114  bool isSameSpecies(QuantumFieldParent const *other) const override;
115 
116  Chirality getChirality() const override;
117 
118  Particle generateSimilar(std::string const& t_name) const override;
119 
120  csl::Expr getEnergyDimension() const override;
121 
122  int getNDegreesOfFreedom() const override;
123 
124  csl::Expr getKineticTerm(csl::Tensor & X) override;
125 
126  Particle getChiralityCounterPart() const override;
127 
128  Particle getDiracParent() const override;
129 
130  void setDiracParent(Particle const &parent) override;
131 
132  void breakParticle(
133  mty::Group *brokenGroup,
134  std::vector<std::string> const &newNames
135  ) override;
136  void breakParticle(
137  mty::FlavorGroup *brokenFlavor,
138  std::vector<mty::FlavorGroup*> const &subGroups,
139  std::vector<std::string> const &names
140  ) override;
141 
142  protected:
143 
144  void initPropagator() override;
145 };
146 
160 
161  friend class WeylFermion;
162 
163  private:
164 
172 
180 
181  public:
182 
183  DiracFermion();
184 
185  DiracFermion(DiracFermion const& other) = default;
186 
188  std::shared_ptr<WeylFermion> const& right);
189 
190  DiracFermion(const std::string& t_name,
191  const Model& model);
192 
193  DiracFermion(const std::string& t_name,
194  Gauge* t_gauge);
195 
196  DiracFermion(const std::string& t_name,
197  const GaugeIrrep& irrep);
198 
199  DiracFermion(const std::string& t_name,
200  Gauge* t_gauge,
201  bool t_isSelfConjugate);
202 
203  DiracFermion(const std::string& t_name,
204  const GaugeIrrep& irrep,
205  bool t_isSelfConjugate);
206 
207  DiracFermion(const std::string& t_name,
208  const GaugeIrrep& irrep,
209  const FlavorIrrep& flavorRep);
210 
211  DiracFermion(const std::string& t_name,
212  const DiracFermion* other);
213 
214  ~DiracFermion() {}
215 
216  bool isSameSpecies(QuantumFieldParent const *other) const override {
217  return this == other
218  || leftPart.get() == other
219  || rightPart.get() == other;
220  }
221 
222  bool contains(QuantumFieldParent const *other) const override {
223  return isSameSpecies(other);
224  }
225 
226  void printDefinition(
227  std::ostream &out = std::cout,
228  int indentSize = 4,
229  bool header = false
230  ) const override;
231 
232  ParticleType getParticleType() const override {
233  return ParticleType::DiracFermion;
234  }
235 
236  void initWeylFermions();
237 
238  Particle generateSimilar(std::string const& t_name) const override;
239 
240  csl::Expr getEnergyDimension() const override;
241 
242  int getNDegreesOfFreedom() const override;
243 
244  csl::Expr getKineticTerm(csl::Tensor & X) override;
245 
246  Particle getWeylFermion(Chirality chirality) const override;
247 
248  void breakParticle(
249  mty::Group *brokenGroup,
250  std::vector<std::string> const &newNames
251  ) override;
252  void breakParticle(
253  mty::FlavorGroup *brokenFlavor,
254  std::vector<mty::FlavorGroup*> const &subGroups,
255  std::vector<std::string> const &names
256  ) override;
257 
258  private:
259 
260  void initPropagator() override;
261 
262  void updateChiralBrokenParts(csl::Space const *space);
263 };
264 
276 template<class ...Args>
277 inline Particle weylfermion_s(Args&& ...args)
278 {
279  auto weyl = csl::make_shared<WeylFermion>(std::forward<Args>(args)...);
280  return weyl;
281 }
282 
294 template<class ...Args>
295 inline Particle diracfermion_s(Args&& ...args)
296 {
297  auto part = csl::make_shared<DiracFermion>(std::forward<Args>(args)...);
298  part->initWeylFermions();
299  return part;
300 }
301 
302 }
303 
304 #endif
Definition: gauge.h:36
virtual Particle getWeylFermion(Chirality chirality) const
For a DiracFermion, returns the chiral WeylFermion it contains of chirality chirality if it has one...
Definition: quantumField.cpp:283
This class inherits from std::shared_ptr<QuantumFieldParent> and should be used instead of direct Qua...
Definition: quantumField.h:1409
Particle getChiralityCounterPart() const override
For a WeylFermion embedded in a DiracFermion, returns the other part of the DiracFermion.
Definition: fermionicField.cpp:205
Particle generateSimilar(std::string const &t_name) const override
Pure virtual function. Generates a partical similar to the current object, changing only the name...
Definition: fermionicField.cpp:167
Namespace of MARTY.
Definition: 2HDM.h:31
class mty::AbstractGroup Group
Abstract base class for groups.
constexpr auto names
Names for topologies.
Definition: topology.h:72
int getNDegreesOfFreedom() const override
Pure virtual function. Returns the number of degrees of freedom in the particle. It does not count ga...
Definition: fermionicField.cpp:177
Definition: gauge.h:137
Chirality
Chirality for fermions. Either Left or Right for WeylFermion, or None for DiracFermion.
Definition: quantumField.h:40
csl::Expr getKineticTerm(csl::Tensor &X) override
Returns the kinetic term in the Lagrangian for the field.
Definition: fermionicField.cpp:182
std::vector< const Space *> space
Definition: flavor.h:37
GaugeIrrep irrep
Representation of the field in the gauge gauge.
Definition: quantumField.h:260
Chirality chirality
Chirality of the particle.
Definition: fermionicField.h:50
FlavorIrrep flavorRep
Representation of the field in the flavor flavor.
Definition: quantumField.h:286
Weyl fermion, two-component Chiral particle.
Definition: fermionicField.h:41
Definition: flavor.h:133
Particle getDiracParent() const override
For a WeylFermion embedded in a DiracFermion, returns the dirac fermion.
Definition: fermionicField.cpp:187
csl::Expr getEnergyDimension() const override
Pure virtual function. Returns the energy dimension of the field.
Definition: fermionicField.cpp:172
Particle diracfermion_s(Args &&...args)
Delegates the construction of a Dirac fermion and returns the result.
Definition: fermionicField.h:295
std::weak_ptr< DiracFermion > diracParent
Weak pointer to the dirac parent if the fermion is part of a Dirac fermion.
Definition: fermionicField.h:59
Chirality getChirality() const override
Returns the chirality of the particle.
Definition: fermionicField.cpp:162
Contains all objects in the theory. In particular QuantumField objects, Gauge, Flavor, Particle...
Definition: model.h:68
Base class for parents of QuantumField objects.
Definition: quantumField.h:152
Dirac or Majorana fermion in MARTY.
Definition: fermionicField.h:159
std::shared_ptr< WeylFermion > rightPart
Right Weyl sub-part for a Dirac fermion.
Definition: fermionicField.h:179
void initPropagator() override
Initializes default propagators for the particle. This function is called automatically in the constr...
Definition: fermionicField.cpp:218
std::shared_ptr< WeylFermion > leftPart
Left Weyl sub-part for a Dirac fermion.
Definition: fermionicField.h:171
bool isChiral() const override
Tells if the field is chiral.
Definition: fermionicField.cpp:157
Contains QuantumField and QuantumFieldParent, basic objects handling quantum fields as csl expression...
Particle weylfermion_s(Args &&...args)
Delegates the construction of a Weyl fermion and returns the result.
Definition: fermionicField.h:277