Interface class containing the result of an amplitude calculation. More...
#include <amplitude.h>
Public Member Functions | |
| Amplitude (FeynOptions const &t_options, Kinematics const &t_kinematics) | |
| Initializes an amplitude with no diagram (to be added later using Amplitude::add()). More... | |
| Amplitude (FeynOptions const &t_options, std::vector< mty::FeynmanDiagram > const &t_diagrams, mty::Kinematics const &t_kinematics) | |
| Initializes the amplitude completely. More... | |
| Amplitude (FeynOptions const &t_options, std::vector< mty::FeynmanDiagram > &&t_diagrams, mty::Kinematics const &t_kinematics) | |
| Initializes the amplitude completely. More... | |
| bool | empty () const |
| size_t | size () const |
| csl::Expr & | expression (size_t pos) |
| Returns a reference to expression of the diagram at a given position. More... | |
| csl::Expr const & | expression (size_t pos) const |
| Returns the const expression of the diagram at a given pos. More... | |
| FeynmanDiagram::diagram_t & | diagram (size_t pos) |
| Returns a reference to the graph layout of the diagram at a given position. More... | |
| FeynmanDiagram::diagram_t const & | diagram (size_t pos) const |
| Returns a const reference to the graph layout of the diagram at a given position. More... | |
| std::vector< csl::Expr > | obtainExpressions () const |
| Creates and return a range containing the expressions of all diagrams. More... | |
| std::vector< std::shared_ptr< mty::wick::Graph > > | obtainGraphs () const |
| Creates and return a range containing the graph layouts of all diagrams. More... | |
| void | add (std::vector< mty::FeynmanDiagram > const &t_diagrams) |
| Adds diagrams to the amplitude. More... | |
| void | add (std::vector< mty::FeynmanDiagram > &&t_diagrams) |
| Adds diagrams to the amplitude. More... | |
| Amplitude | filterOut (std::function< bool(mty::FeynmanDiagram const &)> filter) const |
| Applies a diagram filter (mty::FeynOptions::DiagramFilter requirement) to the amplitude and returns the result. More... | |
| template<class First , class ... Next, typename = std::enable_if_t<(sizeof...(Next) > 1> | |
| Amplitude | filterOut (First &&first, Next &&...next) const |
| Applies an arbitrary number of filters on an amplitude. More... | |
| FeynOptions const & | getOptions () const |
| Returns the options used to calculate the amplitude;. More... | |
| std::vector< mty::FeynmanDiagram > const & | getDiagrams () const |
| Returns all the mty::FeynmanDiagram objects as a const reference to a range. More... | |
| std::vector< mty::FeynmanDiagram > & | getDiagrams () |
| Returns all the mty::FeynmanDiagram objects as a reference to a range. More... | |
| mty::Kinematics const & | getKinematics () const |
| Returns the kinematics of the process. More... | |
| mty::Kinematics & | getKinematics () |
| Returns the kinematics of the process. More... | |
| csl::Expr | getSum () const |
| Computes and returns the sum of all diagrams i.e. the total amplitude. More... | |
| Amplitude | copy () const |
| Returns a copy of the amplitude. More... | |
| void | setKinematics (Kinematics const &t_kinematics, bool replace=true) |
| Replaces one kinematic context by another, replacing the relevant momenta in expressions. More... | |
Private Member Functions | |
| template<class Iterator > | |
| void | add (Iterator first, Iterator last) |
| Template utility to add multiple diagrams at once. More... | |
Private Attributes | |
| FeynOptions | options |
| Set of options that have been used for the calculation. | |
| std::vector< mty::FeynmanDiagram > | diagrams |
| Range of mty::FeynmanDiagram of the process. Each diagram contains a mathematical expression and the corresponding graph (that can be displayed using GRAFED). | |
| mty::Kinematics | kinematics |
| Kinematics of the process. | |
Friends | |
| class | AmplitudeInitializer |
Interface class containing the result of an amplitude calculation.
This is the return type of the mty::Model::computeAmplitude() member. It contains the mty::FeynmanDiagram objects corresponding to the amplitude, the options that have been used during the calculation and the mty::Kinematics objects corresponding to the external particles layout.
| mty::Amplitude::Amplitude | ( | FeynOptions const & | t_options, |
| Kinematics const & | t_kinematics | ||
| ) |
Initializes an amplitude with no diagram (to be added later using Amplitude::add()).
| t_options | Options used to calculate the amplitude. |
| t_diagrams | Range of diagrams. |
| t_kinematics | Kinematics of the process. |
| mty::Amplitude::Amplitude | ( | FeynOptions const & | t_options, |
| std::vector< mty::FeynmanDiagram > const & | t_diagrams, | ||
| mty::Kinematics const & | t_kinematics | ||
| ) |
Initializes the amplitude completely.
| t_options | Options used to calculate the amplitude. |
| t_diagrams | Range of diagrams. |
| t_kinematics | Kinematics of the process. |
| mty::Amplitude::Amplitude | ( | FeynOptions const & | t_options, |
| std::vector< mty::FeynmanDiagram > && | t_diagrams, | ||
| mty::Kinematics const & | t_kinematics | ||
| ) |
Initializes the amplitude completely.
| t_options | Options used to calculate the amplitude. |
| t_diagrams | Set of diagrams, moved range that is invalidated after the call of this constructor (at call site). |
| t_kinematics | Kinematics of the process. |
| void mty::Amplitude::add | ( | std::vector< mty::FeynmanDiagram > const & | t_diagrams | ) |
Adds diagrams to the amplitude.
| t_diagrams | Range of diagrams to be added. |
| void mty::Amplitude::add | ( | std::vector< mty::FeynmanDiagram > && | t_diagrams | ) |
Adds diagrams to the amplitude.
| t_diagrams | Moved range of diagrams to be added. The parameter passed to the function is invalid after the call. |
|
inlineprivate |
Template utility to add multiple diagrams at once.
| Iterator | Iterator type for the range that must be inserted. This type must point to mty::FeynmanDiagram objects. |
| first | Begin iterator. |
| last | End iterator. |
| Amplitude mty::Amplitude::copy | ( | ) | const |
Returns a copy of the amplitude.
This function creates a deep copy ensuring that no object, symbolic expressions included, is shared between the copy and the initial object. Building blocks are still shared as e.g. momenta and squared momenta.
| FeynmanDiagram::diagram_t & mty::Amplitude::diagram | ( | size_t | pos | ) |
Returns a reference to the graph layout of the diagram at a given position.
| pos | Position of the diagram. |
| FeynmanDiagram::diagram_t const & mty::Amplitude::diagram | ( | size_t | pos | ) | const |
Returns a const reference to the graph layout of the diagram at a given position.
| pos | Position of the diagram. |
|
inline |
| csl::Expr & mty::Amplitude::expression | ( | size_t | pos | ) |
Returns a reference to expression of the diagram at a given position.
This function returns a reference allowing the caller to modify directly in place the expression. For example swapping the sign of the second diagram:
This function can then be used to apply any necessary modifications to the amplitude before going further, calculating Wilson coefficients or squaring the amplitude for example.
| pos | Position of the diagram. |
| csl::Expr const & mty::Amplitude::expression | ( | size_t | pos | ) | const |
Returns the const expression of the diagram at a given pos.
| pos | Position of the diagram. |
| Amplitude mty::Amplitude::filterOut | ( | std::function< bool(mty::FeynmanDiagram const &)> | filter | ) | const |
Applies a diagram filter (mty::FeynOptions::DiagramFilter requirement) to the amplitude and returns the result.
This function can be used with built-in filters (see file filters.h) or custom filters. For example, selecting only the contribution where the combination c and b quark appears if one wants to test \( V_{cb} \):
The other overload allows one to call this function with an arbitrary number of filters.
| filter | Filter that should return true if the diagram must be selected and copied in the new Amplitude. |
|
inline |
Applies an arbitrary number of filters on an amplitude.
| First | First filter type. |
| ...Next | Next filter types. |
| typename | Constraining that there is at least 2 filters. |
| first | First filter. |
| ...next | Next filters. |
|
inline |
Returns all the mty::FeynmanDiagram objects as a const reference to a range.
|
inline |
Returns all the mty::FeynmanDiagram objects as a reference to a range.
|
inline |
Returns the kinematics of the process.
|
inline |
Returns the kinematics of the process.
|
inline |
Returns the options used to calculate the amplitude;.
| csl::Expr mty::Amplitude::getSum | ( | ) | const |
Computes and returns the sum of all diagrams i.e. the total amplitude.
| std::vector< csl::Expr > mty::Amplitude::obtainExpressions | ( | ) | const |
Creates and return a range containing the expressions of all diagrams.
| std::vector< std::shared_ptr< mty::wick::Graph > > mty::Amplitude::obtainGraphs | ( | ) | const |
Creates and return a range containing the graph layouts of all diagrams.
| void mty::Amplitude::setKinematics | ( | Kinematics const & | t_kinematics, |
| bool | replace = true |
||
| ) |
Replaces one kinematic context by another, replacing the relevant momenta in expressions.
| t_kinematics | New kinematic context for the process. |
|
inline |
1.8.13