Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FFBtoDstarBLPRVar.cc
Go to the documentation of this file.
1 ///
2 /// @file FFBtoDstarBLPRVar.cc
3 /// @brief \f$ B \rightarrow D^* \f$ BLPRVar form factors with variations
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  FFBtoDstarBLPRVar::FFBtoDstarBLPRVar() {
30  // Create tensor rank and dimensions
31  vector<IndexType> dims = {8, 8}; // size is _FFErrNames + 1 to include central values in zeroth component
32  setGroup("BLPRVar"); //override BLPR base class FF group setting
33  string name{"FFBtoDstarBLPRVar"};
34 
35  setPrefix("BtoD*");
36  _FFErrLabel = FF_BDSTAR_VAR;
37  addProcessSignature(PID::BPLUS, {-PID::DSTAR});
38  addTensor(Tensor{name, MD::makeEmptySparse(dims, {FF_BDSTAR, FF_BDSTAR_VAR})});
39 
40  addProcessSignature(PID::BZERO, {PID::DSTARMINUS});
41  addTensor(Tensor{name, MD::makeEmptySparse(dims, {FF_BDSTAR, FF_BDSTAR_VAR})});
42 
43  setPrefix("BstoDs*");
44  _FFErrLabel = FF_BSDSSTAR_VAR;
45  addProcessSignature(PID::BS, {PID::DSSTARMINUS});
46  addTensor(Tensor{name, MD::makeEmptySparse(dims, {FF_BSDSSTAR, FF_BSDSSTAR_VAR})});
47 
48  setSignatureIndex();
49  }
50 
51  void FFBtoDstarBLPRVar::defineSettings() {
52  _FFErrNames = {"delta_RhoSq","delta_chi21","delta_chi2p","delta_chi3p","delta_eta1","delta_etap","delta_dV20"};
53  setPath(getFFErrPrefixGroup().get());
54  setUnits("GeV");
55 
56  addSetting<double>("RhoSq",1.24);
57  addSetting<double>("a",1.509/sqrt2);
58  //1S scheme: mb1S = 4710, mbBar = 5313, lambda1 = -3 10^5 MeV^2, delta mb-mc = 3400, alpha_s = 26/100
59  addSetting<double>("as",0.26);
60  addSetting<double>("mb",4.710);
61  addSetting<double>("mc",4.710 - 3.400);
62  addSetting<double>("la",0.57115);
63  //Renormalon improvement (1S scheme)
64  addSetting<double>("ebR/eb",0.861);
65  addSetting<double>("ecR/ec",0.822);
66 
67  addSetting<double>("chi21",-0.06);
68  addSetting<double>("chi2p",-0.00);
69  addSetting<double>("chi3p",0.05);
70  addSetting<double>("eta1",0.30);
71  addSetting<double>("etap",-0.05);
72  addSetting<double>("dV20",0.);
73 
74  //correlation matrix and set zero error eigenvectors
75  //Row basis is RhoSq, chi2(1), chi2(1)prime, chi3(1)prime, eta(1), eta(1)prime, V20
76  vector<vector<double>> sliwmat{ {1., 0., 0., 0., 0., 0., 0.},
77  {0., 1., 0., 0., 0., 0., 0.},
78  {0., 0., 1., 0., 0., 0., 0.},
79  {0., 0., 0., 1., 0., 0., 0.},
80  {0., 0., 0., 0., 1., 0., 0.},
81  {0., 0., 0., 0., 0., 1., 0.},
82  {0., 0., 0., 0., 0., 0., 1.}};
83  addSetting<vector<vector<double>>>("sliwmatrix",sliwmat);
84 
85  for (auto elem : _FFErrNames) {
86  addSetting<double>(elem, 0.);
87  }
88 
89  initialized = true;
90 
91  }
92 
93  void FFBtoDstarBLPRVar::evalAtPSPoint(const vector<double>& point, const vector<double>& masses) {
94  Tensor& result = getTensor();
95  result.clearData();
96 
97  if(!initialized){
98  MSG_WARNING("Warning, Settings have not been defined!");
99  }
100 
101  double Mb = 0.;
102  double Mc = 0.;
103  // double unitres = 1.;
104  if(masses.size() >= 2) {
105  Mb = masses[0];
106  Mc = masses[1];
107  // unitres = _units;
108  }
109  else {
110  Mb = this->masses()[0];
111  Mc = this->masses()[1];
112  }
113  const double Mb2 = Mb*Mb;
114  const double Mb3 = Mb*Mb*Mb;
115  const double Mc2 = Mc*Mc;
116 
117  double Sqq = point[0];
118 
119  // const double sqSqq = sqrt(Sqq);
120  const double sqMbMc = sqrt(Mb*Mc);
121  double w = (Mb2 + Mc2 - Sqq)/(2.*Mb*Mc);
122  //safety measure if w==1.0
123  if(isZero(w - 1.0)) w += 1e-6;
124 
125  //Conformal parameters
126  const double a = *getSetting<double>("a");
127  const double zCon = (sqrt(w+1) - sqrt2*a)/(sqrt(w+1) + sqrt2*a);
128 
129  //BLPRVar expansion parameters
130  const double zBC = (*getSetting<double>("mc"))/(*getSetting<double>("mb"));
131  const double eb = (*getSetting<double>("la"))/(*getSetting<double>("mb")*2.);
132  const double ebReb = (*getSetting<double>("ebR/eb"));
133  const double ec = (*getSetting<double>("la"))/(*getSetting<double>("mc")*2.);
134  const double ecRec = (*getSetting<double>("ecR/ec"));
135  const double as = (*getSetting<double>("as"))/pi;
136 
137  //(Sub)leading IW function parameters
138  const double RhoSq = *getSetting<double>("RhoSq");
139  const double chi21 = (*getSetting<double>("chi21"));
140  const double chi2p = (*getSetting<double>("chi2p"));
141  const double chi3p = (*getSetting<double>("chi3p"));
142  const double eta1 = (*getSetting<double>("eta1"));
143  const double etap = (*getSetting<double>("etap"));
144 
145  const vector<vector<double>>& sliwmat = (*getSetting<vector<vector<double>>>("sliwmatrix"));
146 
147  //L and helper variables
148  const double L1 = -4.*(w-1)*(chi21 + (w-1.)*chi2p)+12.*chi3p*(w-1.);
149  const double L2 = -4.*chi3p*(w-1.);
150  const double L3 = 4.*(chi21 + (w-1.)*chi2p);
151  // const double L4 = 2.*(eta1 + etap*(w-1.))-1.;
152  const double L4b = (2.*(eta1 + etap*(w-1.))-1.*ebReb);
153  // const double L4c = (2.*(eta1 + etap*(w-1.))-1.*ecRec);
154  // const double L5 = -1.;
155  const double L5c = -ecRec;
156  // const double L6 = -2.*(1+(eta1 + etap*(w-1.)))/(w+1.);
157  const double L6c = -2.*(ecRec + (eta1 + etap*(w-1.)))/(w+1.);
158 
159  // Variables for leading IW function (derived from G(1))
160  const double rD = 1867./5280.;
161  // const double V11 = 8*pow(a,2);
162  const double V21 = 57.0;
163  const double V20 = 7.5 + (*getSetting<double>("dV20"));
164 
165  //QCD correction functions
166  // const double Cs = CS(w, zBC);
167  const double Cps = CP(w, zBC);
168  const double Cv1 = CV1(w, zBC);
169  // const double Cv2 = CV2(w, zBC);
170  // const double Cv3 = CV3(w, zBC);
171  const double Ca1 = CA1(w, zBC);
172  const double Ca2 = CA2(w, zBC);
173  const double Ca3 = CA3(w, zBC);
174  const double Ct1 = CT1(w, zBC);
175  const double Ct2 = CT2(w, zBC);
176  const double Ct3 = CT3(w, zBC);
177  //Derivatives (approx) at w_0 = 2a^2-1. Calculated once and stored.
178  if(!initCs){
179  const double w0 = 2*a*a - 1.;
180  Cv1z = CV1(w0, zBC);
181  Cv2z = CV2(w0, zBC);
182  Cv3z = CV3(w0, zBC);
183 
184  Cv1zp = (CV1(w0 + 1e-5, zBC) - Cv1z)/1e-5;
185  Cv2zp = (CV2(w0 + 1e-5, zBC) - Cv2z)/1e-5;
186  Cv3zp = (CV3(w0 + 1e-5, zBC) - Cv3z)/1e-5;
187 
188  Cv1zpp = (Cv1zp - (Cv1z - CV1(w0 - 1e-5, zBC))/1e-5)/1e-5;
189  Cv2zpp = (Cv2zp - (Cv2z - CV2(w0 - 1e-5, zBC))/1e-5)/1e-5;
190  Cv3zpp = (Cv3zp - (Cv3z - CV3(w0 - 1e-5, zBC))/1e-5)/1e-5;
191 
192  initCs = true;
193  }
194 
195 // //alpha_s derivatives at w_0 = 2a^2-1
196 // // const double Cv1z = 0.97543966986296275;
197 // const double Cv2z = -0.416360981425492067;
198 // const double Cv3z = -0.186896365253791276;
199 //
200 // const double Cv1zp = 0.11470494247949626;
201 // const double Cv2zp = 0.16684760479981954;
202 // const double Cv3zp = 0.038382492791834666;
203 //
204 // const double Cv1zpp = -0.2557645997620378;
205 // const double Cv2zpp = -0.1297628996251381;
206 // const double Cv3zpp = -0.02238541998227300;
207 
208 
209  // Leading and sub-leading IW function
210  //-------------------------------------------------------------------------------------------
211  const double a2 = a*a;
212  const double a4 = a2*a2;
213  const double a6 = a4*a2;
214  const double Xi = 64*a4*RhoSq - 16*a2 - V21;
215  const double xiIW = 1 - 8*a2*RhoSq*zCon + zCon*zCon*(
216  V21*RhoSq - V20 + (eb - ec)*(2*Xi*etap * (1-rD)/(1+rD))
217  + (eb + ec)*(Xi* (12*chi3p - 4*chi21) - 16*((a2-1)*Xi - 16* a4)*chi2p)
218  + 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 ));
219  const double xiIWN = 1 - 8*a2*RhoSq*(1-a)/(1+a) + pow((1-a)/(1+a),2.)*(
220  V21*RhoSq - V20 + (eb - ec)*(2*Xi*etap * (1-rD)/(1+rD))
221  + (eb + ec)*(Xi* (12*chi3p - 4*chi21) - 16*((a2-1)*Xi - 16* a4)*chi2p)
222  + 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 ));
223 
224  const double chi1=0;
225  const double h=xiIW/xiIWN + 2.*(eb+ec)*chi1;
226 
227  //Create hatted h FFs
228  const double Hps = 1.+as*Cps+ec*(L2+L3*(w-1)+L5c-L6c*(w+1))+eb*(L1-L4b);
229  const double Hv = 1.+as*Cv1+ec*(L2-L5c)+eb*(L1-L4b);
230  const double Ha1 = 1.+as*Ca1+ec*(L2-L5c*(w-1)/(w+1))+eb*(L1-L4b*(w-1)/(w+1));
231  const double Ha2 = as*Ca2+ec*(L3+L6c);
232  const double Ha3 = 1.+as*(Ca1+Ca3)+ec*(L2-L3-L5c+L6c)+eb*(L1-L4b);
233  const double Ht1 = 1.+as*(Ct1+0.5*(w-1)*(Ct2-Ct3))+ec*(L2)+eb*(L1);
234  const double Ht2 = 0.5*(w+1)*as*(Ct2+Ct3)+ec*(L5c)-eb*(L4b);
235  const double Ht3 = as*(Ct2)+ec*(L6c-L3);
236 
237 
238  // set elements, mapping to amplitude FF basis
239  // Fs
240  result.element({0, 0}) = -((Hps * Mc) / sqMbMc);
241  // Ff
242  result.element({1, 0}) = (Ha1 * ((Mb + Mc)*(Mb + Mc) - Sqq)) / (2. * sqMbMc);
243  // Fg
244  result.element({2, 0}) = Hv / (2. * sqMbMc);
245  // Fm
246  result.element({3, 0}) = -(Ha2 * sqrt(Mc / Mb3)) / 2. + Ha3 / (2. * sqMbMc);
247  // Fp
248  result.element({4, 0}) = -(Ha2 * sqrt(Mc / Mb3)) / 2. - Ha3 / (2. * sqMbMc);
249  // Fzt
250  result.element({5, 0}) = (Ht3 * Mc) / (2. * pow(Mb * Mc, 1.5));
251  // Fmt
252  result.element({6, 0}) = (Ht1 * (Mb - Mc)) / (2. * sqMbMc) - (Ht2 * (Mb + Mc)) / (2. * sqMbMc);
253  // Fpt
254  result.element({7, 0}) = (Ht2 * (Mb - Mc)) / (2. * sqMbMc) - (Ht1 * (Mb + Mc)) / (2. * sqMbMc);
255 
256  //Now create remaining FF tensor entries
257  //n indexes rows ie FFs; idx indexes the columns that contract with delta.
258  const double rC = Mc/Mb;
259  const double sqrC = sqrt(rC);
260  const double wSq = w*w;
261  const double zConSq = zCon*zCon;
262  const double wm1Sq = (w-1)*(w-1);
263  const double am1Sq = (a-1)*(a-1);
264  const double ap1Sq = (a+1)*(a+1);
265 
266  //Linearization of hatted FFs
267  vector<vector<double>> FFmat{
268  {0, 4*(eb - ec)*(-1 + w)*sqrC, 4*(eb - ec)*wm1Sq*sqrC, -4*(3*eb - ec)*(-1 + w)*sqrC, 2*(eb - ec)*sqrC, 2*(eb - ec)*(-1 + w)*sqrC, 0},
269  {0, -4*eb*Mb*(-1 + wSq)*sqrC, -4*eb*Mb*wm1Sq*(1 + w)*sqrC, 4*(3*eb - ec)*Mb*(-1 + wSq)*sqrC, -2*eb*Mb*(-1 + w)*sqrC, -2*eb*Mb*wm1Sq*sqrC, 0},
270  {0, (-2*eb*(-1 + w))/(Mb*sqrC), (-2*eb*wm1Sq)/(Mb*sqrC), (2*(3*eb - ec)*(-1 + w))/(Mb*sqrC), -(eb/(Mb*sqrC)), -((eb*(-1 + w))/(Mb*sqrC)), 0},
271  {0, (-2*(eb*(-1 + w) + ec*(1 + rC)))/(Mb*sqrC), (-2*(-1 + w)*(eb*(-1 + w) + ec*(1 + rC)))/(Mb*sqrC), (2*(3*eb - ec)*(-1 + w))/(Mb*sqrC), -((eb + ec + eb*w - ec*rC)/(Mb*(1 + w)*sqrC)), -(((-1 + w)*(eb + ec + eb*w - ec*rC))/(Mb*(1 + w)*sqrC)), 0},
272  {0, (2*(ec + eb*(-1 + w) - ec*rC))/(Mb*sqrC), (2*(-1 + w)*(ec + eb*(-1 + w) - ec*rC))/(Mb*sqrC), (-2*(3*eb - ec)*(-1 + w))/(Mb*sqrC), (eb + ec + eb*w + ec*rC)/(Mb*(1 + w)*sqrC), ((-1 + w)*(eb + ec + eb*w + ec*rC))/(Mb*(1 + w)*sqrC), 0},
273  {0, (-2*ec)/(Mb2*sqrC), (-2*ec*(-1 + w))/(Mb2*sqrC), 0, -(ec/(Mb2*(1 + w)*sqrC)), -((ec*(-1 + w))/(Mb2*(1 + w)*sqrC)), 0},
274  {0, (2*eb*(-1 + w)*(-1 + rC))/sqrC, (2*eb*wm1Sq*(-1 + rC))/sqrC, (-2*(3*eb - ec)*(-1 + w)*(-1 + rC))/sqrC, (eb*(1 + rC))/sqrC, (eb*(-1 + w)*(1 + rC))/sqrC, 0},
275  {0, (2*eb*(-1 + w)*(1 + rC))/sqrC, (2*eb*wm1Sq*(1 + rC))/sqrC, (-2*(3*eb - ec)*(-1 + w)*(1 + rC))/sqrC, (eb*(-1 + rC))/sqrC, (eb*(-1 + w)*(-1 + rC))/sqrC, 0}};
276 
277  //Linearization of LO IW functions
278  const vector<double> xiIWL = {
279  -8*a2*zCon + zConSq*(V21 + (64*a4*Cv1zp + (64*a4*Cv3z)/(1 + rD) + (128*a6*Cv3zp)/(1 + rD) + (64*a4*Cv2z*rD)/(1 + rD) + (128*a6*Cv2zp*rD)/(1 + rD))*as - 256*a4*(eb + ec)*chi21 - 16*(-64*a4 + 64*a6)*(eb + ec)*chi2p + 768*a4*(eb + ec)*chi3p - (128*a4*(-1 + rD)*(eb - ec)*etap)/(1 + rD)),
280  -4*zConSq*(eb + ec)*Xi,
281  -16*zConSq*(eb + ec)*(-(a2*(-16 + V21)) + V21 + 64*a6*RhoSq - 32*a4*(1 + 2*RhoSq)),
282  12*zConSq*(eb + ec)*Xi,
283  0,
284  (-2*(-1 + rD)*zConSq*(eb - ec)*Xi)/(1 + rD),
285  -zConSq};
286 
287  const vector<double> xiIWLN = {
288  (8*a4 + a2*(-8 + V21) + V21 - 2*a*V21)/ap1Sq + ((64*am1Sq*a4*Cv1zp)/ap1Sq + (64*am1Sq*a4*Cv3z)/(ap1Sq*(1 + rD)) + (128*am1Sq*a6*Cv3zp)/(ap1Sq*(1 + rD)) + (64*am1Sq*a4*Cv2z*rD)/(ap1Sq*(1 + rD)) + (128*am1Sq*a6*Cv2zp*rD)/(ap1Sq*(1 + rD)))*as - (256*am1Sq*a4*(eb + ec)*chi21)/ap1Sq - (16*am1Sq*(-64*a4 + 64*a6)*(eb + ec)*chi2p)/ap1Sq + (768*am1Sq*a4*(eb + ec)*chi3p)/ap1Sq - (128*am1Sq*a4*(-1 + rD)*(eb - ec)*etap)/(ap1Sq*(1 + rD)),
289  (-4*am1Sq*(eb + ec)*Xi)/ap1Sq,
290  (-16*am1Sq*(eb + ec)*(-(a2*(-16 + V21)) + V21 + 64*a6*RhoSq - 32*a4*(1 + 2*RhoSq)))/ap1Sq,
291  (12*am1Sq*(eb + ec)*Xi)/ap1Sq,
292  0,
293  (-2*am1Sq*(-1 + rD)*(eb - ec)*Xi)/(ap1Sq*(1 + rD)),
294  (-1 + 2*a - a2)/ap1Sq};
295 
296  for(size_t n = 0; n < 8; ++n){
297  auto ni = static_cast<IndexType>(n);
298  for(size_t idx = 0; idx < 7; ++idx){
299  complex<double> entry = 0;
300  auto idxi = static_cast<IndexType>(idx+1u);
301  for(size_t idx1 = 0; idx1 < 7; ++idx1){
302  entry += sliwmat[idx1][idx]*(FFmat[n][idx1] + result.element({ni, 0})*(xiIWL[idx1]/xiIW - xiIWLN[idx1]/xiIWN));
303  }
304  result.element({ni, idxi}) = entry;
305  }
306  }
307 
308  result *= h;
309  result.toVector();
310  }
311 
312  std::unique_ptr<FormFactorBase> FFBtoDstarBLPRVar::clone(const std::string& label) {
314  }
315 
316 } // 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
Tensor & toVector()
forces conversion of a tensor to vector type
Definition: Tensor.cc:171
BLPRVar form factors with variations
Tensor indices label definitions.
uint16_t IndexType
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