5 #ifndef COMPWA_PHYSICS_DYNAMICS_FORMFACTOR_HPP_ 6 #define COMPWA_PHYSICS_DYNAMICS_FORMFACTOR_HPP_ 24 inline double qSquared(
double S,
double sqrtSA,
double sqrtSB) {
25 double mapb = sqrtSA + sqrtSB;
26 double mamb = sqrtSA - sqrtSB;
27 double t1 = S - mapb * mapb;
28 double t2 = S - mamb * mamb;
29 return (t1 * t2 / (4 * S));
32 inline double phspFactor(
double sqrtS,
double ma,
double mb) {
33 return std::abs(std::sqrt(
qSquared(sqrtS * sqrtS, ma, mb))) /
42 inline std::complex<double>
phspFactorAC(
double sqrtS,
double ma,
double mb) {
45 double s = sqrtS * sqrtS;
46 std::complex<double> i(0, 1);
63 std::complex<double> rho;
64 double q = std::sqrt(std::fabs(
qSquared(s, ma, mb) * 4 / s));
65 if ((ma + mb) * (ma + mb) < s) {
66 rho = (-q / M_PI * log(std::fabs((1 + q) / (1 - q))) + i * q) /
67 (i * 16.0 * M_PI * sqrtS);
68 }
else if (0 < s && s <= (ma + mb) * (ma + mb)) {
69 rho = (-2.0 * q / M_PI * atan(1 / q)) / (i * 16.0 * M_PI * sqrtS);
71 rho = -q / M_PI * std::log(std::fabs((1 + q) / (1 - q)));
73 throw std::runtime_error(
"phspFactor() | PhspFactor not " 74 "defined at sqrtS = " +
75 std::to_string((
long double)sqrtS));
78 if (rho.real() != rho.real() || rho.imag() != rho.imag()) {
80 ss <<
"phspFactor() | Result invalid (NaN)! sqrtS=" << sqrtS
81 <<
", ma=" << ma <<
", mb=" << mb;
82 throw std::runtime_error(ss.str());
95 inline std::complex<double>
qValueAC(
double sqrtS,
double ma,
double mb) {
104 virtual double operator()(
double QSquared,
unsigned int L,
105 double MesonRadius)
const = 0;
106 virtual std::string
getName()
const = 0;
111 double operator()(
double QSquared,
unsigned int L,
double MesonRadius)
const {
114 std::string
getName()
const {
return "NoFormFactor"; }
123 if (MesonRadius == 0.) {
127 double z = qSquared * MesonRadius * MesonRadius;
136 ff = std::sqrt(2 * z / (z + 1));
138 ff = std::sqrt(13 * z * z / ((z - 3) * (z - 3) + 9 * z));
140 ff = std::sqrt(277 * z * z * z /
141 (z * (z - 15) * (z - 15) + 9 * (2 * z - 5) * (2 * z - 5)));
143 ff = std::sqrt(12746 * z * z * z * z /
144 ((z * z - 45 * z + 105) * (z * z - 45 * z + 105) +
145 25 * z * (2 * z - 21) * (2 * z - 21)));
150 std::string
getName()
const {
return "BlattWeisskopf"; }
156 if (MesonRadius == 0.) {
162 double alpha = MesonRadius * MesonRadius / 6;
163 ff = std::exp(-alpha * qSquared);
168 std::string
getName()
const {
return "CrystalBarrel"; }
173 InvMassSquaredDaughter1,
175 InvMassSquaredDaughter2,
176 std::shared_ptr<ComPWA::FunctionTree::FitParameter> MesonRadius,
177 unsigned int L, std::shared_ptr<FormFactor> FormFactorFunctor,
186 FormFactorFunctor(FF) {}
189 std::shared_ptr<ComPWA::FunctionTree::Parameter> &out);
double phspFactor(double sqrtS, double ma, double mb)
std::complex< double > phspFactorAC(double sqrtS, double ma, double mb)
Two body phsp factor.
double qSquared(double S, double sqrtSA, double sqrtSB)
Calculate Break-up momentum squared.
This file contains Functions implementing the Strategy interface so they can be used inside a node of...
std::shared_ptr< ComPWA::FunctionTree::TreeNode > createFunctionTree(std::shared_ptr< ComPWA::FunctionTree::Value< std::vector< double >>> InvMassSquaredDaughter1, std::shared_ptr< ComPWA::FunctionTree::Value< std::vector< double >>> InvMassSquaredDaughter2, std::shared_ptr< ComPWA::FunctionTree::FitParameter > MesonRadius, unsigned int L, std::shared_ptr< FormFactor > FormFactorFunctor, std::shared_ptr< ComPWA::FunctionTree::Value< std::vector< double >>> InvMassSquared)
std::complex< double > qValueAC(double sqrtS, double ma, double mb)
Calculate Break-up momentum.
ParType
Enums for the type of the parameter, should be extended if an new parameter type is added...
Virtual base class for operations of FunctionTree nodes.
This class provides a list of parameters and values of different types.