27 namespace MD = MultiDimensional;
29 FFBtoDBGLVar::FFBtoDBGLVar() {
31 vector<IndexType> dims = {4, 9};
33 string name{
"FFBtoDBGLVar"};
37 addProcessSignature(PID::BPLUS, {-PID::D0});
40 addProcessSignature(PID::BZERO, {PID::DMINUS});
45 addProcessSignature(PID::BS, {PID::DSMINUS});
51 void FFBtoDBGLVar::defineSettings() {
52 _FFErrNames = {
"delta_ap0",
"delta_ap1",
"delta_ap2",
"delta_ap3",
"delta_a00",
"delta_a01",
"delta_a02",
"delta_a03"};
53 setPath(getFFErrPrefixGroup().
get());
57 addSetting<double>(
"ChiT",5.131e-4);
58 addSetting<double>(
"ChiL",6.332e-3);
60 vector<double> apvec={0.01565,-0.0353,-0.043,0.194};
61 vector<double> a0vec={0.07932,-0.214,0.17,-0.958};
62 addSetting<vector<double>>(
"ap",apvec);
63 addSetting<vector<double>>(
"a0",a0vec);
65 vector<double> BcStatesp={6.329, 6.920, 7.020};
66 vector<double> BcStates0={6.716, 7.121};
67 addSetting<vector<double>>(
"BcStatesp",BcStatesp);
68 addSetting<vector<double>>(
"BcStates0",BcStates0);
72 vector<vector<double>> apa0mat{ {1., 0., 0., 0., 0., 0., 0., 0.},
73 {0., 1., 0., 0., 0., 0., 0., 0.},
74 {0., 0., 1., 0., 0., 0., 0., 0.},
75 {0., 0., 0., 1., 0., 0., 0., 0.},
76 {0., 0., 0., 0., 1., 0., 0., 0.},
77 {0., 0., 0., 0., 0., 1., 0., 0.},
78 {0., 0., 0., 0., 0., 0., 1., 0.},
79 {0., 0., 0., 0., 0., 0., 0., 1.}};
80 addSetting<vector<vector<double>>>(
"apa0matrix",apa0mat);
82 for (
auto elem : _FFErrNames) {
83 addSetting<double>(elem, 0.);
89 void FFBtoDBGLVar::evalAtPSPoint(
const vector<double>& point,
const vector<double>& masses) {
90 Tensor& result = getTensor();
94 MSG_WARNING(
"Warning, Settings have not been defined!");
100 if(masses.size() >= 2) {
106 Mb = this->masses()[0];
107 Mc = this->masses()[1];
109 const double Sqq = point[0];
110 const double Mb2 = Mb*Mb;
111 const double Mc2 = Mc*Mc;
112 const double rC = Mc/Mb;
113 const double rC2 = rC*rC;
114 const double sqrC = sqrt(rC);
116 double w = (Mb2 + Mc2 - Sqq) / (2. * Mb * Mc);
118 if(
isZero(w - 1.0)) w += 1e-6;
120 const size_t nmax = 4;
121 const double z = (sqrt(w+1) -
sqrt2)/(sqrt(w+1)+
sqrt2);
122 vector<double> zpow{1.};
123 for (
size_t n = 1; n < nmax; ++n){
124 zpow.push_back(zpow[n-1]*z);
127 const vector<double>& BcStatesp = (*getSetting<vector<double>>(
"BcStatesp"));
128 const vector<double>& BcStates0 = (*getSetting<vector<double>>(
"BcStates0"));
130 const vector<double>& ap = (*getSetting<vector<double>>(
"ap"));
131 const vector<double>& a0 = (*getSetting<vector<double>>(
"a0"));
133 const vector<vector<double>>& apa0mat = (*getSetting<vector<vector<double>>>(
"apa0matrix"));
136 const double chiT=(*getSetting<double>(
"ChiT"))/(unitres*unitres);
137 const double chiL=(*getSetting<double>(
"ChiL"));
138 const double tp=(Mb+Mc)*(Mb+Mc)/Mb2;
139 const double tm=(Mb-Mc)*(Mb-Mc)/Mb2;
140 const double sqtptm = sqrt(tp - tm);
143 for(
size_t n = 0; n< BcStatesp.size(); ++n) {
144 double sqtpBc = sqrt(tp - pow(BcStatesp[n]*unitres/Mb,2));
145 Pp *= ((z-((sqtpBc-sqtptm)/(sqtpBc+sqtptm)))/(1-z*((sqtpBc-sqtptm)/(sqtpBc+sqtptm))));
149 for(
size_t n = 0; n< BcStates0.size(); ++n){
150 double sqtpBc = sqrt(tp-pow(BcStates0[n]*unitres/Mb,2));
151 P0 *= ((z-((sqtpBc-sqtptm)/(sqtpBc+sqtptm)))/(1-z*((sqtpBc-sqtptm)/(sqtpBc+sqtptm))));
154 double phip = 32.*sqrt(nc/(6.*
pi*chiT*Mb2))*rC2*pow(1+z,2)*pow(1-z,0.5)/pow((1+rC)*(1-z)+2*sqrC*(1+z),5);
156 double phi0 = (1-rC2)*8.*sqrt(nc/(8.*
pi*chiL))*rC*(1+z)*pow(1-z,1.5)/pow((1+rC)*(1-z)+2*sqrC*(1+z),4);
160 for(
size_t n = 0; n< ap.size(); ++n) Fp += ap[n] * zpow[n];
164 for(
size_t n = 0; n< a0.size(); ++n) F0 += a0[n] * zpow[n];
184 for(
size_t n = 0; n < 4; ++n){
185 f0entry += apa0mat[n+4][idx]*zpow[n]/(P0*phi0);
186 fpentry += apa0mat[n][idx]*zpow[n]/(Pp*phip);
194 unique_ptr<FormFactorBase> FFBtoDBGLVar::clone(
const string& label) {
TensorData makeEmptySparse(const IndexList &dimensions, const LabelsList &labels)
std::complex< double > & element(const IndexList &indices={})
access an element given its indices
Tensor indices label definitions.
static constexpr double sqrt2
Sparse tensor data container.
Multidimensional tensor class with complex numbers as elements.
bool isZero(const std::complex< double > val)
void clearData()
sets all the elements to 0
Various numerical constants.
Hammer particle data class.
BGL form factors with variations
static constexpr double pi