Instances of this class can be given to mty::Model when launching a calculation to customize the output. More...
#include <feynOptions.h>
Public Types | |
| using | LagrangianFilter = std::function< bool(mty::InteractionTerm const &)> |
| Type definition for a Lagrangian filter. More... | |
| using | DiagramFilter = std::function< bool(mty::FeynmanDiagram const &)> |
| Type definition for a Feynman diagram. More... | |
Public Member Functions | |
| FeynOptions () | |
| Default constructor, only constructor of this class (expect copy and move). More... | |
| bool | getFeynRuleCalculation () const |
| int | getLoopOrder () const |
| int | getExpansionOrder () const |
| int | getTopology () const |
| std::vector< int > const & | getFermionOrder () const |
| std::vector< LagrangianFilter > const & | getLagrangianFilters () const |
| std::vector< DiagramFilter > const & | getDiagramFilters () const |
| csl::Expr | getWilsonOperatorCoefficient () const |
| OperatorBasis | getWilsonOperatorBasis () const |
| void | setFeynmanRuleMode () |
| Sets the value of feynRuleCalculation to true (the default value of this member is false). More... | |
| void | setLoopOrder (int t_nLoops, int nExternalLegs) |
| Sets the number of loops for the calculation. More... | |
| void | setTopology (int t_topology) |
| Sets the topology for the calculation. More... | |
| void | setFermionOrder (std::vector< int > const &order) |
| Sets the fermion order used to express the amplitude. More... | |
| void | setWilsonOperatorCoefficient (csl::Expr const &factor) |
| Sets the Wilson operator coefficient wilsonOperatorCoefficient. More... | |
| bool | passFilters (FeynmanDiagram const &diagram) const |
| Tells if a diagram passes all diagram filters. More... | |
| void | applyFilters (std::vector< Lagrangian::TermType > &lagrangian) const |
| Applies the Lagrangian filters on a vector of vertices. More... | |
| std::vector< FeynmanRule const * > | applyFilters (std::vector< FeynmanRule > const &lagrangian) const |
| Filters a set a Feynman rules using the lagrangian filters. More... | |
| void | applyFilters (std::vector< FeynmanDiagram > &diagrams, bool forceFilters=false) const |
| Applies the diagram filters on a vector of Feynman diagrams. More... | |
| template<class Filter > | |
| void | addFilter (Filter &&filter) |
| Adds one filter (LagrangianFilter or DiagramFilter) to the options. More... | |
| void | addFilters () |
| Overloads to add 0 filter (this function does nothing). More... | |
| template<class First , class ... Next> | |
| void | addFilters (First &&first, Next &&...next) |
| Adds an arbitrary number of filters (Lagrangian or diagram filters) to the options. More... | |
| void | resetFilters () |
| Resets the filters (for lagrangian and diagrams) to the default ones, i.e. removing all user-defined ones. | |
Data Fields | |
| bool | orderInsertions { mty::option::applyInsertionOrdering } |
| This option (default = true) implies that fermionic insertions are ordered using a given rule. More... | |
| bool | orderExternalFermions { mty::option::orderExternalFermions } |
| Boolean telling if external fermions must be ordered in the result. More... | |
| bool | simplifyAmplitudes { mty::option::simplifyAmplitudes } |
| Set this option to false if you want to disable all simplifications of amplitudes. More... | |
| bool | discardLowerOrders { mty::option::discardLowerOrders } |
| Set this option to false if you want the tree-level diagrams to appear in the same amplitude as the one-loop calculation. | |
| bool | verboseAmplitude { mty::option::verboseAmplitude } |
| Set this options to false to disable all prints during calculations. | |
| bool | partialCalculation { false } |
| Set this option to true to disable the DiagramFilters if the calculation is only a part of the full calculation. | |
Protected Member Functions | |
| void | addLagrangianFilter (LagrangianFilter const &filter) |
| Adds one Lagrangian filter to the options. More... | |
| void | addDiagramFilter (DiagramFilter const &filter) |
| Adds one diagram filter to the options. More... | |
| void | addLagrangianFilters (std::initializer_list< LagrangianFilter > filters) |
| Adds a list of Lagrangian filters to the options. More... | |
| void | addDiagramFilters (std::initializer_list< DiagramFilter > filters) |
| Adds a list of diagram filters to the options. More... | |
Private Member Functions | |
| template<class Container , class Predicate > | |
| void | applyFilters (Container &container, Predicate const &predicate) const |
| Helper private class applying a set of filters on a range. More... | |
| void | initDefaultFilters () |
| Initializes the default filters. | |
| void | setWilsonOperatorBasis (OperatorBasis basis) |
| Sets the Wilson operator basis wilsonOperatorBasis. More... | |
Private Attributes | |
| bool | feynRuleCalculation { false } |
| Mode of an amplitude calculation. More... | |
| std::shared_ptr< int > | loopOrder |
| Loop order (0 for tree-level, 1 for one-loop). More... | |
| int | expansionOrder |
| Taylor expansion order for an amplitude calculation (expansion of the lagrangian exponential). | |
| int | topology = mty::Topology::Any |
| Topology allowed for the calculation. The default is mty::Topology::Any. | |
| std::vector< int > | fermionOrder |
| Order for fermions in bilinears. More... | |
| std::vector< LagrangianFilter > | lfilters |
| List of lagrangian filters. More... | |
| std::vector< DiagramFilter > | dfilters |
| List of diagram filters. More... | |
| csl::Expr | wilsonOperatorCoefficient { CSL_1 } |
| Prefactor used for Wilson coefficients. More... | |
| OperatorBasis | wilsonOperatorBasis = OperatorBasis::Chiral |
| Operator basis for Wilson coefficients. More... | |
Static Private Attributes | |
| static constexpr size_t | nDefaultDiagramFilters = 1 |
Instances of this class can be given to mty::Model when launching a calculation to customize the output.
| using mty::FeynOptions::DiagramFilter = std::function<bool(mty::FeynmanDiagram const&)> |
Type definition for a Feynman diagram.
A Feynman diagram filter is a boolean predicate (function, lambda, ...) taking a mty::FeynmanDiagram as parameter (const reference) and returning true if the diagram must be kept.
| using mty::FeynOptions::LagrangianFilter = std::function<bool(mty::InteractionTerm const&)> |
Type definition for a Lagrangian filter.
A Lagrangian filter is a boolean predicate (function, lambda, ...) taking a mty::InteractionTerm as parameter (const reference) and returning true if the vertex must be kept.
| mty::FeynOptions::FeynOptions | ( | ) |
Default constructor, only constructor of this class (expect copy and move).
This constructor initializes default Lagrangian and Feynman diagram filters used in all calculations.
|
inlineprotected |
Adds one diagram filter to the options.
This function delegates to the other overload that takes an arbitrary number of filters.
| filter | Unique filter to add. |
|
protected |
Adds a list of diagram filters to the options.
| filters | List of filters. |
|
inline |
Adds one filter (LagrangianFilter or DiagramFilter) to the options.
Depending on the type (deduced at compile-time) of the filter, this function delegates to addLagrangianFilter() or addDiagramFilter().
| Filter | Type of the filter given as parameter. |
| filter | User-defined predicate respecting the requirements of LagrangianFilter or DiagramFilter types. |
|
inline |
Overloads to add 0 filter (this function does nothing).
This function represents the end-point of the compile-time recursion of the templated overload.
|
inline |
Adds an arbitrary number of filters (Lagrangian or diagram filters) to the options.
This function accepts an arbitrary number of arguments provided that each of them is either a LagrangianFilter or a DiagramFilter. The compiler deduces automatically the types and the function can be used as simply as
| First | Type of the first filter given. |
| ...Next | Types of the next filters. |
| first | First filter. |
| ...next | Next filters. |
|
inlineprotected |
Adds one Lagrangian filter to the options.
This function delegates to the other overload that takes an arbitrary number of filters.
| filter | Unique filter to add. |
|
protected |
Adds a list of Lagrangian filters to the options.
| filters | List of filters. |
| void mty::FeynOptions::applyFilters | ( | std::vector< Lagrangian::TermType > & | lagrangian | ) | const |
Applies the Lagrangian filters on a vector of vertices.
The vector must contain mty::Lagrangian::TermType objects even if the filters themselves take mty::InteractionTerm. This function removes from the vector all interaction terms for which one of the filters returns false (filter out).
| lagrangian | Lagrangian Set of interaction terms to filter. |
| std::vector< FeynmanRule const * > mty::FeynOptions::applyFilters | ( | std::vector< FeynmanRule > const & | lagrangian | ) | const |
Filters a set a Feynman rules using the lagrangian filters.
This function uses the interaction term represented by the different rules and applies the Lagrangian filters. Unlike the other filtering functions, this one does not remove the elements inside the initial vector but returns a newly constructed vector containing pointers to the rules that passed all filters (i.e. for which all filters returned true). This allows to avoid any copy of a FeynmanRule object that is a high cost operation.
| lagrangian | Set of Feynman rules (interpreted here as a lagrangian with respect to filters). |
| void mty::FeynOptions::applyFilters | ( | std::vector< FeynmanDiagram > & | diagrams, |
| bool | forceFilters = false |
||
| ) | const |
Applies the diagram filters on a vector of Feynman diagrams.
This function removes from the vector all diagrams for which one of the filters returns false (filter out).
| diagrams | Set of diagrams to filter. |
| forceFilters | Boolean that ensures (is true) that the filters are applied whatever are the other options (partialCalculation in particular). |
|
inlineprivate |
Helper private class applying a set of filters on a range.
| Container | Type of the container to filter. |
| Predicate | Predicate type to apply. |
| container | Container on which the filter is applied. |
| predicate | Inversed filter, must return true if the object must be filtered out. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| bool mty::FeynOptions::passFilters | ( | FeynmanDiagram const & | diagram | ) | const |
Tells if a diagram passes all diagram filters.
| diagram |
| void mty::FeynOptions::setFermionOrder | ( | std::vector< int > const & | order | ) |
Sets the fermion order used to express the amplitude.
| order | Fermion order to apply, range of integers from \( 0 \) to \( N-1 \) for \( N \) external fermions in the process. |
| void mty::FeynOptions::setFeynmanRuleMode | ( | ) |
Sets the value of feynRuleCalculation to true (the default value of this member is false).
This function will probably not be useful for user-level manipulations.
| void mty::FeynOptions::setLoopOrder | ( | int | t_nLoops, |
| int | nExternalLegs | ||
| ) |
Sets the number of loops for the calculation.
This function needs not only the loop order, but also the number of external legs in the process as it will determine, together with the number of loop, the Taylor expansion order of the Lagrangian exponential.
| t_nLoops | Number of loops wanted (basically 0 or 1). |
| nExternalLegs | Number of external legs of the process. |
| void mty::FeynOptions::setTopology | ( | int | t_topology | ) |
Sets the topology for the calculation.
| t_topology | Topologies allowed. |
|
private |
Sets the Wilson operator basis wilsonOperatorBasis.
| basis | Basis used in Wilson coefficient decomposition. |
| void mty::FeynOptions::setWilsonOperatorCoefficient | ( | csl::Expr const & | factor | ) |
Sets the Wilson operator coefficient wilsonOperatorCoefficient.
| factor | Factor used in Wilson coefficient decomposition. |
|
private |
List of diagram filters.
Those filters are applied by MARTY once the Wick theorem has been applied, i.e. that all possible diagrams have been found. They save less calculation than LagrangianFilter but are more general as one can filter diagrams on more complex conditions.
|
private |
Order for fermions in bilinears.
The order of fermions in the result in fixed, useful for Wilson coefficient extraction. For example, a process with for external fermions \( \psi_0,\ \psi_1,\ \psi_2 \) and \( \psi_3 \) can be expressed with the order \( (0123) \) with terms of the type
\[ \left(\bar{\psi}_0\Gamma^A\psi_1\right) \left(\bar{\psi}_1\Gamma^B\psi_2\right, \]
while an order \( (2013) \) corresponds to something such as
\[ \left(\bar{\psi}_2\Gamma^C\psi_0\right) \left(\bar{\psi}_1\Gamma^D\psi_3\right, \]
with \( \Gamma^{A,B,C,D} \) arbitrary \( \gamma \)-matrix combinations.
|
private |
Mode of an amplitude calculation.
If true, the calculation is done to derive Feynman rules, false otherwise. The derivation of Feynman rules is a more involved calculation and is used only in that purpose. Otherwise, Feynman rules are used. This parameter is handled automatically by MARTY when calculating Feynman rules, it should not be set by the user a priori.
|
private |
List of lagrangian filters.
Those filters are applied by MARTY before any calculation is done by discarding unwanted interaction terms. This type of filter must be preferred to diagram filters if possible.
|
private |
Loop order (0 for tree-level, 1 for one-loop).
This variable is stored in a shared pointer for a technical reason, but the interface (getter and setter functions) use a standard integer.
| bool mty::FeynOptions::orderExternalFermions { mty::option::orderExternalFermions } |
Boolean telling if external fermions must be ordered in the result.
This option is false by default and should not be set to true except for Wilson coefficient calculations because it requires more calculations and it not relevant when calculating a squared amplitude.
| bool mty::FeynOptions::orderInsertions { mty::option::applyInsertionOrdering } |
This option (default = true) implies that fermionic insertions are ordered using a given rule.
This only affects the absolute signs of different diagrams in a process and is then physically irrelevant.
| bool mty::FeynOptions::simplifyAmplitudes { mty::option::simplifyAmplitudes } |
Set this option to false if you want to disable all simplifications of amplitudes.
Using this option, the result is then much closer to the bare use of Feynman rules and propagators.
|
private |
Operator basis for Wilson coefficients.
The chiral basis uses projectors \( P_L,P_R \) whereas the standard one uses \( \1,\gamma^5 \).
|
private |
Prefactor used for Wilson coefficients.
An amplitude is decomposed on pairs of Wilson coefficients and operators the following way:
\[ i\mathcal{M} \equiv -if\sum _i C_i \hat{\mathcal{O}}_i, \]
with \( C_i \) the Wilson coefficients, \( \hat{\mathcal{O}}_i \) the operators, and $f$ a convention-dependent factor. This member corresponds to the \( f \)used by MARTY when calculating the \( C_i \).
1.8.13