Class containing a Feynman diagram, symbolic expression and graph included. More...
#include <feynmanDiagram.h>
Public Types | |
| enum | DiagramParticleType { External, Mediator, Loop, Any } |
| Possible types of particles in a diagram. More... | |
| using | diagram_t = std::shared_ptr< mty::wick::Graph > |
| Type definition for the type used to store graphs. | |
| template<typename T > | |
| using | isNotParticle_t = typename std::enable_if_t< !std::is_same_v< mty::Particle, std::decay_t< T > > > |
| Helper type definition ensuring that the type T is not a mty::Particle. More... | |
Public Member Functions | |
| FeynmanDiagram (mty::Model const &t_model) | |
| FeynmanDiagram (mty::Model const &t_model, csl::Expr const &t_expression, diagram_t const &t_diagram) | |
| bool | isZero () const |
| Tells if the diagram vanishes. More... | |
| csl::Expr const & | getExpression () const |
| Returns the diagrams's expression as a const reference. More... | |
| csl::Expr & | getExpression () |
| Returns the diagrams's expression as a reference. More... | |
| diagram_t & | getDiagram () |
| Returns the diagram's graph as a reference. More... | |
| diagram_t const & | getDiagram () const |
| Returns the diagram's graph as a const reference. More... | |
| std::vector< mty::Particle > const & | getParticles (DiagramParticleType type=Any) const |
| Returns the set of particles corresponding to a given type. More... | |
| bool | contains (mty::Particle const &part, DiagramParticleType type=Any) const |
| Tells if one particle is contained in the diagram for a given type. More... | |
| bool | isExternal (mty::Particle const &particle) const |
| Tells if a particle is an external particle in the diagram. More... | |
| bool | isMediator (mty::Particle const &particle) const |
| Tells if a particle is a mediator particle in the diagram. More... | |
| bool | isInLoop (mty::Particle const &particle) const |
| Tells if a particle is a looped particle in the diagram. More... | |
| bool | isInternal (mty::Particle const &particle) const |
| Tells if a particle is an internal particle in the diagram. More... | |
| bool | isTreeLevel () const |
| bool | isLoop () const |
| int | getNLoops () const |
| bool | isTopology (int topology) const |
| Tells if the diagram is of a given topology. More... | |
| template<typename T , typename = isNotParticle_t<T>> | |
| bool | contains (T &&part, DiagramParticleType type=Any) const |
| Tells if one particle is contained in the diagram for a given type. More... | |
| template<typename T , typename = isNotParticle_t<T>> | |
| bool | isExternal (T &&particle) const |
| Tells if a particle is an external particle in the diagram. More... | |
| template<typename T , typename = isNotParticle_t<T>> | |
| bool | isMediator (T &&particle) const |
| Tells if a particle is a mediator particle in the diagram. More... | |
| template<typename T , typename = isNotParticle_t<T>> | |
| bool | isInLoop (T &&particle) const |
| Tells if a particle is a looped particle in the diagram. More... | |
| template<typename T , typename = isNotParticle_t<T>> | |
| bool | isInternal (T &&particle) const |
| Tells if a particle is an internal particle in the diagram. More... | |
| FeynmanDiagram | copy () const |
| Returns a copy of the diagram. More... | |
Static Public Member Functions | |
| static FeynmanDiagram | combine (FeynmanDiagram const &A, FeynmanDiagram const &B, Particle const &mediator) |
| Combines two Feynman diagrams, connecting them by one external leg. More... | |
Private Member Functions | |
| std::vector< mty::Particle > & | getParticles (DiagramParticleType type=Any) |
| Private non-const overload for getParticles(). More... | |
| void | addParticle (mty::Particle const &part, DiagramParticleType type) |
| Adds a particle to a given range (depending its type). More... | |
| template<typename T , typename = isNotParticle_t<T>> | |
| void | addParticle (T &&part, DiagramParticleType type) |
| Template overload for non-mty::Particle objects. More... | |
| void | loadParticlesFromVertices (std::vector< mty::wick::Vertex > const &vertices) |
| void | updateParticleData () |
| Gathers particles from the graph given in initialization. | |
| void | updateParticleData (std::vector< mty::wick::Vertex > const &vertices) |
| Gathers particles from graph vertices. | |
| void | mergeParticles () |
| Merges all particles found by updateParticleData() in the member allParticles. | |
Private Attributes | |
| Model const * | model |
| Pointer to the model in which the calculation has been done. | |
| csl::Expr | expression |
| Expression result of the calculation. | |
| diagram_t | diagram |
| Graph to forward to GRAFED to display it on screen. | |
| int | cycleLength |
| Length of the cycle (momentum integral) if the calculation is at one-loop. | |
| int | nLoops |
| Number of loops in the diagram. | |
| std::vector< mty::Particle > | allParticles |
| List of all particles in the process. | |
| std::vector< mty::Particle > | externalParticles |
| List of external particles in the process. | |
| std::vector< mty::Particle > | mediatorParticles |
| List of mediator particles in the process. More... | |
| std::vector< mty::Particle > | loopParticles |
| List of particles in loops in the process. More... | |
Class containing a Feynman diagram, symbolic expression and graph included.
The purpose of this class is to provide a container for the result of a diagram calculation, and a simple interface to obtain relevant information about the process. When an amplitude calculation is performed, the result contains a range of Feynman diagrams, each one (an instance of this class) containing as said above the graph that can be displayed in GRAFED, and the fully simplified symbolic expression, main result of MARTY.
| using mty::FeynmanDiagram::isNotParticle_t = typename std::enable_if_t< !std::is_same_v<mty::Particle, std::decay_t<T> > > |
Helper type definition ensuring that the type T is not a mty::Particle.
| T |
|
private |
Adds a particle to a given range (depending its type).
| part | Particle to add to the diagram. |
| type | Type determining the range in which the particle is inserted (externalParticles, loopParticles, mediatorParticles). |
|
inlineprivate |
Template overload for non-mty::Particle objects.
This function can take any type that can be forwarded to mty::Model::getParticle(). In particular, it may take char arrays as parameter knowing the name of the particle:
| T | Type that can be converted to a particle by a mty::Model. |
| Constraint | : T must not be a mty::Particle. |
| part | Particle to add to the diagram. |
| type | Type determining the range in which the particle is |
|
static |
Combines two Feynman diagrams, connecting them by one external leg.
| A | First diagram. |
| B | Second diagram. |
| mediator | External particle in both diagram connecting the two. |
| bool mty::FeynmanDiagram::contains | ( | mty::Particle const & | part, |
| DiagramParticleType | type = Any |
||
| ) | const |
Tells if one particle is contained in the diagram for a given type.
This function is a general one, that is called by several specialization: isExternal(), isMediator(), isInLoop(), isInternal(). Given a particle and a type (DiagramParticleType), this function returns true if the particle is found is the range of particles of the same type in the diagram. This function can take any type that can be forwarded to mty::Model::getParticle(). In particular, it may take char arrays as parameter knowing the name of the particle:
| T | Type that can be converted to a particle by a mty::Model. |
| Constraint | : T must not be a mty::Particle. |
| part | Particle to search in the diagram. |
| type | Type that the particle must be. The default is Any meaning that this function searches in the whole diagram (all particles, external and internal ones). |
|
inline |
Tells if one particle is contained in the diagram for a given type.
This function is a general one, that is called by several specialization: isExternal(), isMediator(), isInLoop(), isInternal(). Given a particle and a type (DiagramParticleType), this function returns true if the particle is found is the range of particles of the same type in the diagram.
| part | Particle to search in the diagram. |
| type | Type that the particle must be. The default is Any meaning that this function searches in the whole diagram (all particles). |
| FeynmanDiagram mty::FeynmanDiagram::copy | ( | ) | const |
Returns a copy of the diagram.
This method deep copies the expression and the graph to create a new diagram with no shared object with the initial one.
|
inline |
Returns the diagram's graph as a reference.
|
inline |
Returns the diagram's graph as a const reference.
|
inline |
Returns the diagrams's expression as a const reference.
|
inline |
Returns the diagrams's expression as a reference.
| int mty::FeynmanDiagram::getNLoops | ( | ) | const |
| std::vector< mty::Particle > const & mty::FeynmanDiagram::getParticles | ( | DiagramParticleType | type = Any | ) | const |
Returns the set of particles corresponding to a given type.
| type | Type of the particle range to return. The default value is Any, meaning all the particles in the diagram. |
|
private |
Private non-const overload for getParticles().
| type | Type of the particles from which the range must be returned. |
|
inline |
Tells if a particle is an external particle in the diagram.
| particle | Particle to test. |
|
inline |
Tells if a particle is an external particle in the diagram.
This function can take any type that can be forwarded to mty::Model::getParticle(). In particular, it may take char arrays as parameter knowing the name of the particle:
| T | Type that can be converted to a particle by a mty::Model. |
| Constraint | : T must not be a mty::Particle. |
| particle | Particle to search for. |
|
inline |
Tells if a particle is a looped particle in the diagram.
| particle | Particle to test. |
|
inline |
Tells if a particle is a looped particle in the diagram.
This function can take any type that can be forwarded to mty::Model::getParticle(). In particular, it may take char arrays as parameter knowing the name of the particle:
| T | Type that can be converted to a particle by a mty::Model. |
| Constraint | : T must not be a mty::Particle. |
| particle | Particle to search for. |
|
inline |
Tells if a particle is an internal particle in the diagram.
| particle | Particle to test. |
|
inline |
Tells if a particle is an internal particle in the diagram.
This function can take any type that can be forwarded to mty::Model::getParticle(). In particular, it may take char arrays as parameter knowing the name of the particle:
| T | Type that can be converted to a particle by a mty::Model. |
| Constraint | : T must not be a mty::Particle. |
| particle | Particle to search for. |
|
inline |
|
inline |
Tells if a particle is a mediator particle in the diagram.
| particle | Particle to test. |
|
inline |
Tells if a particle is a mediator particle in the diagram.
This function can take any type that can be forwarded to mty::Model::getParticle(). In particular, it may take char arrays as parameter knowing the name of the particle:
| T | Type that can be converted to a particle by a mty::Model. |
| Constraint | : T must not be a mty::Particle. |
| particle | Particle to search for. |
| bool mty::FeynmanDiagram::isTopology | ( | int | topology | ) | const |
Tells if the diagram is of a given topology.
This function takes as a parameter an integer, not a mty::Topology::Type object to allow combinations of topologies. A single mty::Topology::Type can also be given as it is implicitly convertible into an int. This interface allows then the following uses:
| topology | Integer representing one or several topologies. |
|
inline |
|
inline |
Tells if the diagram vanishes.
|
private |
List of particles in loops in the process.
|
private |
List of mediator particles in the process.
Mediator particles are defined here as internal particles that do not appear in loops. An internal particle is then either a mediator or a looped particle.
1.8.13