a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
WilsonCoefficientNew.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2012 HEPfit Collaboration
3 *
4 *
5 * For the licensing terms see doc/COPYING.
6 */
7
9#include <sstream>
10#include <stdexcept>
11
12WilsonCoefficientNew::WilsonCoefficientNew(unsigned int dim, schemes scheme, qcd_orders order_qcd_i, qed_orders order_qed_i)
13: WilsonTemplateNew<gslpp::vector<gslpp::complex> >(dim, scheme, order_qcd_i, order_qed_i) {
14};
15
16Expanded<gslpp::complex> WilsonCoefficientNew::getCoeffElement(int i) const {
17 Expanded<gslpp::complex> ret;
18
19 if (i >= size) {
20 std::stringstream out;
21 out << i;
22 throw std::runtime_error("WilsonTemplate::getCoeff(): requested element " + out.str() +
23 " not present in the object");
24 }
25 std::vector<std::vector<gslpp::complex> > obj(wilson.getN1());
26 for (int j = 0; j < wilson.getN1(); j++)
27 for (int k = 0; k < wilson.getN2().at(j); k++)
28 obj[j].push_back(wilson.getOrd(j, k)(i));
29 return (Expanded<gslpp::complex>(obj));
30};
31
32void WilsonCoefficientNew::setCoeff(int i, gslpp::complex z, qcd_orders order_qcd_i, qed_orders order_qed_i) {
33 if (i >= size) {
34 std::stringstream out;
35 out << i;
36 throw std::runtime_error("WilsonTemplate::setCoeff(): coefficient index "
37 + out.str() + " out of range");
38 }
39 if (order_qcd_i > order_qcd || order_qed_i > order_qed) {
40 std::stringstream out;
41 out << order_qcd_i << " and " << order_qed_i;
42 throw std::runtime_error("WilsonTemplate::setCoeff(): order " + out.str() +
43 " not implemented ");
44 }
45 gslpp::vector<gslpp::complex> tmp = wilson.getOrd(order_qcd_i, order_qed_i);
46 tmp.assign(i, z);
47 wilson.setOrd(order_qcd_i, order_qed_i, tmp);
48}
49
50void WilsonCoefficientNew::setCoeff(const gslpp::vector<gslpp::complex>& v, qcd_orders order_qcd_i, qed_orders order_qed_i) {
51 setWilson(v, order_qcd_i, order_qed_i);
52}
53
56}
57
58gslpp::vector<gslpp::complex> WilsonCoefficientNew::getCoeff(qcd_orders order_qcd_i, qed_orders order_qed_i) const {
59 return getWilson(order_qcd_i, order_qed_i);
60}
61
62Expanded<gslpp::vector<gslpp::complex> > WilsonCoefficientNew::getCoeff() const {
63 return getWilson();
64}
65
66void WilsonCoefficientNew::setCoeff(const Expanded<gslpp::vector<gslpp::complex> > wc) {
67 wilson = wc;
68}
Expanded< gslpp::complex > getCoeffElement(int i) const
Expanded< gslpp::vector< gslpp::complex > > getCoeff() const
void setCoeff(int i, gslpp::complex z, qcd_orders order_qcd_i, qed_orders order_qed_i=QED0)
WilsonCoefficientNew(unsigned int dim, schemes scheme, qcd_orders order_qcd, qed_orders order_qed=QED0)
void setWilson(const gslpp::vector< gslpp::complex > &v, qcd_orders order_qcd_i, qed_orders order_qed_i=QED0)
Expanded< gslpp::vector< gslpp::complex > > getWilson() const
Expanded< gslpp::vector< gslpp::complex > > wilson
schemes
An enum type for regularization schemes.
Definition: OrderScheme.h:20
qed_orders
An enum type for qed_orders in electroweak.
Definition: OrderScheme.h:90
qcd_orders
An enum type for qcd_orders in QCD.
Definition: OrderScheme.h:74