1#ifndef AMPGEN_LINESHAPES_H
2#define AMPGEN_LINESHAPES_H
43#define DECLARE_LINESHAPE( X ) \
44 class X : public AmpGen::Lineshape::Base { \
45 static std::string _id; \
47 X(){ DEBUG("Constructing lineshape") ;} \
48 AmpGen::Expression get(const AmpGen::Expression& s, const AmpGen::Expression& s1, \
49 const AmpGen::Expression& s2, const std::string& particleName, \
50 const unsigned int& L, const std::string& lineshapeModifier, \
51 AmpGen::DebugSymbols* dbexpressions = 0) const override; \
52 AmpGen::Expression get(const AmpGen::Particle& p, \
53 const std::string& lineshapeModifier, \
54 AmpGen::DebugSymbols* dbexpressions = nullptr ) const override; \
57#define DEFINE_LINESHAPE( X ) \
58 REGISTER_WITH_KEY( Lineshape::Base, Lineshape::X, #X, std::string ); \
59 AmpGen::Expression Lineshape::X::get( const AmpGen::Particle& p, \
60 const std::string& lineshapeModifier, \
61 AmpGen::DebugSymbols* dbexpressions ) const { return \
62 get(p.massSq(), p.daughter(0)->massSq(), p.daughter(1)->massSq(), \
63 p.name(), p.L(), lineshapeModifier, dbexpressions) ;} \
64 AmpGen::Expression Lineshape::X::get( const AmpGen::Expression& s, const AmpGen::Expression& s1, \
65 const AmpGen::Expression& s2, const std::string& particleName, \
66 const unsigned int& L, const std::string& lineshapeModifier, \
67 AmpGen::DebugSymbols* dbexpressions ) const
69#define DEFINE_GENERIC_SHAPE( X ) \
70 REGISTER_WITH_KEY( Lineshape::Base, Lineshape::X, #X, std::string ); \
71 AmpGen::Expression Lineshape::X::get( const AmpGen::Expression& s, const AmpGen::Expression& s1, \
72 const AmpGen::Expression& s2, const std::string& particleName, \
73 const unsigned int& L, const std::string& lineshapeModifier, \
74 AmpGen::DebugSymbols* dbexpressions ) const { return 0;} \
75 AmpGen::Expression Lineshape::X::get( const AmpGen::Particle& p, \
76 const std::string& lineshapeModifier, \
77 AmpGen::DebugSymbols* dbexpressions ) const
93 const std::string& particleName,
const unsigned& L,
94 const std::string& lineshapeModifier,
DebugSymbols* dbexpressions =
nullptr )
const = 0;
96 const std::string& lineshapeModifier,
105 const Expression& s2,
const std::string& particleName,
const unsigned& L,
106 std::vector<std::pair<std::string, Expression>>* dbexpressions =
nullptr );
409 std::vector<std::pair<std::string, Expression>>* dbexpressions =
nullptr );
413 const Expression& radius,
const unsigned int& L );
419 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)