19 InvMassSquaredDaughter1,
21 InvMassSquaredDaughter2,
22 std::shared_ptr<ComPWA::FunctionTree::FitParameter> MesonRadius,
23 unsigned int L, std::shared_ptr<FormFactor> FormFactorFunctor,
26 size_t sampleSize = InvMassSquared->values().size();
28 auto ffTree = std::make_shared<TreeNode>(
30 std::make_shared<FormFactorStrategy>(FormFactorFunctor));
43 std::shared_ptr<Parameter> &out) {
45 throw BadParameter(
"FormFactorStrat::execute() | Parameter type mismatch!");
52 "Output parameter is of type " +
54 " and conflicts with expected type " +
58 size_t check_nInt = 1;
61 size_t check_nDouble = 1;
64 size_t check_nComplex = 0;
66 size_t check_nMInteger = 0;
69 size_t check_nMDouble = 3;
71 size_t check_nMComplex = 0;
75 if (nInt != check_nInt)
77 "Number of IntParameters does not match: " +
78 std::to_string(nInt) +
" given but " +
79 std::to_string(check_nInt) +
" expected."));
80 if (nDouble != check_nDouble)
82 "Number of FitParameters does not match: " +
83 std::to_string(nDouble) +
" given but " +
84 std::to_string(check_nDouble) +
" expected."));
85 if (nComplex != check_nComplex)
87 "Number of ComplexParameters does not match: " +
88 std::to_string(nComplex) +
" given but " +
89 std::to_string(check_nComplex) +
" expected."));
90 if (nMInteger != check_nMInteger)
92 "Number of MultiInt does not match: " +
93 std::to_string(nMInteger) +
" given but " +
94 std::to_string(check_nMInteger) +
" expected."));
95 if (nMDouble != check_nMDouble)
97 "Number of MultiDoubles does not match: " +
98 std::to_string(nMDouble) +
" given but " +
99 std::to_string(check_nMDouble) +
" expected."));
100 if (nMComplex != check_nMComplex)
102 "Number of MultiComplexes does not match: " +
103 std::to_string(nMComplex) +
" given but " +
104 std::to_string(check_nMComplex) +
" expected."));
111 auto &results = par->
values();
112 if (results.size() != n) {
119 unsigned int L = paras.
intValue(0)->value();
125 if (sa.size() == 1 && sb.size() == 1) {
126 double ma = std::sqrt(sa.at(0));
127 double mb = std::sqrt(sb.at(0));
134 }
else if (sa.size() == 1) {
135 double ma = std::sqrt(sa.at(0));
136 for (
size_t i = 0; i < s.size(); ++i) {
138 qSquared(s[i], ma, std::sqrt(sb[i])), L, MesonRadius);
140 }
else if (sb.size() == 1) {
141 double mb = std::sqrt(sb.at(0));
142 for (
size_t i = 0; i < s.size(); ++i) {
144 qSquared(s[i], std::sqrt(sa[i]), mb), L, MesonRadius);
147 for (
size_t i = 0; i < s.size(); ++i) {
149 qSquared(s[i], std::sqrt(sa[i]), std::sqrt(sb[i])), L, MesonRadius);
virtual std::shared_ptr< Value< int > > intValue(size_t i)
double qSquared(double S, double sqrtSA, double sqrtSB)
Calculate Break-up momentum squared.
Base class for internal parameter.
std::shared_ptr< Value< std::vector< double > > > MDouble(std::string name, size_t s, double el=0.)
virtual std::vector< std::shared_ptr< Value< std::vector< int > > > > & mIntValues()
TreeNode is the basic building block of the FunctionTree.
virtual std::vector< std::shared_ptr< Value< std::vector< double > > > > & mDoubleValues()
static const char *const ParNames[7]
Names of the parameter types, should be extended if an new parameter type is added.
std::shared_ptr< TreeNode > createLeaf(std::shared_ptr< Parameter > parameter)
virtual std::vector< std::shared_ptr< Value< std::complex< double > > > > & complexValues()
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)
virtual std::shared_ptr< FitParameter > doubleParameter(size_t i) const
virtual std::vector< std::shared_ptr< Value< std::vector< std::complex< double > > > > > & mComplexValues()
virtual std::vector< std::shared_ptr< Value< double > > > & doubleValues()
virtual std::vector< std::shared_ptr< FitParameter > > & doubleParameters()
virtual std::vector< std::shared_ptr< Value< int > > > & intValues()
virtual T & values()
Reference on the value.
This class provides a list of parameters and values of different types.
virtual std::shared_ptr< Value< std::vector< double > > > mDoubleValue(size_t i) const