Documentation of MARTY
A Modern ARtificial Theoretical phYsicist
amplitudeSimplification.h
Go to the documentation of this file.
1 // This file is part of MARTY.
2 //
3 // MARTY is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
7 //
8 // MARTY is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with MARTY. If not, see <https://www.gnu.org/licenses/>.
15 
34 #pragma once
35 
36 #include <csl.h>
37 
38 namespace color {
39  class ColorSpace;
40 }
41 namespace mty {
42  class QuantumField;
43  class FeynOptions;
44 }
45 
50 namespace mty::simpli {
51 
56  enum Mode {
58  Amplitude,
59  SquaredAmplitude,
61  };
62 
64  /*************************************************/
65  // Main simplification routine using the other //
66  // routines below //
67  /*************************************************/
69 
86  void simplify(
87  csl::Expr &expr,
88  std::vector<mty::QuantumField> const &insertions,
89  std::vector<csl::Tensor> const &momenta,
90  mty::FeynOptions const &options,
91  Mode mode
92  );
93 
95  /*************************************************/
96  // Simplification functions for color structures //
97  /*************************************************/
99 
110  color::ColorSpace const *inColorSpace(csl::Index const& index);
111 
112 
130  csl::IndexStructure const& structure
131  );
132 
146  color::ColorSpace const *isColorStructure(csl::Expr const &expr);
147 
158  csl::Expr const &node,
159  color::ColorSpace const *color
160  );
161 
175  bool factorIndicial(csl::Expr &res);
176 
194  std::vector<csl::Expr> const &exprs,
195  std::vector<color::ColorSpace const*> const &spaces
196  );
218  bool expandInProd(
219  csl::Expr &prod,
220  std::function<csl::IndexStructure(csl::Expr const&)> const &structureGetter
221  );
222 
232  bool expandColorIndices(csl::Expr &res);
233 
242  bool simplifyColorWeights(csl::Expr &expr);
243 
257  bool findColorAbbreviation(csl::Expr& expr);
258 
260  /*************************************************/
261  // Simplification functions for gamma / Minkowski//
262  /*************************************************/
264 
276  bool expandMinkoStructures(csl::Expr &expr);
277 
293  bool expandMinkoMetric(csl::Expr &expr);
294 
311  bool expandMinkoEpsilon(csl::Expr &expr);
312 
329  csl::Expr &prod,
330  csl::IndexStructure &indices
331  );
332 
346  bool simplifyEpsilon(csl::Expr &expr);
347 
357  bool expandGammaMatrices(csl::Expr &expr);
358 
367  bool simplifyFermionChains(csl::Expr &expr);
368 
376 
378  /*************************************************/
379  // Momenta and one-loop related simplifications //
380  /*************************************************/
382 
391  csl::Expr &res,
392  std::vector<csl::Tensor> const &momenta
393  );
403  void reduceTensorIntegrals(csl::Expr &expr);
404 
409  struct FermionEOMData {
410  csl::Tensor p;
411  csl::Expr m;
413  bool sign;
414  };
415 
436  std::pair<csl::Expr, csl::Expr> getMomentumReplacement(
437  std::vector<mty::QuantumField> const &insertions,
438  std::vector<csl::Tensor> const &momenta,
439  size_t posReplaced
440  );
454  void replaceMomentum(
455  csl::Expr &init,
456  std::vector<mty::QuantumField> const &insertions,
457  std::vector<csl::Tensor> const &momenta,
458  size_t posReplaced
459  );
460 
476  void simplifyImpulsions(
477  csl::Expr &init,
478  std::vector<mty::QuantumField> const &insertions,
479  std::vector<csl::Tensor> const &momenta
480  );
481 
492  void applyEOM(
493  csl::Expr &ampl,
494  std::vector<FermionEOMData> &onShellFermions
495  );
496 
508  void applyEOM(
509  csl::Expr &ampl,
510  std::vector<mty::QuantumField> const &insertions,
511  std::vector<csl::Tensor> const &momenta
512  );
513 
538  void addLocalTerms(csl::Expr &res);
539 
541  /*************************************************/
542  // Miscellaneous routines //
543  /*************************************************/
545 
559  bool maybeSimplified(csl::Expr const &expr);
560 
575 
582  void abbreviateIntegral(csl::Expr &res);
583 
593  void abbreviateAll(csl::Expr &res);
594 
604  bool findAbbreviations(csl::Expr& res);
605 
622  csl::Expr &expr
623  );
624 
636  void suppressDiracDelta(
637  csl::Expr &expr,
638  csl::Expr const &PSum
639  );
640 
641 } // namespace mty
bool simplifyEpsilon(csl::Expr &expr)
Simplifies epsilon contractions with symmetric indices in an expression.
Definition: amplitudeSimplification.cpp:759
csl::IndexStructure colorStructure(csl::Expr const &node, color::ColorSpace const *color)
Returns all color indices found in an expression lying in a particular color space.
Definition: amplitudeSimplification.cpp:307
bool expandColorIndices(csl::Expr &res)
Expands expressions containing color indices to allow all algebra simplifications.
Definition: amplitudeSimplification.cpp:553
void applyDerivativesInStructure(csl::Expr &expr)
Searches in the expression derived fields and applies the derivatives in the fields themselves...
Definition: amplitudeSimplification.cpp:229
Namespace containing the main simplification method for MARTY and all its dependencies.
Definition: amplitudeSimplification.h:50
Namespace of MARTY.
Definition: 2HDM.h:31
csl::Expr colorAbbreviation(std::vector< csl::Expr > const &exprs, std::vector< color::ColorSpace const *> const &spaces)
Abbreviates color structure in expressions under the generic name "Color".
Definition: amplitudeSimplification.cpp:397
csl::Expr alpha
Diagonalization angle for (h0 H0).
Definition: MSSM.h:75
void suppressDiracDelta(csl::Expr &expr, csl::Expr const &PSum)
Removes a dirac delta sub-expression.
Definition: amplitudeSimplification.cpp:246
bool findAbbreviations(csl::Expr &res)
Abbreviates all the sub-expressions that are relevant considering constant factors only...
Definition: amplitudeSimplification.cpp:185
bool expandMinkoEpsilon(csl::Expr &expr)
Expands Minkowski epsilon symbols to contract all possible indices.
Definition: amplitudeSimplification.cpp:693
bool maybeSimplified(csl::Expr const &expr)
Helper function that tells if an expression may be simplified in amplitudes.
void findExternalAbbreviation(csl::Expr &expr)
Abbreviates external legs in the expression using the generic name "EXT".
Definition: amplitudeSimplification.cpp:53
Interface class containing the result of an amplitude calculation.
Definition: amplitude.h:41
color::ColorSpace const * inColorSpace(csl::Index const &index)
Returns the colorspace associated to an index (nullptr if the index does not live in any ColorSpace)...
Definition: amplitudeSimplification.cpp:266
bool simplifyEpsilonInProd(csl::Expr &prod, csl::IndexStructure &indices)
Simplifies the contraction of an epsilon tensor with a symmetric structure index. ...
Definition: amplitudeSimplification.cpp:714
Instances of this class can be given to mty::Model when launching a calculation to customize the outp...
Definition: feynOptions.h:44
void simplifyImpulsions(csl::Expr &init, std::vector< mty::QuantumField > const &insertions, std::vector< csl::Tensor > const &momenta)
Applies the momentum conservation by replacing one of the external momenta by the combination of the ...
Definition: amplitudeSimplification.cpp:946
Mode
Mode for the main simplification routine specifying what calculation is done to adapt the simplificat...
Definition: amplitudeSimplification.h:56
void reduceTensorIntegrals(csl::Expr &expr)
Replaces the one-loop momentum integrals by their reduced form depending on scalar integrals...
Definition: amplitudeSimplification.cpp:883
void expandMomentaExperimental(csl::Expr &res, std::vector< csl::Tensor > const &momenta)
Expands expressions containing momenta to contract all indices, typically replacing ...
Definition: amplitudeSimplification.cpp:856
bool expandMinkoMetric(csl::Expr &expr)
Expands Minkowski metrics to contract all possible indices.
Definition: amplitudeSimplification.cpp:659
std::pair< csl::Expr, csl::Expr > getMomentumReplacement(std::vector< mty::QuantumField > const &insertions, std::vector< csl::Tensor > const &momenta, size_t posReplaced)
Creates the relevant replacement (using momentum conservation) to replace one particular momentum...
Definition: amplitudeSimplification.cpp:911
Class inherited from csl::Space that is used for vector spaces of group representations, in particular for generators.
Definition: colorSpace.h:57
bool factorIndicial(csl::Expr &res)
Factors indicial expressions in a bigger expression.
Definition: amplitudeSimplification.cpp:329
void abbreviateAll(csl::Expr &res)
Abbreviates all the sub-expressions that are relevant.
Definition: amplitudeSimplification.cpp:124
bool expandMinkoStructures(csl::Expr &expr)
Expands Minkowski structures to contract all possible indices.
Definition: amplitudeSimplification.cpp:652
bool findColorAbbreviation(csl::Expr &expr)
Abbreviates color structures in an expression under the generic name "Color".
Definition: amplitudeSimplification.cpp:590
Represents a Feynman rule.
Definition: feynmanRule.h:42
void addLocalTerms(csl::Expr &res)
Adds the local terms in an expression.
Definition: dimensionalRegularization.cpp:39
Definition: wilson.h:37
void expandForFermionOrdering(csl::Expr &expr)
Forces the ordering of external fermions by making sure that all Dirac structures are expanded...
Definition: amplitudeSimplification.cpp:832
color::ColorSpace const * isColorStructure(csl::Expr const &expr)
Returns a colorspace if the expression is a color structure.
Definition: amplitudeSimplification.cpp:284
bool simplifyColorWeights(csl::Expr &expr)
Calculates color traces in an expression.
Definition: amplitudeSimplification.cpp:575
bool expandInProd(csl::Expr &prod, std::function< csl::IndexStructure(csl::Expr const &)> const &structureGetter)
Expands indicial expressions in a way avoiding unnecessary terms, in particular not expanding express...
Definition: amplitudeSimplification.cpp:513
bool expandGammaMatrices(csl::Expr &expr)
Expands gamma matrices in an expression to be able to simplify fermion chains (and traces)...
Definition: amplitudeSimplification.cpp:786
void abbreviateIntegral(csl::Expr &res)
Abbreviate scalar integrals (or combinations of them) into abbreviations with the generic name "INT"...
Definition: amplitudeSimplification.cpp:72
void simplify(csl::Expr &expr, std::vector< mty::QuantumField > const &insertions, std::vector< csl::Tensor > const &momenta, mty::FeynOptions const &options, Mode mode)
Main simplification routine of MARTY, used for amplitudes, squared amplitude and Wilson coefficients...
Definition: amplitudeSimplification.cpp:1028
Helper structure for the application of Dirac equation (equations of motions for spin 1/2) ...
Definition: amplitudeSimplification.h:409
void replaceMomentum(csl::Expr &init, std::vector< mty::QuantumField > const &insertions, std::vector< csl::Tensor > const &momenta, size_t posReplaced)
Applies the momentum conservation by replacing one of the external momenta by the combination of the ...
Definition: amplitudeSimplification.cpp:933
Definition: amplitudeSimplification.h:38
void applyEOM(csl::Expr &ampl, std::vector< mty::QuantumField > const &insertions, std::vector< csl::Tensor > const &momenta)
Applies the equations of motion in an expression.
Definition: amplitudeSimplification.cpp:994
bool simplifyFermionChains(csl::Expr &expr)
Simplifies fermion chains using the mty::FermionChain utility.
Definition: amplitudeSimplification.cpp:809