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 
12 WilsonCoefficient::WilsonCoefficient(unsigned int dim, schemes scheme, orders order)
13 : WilsonTemplate<gslpp::vector<gslpp::complex> >(dim, scheme, order)
14 {};
15 
16 WilsonCoefficient::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 
20 void 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 
37 void 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::WilsonCoefficient
WilsonCoefficient(unsigned int dim, schemes scheme, orders order)
Definition: WilsonCoefficient.cpp:12
WilsonTemplate< gslpp::vector< gslpp::complex > >::order_qed
orders_qed order_qed
Definition: WilsonTemplate.h:119
WilsonTemplate< gslpp::vector< gslpp::complex > >::size
unsigned int size
Definition: WilsonTemplate.h:115
WilsonTemplate< gslpp::vector< gslpp::complex > >::order
orders order
Definition: WilsonTemplate.h:118
gslpp::complex
A class for defining operations on and functions of complex numbers.
Definition: gslpp_complex.h:35
WilsonCoefficient::setCoeff
void setCoeff(const gslpp::vector< gslpp::complex > &z, orders order_i)
Definition: WilsonCoefficient.h:34
schemes
schemes
An enum type for regularization schemes.
Definition: OrderScheme.h:19
WilsonTemplate
A template class for the Wilson coefficients.
Definition: WilsonTemplate.h:23
orders_qed
orders_qed
An enum type for orders in electroweak.
Definition: OrderScheme.h:47
orders
orders
An enum type for orders in QCD.
Definition: OrderScheme.h:31
WilsonCoefficient.h
gslpp
Complex number, vector and matrix manipulation using GSL.
Definition: gslpp_complex.cpp:16
WilsonTemplate< gslpp::vector< gslpp::complex > >::elem
gslpp::vector< gslpp::complex > * elem[MAXORDER_QED+1]
Definition: WilsonTemplate.h:114