Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FFBtoDBGL.cc
Go to the documentation of this file.
1 ///
2 /// @file FFBtoDBGL.cc
3 /// @brief \f$ B \rightarrow D \f$ BGL 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  FFBtoDBGL::FFBtoDBGL() {
30  // Create tensor rank and dimensions
31  vector<IndexType> dims = {4};
32  string name{"FFBtoDBGL"};
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 FFBtoDBGL::defineSettings() {
49  //_FFErrNames = ;
50  setPath(getFFErrPrefixGroup().get());
51  setUnits("GeV");
52 
53  //Using 1606.08030
54  addSetting<double>("ChiT",5.131e-4); //GeV^-2
55  addSetting<double>("ChiL",6.332e-3);
56 
57  vector<double> apvec={0.01565,-0.0353,-0.043,0.194};
58  vector<double> a0vec={0.07932,-0.214,0.17,-0.958};
59  addSetting<vector<double>>("ap",apvec);
60  addSetting<vector<double>>("a0",a0vec);
61 
62  vector<double> BcStatesp={6.329, 6.920, 7.020}; //GeV
63  vector<double> BcStates0={6.716, 7.121}; //GeV
64  addSetting<vector<double>>("BcStatesp",BcStatesp);
65  addSetting<vector<double>>("BcStates0",BcStates0);
66 
67  initialized = true;
68  }
69 
70  void FFBtoDBGL::evalAtPSPoint(const vector<double>& point, const vector<double>& masses) {
71  Tensor& result = getTensor();
72  result.clearData();
73 
74  if(!initialized){
75  MSG_WARNING("Warning, Settings have not been defined!");
76  }
77 
78  double Mb = 0.;
79  double Mc = 0.;
80  double unitres = 1.;
81  if(masses.size() >= 2) {
82  Mb = masses[0];
83  Mc = masses[1];
84  unitres = _units;
85  }
86  else {
87  Mb = this->masses()[0];
88  Mc = this->masses()[1];
89  }
90  const double Sqq = point[0];
91  const double Mb2 = Mb*Mb;
92  const double Mc2 = Mc*Mc;
93  const double rC = Mc/Mb;
94  const double rC2 = rC*rC;
95  const double sqrC = sqrt(rC);
96 
97  double w = (Mb2 + Mc2 - Sqq) / (2. * Mb * Mc);
98  //safety measure if w==1.0
99  if(isZero(w - 1.0)) w += 1e-6;
100 
101  const size_t nmax = 4;
102  const double z = (sqrt(w+1) - sqrt2)/(sqrt(w+1)+sqrt2);
103  vector<double> zpow{1.};
104  for (size_t n = 1; n < nmax; ++n){
105  zpow.push_back(zpow[n-1]*z);
106  }
107 
108  const vector<double>& BcStatesp = (*getSetting<vector<double>>("BcStatesp"));
109  const vector<double>& BcStates0 = (*getSetting<vector<double>>("BcStates0"));
110 
111  const vector<double>& ap = (*getSetting<vector<double>>("ap"));
112  const vector<double>& a0 = (*getSetting<vector<double>>("a0"));
113 
114  const double nc=2.6;
115  const double chiT=(*getSetting<double>("ChiT"))/(unitres*unitres);
116  const double chiL=(*getSetting<double>("ChiL"));
117  const double tp=(Mb+Mc)*(Mb+Mc)/Mb2;
118  const double tm=(Mb-Mc)*(Mb-Mc)/Mb2;
119  const double sqtptm = sqrt(tp - tm);
120 
121  double Pp = 1.;
122  for(size_t n = 0; n< BcStatesp.size(); ++n) {
123  double sqtpBc = sqrt(tp - pow(BcStatesp[n]*unitres/Mb,2));
124  Pp *= ((z-((sqtpBc-sqtptm)/(sqtpBc+sqtptm)))/(1-z*((sqtpBc-sqtptm)/(sqtpBc+sqtptm))));
125  }
126 
127  double P0 = 1.;
128  for(size_t n = 0; n< BcStates0.size(); ++n){
129  double sqtpBc = sqrt(tp-pow(BcStates0[n]*unitres/Mb,2));
130  P0 *= ((z-((sqtpBc-sqtptm)/(sqtpBc+sqtptm)))/(1-z*((sqtpBc-sqtptm)/(sqtpBc+sqtptm))));
131  }
132 
133  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);
134 
135  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);
136 
137  double Fp=0;
138  for(size_t n = 0; n< ap.size(); ++n) Fp += ap[n] * zpow[n];
139  Fp /= (Pp*phip);
140 
141  double F0=0;
142  for(size_t n = 0; n< a0.size(); ++n) F0 += a0[n] * zpow[n];
143  F0 /= (P0*phi0);
144 
145  // set elements, mapping to amplitude FF basis
146  // Fs (dim +1)
147  // result.element({0}) = 0;
148  // Fz (dim 0)
149  result.element({1}) = F0;
150  // Fp (dim 0)
151  result.element({2}) = Fp;
152  // Ft (dim -1)
153  // result.element({3}) = 0;
154 
155  }
156 
157  unique_ptr<FormFactorBase> FFBtoDBGL::clone(const string& label) {
158  MAKE_CLONE(FFBtoDBGL, label);
159  }
160 
161 } // 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
BGL 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