24 #ifndef FERMIONFLOW_H_INCLUDED 25 #define FERMIONFLOW_H_INCLUDED 33 class ConjugationList;
69 using FieldList = std::vector<mty::QuantumField const*>;
126 std::vector<QuantumField>
const &ruleOrder,
149 static void applyConjugation(
299 std::vector<FermionLine>
const &lines
308 void insertInChainForRule(
310 std::vector<FermionLine>
const &lines
358 std::vector<csl::Index> indices;
366 std::vector<ConjugationInfo>
const &info,
368 std::vector<FermionLine>
const &t_lines,
369 std::vector<QuantumField const*>
const &t_bosons
371 :std::vector<ConjugationInfo>(info),
377 std::vector<QuantumField const *> getFinalOrder(
380 std::vector<QuantumField const *> finalOrder;
381 finalOrder.reserve(sizeHint);
382 for (
const auto &b : bosons)
383 finalOrder.push_back(b);
384 for (
const auto &line : lines)
385 for (
const auto &f : line.fields)
386 finalOrder.push_back(f);
392 std::vector<FermionLine> lines;
393 std::vector<QuantumField const*> bosons;
401 std::ostream &operator<<(
406 ConjugationInfo::FieldList::iterator getExternalBegin(
409 ConjugationInfo::FieldList::iterator getInternalBegin(
412 ConjugationInfo::FieldList::iterator getBegin(
bool conjugated
Boolean for External ConjugationInfo, tells if the external leg is complex conjugated.
Definition: fermionFlow.h:352
Class encapsulating necesarry data to place conjugation matrices in amplitudes when treating Majorana...
Definition: fermionFlow.h:40
std::vector< mty::QuantumField const * > FieldList
Quick definition of the data structure for a field list in this file.
Definition: fermionFlow.h:69
Definition: fermionFlow.h:355
csl::Index preA
Index before A in the chain, not valued for External ConjugationInfo.
Definition: fermionFlow.h:340
Type type
Type of ConjugationInfo. Can be external (external leg) or internal (part of gamma-matrices chain)...
Definition: fermionFlow.h:323
std::ostream & operator<<(std::ostream &fout, csl::Type type)
Namespace of MARTY.
Definition: 2HDM.h:31
ConjugationInfo & operator=(ConjugationInfo const &)=default
Default copy assignement operator.
void setInfo(csl::Index const &t_A, bool t_conjugated)
Sets info for an external ConjugationInfo. See the corresponding constructor for more info...
Definition: fermionFlow.cpp:589
Type getType() const
Returns the type.
Definition: fermionFlow.h:227
static ConjugationList resolveFermionLines(FieldList init, FieldList const &ruleOrder, bool ruleMode)
Resolves all fermion lines in a set of fields.
Definition: fermionFlow.cpp:351
csl::Index B
Second index of the chain, not valued for External ConjugationInfo.
Definition: fermionFlow.h:334
csl::Index getA() const
Returns the first index of the ConjugationInfo.
Definition: fermionFlow.h:232
Conjugation of a part of a gamma-matrices chain.
Definition: fermionFlow.h:62
csl::Index postB
Index after B in the chain, not valued for External ConjugationInfo.
Definition: fermionFlow.h:346
Undefined ConjugationInfo.
Definition: fermionFlow.h:52
bool getConjugated() const
Returns the conjugation of the ConjugationInfo, has a meaning only for External ConjugationInfo.
Definition: fermionFlow.h:256
static constexpr size_t maxFermionLines
Maximum number of fermion lines in a diagram.
Definition: fermionFlow.h:85
void apply(csl::Expr &expr, bool ruleMode, std::vector< FermionLine > const &lines) const
Applies the conjugation on the underlying expression.
Definition: fermionFlow.cpp:613
Definition: fermionFlow.h:361
ConjugationInfo()
Constructs an empty ConjugationInfo. Will do nothing.
Definition: fermionFlow.cpp:565
Type
Type of ConjugationInfo.
Definition: fermionFlow.h:47
~ConjugationInfo()=default
Default constructor.
csl::Index A
First (or only for External type) index of the chain.
Definition: fermionFlow.h:328
static void simplify(ConjugationList &infoList, bool ruleMode)
Simplifies a set of ConjugationInfo, merging the consecutive ones.
Definition: fermionFlow.cpp:467
Conjugation of an external leg.
Definition: fermionFlow.h:57
csl::Index getPreA() const
Returns the index before A in the chain, has a meaning only for Internal ConjugationInfo.
Definition: fermionFlow.h:244
csl::Index getB() const
Returns the second index of the ConjugationInfo, has a meaning only for Internal ConjugationInfo.
Definition: fermionFlow.h:238
csl::Index getPostB() const
Returns the index after B in the chain, has a meaning only for Internal ConjugationInfo.
Definition: fermionFlow.h:250