Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FFBtoDstarBGLVar.cc
Go to the documentation of this file.
1 ///
2 /// @file FFBtoDstarBGLVar.cc
3 /// @brief \f$ B \rightarrow D \f$ BGL 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  FFBtoDstarBGLVar::FFBtoDstarBGLVar() {
30  // Create tensor rank and dimensions
31  vector<IndexType> dims = {8, 11}; //size is _FFErrNames + 1 to include central values in zeroth component
32  setGroup("BGLVar"); //override BGL base class FF group setting
33  string name{"FFBtoDstarBGLVar"};
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 FFBtoDstarBGLVar::defineSettings() {
52  _FFErrNames = {"delta_a0","delta_a1","delta_a2","delta_b0","delta_b1","delta_b2","delta_c1","delta_c2",
53  "delta_d0","delta_d1"};
54  setPath(getFFErrPrefixGroup().get());
55  setUnits("GeV");
56 
57  addSetting<double>("Vcb", 41.5e-3);
58  addSetting<double>("Chim", 3.07e-4); //GeV^-2
59  addSetting<double>("Chip", 5.280e-4); //GeV^-2
60  addSetting<double>("ChimL",19.421e-3);
61 
62 // vector<double> avec={0.012,0.7,0.8};
63 // vector<double> bvec={0.01223,-0.054, 0.2};
64 // vector<double> cvec={-0.01,0.12};
65  vector<double> avec={0.00038,0.026905,0.};
66  vector<double> bvec={0.00055,-0.0020370,0.};
67  vector<double> cvec={-0.000433,0.005353};
68  //Made up values
69  vector<double> dvec={0.0025,-0.013};
70  addSetting<vector<double>>("avec",avec);
71  addSetting<vector<double>>("bvec",bvec);
72  addSetting<vector<double>>("cvec",cvec);
73  addSetting<vector<double>>("dvec",dvec);
74 
75  vector<double> BcStatesf{6.730,6.736,7.135,7.142}; //GeV
76  vector<double> BcStatesg{6.337,6.899,7.012,7.280}; //GeV
77  vector<double> BcStatesP1{6.275,6.842,7.250}; //GeV
78  addSetting<vector<double>>("BcStatesf",BcStatesf);
79  addSetting<vector<double>>("BcStatesg",BcStatesg);
80  addSetting<vector<double>>("BcStatesP1",BcStatesP1);
81 
82  //correlation matrix and set zero error eignenvectors
83  //Row basis is a's, b's, c's, then d's!
84  vector<vector<double>> abcdmat{ {1., 0., 0., 0., 0., 0., 0., 0., 0., 0.},
85  {0., 1., 0., 0., 0., 0., 0., 0., 0., 0.},
86  {0., 0., 1., 0., 0., 0., 0., 0., 0., 0.},
87  {0., 0., 0., 1., 0., 0., 0., 0., 0., 0.},
88  {0., 0., 0., 0., 1., 0., 0., 0., 0., 0.},
89  {0., 0., 0., 0., 0., 1., 0., 0., 0., 0.},
90  {0., 0., 0., 0., 0., 0., 1., 0., 0., 0.},
91  {0., 0., 0., 0., 0., 0., 0., 1., 0., 0.},
92  {0., 0., 0., 0., 0., 0., 0., 0., 1., 0.},
93  {0., 0., 0., 0., 0., 0., 0., 0., 0., 1.}};
94  addSetting<vector<vector<double>>>("abcdmatrix",abcdmat);
95 
96  for (auto elem : _FFErrNames) {
97  addSetting<double>(elem, 0.);
98  }
99 
100  initialized = true;
101  }
102 
103  void FFBtoDstarBGLVar::evalAtPSPoint(const vector<double>& point, const vector<double>& masses) {
104  Tensor& result = getTensor();
105  result.clearData();
106 
107  if(!initialized){
108  MSG_WARNING("Warning, Settings have not been defined!");
109  }
110 
111  double Mb = 0.;
112  double Mc = 0.;
113  double unitres = 1.;
114  if(masses.size() >= 2) {
115  Mb = masses[0];
116  Mc = masses[1];
117  unitres = _units;
118  }
119  else {
120  Mb = this->masses()[0];
121  Mc = this->masses()[1];
122  }
123  const double Sqq = point[0];
124  const double Mb2 = Mb*Mb;
125  const double Mb3 = Mb2*Mb;
126  const double Mc2 = Mc*Mc;
127  const double rC = Mc/Mb;
128  const double rC2 = rC*rC;
129  const double sqrC = sqrt(rC);
130 
131  double w = (Mb2 + Mc2 - Sqq) / (2. * Mb * Mc);
132  //safety measure if w==1.0
133  if(isZero(w - 1.0)) w += 1e-6;
134  const double w2 = w*w;
135 
136  const size_t nmax = 4;
137  const double z = (sqrt(w+1) - sqrt2)/(sqrt(w+1)+sqrt2);
138  vector<double> zpow{1.};
139  for (size_t n = 1; n < nmax; ++n){
140  zpow.push_back(zpow[n-1]*z);
141  }
142 
143  const vector<double>& ag=(*getSetting<vector<double>>("avec"));
144  const vector<double>& af=(*getSetting<vector<double>>("bvec"));
145  const vector<double>& aF1=(*getSetting<vector<double>>("cvec"));
146  const vector<double>& aP1=(*getSetting<vector<double>>("dvec"));
147 
148  const vector<vector<double>>& abcdmat = (*getSetting<vector<vector<double>>>("abcdmatrix"));
149 
150  const double nc=2.6;
151  const double etaEWVcb = 1.0066*(*getSetting<double>("Vcb"));
152  const double chim=(*getSetting<double>("Chim"))/(unitres*unitres);
153  const double chip=(*getSetting<double>("Chip"))/(unitres*unitres);
154  const double chimL=(*getSetting<double>("ChimL"));
155 
156  const double tp=(Mb+Mc)*(Mb+Mc)/Mb2;
157  const double tm=(Mb-Mc)*(Mb-Mc)/Mb2;
158  const double sqtptm = sqrt(tp - tm);
159 
160  vector<double>& BcStatesf = (*getSetting<vector<double>>("BcStatesf"));
161  vector<double>& BcStatesg = (*getSetting<vector<double>>("BcStatesg"));
162  vector<double>& BcStatesP1 = (*getSetting<vector<double>>("BcStatesP1"));
163 
164  double Pf = 1.;
165  for(size_t n = 0; n< BcStatesf.size(); ++n){
166  double sqtpBc = sqrt(tp-pow(BcStatesf[n]*unitres/Mb,2));
167  Pf *= ((z-((sqtpBc-sqtptm)/(sqtpBc+sqtptm)))/(1.-z*((sqtpBc-sqtptm)/(sqtpBc+sqtptm))));
168  }
169 
170  double PF1 = Pf;
171 
172  double Pg = 1.;
173  for(size_t n = 0; n< BcStatesg.size(); ++n){
174  double sqtpBc = sqrt(tp-pow(BcStatesg[n]*unitres/Mb,2));
175  Pg *= ((z-((sqtpBc-sqtptm)/(sqtpBc+sqtptm)))/(1.-z*((sqtpBc-sqtptm)/(sqtpBc+sqtptm))));
176  }
177 
178  double PP1 = 1.;
179  for(size_t n = 0; n< BcStatesP1.size(); ++n){
180  double sqtpBc = sqrt(tp-pow(BcStatesP1[n]*unitres/Mb,2));
181  PP1 *= ((z-((sqtpBc-sqtptm)/(sqtpBc+sqtptm)))/(1.-z*((sqtpBc-sqtptm)/(sqtpBc+sqtptm))));
182  }
183 
184  const double phig=sqrt(256.*nc/(3*pi*chip))*((rC2*pow(1+z,2)*pow(1-z,-0.5))/pow(((1+rC)*(1-z)+2*sqrC*(1+z)),4));
185  const double phif=(1./Mb2)*sqrt(16.*nc/(3*pi*chim))*((rC*(1+z)*pow(1-z,1.5))/pow(((1+rC)*(1-z)+2*sqrC*(1+z)),4));
186  const double phiF1=(1./Mb3)*sqrt(8.*nc/(3*pi*chim))*((rC*(1+z)*pow(1-z,2.5))/pow(((1+rC)*(1-z)+2*sqrC*(1+z)),5));
187 
188  const double phif_0 = 4.*rC*sqrt(nc/chim)/(Mb2*sqrt(3*pi)*pow(1+2*sqrC+rC,4));
189  const double phiF1_0 = 2.*sqrt(2/(3*pi))*rC*sqrt(nc/chim)/(Mb3*pow(1+2*sqrC+rC,5));
190 
191  const double phiP1=sqrt(nc/(pi*chimL))*((8.*sqrt2*rC2*pow(1+z,2)*pow(1-z,-0.5)))/pow(((1+rC)*(1-z)+2*sqrC*(1+z)),4);
192 
193  double g=0;
194  for(size_t n = 0; n< ag.size(); ++n) g += ag[n] * zpow[n];
195  g /= (Pg*phig);
196 
197  double f=0;
198  for(size_t n = 0; n< af.size(); ++n) f += af[n] * zpow[n];
199  f /= (Pf*phif);
200 
201  double F1=af[0]*(Mb-Mc)*phiF1_0/phif_0;
202  for(size_t n = 0; n< aF1.size(); ++n) F1 += aF1[n] * zpow[n+1];
203  F1 /= (PF1*phiF1);
204 
205  //From 1707.09509 (sqrC/(1+rC) maps from F2)
206  double P1=0;
207  for(size_t n = 0; n< aP1.size(); ++n) P1 += aP1[n]*zpow[n];
208  P1 *= sqrC/((1+rC)*PP1*phiP1);
209 
210  //Mapping to amplitude FF basis
211  const double Fpf = (rC-w)/(2.*rC*Mb2*(w2 - 1));
212  const double FpF1 = 1./(2.*rC*Mb3*(w2 - 1));
213  const double Fmf = (rC+w)/(2.*rC*Mb2*(w2 - 1));
214  const double FmF1 = 1./(2.*rC*Mb3*(w2 - 1))*(rC2-1)/(1 + rC2 - 2*rC*w);
215  const double FmP1 = sqrC*(rC+1)/(Mb*(1 + rC2 - 2*rC*w));
216 
217 
218  // set elements, mapping to amplitude FF basis
219  // Fs (dim 0)
220  // result.element({0}) = 0;
221  // Ff (dim 1)
222  result.element({1,0}) = f;
223  // Fg (dim -1) Definition in BGL (hep-ph/9705252) differs from Manohar, Wise or 1610.02045 by factor of 2
224  result.element({2,0}) = g/2.;
225  // Fm (dim -1)
226  result.element({3,0}) = (Fmf*f + FmF1*F1 + FmP1*P1);
227  // Fp (dim -1)
228  result.element({4,0}) = (Fpf*f + FpF1*F1);
229  // Fzt (dim -2)
230  // result.element({5}) = 0;
231  // Fmt (dim 0)
232  // result.element({6}) = 0;
233  // Fpt (dim 0)
234  // result.element({7}) = 0;
235 
236  //Now create remaining FF tensor entries
237  //Logic: FF^x = a^x_i z^i, a^x_i = M_{ij} delta_j, delta_j = {1, delta_...}
238  //n indexes rows of abcdmat; idx2 indexes the columns that contract with delta.
239  //g: 1st 3 rows; f: 2nd 3 rows; F1: contribution from 1st f row, plus next 2 rows; P1: last two rows
240  //Sum over appropriate n and linearly combine to generate idx-th entries for each FF
241  for(IndexType idx = 0; idx < 10; ++idx){
242  double fentry = 0.;
243  double gentry = 0.;
244  double F1entry = abcdmat[3][idx]*(Mb-Mc)*phiF1_0/phif_0/(PF1*phiF1);
245  double P1entry = 0.;
246  for(size_t n = 0; n < 3; ++n){
247  gentry += abcdmat[n][idx]*zpow[n]/(Pg*phig);
248  fentry += abcdmat[n+3][idx]*zpow[n]/(Pf*phif);
249  }
250  for(size_t n = 0; n < 2; ++n){
251  F1entry += abcdmat[n+6][idx]*zpow[n+1]/(PF1*phiF1);
252  P1entry += abcdmat[n+8][idx]*zpow[n]*sqrC/(1+rC)/(PP1*phiP1);
253  }
254  double Fmentry = Fmf*fentry + FmF1*F1entry + FmP1*P1entry;
255  double Fpentry = Fpf*fentry + FpF1*F1entry;
256 
257  const IndexType idxp1 = static_cast<IndexType>(idx + 1u);
258  if(!isZero(fentry)) { result.element({1, idxp1}) = fentry; }
259  if(!isZero(gentry)) { result.element({2, idxp1}) = gentry/2.; }
260  if(!isZero(Fmentry)) { result.element({3, idxp1}) = Fmentry; }
261  if(!isZero(Fpentry)) { result.element({4, idxp1}) = Fpentry; }
262  }
263 
264  result*=(1./etaEWVcb);
265  }
266 
267  unique_ptr<FormFactorBase> FFBtoDstarBGLVar::clone(const string& label) {
269  }
270 
271 } // 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 indices label definitions.
uint16_t IndexType
static constexpr double sqrt2
Definition: Constants.hh:26
BGL form factors with variations
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