The class ModelData contains all the necessary features to store and manipulate the content of a model. No model building (symmetry breaking, replacements etc) or computation are implemented in it. More...
#include <modelData.h>
Public Member Functions | |
| ModelData () | |
| Default constructor. More... | |
| ModelData (std::unique_ptr< Gauge > &&t_gauge) | |
| Constructor with one parameter. More... | |
| ModelData (std::unique_ptr< Gauge > &&t_gauge, std::unique_ptr< Flavor > &&t_flavor) | |
| Constructor with 2 parameters. More... | |
| ModelData (std::unique_ptr< Gauge > &&t_gauge, std::unique_ptr< Flavor > &&t_flavor, std::vector< Particle > &t_particles) | |
| Constructor with 3 parameters. More... | |
| ModelData (std::string const &nameFile) | |
| Creates a model from a model file (.json). More... | |
| virtual | ~ModelData () |
| Destructor. | |
| ModelData (ModelData &&other)=default | |
| Defaulted move constructor. | |
| ModelData & | operator= (ModelData &&other)=default |
| Defaulted move assignement operator. | |
| ModelData (ModelData const &other)=delete | |
| Defaulted copy constructor. | |
| ModelData & | operator= (ModelData const &other)=delete |
| Defaulted copy assignement operator. | |
| void | init (bool initGaugeTerms=true) |
| Initializes the gauge once and for all. This function must be called after finishing the gauge, and before adding matter particles. Calling the constructors that take an already built gauge, this function is called automatically. Otherwise you have to call it. More... | |
| void | checkHermiticity () |
| Checks the hermiticity of the Lagrangian, i.e. checks if \( \mathcal{L}^\dagger = \mathcal{L} \). More... | |
| virtual void | saveModel (std::ostream &out, int indent=4) |
| void | saveModelFunction (std::string_view name, std::ostream &out, int indent=0) |
| void | saveModelFunctionWithRef (std::string_view name, std::ostream &out, int indent=0) |
| void | saveModelFile (std::string_view name, std::string const &fileName) |
| Lagrangian const & | getLagrangian () const |
| Returns a const reference to the Lagrangian. More... | |
| bool | isEnableChecks () const |
| void | setEnableChecks (bool t_enable) |
| Sets enableChecks. More... | |
| csl::Space const * | getSpaceTime () const |
| Returns a pointer to the space time of the mode (csl::Space). More... | |
| mty::Gauge * | getGauge () const |
| Returns a pointer to the model's gauge. More... | |
| mty::Flavor * | getFlavor () const |
| Returns a pointer to the model's flavor. More... | |
| std::vector< mty::Particle > const & | getParticles () const |
| Returns a const reference to the model's particles. More... | |
| std::vector< mty::Particle > | getPhysicalParticles (std::function< bool(mty::Particle)> const &predicate=[](mty::Particle) { return true;}) const |
| Returns a list of the physical particles in a model. More... | |
| std::vector< mty::QuantumNumber > const & | getQuantumNumbers () const |
| Returns the list of quantum numbers. More... | |
| std::vector< mty::QuantumNumber > & | getQuantumNumbers () |
| Returns the list of quantum numbers. More... | |
| std::vector< csl::Expr > const & | getScalarCouplings () const |
| Returns the scalar couplings (gauge coupling typically) of the model. More... | |
| std::vector< csl::Tensor > const & | getTensorCouplings () const |
| Returns the tensor couplings (Yukawa coupling typically) of the model. More... | |
| void | setSpaceTime (csl::Space const *t_spaceTime) |
| Sets the space time of the model. More... | |
| void | setGauge (std::unique_ptr< mty::Gauge > &&t_gauge) |
| Sets the gauge of the model. More... | |
| void | addGaugedGroup (group::Type type, std::string_view name, int dim, csl::Expr const &coupling=nullptr) |
| Adds a gauge group to the model. More... | |
| void | addGaugedGroup (group::Type type, std::string_view name, csl::Expr const &coupling=nullptr) |
| Adds a gauge group to the model. More... | |
| void | addFlavorGroup (std::string_view name, int nFlavor, bool complexFields=true) |
| Adds a flavor group to the model. More... | |
| void | setFlavor (std::unique_ptr< mty::Flavor > &&t_flavor) |
| Sets the flavor of the model. More... | |
| void | addParticle (mty::Particle const &part, bool initializeTerms=true) |
| Adds a particle to the model. More... | |
| void | addParticles (std::vector< mty::Particle > const &parts, bool initializeTerms=true) |
| Adds a list of particles to the model. More... | |
| void | addParticlesIn (csl::Expr const &expr) |
| void | removeParticle (mty::Particle const &part) |
| Removes a particle from the model. More... | |
| void | removeParticles (std::vector< mty::Particle > const &parts) |
| Removes particles from the model. More... | |
| void | removeParticle (std::string const &part) |
| Removes a particle from the model. More... | |
| void | removeParticles (std::vector< std::string > const &parts) |
| Removes particles from the model. More... | |
| void | addScalarCoupling (std::string_view t_name) |
| Adds a scalar coupling constant in the model. More... | |
| void | addScalarCoupling (csl::Expr const &coupling) |
| Adds a scalar coupling constant in the model. More... | |
| void | addTensorCoupling (csl::Parent const &tensorCoupling) |
| Adds a tensor coupling constant in the model. More... | |
| void | addQuantumNumber (std::string_view name, std::vector< mty::Particle > const &fields, std::vector< int > const &values, bool conserved=true) |
| Adds a new quantum number to a model, giving eigenvalues for particles also. More... | |
| template<class FieldType > | |
| void | addQuantumNumber (std::string_view name, std::vector< FieldType > const &fields, std::vector< int > const &values, bool conserved=true) |
| Adds a new quantum number to a model, giving eigenvalues for particles also. More... | |
| template<class FieldType > | |
| void | addQuantumNumber (std::string_view name, std::initializer_list< FieldType > fields, std::vector< int > const &values, bool conserved=true) |
| Adds a new quantum number to a model, giving eigenvalues for particles also. More... | |
| void | setQuantumNumbers (std::vector< mty::QuantumNumber > const &numbers) |
| Sets the quantum numbers of the model. More... | |
| bool | findParticle (std::string_view t_name) const |
| Searches a particle in the model. More... | |
| bool | findParticle (mty::Particle const &part) const |
| Searches a particle in the model. More... | |
| bool | findParticle (mty::QuantumFieldParent const *part) const |
| Searches a particle in the model. More... | |
| bool | findScalarCoupling (std::string_view t_name) const |
| Searches a scalar coupling in the model. More... | |
| bool | findScalarCoupling (csl::Expr const &coupling) const |
| Searches a scalar coupling in the model. More... | |
| bool | findTensorCoupling (std::string_view t_name) const |
| Searches a tensor coupling in the model. More... | |
| bool | findTensorCoupling (csl::Parent const &coupling) const |
| Searches a tensor coupling in the model. More... | |
| bool | findTensorCoupling (csl::AbstractParent const *coupling) const |
| Searches a tensor coupling in the model. More... | |
| mty::Group const * | getGroup (std::string_view t_name) const |
| Returns a Group (pointer to const) given its name. More... | |
| mty::Group * | getGroup (std::string_view t_name) |
| Returns a Group (pointer) given its name. More... | |
| mty::Group const * | getGroup (mty::FlavorGroup const *flavGroup) const |
| Returns a Group (pointer to const) given its flavor group. More... | |
| mty::Group * | getGroup (mty::FlavorGroup const *flavGroup) |
| Returns a Group (pointer to const) given its flavor group. More... | |
| mty::GaugedGroup const * | getGaugedGroup (std::string_view t_name) const |
| Returns a GaugedGroup (pointer to const) given its name. More... | |
| mty::GaugedGroup * | getGaugedGroup (std::string_view t_name) |
| Returns a GaugedGroup (pointer) given its name. More... | |
| mty::FlavorGroup const * | getFlavorGroup (std::string_view t_name) const |
| Returns a FlavorGroup (pointer) given its name. More... | |
| mty::FlavorGroup * | getFlavorGroup (std::string_view t_name) |
| Returns a FlavorGroup (pointer) given its name. More... | |
| std::vector< mty::Particle > | getParticles (std::initializer_list< std::string_view > names) const |
| mty::Particle | getParticle (std::string_view t_name) const |
| Returns a particle in the model given a name. More... | |
| mty::Particle | getParticle (mty::QuantumFieldParent const *field) const |
| Returns a particle in the model given a pointer to QuantumFieldParent. More... | |
| mty::Particle | getParticle (mty::QuantumFieldParent const &field) const |
| Returns a particle in the model given a QuantumFieldParent. More... | |
| mty::Particle | getParticle (mty::QuantumField const &field) const |
| Returns a particle in the model given a QuantumField. More... | |
| mty::Particle | getParticle (csl::Expr const &field) const |
| Returns a particle in the model given an expression. More... | |
| csl::Expr | getScalarCoupling (std::string_view t_name) const |
| Returns a scalar coupling given its name. More... | |
| csl::Tensor | getTensorCoupling (std::string_view t_name) const |
| Returns a tensor coupling given its name. More... | |
| csl::Tensor | getTensorCoupling (csl::Parent const &t_coupling) const |
| Returns a tensor coupling. More... | |
| template<class FieldType > | |
| mty::GaugeIrrep | getGaugeIrrep (FieldType &&field) const |
| Returns the gauge representation of a field. More... | |
| template<class GroupType , class FieldType > | |
| mty::Irrep | getGroupIrrep (FieldType &&field, GroupType &&group) const |
| Returns the group representation of a field. More... | |
| template<class GroupType , class FieldType > | |
| csl::Expr | getCharge (FieldType &&field, GroupType &&group) const |
| Returns the charge representation of a field in a U(1) group. More... | |
| template<class FieldType > | |
| mty::FlavorIrrep | getFlavorIrrep (FieldType &&field) const |
| Returns the flavor representation of a field. More... | |
| template<class FlavorType , class FieldType > | |
| mty::Irrep | getFlavorIrrep (FieldType &&field, FlavorType &&flavor) const |
| Returns the flavor group representation of a field. More... | |
| template<class GroupType , class FieldType > | |
| csl::Space const * | getVectorSpace (GroupType &&group, FieldType &&field) const |
| Returns the vector space coresponding to the representation of a field in a given group. More... | |
| template<class GroupType , class FieldType > | |
| csl::Index | generateIndex (GroupType &&group, FieldType &&field) const |
| Returns an index coresponding to the representation of a field in a given group. More... | |
| template<class GroupType > | |
| csl::Index | generateIndex (GroupType &&group) const |
| Returns an index coresponding to the fundamental representation in a given group. More... | |
| template<class GroupType , class FieldType > | |
| std::vector< csl::Index > | generateIndices (size_t nIndices, GroupType &&group, FieldType &&field) const |
| Returns indices coresponding to the representation of a field in a given group. More... | |
| template<class GroupType > | |
| std::vector< csl::Index > | generateIndices (size_t nIndices, GroupType &&group) const |
| Returns indices coresponding to the fundamental representation in a given group. More... | |
| template<class GroupType , class FieldType > | |
| csl::Index | generateIndex (std::string_view nameIndex, GroupType &&group, FieldType &&field) const |
| Returns an index coresponding to the representation of a field in a given group. More... | |
| template<class GroupType , class FieldType > | |
| mty::Generator | getGenerator (GroupType &&group, FieldType &&field) const |
| Returns the generator coresponding to the representation of a field in a given group. More... | |
| mty::QuantumNumber const & | getQuantumNumber (std::string_view name) const |
| Returns a quantum number (const reference) given its name. More... | |
| mty::QuantumNumber & | getQuantumNumber (std::string_view name) |
| Returns a quantum number (reference) given its name. More... | |
| void | checkValidity (mty::Particle const &part) const |
| Checks the validity of a particle when adding it to the model. More... | |
| void | checkValidity (mty::Lagrangian::TermType const &term) const |
| Checks the validity of a term when adding it to the Lagrangian. More... | |
| void | addLagrangianTerm (csl::Expr const &term, bool addHermitic=false) |
| Adds a lagrangian term to the model. More... | |
| void | addLagrangianTerm (mty::Lagrangian::TermType const &term, bool addHermitic=false) |
| Adds a lagrangian term to the model. More... | |
| template<class FieldType > | |
| void | addBosonicMass (FieldType &&field, std::string_view mass) |
| Adds a bosonic mass term to the model. More... | |
| template<class FieldType > | |
| void | addBosonicMass (FieldType &&field, csl::Expr const &mass) |
| Adds a bosonic mass term to the model. More... | |
| template<class FieldType1 , class FieldType2 > | |
| void | addFermionicMass (FieldType1 &&left, FieldType2 &&right, std::string_view mass) |
| Adds a fermionic mass to the model. More... | |
| template<class FieldType1 , class FieldType2 > | |
| void | addFermionicMass (FieldType1 &&left, FieldType2 &&right, csl::Expr const &mass) |
| Adds a fermionic mass to the model. More... | |
| template<class FieldType > | |
| void | addFermionicMass (FieldType &&diracFermion, std::string_view mass) |
| Adds a fermionic mass to the model. More... | |
| template<class FieldType > | |
| void | addFermionicMass (FieldType &&diracFermion, csl::Expr const &mass) |
| Adds a fermionic mass to the model. More... | |
| template<class FieldType > | |
| void | renameParticle (FieldType &&field, std::string_view newName) |
| Renames a particle of the model. More... | |
| void | renameCoupling (std::string_view name, std::string_view newName) |
| Renames a (scalar or tensor) coupling of the model. More... | |
| void | printSubPart (std::vector< std::string > const &particles, std::ostream &out=std::cout) const |
| Prints a sub part of the Lagrangian including some particles. More... | |
| void | printSubPart (std::initializer_list< std::string > particles, std::ostream &out=std::cout) const |
| Prints a sub part of the Lagrangian including some particles. More... | |
| void | printSubPart (std::string const &particle, std::ostream &out=std::cout) const |
| Prints a sub part of the Lagrangian including some particles. More... | |
Static Public Attributes | |
| static size_t | nMomentums = 10 |
| Number of momenta instantiated for the model (10). With 5 maximum external legs, this is fairly safe. | |
| static csl::Space const * | defaultSpaceTime = &csl::Minkowski |
| Default space-time for the model's particles. There is actually no support for another space that csl::Minkowski yet. | |
| static int | defaultQuantumNumber = 1 |
| Default quantum number for particles when not given. More... | |
Protected Member Functions | |
| void | initGaugedGroups (bool initGaugeTerms=true) |
| Initializes gauge terms (gauge bosons, ghosts) and fixes the gauge. More... | |
| void | writeHeader (std::ostream &out, int indentSize, std::vector< csl::Parent > &defined) |
| void | writeGauge (std::ostream &out, int indentSize, std::vector< csl::Parent > &defined) |
| void | writeFlavor (std::ostream &out, int indentSize, std::vector< csl::Parent > &defined) |
| void | writeMassAndWidth (std::ostream &out, int indentSize, std::vector< csl::Parent > &defined) |
| void | writeParticles (std::ostream &out, int indentSize, std::vector< csl::Parent > &defined) |
| void | writeDependencies (std::ostream &out, int indentSize, std::vector< csl::Parent > &defined, std::vector< csl::Expr > &kinetic, std::vector< csl::Expr > &mass, std::vector< csl::Expr > &interac) |
| void | writeLagrangian (std::ostream &out, int indentSize, std::vector< csl::Expr > const &kinetic, std::vector< csl::Expr > const &mass, std::vector< csl::Expr > const &interac) |
| mty::GaugeIrrep | doGetGaugeIrrep (mty::Particle const &part) const |
| Actually returns the gauge representation of a particle. More... | |
| mty::Irrep | doGetGroupIrrep (mty::Particle const &part, mty::Group const *group) const |
| Actually returns the group representation of a particle. More... | |
| csl::Expr | doGetCharge (mty::Particle const &particle, mty::Group const *group) const |
| Actually returns the charge representation of a particle for a U(1) group. More... | |
| mty::FlavorIrrep | doGetFlavorIrrep (mty::Particle const &part) const |
| Actually returns the flavor representation of a particle. More... | |
| mty::Irrep | doGetFlavorIrrep (mty::Particle const &part, mty::Group const *flavor) const |
| Actually returns the flavor group representation of a particle. More... | |
| csl::Space const * | doGetVectorSpace (mty::Group const *group, mty::Particle const &irrep) const |
| Actually returns the vector space corresponding to a particle's representation. More... | |
| csl::Space const * | doGetVectorSpace (mty::FlavorGroup const *group, mty::Particle const &irrep) const |
| Actually returns the vector space corresponding to a particle's representation. More... | |
| csl::Index | doGenerateIndex (mty::Group const *group, mty::Particle const &fieldRep) const |
| Actually returns a csl::Index corresponding to a particle's representation. More... | |
| csl::Index | doGenerateIndex (mty::Group const *group) const |
| Actually returns a csl::Index corresponding to the fundamental representation of a given group. More... | |
| csl::Index | doGenerateIndex (std::string_view nameIndex, mty::Group const *group, mty::Particle const &fieldRep) const |
| Actually returns a csl::Index corresponding to a particle's representation. More... | |
| mty::Generator | doGetGenerator (mty::Group const *group, mty::Particle const &fieldRep) const |
| Actually returns a generator corresponding to a particle's representation. More... | |
| void | doAddBosonicMass (mty::Particle const &particle, std::string_view mass) |
| void | doAddBosonicMass (mty::Particle const &particle, csl::Expr const &mass) |
| void | doAddFermionicMass (mty::Particle const &left, mty::Particle const &right, std::string_view mass) |
| void | doAddFermionicMass (mty::Particle const &left, mty::Particle const &right, csl::Expr const &mass) |
| void | doAddFermionicMass (mty::Particle const &diracFermion, std::string_view mass) |
| void | doAddFermionicMass (mty::Particle const &diracFermion, csl::Expr const &mass) |
| void | doRenameParticle (mty::Particle const &part, std::string_view newName) |
| Actually renames a particle. More... | |
Protected Attributes | |
| mty::Lagrangian | L |
| Lagrangian of the model. More... | |
| csl::Space const * | spaceTime |
| Space time for the model. More... | |
| std::unique_ptr< mty::Gauge > | gauge |
| Gauge of the model. | |
| std::unique_ptr< mty::Flavor > | flavor |
| Flavor of the model. | |
| std::vector< mty::Particle > | particles |
| Particle content (including gauge bosons, ghosts etc) of the model. More... | |
| std::vector< mty::QuantumNumber > | quantumNumbers |
| List of quantum numbers in the model. More... | |
| std::vector< csl::Expr > | scalarCouplings |
| Lists of scalar couplings of the model. More... | |
| std::vector< csl::Tensor > | tensorCouplings |
| List of tensor couplings of the model. More... | |
| bool | gaugeLocked = false |
| Boolean that tells if the gauge model is initilialized. More... | |
| bool | enableChecks = true |
| Boolean telling if checks must be done with lagrangian terms added to the model (gauge representation, dispatching ...) More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &out, ModelData const &model) |
| Prints the model. More... | |
The class ModelData contains all the necessary features to store and manipulate the content of a model. No model building (symmetry breaking, replacements etc) or computation are implemented in it.
This class contains the Lagrangian of the theory (all interaction, kinetic, and mass terms), the gauge, flavor symmetries, particles, quantum numbers, couplings, and momenta. It is really a container, owner of all the cited objects. In particular, deleting the ModelData will automatically delete the lagrangian, gauge, flavor. Particles are under shared ownership, so will be deleted only if there is no other reference to it in the program. Beware however than even particles cannot be used if the model is deleted as they will refer to a non-existing gauge / flavor.
| mty::ModelData::ModelData | ( | ) |
Default constructor.
Instantiates a null flavor, and an empty gauge. This is a valid state and you can add gauge groups through addGaugedGroup().
|
explicit |
Constructor with one parameter.
Instantiates a null flavor, and the gauge to t_gauge. Calling this constructor, the gauge you give to the model is no longer valid as the unique ownership is transfered to it. Using this constructor, the gauge is taken as is, and the model is initialized. It is in particular not possible to add gauged groups afterwards. If you want to add gauge groups through the addGaugedGroup() function, consider using the default constructor. Here is a code snippet that show how to use this constructor.
| mty::ModelData::ModelData | ( | std::unique_ptr< Gauge > && | t_gauge, |
| std::unique_ptr< Flavor > && | t_flavor | ||
| ) |
Constructor with 2 parameters.
Instantiates the model with a gauge and a flavor. See the constructor with one parameter for more information. The constructor simply instantiates the flavor with t_flavor. Here is a code snippet that show how to use this constructor.
| mty::ModelData::ModelData | ( | std::unique_ptr< Gauge > && | t_gauge, |
| std::unique_ptr< Flavor > && | t_flavor, | ||
| std::vector< Particle > & | t_particles | ||
| ) |
Constructor with 3 parameters.
Instantiates the model with a gauge, a flavor and a set of particles. See the constructor with two parameters for more information. The constructor simply adds particles. Those particles must have been created with the corresponding gauge and flavor. Covariant derivative and mass terms for the particles are added automatically. Here is a code snippet that show how to use this constructor.
| mty::ModelData::ModelData | ( | std::string const & | nameFile | ) |
Creates a model from a model file (.json).
| void mty::ModelData::addBosonicMass | ( | FieldType && | field, |
| std::string_view | mass | ||
| ) |
Adds a bosonic mass term to the model.
A bosonic mass term for a field \( \phi \) of mass \( m \) is of the form
\[ \mathcal{L}_M \ni \pm \eta m^2 \phi ^\dagger \phi \]
, with \( \eta = 1/2 \) if \( \phi ^\dagger = \phi\), \( \eta = 1 \) otherwise. For spin 1 particles, the sign is positive, and negative for spin 0 particles.
| FieldType | mty::Particle or any valid type for the getParticle() function. |
| field | Field in the mass term (must be bosonic). |
| mass | Name of the mass to add. |
| void mty::ModelData::addBosonicMass | ( | FieldType && | field, |
| csl::Expr const & | mass | ||
| ) |
Adds a bosonic mass term to the model.
A bosonic mass term for a field \( \phi \) of mass \( m \) is of the form
\[ \mathcal{L}_M \ni \pm \eta m^2 \phi ^\dagger \phi \]
, with \( \eta = 1/2 \) if \( \phi ^\dagger = \phi\), \( \eta = 1 \) otherwise. For spin 1 particles, the sign is positive, and negative for spin 0 particles. After the function call, the mass of the boson is set to the given mass \( m \), and any other mass term with $$$$ is suppressed.
| FieldType | mty::Particle or any valid type for the getParticle() function. |
| field | Field in the mass term (must be bosonic). |
| mass | Mass to add (must be scalar). |
| void mty::ModelData::addFermionicMass | ( | FieldType1 && | left, |
| FieldType2 && | right, | ||
| std::string_view | mass | ||
| ) |
Adds a fermionic mass to the model.
This function adds a Weyl mass term for left and right. Considering two Weyl fermions \( \psi _L \) and \( \psi _R \), the mass term reads
\[ m\left(\psi _L^\dagger \psi _R + \psi _R^\dagger \psi _L\right). \]
After the function call, the mass of the two weyl fermions is set to the given mass \( m \), and any other mass term with \( \psi_ L \) or \( \psi _R \) is suppressed.
| FieldType1 | mty::Particle or any valid type for the getParticle() function. |
| FieldType2 | mty::Particle or any valid type for the getParticle() function. |
| left | Left-handed Weyl fermion. |
| right | Right-handed Weyl fermion. |
| mass | Name of the mass for the fermion. |
| void mty::ModelData::addFermionicMass | ( | FieldType1 && | left, |
| FieldType2 && | right, | ||
| csl::Expr const & | mass | ||
| ) |
Adds a fermionic mass to the model.
This function adds a Weyl mass term for left and right. Considering two Weyl fermions \( \psi _L \) and \( \psi _R \), the mass term reads
\[ m\left(\psi _L^\dagger \psi _R + \psi _R^\dagger \psi _L\right). \]
After the function call, the mass of the two weyl fermions is set to the given mass \( m \), and any other mass term with \( \psi_ L \) or \( \psi _R \) is suppressed.
| FieldType1 | mty::Particle or any valid type for the getParticle() function. |
| FieldType2 | mty::Particle or any valid type for the getParticle() function. |
| left | Left-handed Weyl fermion. |
| right | Right-handed Weyl fermion. |
| mass | Mass for the fermion. |
| void mty::ModelData::addFermionicMass | ( | FieldType && | diracFermion, |
| std::string_view | mass | ||
| ) |
Adds a fermionic mass to the model.
This function adds a simple fermionic mass term for a particle, actually similar to a bosonic mass term replacing \( \phi ^* \) by ${}$. See addBosonicMass() for more details.
| FieldType | mty::Particle or any valid type for the getParticle() function. |
| diracFermion | Dirac fermion. |
| mass | Name of the mass for the fermion. |
| void mty::ModelData::addFermionicMass | ( | FieldType && | diracFermion, |
| csl::Expr const & | mass | ||
| ) |
Adds a fermionic mass to the model.
This function adds a simple fermionic mass term for a particle, actually similar to a bosonic mass term replacing \( \phi ^\dagger \) by ${}$. See addBosonicMass() for more details.
| FieldType | mty::Particle or any valid type for the getParticle() function. |
| diracFermion | Dirac fermion. |
| mass | Mass for the fermion. |
| void mty::ModelData::addFlavorGroup | ( | std::string_view | name, |
| int | nFlavor, | ||
| bool | complexFields = true |
||
| ) |
Adds a flavor group to the model.
For now, only SU(N) and SO(N) fundamental representations are enabled for flavor symmetries. For a flavor symmetry between N complex fields, The fundamental representation of SU(N) is created. For real fields, the fundamental representation of SO(N) is created.
| name | Name of the flavor group |
| nFlavor | Number of flavors |
| complexFields | Boolean (default = true) that tells if the fields are complex (SU(N) flavor) or not (SO(N) flavor). |
| void mty::ModelData::addGaugedGroup | ( | group::Type | type, |
| std::string_view | name, | ||
| int | dim, | ||
| csl::Expr const & | coupling = nullptr |
||
| ) |
Adds a gauge group to the model.
This function allow to add a gauged group to the model, before initializing it (see init()) and adding matter particles. Given the type, the name, the dimension and (optionnaly) a coupling constant, the corresponding group, gauge boson, ghosts are created.
| type | Type of the gauged group |
| name | Name of the group |
| dim | Dimension of the group (3 for SU(3) etc) |
| coupling | Coupling constant (optional) |
| void mty::ModelData::addGaugedGroup | ( | group::Type | type, |
| std::string_view | name, | ||
| csl::Expr const & | coupling = nullptr |
||
| ) |
Adds a gauge group to the model.
This function allow to add a gauged group to the model, before initializing it (see init()) and adding matter particles. Given the type, the name, and (optionnaly) a coupling constant, the corresponding group, gauge boson, ghosts are created. Here the dimension is not given. This function must then be used only for U(1), and exceptional algebras.
| type | Type of the gauged group |
| name | Name of the group |
| coupling | Coupling constant (optional) |
| void mty::ModelData::addLagrangianTerm | ( | csl::Expr const & | term, |
| bool | addHermitic = false |
||
| ) |
Adds a lagrangian term to the model.
The term can be a kinetic, mass term, or interaction term. It must be of course gauge invariant (see checkValidity()), and have no free indices (scalar term). Setting addHermitic to true, to hermitian conjugate will be computed and added automatically. For example, you may have in a Lagrangian
\[ \mathcal{L}Â \ni \frac{g}{\sqrt{2}} \bar{u}W^+\cdot \gamma P_Ld + h.c, \]
(in that case the '+h.c' corresponds to addHermitic = true), or
\[ \mathcal{L} \ni \frac{2}{3}e\bar{u}A\cdot \gamma u, \]
that do not have an hermitian counter part.
| term | Lagrangian term to add |
| addHermitic | Boolean (default = false) that tells if the hermitian conjugate of the term must be also added |
| void mty::ModelData::addLagrangianTerm | ( | mty::Lagrangian::TermType const & | term, |
| bool | addHermitic = false |
||
| ) |
Adds a lagrangian term to the model.
The term can be a kinetic, mass term, or interaction term. It must be of course gauge invariant (see checkValidity()), and have no free indices (scalar term). Setting addHermitic to true, to hermitian conjugate will be computed and added automatically. For example, you may have in a Lagrangian
\[ \mathcal{L}Â \ni \frac{g}{\sqrt{2}} \bar{u}W^+\cdot \gamma P_Ld + h.c, \]
(in that case the '+h.c' corresponds to addHermitic = true), or
\[ \mathcal{L} \ni \frac{2}{3}e\bar{u}A\cdot \gamma u, \]
that do not have an hermitian counter part.
| term | Lagrangian term to add |
| addHermitic | Boolean (default = false) that tells if the hermitian conjugate of the term must be also added |
| void mty::ModelData::addParticle | ( | mty::Particle const & | part, |
| bool | initializeTerms = true |
||
| ) |
Adds a particle to the model.
When adding a particle, its gauge representation should be already set, and the model must be initialized (see init()). You can choose to let MARTY create kinetic (including covariant derivative) and mass terms (default) or disable all automatic interaction terms with the initializeTerms parameter.
| part | Particle to add to the model |
| initializeTerms | Boolean (default = true) that tells if kinetic and mass terms must be added automatically. |
| void mty::ModelData::addParticles | ( | std::vector< mty::Particle > const & | parts, |
| bool | initializeTerms = true |
||
| ) |
Adds a list of particles to the model.
When adding a particle, its gauge representation should be already set, and the model must be initialized (see init()). You can choose to let MARTY create kinetic (including covariant derivative) and mass terms (default) or disable all automatic interaction terms with the initializeTerms parameter.
| part | Particles to add to the model |
| initializeTerms | Boolean (default = true) that tells if kinetic and mass terms must be added automatically. |
| void mty::ModelData::addQuantumNumber | ( | std::string_view | name, |
| std::vector< mty::Particle > const & | fields, | ||
| std::vector< int > const & | values, | ||
| bool | conserved = true |
||
| ) |
Adds a new quantum number to a model, giving eigenvalues for particles also.
You must give a list of particles, and a list of eigenvalues. The list of eigenvalues may be empty: in this case, all eigenvalues are considered to be 1 by default. All particles not present in fields have 0 eigenvalue. Optionally, you may set conserved to false if you do not want this quantum number to interfere in calculations. Here is a code snippet that shows how to use this function, considering for example a quark q, and a lepton l (both of type mty::Particle).
| name | Name of the quantum number |
| fields | List of fields for which a non-trivial eigenvalue is defined |
| values | Eigenvalues for the fields (all 1 if the list is empty) |
| conserved | Boolean (default = true) that tells if the quantum number must be conserved in calculations. |
| void mty::ModelData::addQuantumNumber | ( | std::string_view | name, |
| std::vector< FieldType > const & | fields, | ||
| std::vector< int > const & | values, | ||
| bool | conserved = true |
||
| ) |
Adds a new quantum number to a model, giving eigenvalues for particles also.
You must give a list of particles, and a list of eigenvalues. The list of eigenvalues may be empty: in this case, all eigenvalues are considered to be 1 by default. All particles not present in fields have 0 eigenvalue. Optionally, you may set conserved to false if you do not want this quantum number to interfere in calculations. Here is a code snippet that shows how to use this function, considering for example a quark q, and a lepton l (both of type mty::Particle).
| FieldType | mty::Particle or any valid type for the getParticle() function |
| name | Name of the quantum number |
| fields | List of fields for which a non-trivial eigenvalue is defined |
| values | Eigenvalues for the fields (all 1 if the list is empty) |
| conserved | Boolean (default = true) that tells if the quantum number must be conserved in calculations. |
| void mty::ModelData::addQuantumNumber | ( | std::string_view | name, |
| std::initializer_list< FieldType > | fields, | ||
| std::vector< int > const & | values, | ||
| bool | conserved = true |
||
| ) |
Adds a new quantum number to a model, giving eigenvalues for particles also.
You must give a list of particles, and a list of eigenvalues. The list of eigenvalues may be empty: in this case, all eigenvalues are considered to be 1 by default. All particles not present in fields have 0 eigenvalue. Optionally, you may set conserved to false if you do not want this quantum number to interfere in calculations. Here is a code snippet that shows how to use this function, considering for example a quark q, and a lepton l (both of type mty::Particle).
| FieldType | mty::Particle or any valid type for the getParticle() function |
| name | Name of the quantum number |
| fields | List of fields for which a non-trivial eigenvalue is defined |
| values | Eigenvalues for the fields (all 1 if the list is empty) |
| conserved | Boolean (default = true) that tells if the quantum number must be conserved in calculations. |
| void mty::ModelData::addScalarCoupling | ( | std::string_view | t_name | ) |
Adds a scalar coupling constant in the model.
This function creates a csl::Constant named name and adds it to the list of coupling constants.
| t_name | Name for the coupling constant. |
| void mty::ModelData::addScalarCoupling | ( | csl::Expr const & | coupling | ) |
Adds a scalar coupling constant in the model.
This function adds coupling to the list of coupling constants.
| coupling | New coupling constant. |
| void mty::ModelData::addTensorCoupling | ( | csl::Parent const & | tensorCoupling | ) |
Adds a tensor coupling constant in the model.
This function adds tensorCoupling to the list of tensor coupling constants.
| tensorCoupling | New tensorial coupling constant. |
| void mty::ModelData::checkHermiticity | ( | ) |
Checks the hermiticity of the Lagrangian, i.e. checks if \( \mathcal{L}^\dagger = \mathcal{L} \).
If the Lagrangian is not hermitian, this function simply prints out the problematic terms. There is no check for integration by parts, so the Lagrangian may still be hermitic, this function simply does not automatically recognize this kind of patterns.
| void mty::ModelData::checkValidity | ( | mty::Particle const & | part | ) | const |
Checks the validity of a particle when adding it to the model.
This function checks if the gauge, flavor of the particle are the same as the ones defined in the model. If the particle is not valid, an error message is printed and the program stops.
| part | Particle to check |
| void mty::ModelData::checkValidity | ( | mty::Lagrangian::TermType const & | term | ) | const |
Checks the validity of a term when adding it to the Lagrangian.
This function simply computes the tensor product of the gauge representations of all particles in the interaction (taking conjugate representations for conjugate fields) and checks that the trivial gauge representation exists in the resulting decomposition. This represents a quick check of gauge invariance, even though the exact gauge invariance is not guaranteed at this point.
| term | Term to check |
|
protected |
Actually returns a csl::Index corresponding to a particle's representation.
| group | Group |
| fieldRep | Particle |
|
protected |
Actually returns a csl::Index corresponding to the fundamental representation of a given group.
| group | Group |
|
protected |
Actually returns a csl::Index corresponding to a particle's representation.
| name | Name of the index to generate |
| group | Group |
| fieldRep | Particle |
|
protected |
Actually returns the charge representation of a particle for a U(1) group.
| part | Particle from which we want the charge |
| group | U(1) Group |
|
protected |
Actually returns the flavor representation of a particle.
| part | Particle from which we want the representation. |
|
protected |
Actually returns the flavor group representation of a particle.
|
protected |
Actually returns the gauge representation of a particle.
| part | Particle from which we want the representation. |
|
protected |
Actually returns a generator corresponding to a particle's representation.
| group | Group |
| fieldRep | Particle |
|
protected |
Actually returns the group representation of a particle.
| part | Particle from which we want the representation |
| group | Group |
|
protected |
Actually returns the vector space corresponding to a particle's representation.
| group | Group |
| irrep | Particle |
|
protected |
Actually returns the vector space corresponding to a particle's representation.
|
protected |
Actually renames a particle.
| part | Particle to rename. |
| newName | New name for the particle. |
| bool mty::ModelData::findParticle | ( | std::string_view | t_name | ) | const |
Searches a particle in the model.
| t_name | Name of the particle to search. |
| bool mty::ModelData::findParticle | ( | mty::Particle const & | part | ) | const |
Searches a particle in the model.
| part | Particle to search in the model |
| bool mty::ModelData::findParticle | ( | mty::QuantumFieldParent const * | part | ) | const |
Searches a particle in the model.
| part | Particle to search in the model |
| bool mty::ModelData::findScalarCoupling | ( | std::string_view | t_name | ) | const |
Searches a scalar coupling in the model.
| t_name | Name of the coupling to search. |
| bool mty::ModelData::findScalarCoupling | ( | csl::Expr const & | coupling | ) | const |
Searches a scalar coupling in the model.
| coupling | Coupling to search |
| bool mty::ModelData::findTensorCoupling | ( | std::string_view | t_name | ) | const |
Searches a tensor coupling in the model.
| t_name | Name of the coupling to search. |
| bool mty::ModelData::findTensorCoupling | ( | csl::Parent const & | coupling | ) | const |
Searches a tensor coupling in the model.
| coupling | Coupling to search in the model |
| bool mty::ModelData::findTensorCoupling | ( | csl::AbstractParent const * | coupling | ) | const |
Searches a tensor coupling in the model.
| coupling | Coupling to search in the model |
| csl::Index mty::ModelData::generateIndex | ( | GroupType && | group, |
| FieldType && | field | ||
| ) | const |
Returns an index coresponding to the representation of a field in a given group.
| GroupType | mty::Group* or valid type for the function getGroup() |
| FieldType | mty::Particle or valid type for the function getParticle() |
| field | Particle. |
| group | Group. |
| csl::Index mty::ModelData::generateIndex | ( | GroupType && | group | ) | const |
Returns an index coresponding to the fundamental representation in a given group.
| GroupType | mty::Group* or valid type for the function getGroup() |
| group | Group. |
| csl::Index mty::ModelData::generateIndex | ( | std::string_view | nameIndex, |
| GroupType && | group, | ||
| FieldType && | field | ||
| ) | const |
Returns an index coresponding to the representation of a field in a given group.
| GroupType | mty::Group* or valid type for the function getGroup() |
| FieldType | mty::Particle or valid type for the function getParticle() |
| name | Name for the generated index. |
| group | Group. |
| field | Particle. |
| std::vector< csl::Index > mty::ModelData::generateIndices | ( | size_t | nIndices, |
| GroupType && | group, | ||
| FieldType && | field | ||
| ) | const |
Returns indices coresponding to the representation of a field in a given group.
| GroupType | mty::Group* or valid type for the function getGroup() |
| FieldType | mty::Particle or valid type for the function getParticle() |
| nIndices | Number of indices to generate. |
| group | Group. |
| field | Particle. |
| std::vector< csl::Index > mty::ModelData::generateIndices | ( | size_t | nIndices, |
| GroupType && | group | ||
| ) | const |
Returns indices coresponding to the fundamental representation in a given group.
| GroupType | mty::Group* or valid type for the function getGroup() |
| group | Group. |
| csl::Expr mty::ModelData::getCharge | ( | FieldType && | field, |
| GroupType && | group | ||
| ) | const |
Returns the charge representation of a field in a U(1) group.
| GroupType | mty::Group* or valid type for the function getGroup() |
| FieldType | mty::Particle or valid type for the function getParticle() |
| field | Particle. |
| group | U(1) group. |
| mty::Flavor * mty::ModelData::getFlavor | ( | ) | const |
Returns a pointer to the model's flavor.
This function does not transfer the ownership. In particular, you have not to delete the data.
| mty::FlavorGroup const * mty::ModelData::getFlavorGroup | ( | std::string_view | t_name | ) | const |
Returns a FlavorGroup (pointer) given its name.
| t_name | Name of the flavor group to search |
| mty::FlavorGroup * mty::ModelData::getFlavorGroup | ( | std::string_view | t_name | ) |
Returns a FlavorGroup (pointer) given its name.
| t_name | Name of the flavor group to search |
| mty::FlavorIrrep mty::ModelData::getFlavorIrrep | ( | FieldType && | field | ) | const |
Returns the flavor representation of a field.
| FieldType | mty::Particle or valid type for the function getParticle() |
| field | Particle. |
| mty::Irrep mty::ModelData::getFlavorIrrep | ( | FieldType && | field, |
| FlavorType && | flavor | ||
| ) | const |
Returns the flavor group representation of a field.
| FlavorType | mty::Flavor* or valid type for the function getFlavorGroup() |
| FieldType | mty::Particle or valid type for the function getParticle() |
| mty::Gauge * mty::ModelData::getGauge | ( | ) | const |
Returns a pointer to the model's gauge.
This function does not transfer the ownership. In particular, you have not to delete the data.
| mty::GaugedGroup const * mty::ModelData::getGaugedGroup | ( | std::string_view | t_name | ) | const |
Returns a GaugedGroup (pointer to const) given its name.
| t_name | Name of the gauged group to search |
| mty::GaugedGroup * mty::ModelData::getGaugedGroup | ( | std::string_view | t_name | ) |
Returns a GaugedGroup (pointer) given its name.
| t_name | Name of the gauged group to search |
| mty::GaugeIrrep mty::ModelData::getGaugeIrrep | ( | FieldType && | field | ) | const |
Returns the gauge representation of a field.
| FieldType | mty::Particle or valid type for the function getParticle() |
| field | Particle. |
| mty::Generator mty::ModelData::getGenerator | ( | GroupType && | group, |
| FieldType && | field | ||
| ) | const |
Returns the generator coresponding to the representation of a field in a given group.
| GroupType | mty::Group* or valid type for the function getGroup() |
| FieldType | mty::Particle or valid type for the function getParticle() |
| group | Group. |
| field | Particle. |
| mty::Group const * mty::ModelData::getGroup | ( | std::string_view | t_name | ) | const |
Returns a Group (pointer to const) given its name.
| t_name | Name of the group to search |
| mty::Group * mty::ModelData::getGroup | ( | std::string_view | t_name | ) |
Returns a Group (pointer) given its name.
| t_name | Name of the group to search |
| mty::Group const * mty::ModelData::getGroup | ( | mty::FlavorGroup const * | flavGroup | ) | const |
Returns a Group (pointer to const) given its flavor group.
| flavGroup | Initial flavor group. |
| mty::Group * mty::ModelData::getGroup | ( | mty::FlavorGroup const * | flavGroup | ) |
Returns a Group (pointer to const) given its flavor group.
| flavGroup | Initial flavor group. |
| mty::Irrep mty::ModelData::getGroupIrrep | ( | FieldType && | field, |
| GroupType && | group | ||
| ) | const |
Returns the group representation of a field.
| GroupType | mty::Group* or valid type for the function getGroup() |
| FieldType | mty::Particle or valid type for the function getParticle() |
| field | Particle. |
| group | Group. |
| mty::Lagrangian const & mty::ModelData::getLagrangian | ( | ) | const |
Returns a const reference to the Lagrangian.
The lagrangian should not be modified directly. Always prefer using buitl-in functions to modify it. This is why this function returns an const-reference. The way to get the lagrangian from it is
| mty::Particle mty::ModelData::getParticle | ( | std::string_view | t_name | ) | const |
Returns a particle in the model given a name.
In case no particle is found, an error message is printed and the code stops. If you want to know if a particle exists, consider using findParticle() instead.
| t_name | Name of the particle to get. |
| mty::Particle mty::ModelData::getParticle | ( | mty::QuantumFieldParent const * | field | ) | const |
Returns a particle in the model given a pointer to QuantumFieldParent.
In case no particle is found, an error message is printed and the code stops. If you want to know if a particle exists, consider using findParticle() instead.
| field | Field from which you want a mty::Particle type. |
| mty::Particle mty::ModelData::getParticle | ( | mty::QuantumFieldParent const & | field | ) | const |
Returns a particle in the model given a QuantumFieldParent.
In case no particle is found, an error message is printed and the code stops. If you want to know if a particle exists, consider using findParticle() instead.
| field | Field from which you want a mty::Particle type. |
| mty::Particle mty::ModelData::getParticle | ( | mty::QuantumField const & | field | ) | const |
Returns a particle in the model given a QuantumField.
In case no particle is found, an error message is printed and the code stops. If you want to know if a particle exists, consider using findParticle() instead.
| field | Field from which you want a mty::Particle type. |
| mty::Particle mty::ModelData::getParticle | ( | csl::Expr const & | field | ) | const |
Returns a particle in the model given an expression.
In case no particle is found, an error message is printed and the code stops. If you want to know if a particle exists, consider using findParticle() instead. The expression field must of course be of type QuantumField, i.e. pointing to an object of this type.
| field | Field from which you want a mty::Particle type. |
| std::vector< mty::Particle > const & mty::ModelData::getParticles | ( | ) | const |
Returns a const reference to the model's particles.
Particles should be modified through the built-in functions, not directly from this vector. This is why the function only returns a const reference. It must be called as follows
| std::vector< mty::Particle > mty::ModelData::getPhysicalParticles | ( | std::function< bool(mty::Particle)> const & | predicate = [](mty::Particle) { return true; } | ) | const |
Returns a list of the physical particles in a model.
Takes care of removing ghosts and particles that would appear twice in the full list of particles (see getParticles()), in particular removing left- and right-handed parts of Dirac fermions (letting only the full 4-component fermion). This function is meant to be called when repeting a particular calculation for all particles in a model. A boolean predicate can be given to filter more the list, for example taking only bosons or fermions. Example:
| mty::QuantumNumber const & mty::ModelData::getQuantumNumber | ( | std::string_view | name | ) | const |
Returns a quantum number (const reference) given its name.
If the quantum number does not exist, this function prints an error message and stops the program.
| t_name | Name of the quantum number to get |
| mty::QuantumNumber & mty::ModelData::getQuantumNumber | ( | std::string_view | name | ) |
Returns a quantum number (reference) given its name.
If the quantum number does not exist, this function prints an error message and stops the program.
| t_name | Name of the quantum number to get |
| std::vector< QuantumNumber > const & mty::ModelData::getQuantumNumbers | ( | ) | const |
Returns the list of quantum numbers.
| std::vector< QuantumNumber > & mty::ModelData::getQuantumNumbers | ( | ) |
Returns the list of quantum numbers.
| csl::Expr mty::ModelData::getScalarCoupling | ( | std::string_view | t_name | ) | const |
Returns a scalar coupling given its name.
If the scalar coupling does not exist, this function prints an error message and stops the program. If you want to know if a scalar coupling exists, try using findScalarCoupling() instead.
| t_name | Name of the scalar coupling to get |
| std::vector< csl::Expr > const & mty::ModelData::getScalarCouplings | ( | ) | const |
Returns the scalar couplings (gauge coupling typically) of the model.
When a gauge group is created, a gauge coupling constant comes with it. This coupling is stored in the model's scalar couplings that you can get with this function (as a constant reference).
| csl::Space const * mty::ModelData::getSpaceTime | ( | ) | const |
Returns a pointer to the space time of the mode (csl::Space).
For now, only csl::Minkowski is supported.
| csl::Tensor mty::ModelData::getTensorCoupling | ( | std::string_view | t_name | ) | const |
Returns a tensor coupling given its name.
If the tensor coupling does not exist, this function prints an error message and stops the program. If you want to know if a tensor coupling exists, try using findTensorCoupling() instead.
| t_name | Name of the tensor coupling to get |
| csl::Tensor mty::ModelData::getTensorCoupling | ( | csl::Parent const & | t_coupling | ) | const |
Returns a tensor coupling.
If the tensor coupling does not exist, this function prints an error message and stops the program. If you want to know if a tensor coupling exists, try using findTensorCoupling() instead.
| t_coupling | Coupling to search in the model |
| std::vector< csl::Tensor > const & mty::ModelData::getTensorCouplings | ( | ) | const |
Returns the tensor couplings (Yukawa coupling typically) of the model.
When a Yukawa coupling is created, th corresponding tensor is stored in the model's tensor couplings that you can get with this function (as a constant reference).
| csl::Space const * mty::ModelData::getVectorSpace | ( | GroupType && | group, |
| FieldType && | field | ||
| ) | const |
Returns the vector space coresponding to the representation of a field in a given group.
| GroupType | mty::Group* or valid type for the function getGroup() |
| FieldType | mty::Particle or valid type for the function getParticle() |
| field | Particle. |
| group | Group. |
| void mty::ModelData::init | ( | bool | initGaugeTerms = true | ) |
Initializes the gauge once and for all. This function must be called after finishing the gauge, and before adding matter particles. Calling the constructors that take an already built gauge, this function is called automatically. Otherwise you have to call it.
| initGaugeTerms | Boolean (default = true) that tells if kinetic and mass terms for gauge bosons and ghosts must be added. |
|
protected |
Initializes gauge terms (gauge bosons, ghosts) and fixes the gauge.
| initGaugeTerms | Boolean (default = true) that tells if kinetic and mass terms must be added automatically. |
|
inline |
| void mty::ModelData::printSubPart | ( | std::vector< std::string > const & | particles, |
| std::ostream & | out = std::cout |
||
| ) | const |
Prints a sub part of the Lagrangian including some particles.
| particles | Particles that printed terms must have |
| out | Output stream (std::cout, standard stream by default) |
| void mty::ModelData::printSubPart | ( | std::initializer_list< std::string > | particles, |
| std::ostream & | out = std::cout |
||
| ) | const |
Prints a sub part of the Lagrangian including some particles.
| particles | Particles that printed terms must have |
| out | Output stream (std::cout, standard stream by default) |
| void mty::ModelData::printSubPart | ( | std::string const & | particle, |
| std::ostream & | out = std::cout |
||
| ) | const |
Prints a sub part of the Lagrangian including some particles.
| particles | Particles that printed terms must have |
| out | Output stream (std::cout, standard stream by default) |
| void mty::ModelData::removeParticle | ( | mty::Particle const & | part | ) |
Removes a particle from the model.
When removing a particle, all interaction terms containing it are removed. It is a non-return point. If you simply want to disable a given particle in calculations, consider using mty::DisableParticle().
| part | Particle to remove. |
| void mty::ModelData::removeParticle | ( | std::string const & | part | ) |
Removes a particle from the model.
When removing a particle, all interaction terms containing it are removed. It is a non-return point. If you simply want to disable a given particle in calculations, consider using mty::DisableParticle().
| part | Name of the particle to remove. |
| void mty::ModelData::removeParticles | ( | std::vector< mty::Particle > const & | parts | ) |
Removes particles from the model.
When removing a particle, all interaction terms containing it are removed. It is a non-return point. If you simply want to disable a given particle in calculations, consider using mty::DisableParticle().
| parts | Particles to remove. |
| void mty::ModelData::removeParticles | ( | std::vector< std::string > const & | parts | ) |
Removes particles from the model.
When removing a particle, all interaction terms containing it are removed. It is a non-return point. If you simply want to disable a given particle in calculations, consider using mty::DisableParticle().
| parts | Names of the particles to remove. |
| void mty::ModelData::renameCoupling | ( | std::string_view | name, |
| std::string_view | newName | ||
| ) |
Renames a (scalar or tensor) coupling of the model.
| name | Initial name of the coupling |
| newName | New name for the particle |
| void mty::ModelData::renameParticle | ( | FieldType && | field, |
| std::string_view | newName | ||
| ) |
Renames a particle of the model.
| FieldType | mty::Particle or any valid type for the getParticle() function. |
| field | Particle to rename |
| newName | New name for the particle |
|
inline |
Sets enableChecks.
| t_enable | New boolean value |
| void mty::ModelData::setFlavor | ( | std::unique_ptr< mty::Flavor > && | t_flavor | ) |
Sets the flavor of the model.
This function should be used after creating a model with an empty flavor (in particular using the default constructor of ModelData). It may be used to create the flavor separately, not using built-in functions of this class. The std::unique_ptr given as parameter loses the ownership of the flavor and is not valid after the function call. Here is a code snippet that show how to use this function.
| t_flavor | Flavor for the model. |
| void mty::ModelData::setGauge | ( | std::unique_ptr< mty::Gauge > && | t_gauge | ) |
Sets the gauge of the model.
This function should be used after creating a model with an empty gauge (in particular using the default constructor of ModelData). It may be used to create the gauge separately, not using built-in functions of this class. The std::unique_ptr given as parameter loses the ownership of the gauge and is not valid after the function call. Here is a code snippet that show how to use this function.
| t_gauge | Gauge for the model. |
| void mty::ModelData::setQuantumNumbers | ( | std::vector< mty::QuantumNumber > const & | numbers | ) |
Sets the quantum numbers of the model.
This function should in principle not be used. It replaces the entire set of quantum numbers, without defining eigenvalues for particles. Consider using addQuantumNumber() instead.
| numbers | New quantum numbers |
| void mty::ModelData::setSpaceTime | ( | csl::Space const * | t_spaceTime | ) |
Sets the space time of the model.
| t_spaceTime | New space time for the model. |
|
friend |
Prints the model.
This function prints out the model gauge, the particle content and the Lagrangian (kinetic, mass, and interaction terms).
| out | Output stream (default is standard stream std::cout). |
| model | Model to output. |
|
inlinestatic |
Default quantum number for particles when not given.
When defining a quantum number in a model, for example the baryonic number B, you may define it for any particle. If you do nothing, the default number is zero. If you define it, you can either give the quantum number, or nothing. It the latter case, the defined quantum number is equal to defaultQuantumNumber.
|
protected |
Boolean telling if checks must be done with lagrangian terms added to the model (gauge representation, dispatching ...)
|
protected |
Boolean that tells if the gauge model is initilialized.
When building a model, the gauge must be created first before adding any other particle. The gauge must be fixed by calling the init() function. Only then, particles can be added using addParticle() function.
|
protected |
Lagrangian of the model.
The lagrangian is modified only through built-in functions, either from this class (ModelData) for basic content modifications, or from the ModelBuilder class for more complicated model building features (symmetry breaking, replacements etc).
|
protected |
Particle content (including gauge bosons, ghosts etc) of the model.
|
protected |
List of quantum numbers in the model.
Particles can have different eigenvalues for these quantum numbers (0 by default, if not given).
|
protected |
Lists of scalar couplings of the model.
|
protected |
Space time for the model.
By default, this variable is a pointer to csl::Minkowski (4D). There is actually no support for another space time so for now, nothing to do with this member.
|
protected |
List of tensor couplings of the model.
1.8.13