25 throw std::runtime_error(
26 "Flatte::createFunctionTree() | Vector with " 27 "couplings has a wrong size. We expect either 2 or 3 couplings.");
30 throw std::runtime_error(
31 "Flatte::createFunctionTree() | Coupling to signal channel not set");
33 size_t sampleSize = InvMassSquared->values().size();
36 auto tr = std::make_shared<TreeNode>(
55 std::shared_ptr<Parameter> &out) {
56 if (out && checkType != out->type())
57 throw BadParameter(
"FlatteStrategy::execute() | Parameter type mismatch!");
61 if (checkType != out->type())
64 "Output parameter is of type " +
66 " and conflicts with expected type " +
70 size_t check_nInt = 0;
72 size_t check_nDouble = 10;
75 size_t check_nComplex = 0;
77 size_t check_nMInteger = 0;
79 size_t check_nMDouble = 3;
81 size_t check_nMComplex = 0;
85 if (nInt != check_nInt)
87 "Number of IntParameters does not match: " +
88 std::to_string(nInt) +
" given but " +
89 std::to_string(check_nInt) +
" expected."));
90 if (nDouble != check_nDouble)
92 "Number of FitParameters does not match: " +
93 std::to_string(nDouble) +
" given but " +
94 std::to_string(check_nDouble) +
" expected."));
95 if (nComplex != check_nComplex)
97 "Number of ComplexParameters does not match: " +
98 std::to_string(nComplex) +
" given but " +
99 std::to_string(check_nComplex) +
" expected."));
100 if (nMInteger != check_nMInteger)
102 "Number of MultiInt does not match: " +
103 std::to_string(nMInteger) +
" given but " +
104 std::to_string(check_nMInteger) +
" expected."));
105 if (nMDouble != check_nMDouble)
107 "Number of MultiDoubles does not match: " +
108 std::to_string(nMDouble) +
" given but " +
109 std::to_string(check_nMDouble) +
" expected."));
110 if (nMComplex != check_nMComplex)
112 "Number of MultiComplexes does not match: " +
113 std::to_string(nMComplex) +
" given but " +
114 std::to_string(check_nMComplex) +
" expected."));
123 auto &results = par->
values();
124 if (results.size() != n) {
128 for (
size_t ele = 0; ele < n; ele++) {
147 }
catch (std::exception &ex) {
148 LOG(ERROR) <<
"FlatteStrategy::execute() | " << ex.what();
149 throw(std::runtime_error(
"FlatteStrategy::execute() | " 150 "Evaluation of dynamic function failed!"));
Base class for internal parameter.
std::complex< double > dynamicalFunction(double mSq, double mR, double gA, std::complex< double > termA, std::complex< double > termB, std::complex< double > termC=std::complex< double >(0, 0))
Dynamical function for two coupled channel approach.
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< ComPWA::FunctionTree::TreeNode > createFunctionTree(InputInfo Params, std::shared_ptr< ComPWA::FunctionTree::Value< std::vector< double >>> InvMassSquared)
virtual void execute(ComPWA::FunctionTree::ParameterList ¶s, std::shared_ptr< ComPWA::FunctionTree::Parameter > &out)
std::shared_ptr< TreeNode > createLeaf(std::shared_ptr< Parameter > parameter)
virtual std::vector< std::shared_ptr< Value< std::complex< double > > > > & complexValues()
std::shared_ptr< Value< std::vector< std::complex< double > > > > MComplex(std::string name, size_t s, std::complex< double > el=std::complex< double >(0., 0.))
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
virtual std::shared_ptr< Value< double > > doubleValue(size_t i) const