1#ifndef AMPGEN_LINESHAPES_H
2#define AMPGEN_LINESHAPES_H
44#define DECLARE_LINESHAPE(X) \
45 class X : public AmpGen::Lineshape::Base { \
46 static std::string _id; \
49 X() { DEBUG("Constructing lineshape"); } \
50 AmpGen::Expression get(const AmpGen::Expression &s, const AmpGen::Expression &s1, const AmpGen::Expression &s2, const std::string &particleName, \
51 const unsigned int &L, const std::string &lineshapeModifier, AmpGen::DebugSymbols *dbexpressions = 0) const override; \
52 AmpGen::Expression get(const AmpGen::Particle &p, const std::string &lineshapeModifier, AmpGen::DebugSymbols *dbexpressions = nullptr) const override; \
55#define DEFINE_LINESHAPE(X) \
56 REGISTER_WITH_KEY(Lineshape::Base, Lineshape::X, #X, std::string); \
57 AmpGen::Expression Lineshape::X::get(const AmpGen::Particle &p, const std::string &lineshapeModifier, AmpGen::DebugSymbols *dbexpressions) const { \
58 return get(p.massSq(), p.daughter(0)->massSq(), p.daughter(1)->massSq(), p.name(), p.L(), lineshapeModifier, dbexpressions); \
60 AmpGen::Expression Lineshape::X::get(const AmpGen::Expression &s, const AmpGen::Expression &s1, const AmpGen::Expression &s2, \
61 const std::string &particleName, const unsigned int &L, const std::string &lineshapeModifier, \
62 AmpGen::DebugSymbols *dbexpressions) const
64#define DEFINE_GENERIC_SHAPE(X) \
65 REGISTER_WITH_KEY(Lineshape::Base, Lineshape::X, #X, std::string); \
66 AmpGen::Expression Lineshape::X::get(const AmpGen::Expression &s, const AmpGen::Expression &s1, const AmpGen::Expression &s2, \
67 const std::string &particleName, const unsigned int &L, const std::string &lineshapeModifier, \
68 AmpGen::DebugSymbols *dbexpressions) const { \
71 AmpGen::Expression Lineshape::X::get(const AmpGen::Particle &p, const std::string &lineshapeModifier, AmpGen::DebugSymbols *dbexpressions) const
86 const std::string &lineshapeModifier,
DebugSymbols *dbexpressions =
nullptr)
const
95 const unsigned &L, std::vector<std::pair<std::string, Expression>> *dbexpressions =
nullptr);
422 std::vector<Expression>
parameterVector(
const std::string &name,
const size_t &nParam);
#define DECLARE_LINESHAPE(X)
Wrapper class for shared_ptrs to virtual expressions for use in conjunction with operators to build e...
Static factory to construct classes from a hierarchy based on a key (normally std::string).
virtual Expression get(const Expression &s, const Expression &s1, const Expression &s2, const std::string &particleName, const unsigned &L, const std::string &lineshapeModifier, DebugSymbols *dbexpressions=nullptr) const =0
virtual Expression get(const AmpGen::Particle &p, const std::string &lineshapeModifier, AmpGen::DebugSymbols *dbexpressions=nullptr) const =0
static Expression get(const std::string &lineshape, const Particle &p, AmpGen::DebugSymbols *dbexpressions)
static Expression get(const std::string &lineshape, const Expression &s, const Expression &s1, const Expression &s2, const std::string &particleName, const unsigned &L, std::vector< std::pair< std::string, Expression > > *dbexpressions=nullptr)
static bool isLineshape(const std::string &lineshape)
Describes a particle, its decay process and subsequent decay products, which are also Particles.
Expression Q2(const Expression &Msq, const Expression &M1sq, const Expression &M2sq)
Expression kFactor(const Expression &mass, const Expression &width, std::vector< std::pair< std::string, Expression > > *dbexpressions=nullptr)
Expression BL(const Expression &s, const Expression &s0, const Expression &s1, const Expression &s2, const Expression &radius, const unsigned int &L)
Expression width(const Expression &s, const Expression &s1, const Expression &s2, const Expression &mass, const Expression &width, const Expression &radius, unsigned int L, DebugSymbols *dbexpressions=nullptr)
Expression BlattWeisskopf(const Expression &z, unsigned int L)
std::vector< DebugSymbol > DebugSymbols
Expression pol(const AmpGen::Expression &X, const std::vector< Expression > &p)
Expression BlattWeisskopf_Norm(const Expression &z, const Expression &z0, unsigned int L)
std::vector< Expression > parameterVector(const std::string &name, const size_t &nParam)