a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
WilsonCoefficient.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
8#include "WilsonCoefficient.h"
9#include <sstream>
10#include <stdexcept>
11
12WilsonCoefficient::WilsonCoefficient(unsigned int dim, schemes scheme, orders order)
13: WilsonTemplate<gslpp::vector<gslpp::complex> >(dim, scheme, order)
14{};
15
16WilsonCoefficient::WilsonCoefficient(unsigned int dim, schemes scheme, orders order, orders_qed order_qed)
17: WilsonTemplate<gslpp::vector<gslpp::complex> >(dim, scheme, order, order_qed)
18{};
19
20void WilsonCoefficient::setCoeff(unsigned int i, gslpp::complex z, orders order_i)
21{
22 if ((unsigned int) i > size) {
23 std::stringstream out;
24 out << i;
25 throw std::runtime_error("WilsonCoefficient::setCoeff(): coefficient index "
26 + out.str() + " out of range");
27 }
28 if (order_i > order) {
29 std::stringstream out;
30 out << order_i;
31 throw std::runtime_error("WilsonCoefficient::setCoeff(): order " + out.str() +
32 " not implemented ");
33 }
34 elem[order_i]->assign(i, z);
35}
36
37void WilsonCoefficient::setCoeff(unsigned int i, gslpp::complex z, orders_qed order_qed_i)
38{
39 if ((unsigned int) i > size) {
40 std::stringstream out;
41 out << i;
42 throw std::runtime_error("WilsonCoefficientEW::setCoeff(): coefficient index "
43 + out.str() + " out of range");
44 }
45 if (order_qed_i > order_qed) {
46 std::stringstream out;
47 out << order_qed_i;
48 throw std::runtime_error("WilsonCoefficientEW::setCoeff(): order_qed " + out.str() +
49 " not implemented ");
50 }
51 elem[order_qed_i]->assign(i, z);
52}
WilsonCoefficient(unsigned int dim, schemes scheme, orders order)
void setCoeff(const gslpp::vector< gslpp::complex > &z, orders order_i)
A template class for the Wilson coefficients.
gslpp::vector< gslpp::complex > * elem[MAXORDER_QED+1]
orders
An enum type for orders in QCD.
Definition: OrderScheme.h:33
schemes
An enum type for regularization schemes.
Definition: OrderScheme.h:20
orders_qed
An enum type for orders in electroweak.
Definition: OrderScheme.h:56