Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FFBtoDBLPR.cc
Go to the documentation of this file.
1 ///
2 /// @file FFBtoDBLPR.cc
3 /// @brief \f$ B \rightarrow D \f$ BLPR form factors
4 ///
5 
6 //**** This file is a part of the HAMMER library
7 //**** Copyright (C) 2016 - 2020 The HAMMER Collaboration
8 //**** HAMMER is licensed under version 3 of the GPL; see COPYING for details
9 //**** Please note the MCnet academic guidelines; see GUIDELINES for details
10 
11 // -*- C++ -*-
13 #include "Hammer/IndexLabels.hh"
14 #include "Hammer/Math/Constants.hh"
15 #include "Hammer/Math/Utils.hh"
16 #include "Hammer/Particle.hh"
17 #include "Hammer/Tools/Pdg.hh"
19 #include <cmath>
20 
21 #include <iostream>
22 
23 using namespace std;
24 
25 namespace Hammer {
26 
27  namespace MD = MultiDimensional;
28 
29  FFBtoDBLPR::FFBtoDBLPR() {
30  // Create tensor rank and dimensions
31  vector<IndexType> dims = {4};
32  string name{"FFBtoDBLPR"};
33 
34  setPrefix("BtoD");
35  addProcessSignature(PID::BPLUS, {-PID::D0});
36  addTensor(Tensor{name, MD::makeEmptySparse(dims, {FF_BD})});
37 
38  addProcessSignature(PID::BZERO, {PID::DMINUS});
39  addTensor(Tensor{name, MD::makeEmptySparse(dims, {FF_BD})});
40 
41  setPrefix("BstoDs");
42  addProcessSignature(PID::BS, {PID::DSMINUS});
43  addTensor(Tensor{name, MD::makeEmptySparse(dims, {FF_BSDS})});
44 
45  setSignatureIndex();
46  }
47 
48  void FFBtoDBLPR::defineSettings() {
49  //_FFErrNames = ;
50  setPath(getFFErrPrefixGroup().get());
51  setUnits("GeV");
52 
53  addSetting<double>("RhoSq",1.24);
54  addSetting<double>("a",1.509/sqrt2);
55  //1S scheme: mb1S = 4710, mbBar = 5313, lambda1 = -3 10^5 MeV^2, delta mb-mc = 3400, alpha_s = 26/100
56  addSetting<double>("as",0.26);
57  addSetting<double>("mb",4.710);
58  addSetting<double>("mc",4.710 - 3.400);
59  addSetting<double>("la",0.57115);
60  //Renormalon improvement (1S scheme)
61  addSetting<double>("ebR/eb",0.861);
62  addSetting<double>("ecR/ec",0.822);
63 
64  addSetting<double>("chi21",-0.06);
65  addSetting<double>("chi2p",-0.00);
66  addSetting<double>("chi3p",0.05);
67  addSetting<double>("eta1",0.30);
68  addSetting<double>("etap",-0.05);
69  addSetting<double>("dV20",0.);
70 
71  initialized = true;
72 
73  }
74 
75  void FFBtoDBLPR::evalAtPSPoint(const vector<double>& point, const vector<double>& masses) {
76  Tensor& result = getTensor();
77  result.clearData();
78 
79  if(!initialized){
80  MSG_WARNING("Warning, Settings have not been defined!");
81  }
82 
83  double Mb = 0.;
84  double Mc = 0.;
85  // double unitres = 1.;
86  if(masses.size() >= 2) {
87  Mb = masses[0];
88  Mc = masses[1];
89  // unitres = _units;
90  }
91  else {
92  Mb = this->masses()[0];
93  Mc = this->masses()[1];
94  }
95  const double Mb2 = Mb*Mb;
96  const double Mc2 = Mc*Mc;
97 
98  double Sqq = point[0];
99 
100  // const double sqSqq = sqrt(Sqq);
101  const double sqMbMc = sqrt(Mb*Mc);
102  double w = (Mb2 + Mc2 - Sqq)/(2.*Mb*Mc);
103  //safety measure if w==1.0
104  if(isZero(w - 1.0)) w += 1e-6;
105 
106  //Conformal parameters
107  const double a = *getSetting<double>("a");
108  const double zCon = (sqrt(w+1) - sqrt2*a)/(sqrt(w+1) + sqrt2*a);
109 
110  //BLPR expansion parameters
111  const double zBC = (*getSetting<double>("mc"))/(*getSetting<double>("mb"));
112  const double eb = (*getSetting<double>("la"))/(*getSetting<double>("mb")*2.);
113  const double ebReb = (*getSetting<double>("ebR/eb"));
114  const double ec = (*getSetting<double>("la"))/(*getSetting<double>("mc")*2.);
115  const double ecRec = (*getSetting<double>("ecR/ec"));
116  const double as = (*getSetting<double>("as"))/pi;
117 
118  //(Sub)leading IW function parameters
119  const double RhoSq = *getSetting<double>("RhoSq");
120  const double chi21 = (*getSetting<double>("chi21"));
121  const double chi2p = (*getSetting<double>("chi2p"));
122  const double chi3p = (*getSetting<double>("chi3p"));
123  const double eta1 = (*getSetting<double>("eta1"));
124  const double etap = (*getSetting<double>("etap"));
125 
126  //L and helper variables
127  const double L1 = -4.*(w-1)*(chi21 + (w-1.)*chi2p)+12.*chi3p*(w-1.);
128  // const double L2 = -4.*chi3p*(w-1.);
129  // const double L3 = 4.*(chi21 + (w-1.)*chi2p);
130  // const double L4 = 2.*(eta1 + etap*(w-1.))-1.;
131  const double L4b = (2.*(eta1 + etap*(w-1.))-1.*ebReb);
132  const double L4c = (2.*(eta1 + etap*(w-1.))-1.*ecRec);
133  // const double L5 = -1.;
134  // const double L5c = -ecRec;
135  // const double L6 = -2.*(1+(eta1 + etap*(w-1.)))/(w+1.);
136  // const double L6c = -2.*(ecRec + (eta1 + etap*(w-1.)))/(w+1.);
137 
138  // Variables for leading IW function (derived from G(1))
139  const double rD = 1867./5280.;
140  // const double V11 = 8*pow(a,2);
141  const double V21 = 57.0;
142  const double V20 = 7.5 + (*getSetting<double>("dV20"));
143 
144  //QCD correction functions
145  const double Cs = CS(w, zBC);
146  // const double Cps = CP(w, zBC);
147  const double Cv1 = CV1(w, zBC);
148  const double Cv2 = CV2(w, zBC);
149  const double Cv3 = CV3(w, zBC);
150  // const double Ca1 = CA1(w, zBC);
151  // const double Ca2 = CA2(w, zBC);
152  // const double Ca3 = CA3(w, zBC);
153  const double Ct1 = CT1(w, zBC);
154  const double Ct2 = CT2(w, zBC);
155  const double Ct3 = CT3(w, zBC);
156  //Derivatives (approx) at w_0 = 2a^2-1. Calculated once and stored.
157  if(!initCs){
158  const double w0 = 2*a*a - 1.;
159  Cv1z = CV1(w0, zBC);
160  Cv2z = CV2(w0, zBC);
161  Cv3z = CV3(w0, zBC);
162 
163  Cv1zp = (CV1(w0 + 1e-5, zBC) - Cv1z)/1e-5;
164  Cv2zp = (CV2(w0 + 1e-5, zBC) - Cv2z)/1e-5;
165  Cv3zp = (CV3(w0 + 1e-5, zBC) - Cv3z)/1e-5;
166 
167  Cv1zpp = (Cv1zp - (Cv1z - CV1(w0 - 1e-5, zBC))/1e-5)/1e-5;
168  Cv2zpp = (Cv2zp - (Cv2z - CV2(w0 - 1e-5, zBC))/1e-5)/1e-5;
169  Cv3zpp = (Cv3zp - (Cv3z - CV3(w0 - 1e-5, zBC))/1e-5)/1e-5;
170 
171  initCs = true;
172  }
173 
174 // //alpha_s derivatives at w_0 = 2a^2-1
175 // // const double Cv1z = 0.97543966986296275;
176 // const double Cv2z = -0.416360981425492067;
177 // const double Cv3z = -0.186896365253791276;
178 //
179 // const double Cv1zp = 0.11470494247949626;
180 // const double Cv2zp = 0.16684760479981954;
181 // const double Cv3zp = 0.038382492791834666;
182 //
183 // const double Cv1zpp = -0.2557645997620378;
184 // const double Cv2zpp = -0.1297628996251381;
185 // const double Cv3zpp = -0.02238541998227300;
186 
187 
188  // Leading and sub-leading IW function
189  //-------------------------------------------------------------------------------------------
190  const double a2 = a*a;
191  const double a4 = a2*a2;
192  const double a6 = a4*a2;
193  const double Xi = 64*a4*RhoSq - 16*a2 - V21;
194  double xiIW = 1 - 8*a2*RhoSq*zCon + zCon*zCon*(
195  V21*RhoSq - V20 + (eb - ec)*(2*Xi*etap * (1-rD)/(1+rD))
196  + (eb + ec)*(Xi* (12*chi3p - 4*chi21) - 16*((a2-1)*Xi - 16* a4)*chi2p)
197  + as*(Xi*(Cv1zp +(Cv3z + rD*Cv2z)/(1 + rD)) + 2*a2*(Xi - 32*a2)*(Cv3zp + rD*Cv2zp)/(1+rD) - 64*a6*(Cv3zpp + rD*Cv2zpp)/(1+rD) -32*a4*Cv1zpp ));
198  xiIW /= 1 - 8*a2*RhoSq*(1-a)/(1+a) + pow((1-a)/(1+a),2.)*(
199  V21*RhoSq - V20 + (eb - ec)*(2*Xi*etap * (1-rD)/(1+rD))
200  + (eb + ec)*(Xi* (12*chi3p - 4*chi21) - 16*((a2-1)*Xi - 16* a4)*chi2p)
201  + as*(Xi*(Cv1zp +(Cv3z + rD*Cv2z)/(1 + rD)) + 2*a2*(Xi - 32*a2)*(Cv3zp + rD*Cv2zp)/(1+rD) - 64*a6*(Cv3zpp + rD*Cv2zpp)/(1+rD) -32*a4*Cv1zpp ));
202 
203  // LO IW function linear only
204  //double xiIW = 1. - 8 * pow(a, 2.) * RhoSq * zCon;
205 
206  const double chi1=0;
207  const double h=xiIW + 2.*(eb+ec)*chi1;
208 
209  // Create hatted h FFs
210  const double Hs = 1.+as*Cs + ec*(L1-(L4c*(w-1)/(w+1))) + eb*(L1-(L4b*(w-1)/(w+1)));
211  const double Hp = 1.+as*(Cv1+0.5*(w+1)*(Cv2+Cv3))+(ec+eb)*L1;
212  const double Hm = as*0.5*(w+1)*(Cv2-Cv3)+(ec*L4c-eb*L4b);
213  const double Ht = 1.+as*(Ct1-Ct2+Ct3)+(ec+eb)*(L1) - (ec*L4c+eb*L4b);
214 
215 
216  // set elements, mapping to amplitude FF basis
217  // Fs
218  result.element({0}) = (Hs * ((Mb + Mc)*(Mb + Mc) - Sqq)) / (2. * sqMbMc);
219  // Fz
220  result.element({1}) = (Hp * ((Mb + Mc)*(Mb + Mc) - Sqq)) / (2. * sqMbMc * (Mb + Mc)) +
221  (Hm * (-(Mb - Mc)*(Mb - Mc) + Sqq)) / (2. * (Mb - Mc) * sqMbMc);
222  // Fp
223  result.element({2}) = (Hm * (-Mb + Mc)) / (2. * sqMbMc) + (Hp * (Mb + Mc)) / (2. * sqMbMc);
224  // Ft
225  result.element({3}) = Ht / (2. * sqMbMc);
226 
227  result *= h;
228 
229  }
230 
231  std::unique_ptr<FormFactorBase> FFBtoDBLPR::clone(const std::string& label) {
232  MAKE_CLONE(FFBtoDBLPR, label);
233  }
234 
235 } // namespace Hammer
#define MSG_WARNING(x)
Definition: Logging.hh:366
TensorData makeEmptySparse(const IndexList &dimensions, const LabelsList &labels)
std::complex< double > & element(const IndexList &indices={})
access an element given its indices
Definition: Tensor.cc:67
BLPR form factors
Tensor indices label definitions.
static constexpr double sqrt2
Definition: Constants.hh:26
Sparse tensor data container.
Multidimensional tensor class with complex numbers as elements.
Definition: Tensor.hh:33
bool isZero(const std::complex< double > val)
Definition: Math/Utils.hh:25
void clearData()
sets all the elements to 0
Definition: Tensor.cc:229
Various numerical constants.
Hammer particle data class.
Hammer particle class.
#define MAKE_CLONE(OBJ, LABEL)
static constexpr double pi
Definition: Constants.hh:21