21 size_t sampleSize = InvMassSquared->values().size();
25 if (Params.
Type ==
"relativisticBreitWigner") {
26 }
else if (Params.
Type ==
"relativisticBreitWignerAC") {
29 LOG(INFO) <<
"Relativistic BreitWigner of type " << Params.
Type 30 <<
" is unknown. Using standard defintion as fallback!";
34 auto tr = std::make_shared<TreeNode>(
35 MComplex(
"", sampleSize), std::make_shared<BreitWignerStrategy>(
48 std::shared_ptr<Parameter> &out) {
49 if (out && checkType != out->type())
51 "BreitWignerStrat::execute() | Parameter type mismatch!");
55 if (checkType != out->type())
58 "Output parameter is of type " +
60 " and conflicts with expected type " +
75 "Number of IntParameters does not match: " +
76 std::to_string(nInt) +
" given but " +
"1 expected."));
79 "Number of FitParameters does not match: " +
80 std::to_string(nDouble) +
" given but " +
84 "Number of ComplexParameters does not match: " +
85 std::to_string(nComplex) +
" given but " +
89 "Number of MultiInt does not match: " +
90 std::to_string(nMInteger) +
" given but " +
94 "Number of MultiDoubles does not match: " +
95 std::to_string(nMDouble) +
" given but " +
99 "Number of MultiComplexes does not match: " +
100 std::to_string(nMComplex) +
" given but " +
109 auto &results = par->
values();
110 if (results.size() != n) {
119 unsigned int orbitL = 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));
131 return BWFunction(s, m0, ma, mb, Gamma0, orbitL,
132 MesonRadius, FormFactorFunctor);
134 }
else if (sa.size() == 1) {
135 double ma = std::sqrt(sa.at(0));
136 for (
size_t i = 0; i < s.size(); ++i) {
137 results[i] = BWFunction(s[i], m0, ma, std::sqrt(sb[i]), Gamma0, orbitL,
138 MesonRadius, FormFactorFunctor);
140 }
else if (sb.size() == 1) {
141 double mb = std::sqrt(sb.at(0));
142 for (
size_t i = 0; i < s.size(); ++i) {
143 results[i] = BWFunction(s[i], m0, std::sqrt(sa[i]), mb, Gamma0, orbitL,
144 MesonRadius, FormFactorFunctor);
147 for (
size_t i = 0; i < s.size(); ++i) {
148 results[i] = BWFunction(s[i], m0, std::sqrt(sa[i]), std::sqrt(sb[i]),
149 Gamma0, orbitL, MesonRadius, FormFactorFunctor);
virtual std::shared_ptr< Value< int > > intValue(size_t i)
std::function< std::complex< double >(double, double, double, double, double, unsigned int, double, std::shared_ptr< FormFactor >)> BreitWignerFunction
Base class for internal parameter.
std::complex< double > relativisticBreitWigner(double mSq, double mR, double ma, double mb, double width, unsigned int L, double mesonRadius, std::shared_ptr< FormFactor > FormFactorFunctor)
Relativistic Breit-Wigner model with barrier factors.
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)
std::complex< double > relativisticBreitWignerAnalyticCont(double mSq, double mR, double ma, double mb, double width, unsigned int L, double mesonRadius, std::shared_ptr< FormFactor > FormFactorFunctor)
Relativistic Breit-Wigner model with barrier factors.
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.))
std::shared_ptr< ComPWA::FunctionTree::TreeNode > createFunctionTree(InputInfo Params, 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 void execute(ComPWA::FunctionTree::ParameterList ¶s, std::shared_ptr< ComPWA::FunctionTree::Parameter > &out)
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