1#ifndef AMPGEN_IVERTEX_H
2#define AMPGEN_IVERTEX_H
26#define DECLARE_VERTEX(NAME) \
27 struct NAME : public Base { \
28 NAME(){ DEBUG("Constructing vertex"); } \
29 virtual Tensor operator()(const Tensor& P, const Tensor& Q, const Tensor& V1, const Tensor& V2, DebugSymbols* db = 0 ) override; \
30 static std::string _id; \
33#define DEFINE_VERTEX(VERTEX) \
34 REGISTER_WITH_KEY( Vertex::Base, Vertex::VERTEX, #VERTEX, std::string ); \
35 Tensor Vertex::VERTEX::operator()( const Tensor& P, const Tensor& Q, const Tensor& V1, const Tensor& V2, DebugSymbols* db )
Static factory to construct classes from a hierarchy based on a key (normally std::string)
static Tensor getSpinFactor(const Tensor &P, const Tensor &Q, const Tensor &V1, const Tensor &V2, const std::string &name, DebugSymbols *db=nullptr)
static Tensor getSpinFactorNBody(const std::vector< std::pair< Tensor, Tensor > > &tensors, const unsigned int &mL, DebugSymbols *db=nullptr)
static bool isVertex(const std::string &hash)
Tensor Spin2Projector(const Tensor &p)
Helper function that computes the projection operator onto a spin one state.
Tensor Orbital_DWave(const Tensor &p, const Tensor &q)
Helper function that computes the orbital momentum operator.
#define DECLARE_VERTEX(NAME)
Macro to declare a vertex.
Tensor Orbital_PWave(const Tensor &p, const Tensor &q)
Helper function that computes the orbital momentum operator.
Tensor Spin1Projector(const Tensor &p)
Helper function that computes the projection operator onto a spin one state.
Tensor Spin1hProjector(const Tensor &B)
Helper function that projects a spinor.
Namespace that contains the base class for vertices, Vertex::Base, as well as the implementations of ...
Tensor Spin3hProjector(const Tensor &A)
Tensor Spin3hbProjector(const Tensor &A)
Tensor Spin1hbProjector(const Tensor &B)
Tensor slash(const Tensor &P)
std::vector< DebugSymbol > DebugSymbols
Tensor Bar(const Tensor &P)
Tensor gamma_twiddle(const Tensor &P)
Base class for all spin vertices.
virtual AmpGen::Tensor operator()(const AmpGen::Tensor &P, const AmpGen::Tensor &Q, const AmpGen::Tensor &V1, const AmpGen::Tensor &V2, AmpGen::DebugSymbols *db=nullptr)=0
Calculate the generalised current for this decay process, as a function of: