22 #ifndef QUANTUMFIELD_H 23 #define QUANTUMFIELD_H 31 #include "latexLink.h" 61 default: out <<
"No chirality";
91 enum class ParticleType {
123 bool isLeft {
false };
127 return self != -1 &&
self == other.partner;
204 bool selfConjugate =
false;
210 bool integratedOut =
false;
216 bool physical =
true;
222 bool enabledInDiagrams =
true;
238 drawer::ParticleType drawType = drawer::ParticleType::None;
266 bool polarizationSumInitialized =
false;
295 std::map<QuantumNumber::ID, QuantumNumber::Value>
qNumbers;
305 std::map<QuantumFieldParent const*, Propagator_func>
propagator;
307 std::vector<std::weak_ptr<mty::QuantumFieldParent>> relatives;
361 bool t_isSelfConjugate);
376 bool t_isSelfConjugate);
406 drawer::ParticleType getDrawType()
const;
409 return this == other;
413 return this == other;
416 virtual ParticleType getParticleType()
const;
424 void setDrawType(drawer::ParticleType type);
432 virtual Particle generateSimilar(std::string
const& t_name)
const = 0;
446 virtual csl::Expr getEnergyDimension()
const = 0;
454 virtual int getNDegreesOfFreedom()
const = 0;
456 int getNGaugeDegreesOfFreedom()
const;
465 virtual bool hasSpecialContractionWith(
QuantumField const& other)
const;
472 virtual bool isChiral()
const;
483 virtual Particle getChiralityCounterPart()
const;
501 virtual Particle getDiracParent()
const;
510 virtual Particle getGoldstone()
const;
512 virtual void setDiracParent(
Particle const &diracFermion);
527 bool external)
const;
545 bool external)
const;
570 virtual bool isGaugeBoson()
const;
586 virtual Particle getVectorBoson()
const;
597 virtual Particle getGoldstoneBoson()
const;
605 virtual Particle getGhostBoson()
const;
607 virtual Particle getConjugatedGhostBoson()
const;
622 virtual void setGoldstoneBoson(
Particle const& goldstone);
636 virtual void setGhostBoson(
Particle const& ghost);
638 virtual void setConjugatedGhostBoson(
Particle const& ghost);
658 virtual bool hasFieldStrength()
const;
667 virtual Particle getFieldStrength()
const;
677 virtual void setFieldStrength(
Particle const& fieldStrength);
695 bool isBosonic()
const;
703 bool isFermionic()
const;
711 virtual bool isAntiCommuting()
const;
722 bool isSelfConjugate()
const;
735 bool isPhysical()
const;
745 bool isEnabledInDiagrams()
const;
768 bool isIntegratedOut()
const;
778 int getSpinDimension()
const;
803 Irrep getLorentzRep()
const;
810 Gauge* getGauge()
const;
829 Irrep getGroupIrrep(
const Group* group)
const;
831 Flavor const* getFlavor()
const;
833 void setFlavor(
Flavor const *flavor);
864 std::vector<csl::Index> getSpaceIndex(
865 const std::string& nameIndex =
"")
const;
873 std::vector<csl::Index> getGaugeIndex(std::vector<std::string>
names 874 = std::vector<std::string>())
const;
882 std::vector<csl::Index> getFlavorIndex(std::vector<std::string>
names 883 = std::vector<std::string>())
const;
894 std::vector<csl::Index> getFullSetOfIndices()
const;
954 void integrateOut(
bool value =
true);
964 void setMass(
const std::string& t_mass);
976 void setMass(
const std::string& t_mass,
long double value);
1007 void setSelfConjugate(
bool t_selfConjugate);
1018 void setPhysical(
bool t_physical);
1030 void setEnabledInDiagrams(
bool t_enabled);
1043 void adjustFlavorRep(
Flavor* t_flavor);
1045 void setGaugeIrrep(
const GaugeIrrep& newRep);
1057 void setGroupRep(
Group* group,
1058 const Irrep& newRep);
1074 void setGroupRep(std::string
const& group,
1075 std::vector<int>
const& highestWeight);
1077 void setGroupRep(std::string
const& group,
1092 const Irrep& newRep);
1093 void setFundamentalFlavorRep(
1094 std::string
const &flavorGroup
1115 virtual void setBrokenParts(
1117 const std::vector<Particle>& brokenParts);
1129 std::vector<csl::Parent> breakSpace(
1131 const std::vector<const csl::Space*>& newSpace,
1132 const std::vector<size_t>& pieces
1182 csl::Expr operator()(std::vector<int>
const& indices,
1194 csl::Expr operator()(std::vector<csl::Index> indices,
1207 std::vector<int>
const& indices,
1241 csl::Expr operator()(std::vector<csl::Index> indices)
override;
1283 std::vector<csl::Index> indices,
1288 virtual void breakParticle(
1290 std::vector<std::string>
const &newNames
1292 virtual void breakParticle(
1294 std::vector<mty::FlavorGroup*>
const &subGroups,
1295 std::vector<std::string>
const &
names 1300 void addRelative(std::weak_ptr<mty::QuantumFieldParent>
const &particle);
1302 std::weak_ptr<mty::QuantumFieldParent> removeRelative(
1306 void checkRelatives();
1308 template<
class Func>
1309 void applyToRelatives(Func &&func);
1311 void printQuantumDefinition(
1321 virtual void initPropagator();
1328 void initIndexSpaces();
1335 void initPolarizationSum();
1423 template<
class ...Args>
1427 return (**
this)(std::forward<Args>(args)...);
1440 template<
class ...Args>
1446 return (**
this)(polar, index, std::forward<Args>(args)...);
1458 template<
class ...Args>
1463 return (**
this)(indices, std::forward<Args>(args)...);
1475 template<
class ...Args>
1480 return (**
this)(indices, std::forward<Args>(args)...);
1493 template<
class ...Args>
1496 const std::vector<int>& indices,\
1499 return (**
this)(polar, indices, std::forward<Args>(args)...);
1512 template<
class ...Args>
1515 const std::vector<csl::Index>& indices,\
1518 return (**
this)(polar, indices, std::forward<Args>(args)...);
1531 template<
class ...Args>
1534 std::initializer_list<int> indices,\
1537 return (**
this)(polar, indices, std::forward<Args>(args)...);
1550 template<
class ...Args>
1553 std::initializer_list<csl::Index> indices,\
1556 return (**
this)(polar, indices, std::forward<Args>(args)...);
1568 template<
class ...Args>
1573 return (**
this)(indices, std::forward<Args>(args)...);
1585 template<
class ...Args>
1590 return (**
this)(indices, std::forward<Args>(args)...);
1627 bool particle =
true;
1636 bool external =
false;
1638 bool onShell =
false;
1648 bool incoming =
true;
1707 const std::vector<csl::Index>& indices);
1722 template<
typename ...Args>
1778 auto getGaugeIrrep()
const {
1780 return (conjugated) ? rep.getConjugatedRep() : rep;
1782 auto getFlavorIrrep()
const {
1783 auto rep = getQuantumParent()->getFlavorIrrep();
1786 template<
class GroupType>
1787 auto getGroupIrrep(GroupType &&group)
const {
1788 auto rep = getQuantumParent()->getGroupIrrep(std::forward<GroupType>(group));
1789 return (conjugated) ? rep.getConjugatedRep() : rep;
1791 template<
class FlavorGroupType>
1792 auto getFlavorIrrep(FlavorGroupType &&group)
const {
1793 auto rep = getQuantumParent()->getFlavorIrrep(std::forward<FlavorGroupType>(group));
1801 int getSpinDimension()
const;
1830 bool isChiral()
const;
1860 bool isGaugeBoson()
const;
1881 bool getConjugated()
const;
1889 bool isExternal()
const;
1891 bool isOnShell()
const;
1898 bool isBosonic()
const;
1905 bool isFermionic()
const;
1912 bool isAntiCommuting()
const;
1919 bool isSelfConjugate()
const;
1921 bool isReal()
const override;
1932 bool isPhysical()
const;
1940 bool isContractibleWith(
const QuantumField& other)
const;
1954 bool isExactlyContractiblewith(
const QuantumField& other)
const;
1972 bool hasDerivative()
const;
2010 bool ruleMode =
false,
2022 csl::Expr contraction(csl::Expr_info other)
const override;
2024 virtual csl::Expr matrixChargeConjugation(csl::Expr_info other)
const;
2031 std::optional<csl::Expr> getComplexConjugate()
const override;
2048 void setExternal(
bool t_external);
2050 void setOnShell(
bool t_onShell);
2058 virtual void setIncoming(
bool t_incoming);
2066 virtual void setParticle(
bool t_particle);
2068 void setPartnerShip(
PartnerShip const &t_partnerShip) {
2069 partnerShip = t_partnerShip;
2085 bool getCommutable()
const override;
2102 bool commutesWith(csl::Expr_info other,
int sign=-1)
const override;
2112 bool hasContractionProperty(csl::Expr_info expr)
const override;
2118 csl::unique_Expr copy_unique()
const override;
2125 bool isIndexed()
const override;
2138 bool operator==(csl::Expr_info other)
const override;
2157 bool compareWithDummy(csl::Expr_info other,
2158 std::map<csl::Index, csl::Index>& constraints,
2159 bool keepAllCosntraints =
false)
const override;
2195 bool isParticle()
const;
2204 bool isIncoming()
const;
2213 bool isIncomingParticle()
const;
2222 bool isOutgoingParticle()
const;
2231 bool isIncomingAntiParticle()
const;
2240 bool isOutgoingAntiParticle()
const;
2243 template<
class Func>
2244 void QuantumFieldParent::applyToRelatives(Func &&func) {
2246 for (
auto &rel : relatives) {
2248 auto shared = rel.lock();
2249 auto self = shared->removeRelative(
this);
2252 shared->addRelative(
self);
2263 template<
typename ...Args>
2266 auto field = csl::make_shared<QuantumField>(std::forward<Args>(args)...);
2267 field->getCanonicalPermutation();
2290 const std::vector<csl::Tensor>& impulsions,
Definition: gaugedGroup.h:194
Contains the QuantumNumber class.
Particle getParticle() const
Returns a mty::Particle, pointer to the parent of the field.
Definition: quantumField.h:1774
std::function< csl::Expr(QuantumField const &, QuantumField const &, csl::Tensor &, bool)> Propagator_func
Type definition. A Propagator_func is a function called to get the propagator result of the contracti...
Definition: quantumField.h:188
size_t firstGaugeIndex
Position of the first gauge index, after flavor indices.
Definition: quantumField.h:271
std::ostream & operator<<(std::ostream &fout, csl::Type type)
This class inherits from std::shared_ptr<QuantumFieldParent> and should be used instead of direct Qua...
Definition: quantumField.h:1409
Namespace of MARTY.
Definition: 2HDM.h:31
csl::Expr operator()(const std::vector< csl::Index > &indices, Args &&...args)
Delegates the arguments to QuantumFieldParent::operator()() of the managed object.
Definition: quantumField.h:1570
size_t firstSpaceIndex
Position of the first space index, after flavor and gauge indices.
Definition: quantumField.h:276
csl::Expr operator()(std::initializer_list< csl::Index > indices, Args &&...args)
Delegates the arguments to QuantumFieldParent::operator()() of the managed object.
Definition: quantumField.h:1587
class mty::AbstractGroup Group
Abstract base class for groups.
constexpr auto names
Names for topologies.
Definition: topology.h:72
csl::Expr quantumfield_s(Args &&...args)
Creates and returns an expression corresponding to a QuantumField.
Definition: quantumField.h:2264
QuantumFieldParent * getQuantumParent() const
Returns a pointer to the QuantumFieldParent of the field.
Definition: quantumField.h:1761
This class represents quantum numbers of a theory, like for example baryon number B...
Definition: quantumNumber.h:44
Chirality
Chirality for fermions. Either Left or Right for WeylFermion, or None for DiracFermion.
Definition: quantumField.h:40
csl::Expr operator()(const csl::Index &polar, const std::vector< csl::Index > &indices, Args &&...args)
Delegates the arguments to QuantumFieldParent::operator()() of the managed object.
Definition: quantumField.h:1514
Implementation of vector bosons in AMRTY.
Definition: vectorField.h:164
Goldstone boson class.
Definition: goldstoneField.h:39
csl::Expr operator()(const csl::Index &polar, std::initializer_list< csl::Index > indices, Args &&...args)
Delegates the arguments to QuantumFieldParent::operator()() of the managed object.
Definition: quantumField.h:1552
int Value
Integer type for quantum number value.
Definition: quantumNumber.h:55
csl::Expr operator()(Args &&...args)
Delegates the arguments to QuantumFieldParent::operator()() of the managed object.
Definition: quantumField.h:1425
GaugeIrrep irrep
Representation of the field in the gauge gauge.
Definition: quantumField.h:260
Field strength object in MARTY.
Definition: vectorField.h:389
std::map< QuantumNumber::ID, QuantumNumber::Value > qNumbers
List of quantum numbers of the field.
Definition: quantumField.h:295
Chirality operator!(Chirality init)
Returns the inverse chirality with respect to init.
Definition: quantumField.cpp:32
Class deriving from csl::TensorFieldElement, may enter expressions. In contrary to QuantumFieldParent...
Definition: quantumField.h:1614
FlavorIrrep flavorRep
Representation of the field in the flavor flavor.
Definition: quantumField.h:286
csl::Expr operator()(const std::vector< int > &indices, Args &&...args)
Delegates the arguments to QuantumFieldParent::operator()() of the managed object.
Definition: quantumField.h:1460
Definition: gaugedGroup.h:100
Weyl fermion, two-component Chiral particle.
Definition: fermionicField.h:41
bool operator==(const Expr &a, const Expr &b)
csl::Expr operator()(std::initializer_list< int > indices, Args &&...args)
Delegates the arguments to QuantumFieldParent::operator()() of the managed object.
Definition: quantumField.h:1477
const Flavor * flavor
Pointer to the flavor the particle is a representation of.
Definition: quantumField.h:281
csl::Tensor defaultSpaceTimePoint
Default space-time point when not given while defining a QuantumField.
Definition: quantumField.h:86
Structure containing data about fermion ordering.
Definition: quantumField.h:120
Handles the irreducible representation of a given semi-simple algebra.
Definition: representation.h:42
Gauge * gauge
Pointer to the gauge the particle is a representation of.
Definition: quantumField.h:255
Ghost boson, created with the vector bosons in non abelian gauge groups.
Definition: ghostField.h:41
Type
Different types of gauge ficing parameter for gauge boson propagators.
Definition: gaugedGroup.h:92
bool bosonic
True if the field is bosonic.
Definition: quantumField.h:195
void AddCustomPropagator(QuantumFieldParent *left, QuantumFieldParent *right, QuantumFieldParent::Propagator_func propagator)
Definition: quantumField.cpp:1648
Group * stGroup
Pointer to the space-time group. For know it is the Lorentz group, algebra.
Definition: quantumField.h:244
Irrep spin
Spin representation in stGroup. To have a number corresponding to the spin, see getSpinDimension().
Definition: quantumField.h:250
csl::Expr getMomentumSum(const std::vector< QuantumField > &insertions, const std::vector< csl::Tensor > &impulsions, const csl::Index &index)
Creates and returns the sum of momentums in a process, taking into account incoming or outgoing parti...
Definition: quantumField.cpp:1676
csl::Expr operator()(const csl::Index &polar, const std::vector< int > &indices, Args &&...args)
Delegates the arguments to QuantumFieldParent::operator()() of the managed object.
Definition: quantumField.h:1495
Base class for parents of QuantumField objects.
Definition: quantumField.h:152
Dirac or Majorana fermion in MARTY.
Definition: fermionicField.h:159
std::map< QuantumFieldParent const *, Propagator_func > propagator
Contains all propagators for the field with other.
Definition: quantumField.h:305
GaugeIrrep getGaugeIrrep() const
Returns the gauge representation containing all individual group representations of the field in the ...
Definition: quantumField.cpp:590
csl::Expr operator()(const csl::Index &polar, const csl::Index &index, Args &&...args)
Delegates the arguments to QuantumFieldParent::operator()() of the managed object.
Definition: quantumField.h:1442
bool operator<(const Expr &a, const Expr &b)
bool operator!=(const Expr &a, const Expr &b)
Gauge boson implementation in MARTY.
Definition: vectorField.h:343
csl::Expr operator()(const csl::Index &polar, std::initializer_list< int > indices, Args &&...args)
Delegates the arguments to QuantumFieldParent::operator()() of the managed object.
Definition: quantumField.h:1533
Contains macros for doc brown's debugger.
Scalar boson, spin 0 particles in MARTY.
Definition: scalarField.h:35