21 size_t sampleSize = InvMassSquared->values().size();
23 auto tr = std::make_shared<ComPWA::FunctionTree::TreeNode>(
25 std::make_shared<VoigtianStrategy>());
36 std::shared_ptr<Parameter> &out) {
38 throw BadParameter(
"VoigtianStrat::execute() | Parameter type mismatch!");
45 "Output parameter is of type " +
47 " and conflicts with expected type " +
51 size_t check_nInt = 0;
53 size_t check_nDouble = 3;
56 size_t check_nComplex = 0;
58 size_t check_nMInteger = 0;
60 size_t check_nMDouble = 1;
62 size_t check_nMComplex = 0;
66 if (nInt != check_nInt)
68 "Number of IntParameters does not match: " +
69 std::to_string(nInt) +
" given but " +
70 std::to_string(check_nInt) +
" expected."));
73 if (nDouble != check_nDouble)
75 "Number of FitParameters does not match: " +
76 std::to_string(nDouble) +
" given but " +
77 std::to_string(check_nDouble) +
" expected."));
78 if (nComplex != check_nComplex)
80 "Number of ComplexParameters does not match: " +
81 std::to_string(nComplex) +
" given but " +
82 std::to_string(check_nComplex) +
" expected."));
83 if (nMInteger != check_nMInteger)
85 "Number of MultiInt does not match: " +
86 std::to_string(nMInteger) +
" given but " +
87 std::to_string(check_nMInteger) +
" expected."));
88 if (nMDouble != check_nMDouble)
90 "Number of MultiDoubles does not match: " +
91 std::to_string(nMDouble) +
" given but " +
92 std::to_string(check_nMDouble) +
" expected."));
93 if (nMComplex != check_nMComplex)
95 "Number of MultiComplexes does not match: " +
96 std::to_string(nMComplex) +
" given but " +
97 std::to_string(check_nMComplex) +
" expected."));
105 auto &results = par->
values();
106 if (results.size() != n) {
117 for (
unsigned int ele = 0; ele < n; ele++) {
120 paras.
mDoubleValue(0)->values().at(ele), m0, Gamma0, sigma);
121 }
catch (std::exception &ex) {
122 LOG(ERROR) <<
"VoigtianStrategy::execute() | " << ex.what();
123 throw(std::runtime_error(
"VoigtianStrategy::execute() | " 124 "Evaluation of dynamic function failed!"));
This file contains the declaration of the Voigtian class, which is used the implementation of voigt f...
Base class for internal parameter.
virtual std::vector< std::shared_ptr< Value< std::vector< int > > > > & mIntValues()
std::shared_ptr< ComPWA::FunctionTree::TreeNode > createFunctionTree(InputInfo Params, std::shared_ptr< ComPWA::FunctionTree::Value< std::vector< double >>> InvMassSquared)
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< 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 void execute(ComPWA::FunctionTree::ParameterList ¶s, std::shared_ptr< ComPWA::FunctionTree::Parameter > &out)
virtual std::vector< std::shared_ptr< FitParameter > > & doubleParameters()
virtual std::vector< std::shared_ptr< Value< int > > > & intValues()
std::complex< double > dynamicalFunction(double mSq, double mR, double wR, double sigma)
Dynamical voigt function.
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