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 
8 #include "WilsonCoefficientNew.h"
9 #include <sstream>
10 #include <stdexcept>
11 
12 WilsonCoefficientNew::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 
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 
32 void 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 
51  setWilson(v, order_qcd_i, order_qed_i);
52 }
53 
55  resetWilson();
56 }
57 
59  return getWilson(order_qcd_i, order_qed_i);
60 }
61 
63  return getWilson();
64 }
65 
67  wilson = wc;
68 }
Expanded::getOrd
const T & getOrd(int j) const
Get an element of a single expansion.
Definition: Expanded.h:694
WilsonTemplateNew< gslpp::vector< gslpp::complex > >::resetWilson
void resetWilson()
Definition: WilsonTemplateNew.h:65
WilsonCoefficientNew::resetCoeff
void resetCoeff()
Definition: WilsonCoefficientNew.cpp:54
WilsonCoefficientNew::getCoeffElement
Expanded< gslpp::complex > getCoeffElement(int i) const
Definition: WilsonCoefficientNew.cpp:16
qcd_orders
qcd_orders
Definition: OrderScheme.h:65
WilsonTemplateNew< gslpp::vector< gslpp::complex > >::size
unsigned int size
Definition: WilsonTemplateNew.h:119
WilsonCoefficientNew::setCoeff
void setCoeff(int i, gslpp::complex z, qcd_orders order_qcd_i, qed_orders order_qed_i=QED0)
Definition: WilsonCoefficientNew.cpp:32
gslpp::complex
A class for defining operations on and functions of complex numbers.
Definition: gslpp_complex.h:35
WilsonTemplateNew< gslpp::vector< gslpp::complex > >::getWilson
Expanded< gslpp::vector< gslpp::complex > > getWilson() const
Definition: WilsonTemplateNew.h:101
Expanded::getN1
const int getN1() const
Get the number of terms in the outer expansion.
Definition: Expanded.h:803
WilsonTemplateNew< gslpp::vector< gslpp::complex > >::order_qed
qed_orders order_qed
Definition: WilsonTemplateNew.h:123
WilsonTemplateNew< gslpp::vector< gslpp::complex > >::wilson
Expanded< gslpp::vector< gslpp::complex > > wilson
Definition: WilsonTemplateNew.h:116
WilsonTemplateNew< gslpp::vector< gslpp::complex > >::order_qcd
qcd_orders order_qcd
Definition: WilsonTemplateNew.h:122
WilsonTemplateNew
Definition: WilsonTemplateNew.h:27
schemes
schemes
An enum type for regularization schemes.
Definition: OrderScheme.h:19
qed_orders
qed_orders
Definition: OrderScheme.h:81
Expanded
A template class for Taylor double expansion of several objects.
Definition: Expanded.h:55
WilsonCoefficientNew::getCoeff
Expanded< gslpp::vector< gslpp::complex > > getCoeff() const
Definition: WilsonCoefficientNew.cpp:62
WilsonTemplateNew< gslpp::vector< gslpp::complex > >::setWilson
void setWilson(const gslpp::vector< gslpp::complex > &v, qcd_orders order_qcd_i, qed_orders order_qed_i=QED0)
Definition: WilsonTemplateNew.h:105
WilsonCoefficientNew.h
Expanded::setOrd
void setOrd(int j, T value)
Set an element of a single expansion.
Definition: Expanded.h:713
Expanded::getN2
const std::vector< int > & getN2() const
Get the number of terms in the inner expansion.
Definition: Expanded.h:812
gslpp
Complex number, vector and matrix manipulation using GSL.
Definition: gslpp_complex.cpp:16
gslpp::vector< gslpp::complex >
WilsonCoefficientNew::WilsonCoefficientNew
WilsonCoefficientNew(unsigned int dim, schemes scheme, qcd_orders order_qcd, qed_orders order_qed=QED0)
Definition: WilsonCoefficientNew.cpp:12