Documentation of MARTY
A Modern ARtificial Theoretical phYsicist
Public Member Functions | Private Member Functions | Private Attributes | Friends
mty::PolarizationField Class Reference

Representing polarization vectors in equations. Allows to compute polarization sums in cross-sections. Is derived from TensorFieldElement: possess at least one csl::Index (polarization) and one "space-time point" that is the impulsion of the particle. More...

#include <polarization.h>

Inheritance diagram for mty::PolarizationField:
[legend]

Public Member Functions

void test (int)
 
 PolarizationField (csl::Tensor const &impulsion, csl::Parent const &t_parent)
 
 PolarizationField (csl::Tensor const &impulsion, csl::Parent const &t_parent, const std::vector< csl::Index > &indices)
 
 PolarizationField (csl::Tensor const &impulsion, csl::Parent const &t_parent, const csl::IndexStructure &indices)
 
 PolarizationField (PolarizationField const &)=default
 
bool getCommutable () const override
 
std::optional< csl::ExprgetComplexConjugate () const override
 
bool hasContractionProperty (csl::Expr_info other) const override
 
csl::Expr contraction (csl::Expr_info other) const override
 
csl::unique_Expr copy_unique () const override
 
void printCode (int mode=0, std::ostream &out=std::cout) const override
 
void printProp (std::ostream &out=std::cout) const override
 
Particle getParticle () const
 Returns a mty::Particle, pointer to the parent of the field. More...
 
bool isConjugationLocked () const
 
void setConjugationLock (bool t_lock)
 
void setParticle (bool) override
 Sets the particle property of the particle. More...
 
void setIncoming (bool) override
 Sets the incoming property of the particle. More...
 
- Public Member Functions inherited from mty::QuantumField
 QuantumField (const csl::Tensor &t_vector, const csl::Parent &t_parent)
 Constructor with two parameters. More...
 
 QuantumField (const csl::Tensor &t_vector, const csl::Parent &t_parent, const std::vector< csl::Index > &indices)
 Constructor with three parameters. More...
 
 QuantumField (const csl::Tensor &t_vector, const csl::Parent &t_parent, const csl::IndexStructure &indices)
 Constructor with three parameters. More...
 
 QuantumField ()
 Default constructor. Initializes no parent and no space-time point. More...
 
 QuantumField (QuantumField const &)=default
 Default Copy constructor.
 
 QuantumField (QuantumField &&)=default
 Default Move constructor.
 
QuantumFieldoperator= (const QuantumField &other)=default
 Default copy assignement operator.
 
QuantumFieldoperator= (QuantumField &&)=default
 Default move assignement operator.
 
QuantumFieldParentgetQuantumParent () const
 Returns a pointer to the QuantumFieldParent of the field. More...
 
Particle getParticle () const
 Returns a mty::Particle, pointer to the parent of the field. More...
 
auto getGaugeIrrep () const
 
auto getFlavorIrrep () const
 
template<class GroupType >
auto getGroupIrrep (GroupType &&group) const
 
template<class FlavorGroupType >
auto getFlavorIrrep (FlavorGroupType &&group) const
 
int getSpinDimension () const
 See QuantumFieldParent::getSpinDimension(). More...
 
csl::Expr getEnergyDimension () const
 See QuantumFieldParent::getEnergyDimension(). More...
 
csl::Expr getMass () const
 See QuantumFieldParent::getMass(). More...
 
csl::Expr getWidth () const
 See QuantumFieldParent::getWidth(). More...
 
PartnerShip getPartnerShip () const
 
bool isChiral () const
 See QuantumFieldParent::isChiral(). More...
 
Chirality getChirality () const
 See QuantumFieldParent::getChirality(). More...
 
void setChirality (Chirality chirality)
 Sets the chirality of the particle. More...
 
bool isGaugeBoson () const
 See QuantumFieldParent::isGaugeBoson(). More...
 
csl::Expr getXiGauge () const
 See QuantumFieldParent::getXiGauge(). More...
 
csl::Expr getSquaredMass () const
 Returns the mass squared of the field. More...
 
bool getConjugated () const
 Tells if the field is complex conjugated. More...
 
bool isExternal () const
 Tells if the field is an external field. More...
 
bool isOnShell () const
 
bool isBosonic () const
 See QuantumFieldParent::isBosonic(). More...
 
bool isFermionic () const
 See QuantumFieldParent::isFermionic(). More...
 
bool isAntiCommuting () const
 See QuantumFieldParent::isAntiCommuting(). More...
 
bool isSelfConjugate () const
 See QuantumFieldParent::isSelfConjugate(). More...
 
bool isReal () const override
 
bool isPhysical () const
 Tells if the field is physical, i.e. may appear in external legs. More...
 
bool isContractibleWith (const QuantumField &other) const
 See QuantumFieldParent::isContractibleWith(). More...
 
bool isExactlyContractiblewith (const QuantumField &other) const
 Tests if the the field is exactly contractible with the other one. More...
 
void addDerivative (const csl::Index &index)
 Adds a derivative index to the the field. More...
 
bool hasDerivative () const
 Tells if the field has derivative indices. More...
 
csl::IndexStructure getDerivativeStructure () const
 Returns the derivative structure of the field. More...
 
csl::Expr getPropagator (const QuantumField &other, csl::Tensor &vertex) const
 Returns the propagator with another QuantumField. More...
 
csl::Expr getLSZInsertion (const csl::Tensor &momentum, bool ruleMode=false, bool lock=false) const
 Returns the expression of the LSZ insertion corresponding to the field. More...
 
QuantumField getConjugatedField () const
 Copies the field in a new new one and conjugates it before returning it. More...
 
csl::Expr contraction (csl::Expr_info other) const override
 
std::optional< csl::ExprgetComplexConjugate () const override
 Returns the complex conjugate expression of the field. More...
 
void conjugate ()
 Conjugates the field and changes its particle number. More...
 
void setExternal (bool t_external)
 Sets the external property of the particle. More...
 
void setOnShell (bool t_onShell)
 
void setPartnerShip (PartnerShip const &t_partnerShip)
 
void setDerivativeStructure (const csl::IndexStructure &structure)
 Sets the derivative structure of the field. More...
 
bool getCommutable () const override
 Tells if the field is a commutable object in products. More...
 
bool commutesWith (csl::Expr_info other, int sign=-1) const override
 Tells if the field commutes with another expression. More...
 
bool hasContractionProperty (csl::Expr_info expr) const override
 Tells if the field has an indicial contraction property with another expression. More...
 
csl::unique_Expr copy_unique () const override
 Returns a copy of the field in a std::unique_ptr. More...
 
bool isIndexed () const override
 Tells if the field is indexed. More...
 
bool operator== (csl::Expr_info other) const override
 Compares the field with another expression. More...
 
bool compareWithDummy (csl::Expr_info other, std::map< csl::Index, csl::Index > &constraints, bool keepAllCosntraints=false) const override
 Compares the field with another expression. More...
 
bool operator< (const QuantumField &other) const
 Compares the simplicity of the field with another. More...
 
bool operator== (const QuantumField &other) const
 Compares the field with another. More...
 
bool operator!= (const QuantumField &other) const
 Compares the field with another. More...
 
bool isParticle () const
 Tells if the (external) field is a particle or anti particle. More...
 
bool isIncoming () const
 Tells if the (external) field is incoming or outgoing. More...
 
bool isIncomingParticle () const
 Tells if the (external) field is an incoming particle. More...
 
bool isOutgoingParticle () const
 Tells if the (external) field is an outgoing particle. More...
 
bool isIncomingAntiParticle () const
 Tells if the (external) field is an incoming anti-particle. More...
 
bool isOutgoingAntiParticle () const
 Tells if the (external) field is an outgoing an anti-particle. More...
 
- Public Member Functions inherited from csl::TensorFieldElement
csl::PrimaryType getPrimaryType () const override
 
csl::Type getType () const override
 
void print (int mode=0, std::ostream &out=std::cout, bool lib=false) const override
 
std::string printLaTeX (int mode=0) const override
 
std::optional< Exprevaluate (csl::eval::mode user_mode=csl::eval::base) const override
 
bool commutesWith (Expr_info expr, int sign=-1) const override
 
bool dependsOn (Expr_info expr) const override
 
bool dependsExplicitlyOn (Expr_info expr) const override
 
bool compareWithDummy (Expr_info other, std::map< Index, Index > &constraints, bool keepAllCosntraints=false) const override
 
bool operator== (Expr_info expr) const override
 
- Public Member Functions inherited from csl::TensorElement
 TensorElement (const Index &t_index, const Parent &t_parent)
 
 TensorElement (const std::vector< Index > &indices, const Parent &t_parent)
 
 TensorElement (const IndexStructure &indices, const Parent &t_parent)
 
 TensorElement (const Abstract *&expression)
 
 TensorElement (const Expr &expression)
 
int getNIndices () const override
 
IndexStructure getIndexStructure () const override
 
Index getIndex (int i) const override
 
bool askTerm (Expr_info expr, bool exact=false) const override
 
const std::vector< Equation *> & getProperties () const override
 
void addProperty (Equation *property) override
 
void removeProperty (Equation *property) override
 
bool checkIndexStructure (const std::vector< Index > &t_index) const override
 
std::optional< ExprreplaceIndex (const Index &indexToReplace, const Index &newIndex, bool refresh=true) const override
 
void setIndexStructure (const IndexStructure &t_index) override
 
bool hasContractionProperty (Expr_info B) const override
 
Expr contraction (Expr_info B) const override
 
Expr applyPermutation (const Permutation &permutations) const
 
csl::vector_expr getPermutations (bool optimize=true) const override
 
csl::vector_expr getAlternateForms () const override
 
std::optional< Exprderive (Expr_info expr) const override
 
- Public Member Functions inherited from csl::AbstractElement
 AbstractElement (const std::shared_ptr< AbstractParent > &t_parent)
 
Parent getParent () const override
 
std::string const & getName () const override
 
void setParent (const Parent &t_parent) override
 
void setName (const std::string &t_name) override
 
void setCommutable (bool t_commutable) override
 
int isPolynomial (Expr_info variable) const override
 
std::optional< ExprgetPolynomialTerm (Expr_info variable, int order) const override
 
- Public Member Functions inherited from csl::Complexified
std::optional< ExprgetRealPart () const override
 
Expr getImaginaryPart () const override
 
- Public Member Functions inherited from csl::AbstractBuildingBlock
bool isBuildingBlock () const override
 
std::optional< Exprexpand (bool full=false, bool inplace=false) const override
 
std::optional< Exprfactor (bool full=false) const override
 
std::optional< Exprfactor (Expr_info expr, bool full=false) const override
 
std::optional< ExprgetTerm () const override
 
std::optional< ExprgetComplexModulus () const override
 
std::optional< ExprfindSubExpression (Expr_info subExpression, const Expr &newExpression) const override
 
- Public Member Functions inherited from csl::Abstract
void printExplicit (int mode=0) const
 
virtual int getDim () const
 
virtual bool isInteger () const
 
virtual bool getValued () const
 
virtual long double getValue () const
 
virtual long long int getNum () const
 
virtual long long int getDenom () const
 
virtual int getNArgs (int axis=0) const
 
virtual csl::vector_expr::iterator begin ()
 
virtual csl::vector_expr::iterator end ()
 
virtual csl::vector_expr::const_iterator begin () const
 
virtual csl::vector_expr::const_iterator end () const
 
virtual Expr const & getArgument (int iArg=0) const
 
virtual Expr const & getArgument (const std::vector< int > &indices) const
 
virtual const csl::vector_expr & getVectorArgument () const
 
virtual Expr getVariable () const
 
virtual int getOrder () const
 
virtual int getSign () const
 
virtual bool isAnOperator () const
 
virtual bool isEmpty () const
 
virtual Expr getOperand () const
 
virtual std::vector< int > getShape () const
 
virtual IndexStructure getFreeIndexStructure () const
 
virtual int getNContractedPairs () const
 
virtual std::set< std::pair< int, int > > getContractedPair () const
 
virtual void setValue (long double t_value)
 
virtual void setArgument (const Expr &expr, int iArg=0)
 
virtual void setArgument (const Expr &expr, const std::vector< int > &indices)
 
virtual void setOperand (const Expr &operand)
 
virtual void setOperandPrivate (const Expr &operand, bool leaveEmpty)
 
virtual void setVectorArgument (const csl::vector_expr &t_argument)
 
virtual void insert (const Expr &expr, bool side=1)
 
virtual void setFullySymmetric ()
 
virtual void setFullyAntiSymmetric ()
 
virtual void addSymmetry (int i1, int i2)
 
virtual void addAntiSymmetry (int i1, int i2)
 
virtual int permut (int i1, int i2)
 
virtual Expr getNumericalFactor () const
 
virtual int getNFactor () const
 
virtual csl::vector_expr getFactors () const
 
virtual void getExponents (std::vector< Expr > const &factors, std::vector< Expr > &exponents) const
 
virtual bool checkIndexStructure (const std::initializer_list< Index > &index) const
 
virtual int getParity (Expr_info t_variable) const
 
virtual bool matchShape (Expr_info expr, bool exact=false) const
 
virtual long double evaluateScalar () const
 
virtual std::optional< Exprcollect (std::vector< Expr > const &factors, bool full=false) const
 
virtual Expr suppressTerm (Expr_info expr) const
 
virtual std::optional< ExprsuppressExponent (Expr const &factor, Expr const &exponent) const
 
virtual std::optional< Exprexpand_if (std::function< bool(Expr const &)> const &f, bool full=false, bool inPlace=false) const
 
virtual std::optional< ExprgetComplexArgument () const
 
virtual Expr applyOperator (const Expr &operand, bool leaveEmpty=false) const
 
virtual Expr addition_own (const Expr &expr) const
 
virtual Expr multiplication_own (const Expr &expr, bool side=1) const
 
virtual Expr division_own (const Expr &expr) const
 
virtual Expr exponentiation_own (const Expr &expr) const
 
virtual Expr getRegularExpression () const
 
virtual Expr tensordot (const Expr &expr) const
 
virtual Expr dot (const Expr &expr) const
 
virtual Expr getSum () const
 
virtual Expr getProduct () const
 
virtual Expr getVectorialModulus () const
 
virtual Expr getSubVectorial (int iExcept) const
 
virtual Expr getSubVectorial (int iExcept, int jExcept) const
 
virtual Expr getSubVectorial (const std::vector< int > &exceptions) const
 
virtual Expr determinant () const
 
virtual Expr trace () const
 
virtual Expr trace (int axis1, int axis2) const
 
virtual Expr transpose () const
 
virtual Expr symmetrise () const
 
virtual Expr antisymmetrise () const
 
virtual Expr inverseMatrix () const
 
virtual void operator= (double t_value)
 
virtual bool operator== (int t_value) const
 
virtual bool operator== (double t_value) const
 
virtual bool operator!= (int t_value) const
 
virtual bool operator!= (double t_value) const
 
bool operator!= (const Expr_c &expr) const
 
virtual Expr const & operator[] (int iArg) const
 
virtual Exproperator[] (int iArg)
 
virtual bool operator< (Expr_info expr) const=0
 
bool operator< (const Expr_c &expr) const
 
bool operator> (Expr_info expr) const
 
bool operator>= (Expr_info expr) const
 
bool operator<= (const Expr_c &expr) const
 

Private Member Functions

PolarizationField complexConjugatedField (bool keepFermionOrder=false) const
 
bool hasFieldChargeConjugation (mty::PolarizationField const *other) const
 
bool spaceIndexContraction (csl::Expr_info other) const
 
bool spinIndexContraction (csl::Expr_info other) const
 
bool isContractibleWith (csl::Expr_info otherPolar) const
 
csl::Expr sumPolarization (csl::Expr_info other) const
 
csl::Expr matrixChargeConjugation (csl::Expr_info other) const override
 
csl::Expr fieldChargeConjugation (mty::PolarizationField const *other) const
 
void updateComplexConjugation ()
 

Private Attributes

bool lockConjugation
 

Friends

std::ostream & operator<< (std::ostream &fout, const PolarizationField &pol)
 

Additional Inherited Members

- Protected Attributes inherited from mty::QuantumField
bool particle = true
 Tells if the QuantumField, if external, is a particle or an anti-particle. More...
 
bool external = false
 Tells if the field is external (initial of final state in computations) or not. More...
 
bool onShell = false
 
bool incoming = true
 Tells if the QuantumField, if external, is a incoming or outgoing. More...
 
csl::IndexStructure derivativeIndices {}
 csl::IndexStructure allowing to store derivative indices, to keep track of terms in \( \partial _\mu \) in computations while having only QuantumField objects. More...
 
PartnerShip partnerShip {}
 Wanted partner for fermion ordering in amplitude results, together with the number defining the fermion. More...
 
- Protected Attributes inherited from csl::TensorElement
IndexStructure index
 
- Protected Attributes inherited from csl::AbstractElement
std::shared_ptr< AbstractParentparent
 

Detailed Description

Representing polarization vectors in equations. Allows to compute polarization sums in cross-sections. Is derived from TensorFieldElement: possess at least one csl::Index (polarization) and one "space-time point" that is the impulsion of the particle.

Member Function Documentation

◆ getParticle()

Particle mty::PolarizationField::getParticle ( ) const
inline

Returns a mty::Particle, pointer to the parent of the field.

As QuantumField inherits from csl::TensorFieldElement, its parent is in the form of a csl::Parent. This function then makes a conversion to a mty::Particle before returning the pointer.

Returns
A shared pointer to the QuantumFieldParent (i.e. mty::Particle) of the field.

◆ setIncoming()

void mty::PolarizationField::setIncoming ( bool  t_incoming)
overridevirtual

Sets the incoming property of the particle.

Parameters
t_incomingMust be true if the field is incoming, false otherwise.
See also
incoming, isIncoming().

Reimplemented from mty::QuantumField.

◆ setParticle()

void mty::PolarizationField::setParticle ( bool  t_particle)
overridevirtual

Sets the particle property of the particle.

Parameters
t_particleMust be true if the field is a particle, false otherwise.
See also
particle, isParticle().

Reimplemented from mty::QuantumField.


The documentation for this class was generated from the following files: