Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FFBLPRBase.cc
Go to the documentation of this file.
1 ///
2 /// @file FFBLPRBase.cc
3 /// @brief Hammer base class for 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/Math/Utils.hh"
14 #include "Hammer/Math/Constants.hh"
15 #include "Hammer/Particle.hh"
16 
17 using namespace std;
18 
19 namespace Hammer {
20 
21  FFBLPRBase::FFBLPRBase() {
22  setGroup("BLPR");
23  }
24 
25  void FFBLPRBase::eval(const Particle& parent, const ParticleList& daughters,
26  const ParticleList&) {
27  // Momenta
28  const FourMomentum& pBmes = parent.momentum();
29  const FourMomentum& pDstarmes = daughters[0].momentum();
30  // const FourMomentum& pTau = daughters[2].momentum();
31 
32 
33  // kinematic objects
34  const double Mb = pBmes.mass();
35  const double Mc = pDstarmes.mass();
36  // const double Mt = pTau.mass();
37  const double Sqq = pow(Mb, 2.) + pow(Mc, 2.) - 2. * (pBmes * pDstarmes);
38 
39  evalAtPSPoint({Sqq}, {Mb, Mc});
40  }
41 
42  void FFBLPRBase::initVars(double w, double z) const {
43  _wSq = w*w;
44  _sqrt1wSq = sqrt(_wSq - 1);
45  _zSq = z*z;
46  _zCu = z*z*z;
47  _zp1Sq = (z+1.)*(z+1.);
48  _zm1Sq = (z-1.)*(z-1.);;
49  _lnz = log(z);
50  _wZ = (z + 1./z)/2.;
51  _wP = w + _sqrt1wSq;
52  _wM = w - _sqrt1wSq;
53  _wmwZSq = (w - _wZ)*(w - _wZ);
54  _lnwP = log(_wP);
55  _rW = _lnwP/_sqrt1wSq;
56  _Omega = w/(2.*_sqrt1wSq)*( 2*DiLog(1 - _wM*z) - 2*DiLog(1 - _wP*z) + DiLog(1 - _wP*_wP) - DiLog(1 - _wM*_wM) ) - w*_rW*_lnz + 1.;
57  }
58 
59  double FFBLPRBase::CS(double w, double z) const {
60  if(isZero(w - 1.)) w += 1e-6;
61  initVars(w , z);
62  return (2.*_Omega*(w - _wZ)*z + (-1. + _zSq)*_lnz - (-1. + w)*_zp1Sq*_rW)/(3.*(w - _wZ)*z);
63  }
64 
65  double FFBLPRBase::CP(double w, double z) const {
66  if(isZero(w - 1.)) w += 1e-6;
67  initVars(w , z);
68  return (2.*_Omega*(w - _wZ)*z + (-1. + _zSq)*_lnz - (1. + w)*_zm1Sq*_rW)/(3.*(w - _wZ)*z);
69  }
70 
71  double FFBLPRBase::CV1(double w, double z) const {
72  if(isZero(w - 1.)) w += 1e-6;
73  initVars(w , z);
74  return (4.*_Omega*(w - _wZ)*z + 12*(-w + _wZ)*z + _lnz - _zSq*_lnz + 2.*(1. + w)*(-1. + (-1. + 3.*w - z)*z)*_rW)/(6.*(w - _wZ)*z);
75  }
76 
77  double FFBLPRBase::CV2(double w, double z) const {
78  if(isZero(w - 1.)) w += 1e-6;
79  initVars(w , z);
80  return (-(z*(-2.*(w - _wZ)*(-1. + z) + (3. - 2.*w + (2. - 4.*w)*z + _zSq)*_lnz)) + (-2. + (-1. + 5.*w + 2.*_wSq)*z - 2.*w*(1. + 2.*w)*_zSq + (1. + w)*_zCu)*_rW)/(6.*_wmwZSq*_zSq);
81  }
82 
83  double FFBLPRBase::CV3(double w, double z) const {
84  if(isZero(w - 1.)) w += 1e-6;
85  initVars(w , z);
86  return (-2.*(w - _wZ)*(-1. + z)*z + (1. + (2. - 4.*w)*z + (3. - 2.*w)*_zSq)*_lnz + (1. + 2.*_wSq*(-2. + z)*z - _zSq - 2.*_zCu + w*(1. - 2.*z + 5.*_zSq))*_rW)/(6.*_wmwZSq*z);
87  }
88 
89  double FFBLPRBase::CA1(double w, double z) const {
90  if(isZero(w - 1.)) w += 1e-6;
91  initVars(w , z);
92  return (-12*w*z + 4.*_Omega*(w - _wZ)*z + 12*_wZ*z + _lnz - _zSq*_lnz + 2.*(-1. + w)*(-1. + z + 3.*w*z - _zSq)*_rW)/(6.*(w - _wZ)*z);
93  }
94 
95  double FFBLPRBase::CA2(double w, double z) const {
96  if(isZero(w - 1.)) w += 1e-6;
97  initVars(w , z);
98  return (-(z*(-2.*(w - _wZ)*(1. + z) + (3. + 2.*w + (-2. - 4.*w)*z + _zSq)*_lnz)) + (-2. + (1. + 5.*w - 2.*_wSq)*z + 2.*(1. - 2.*w)*w*_zSq + (-1. + w)*_zCu)*_rW)/(6.*_wmwZSq*_zSq);
99  }
100 
101  double FFBLPRBase::CA3(double w, double z) const {
102  if(isZero(w - 1.)) w += 1e-6;
103  initVars(w , z);
104  return (-2.*(w - _wZ)*z*(1. + z) + (-1. + (2. + 4.*w)*z + (-3. - 2.*w)*_zSq)*_lnz + (1. - _zSq + 2.*_zCu + 2.*_wSq*z*(2. + z) - w*(1. + 2.*z + 5.*_zSq))*_rW)/(6.*_wmwZSq*z);
105  }
106 
107  double FFBLPRBase::CT1(double w, double z) const {
108  if(isZero(w - 1.)) w += 1e-6;
109  initVars(w , z);
110  return (-6.*w*z + 2.*_Omega*(w - _wZ)*z + 6.*_wZ*z + _lnz - _zSq*_lnz + (-1. + w)*(-1. + (2. + 4.*w)*z - _zSq)*_rW)/(3.*(w - _wZ)*z);
111  }
112 
113  double FFBLPRBase::CT2(double w, double z) const {
114  if(isZero(w - 1.)) w += 1e-6;
115  initVars(w , z);
116  return (-2.*((1. - w*z)*_rW + z*_lnz))/(3.*(-w + _wZ)*z);
117  }
118 
119  double FFBLPRBase::CT3(double w, double z) const {
120  if(isZero(w - 1.)) w += 1e-6;
121  initVars(w , z);
122  return (-2.*((w - z)*_rW + _lnz))/(3.*(-w + _wZ));
123 }
124 
125  double FFBLPRBase::DiLog(double z) const {
126 // ====================================================================
127 // This file is part of Dilogarithm.
128 //
129 // Dilogarithm is licenced under the GNU Lesser General Public License
130 // (GNU LGPL) version 3.
131 // Code translated by R.Brun from CERNLIB DILOG function C332
132 // ====================================================================
133  constexpr double HF = 0.5;
134  constexpr double PI3 = pi2/3.;
135  constexpr double PI6 = pi2/6.;
136  constexpr double PI12 = pi2/12.;
137  constexpr double C[20] = {0.42996693560813697, 0.40975987533077105,
138  -0.01858843665014592, 0.00145751084062268,-0.00014304184442340,
139  0.00001588415541880,-0.00000190784959387, 0.00000024195180854,
140  -0.00000003193341274, 0.00000000434545063,-0.00000000060578480,
141  0.00000000008612098,-0.00000000001244332, 0.00000000000182256,
142  -0.00000000000027007, 0.00000000000004042,-0.00000000000000610,
143  0.00000000000000093,-0.00000000000000014, 0.00000000000000002};
144 
145  double T,H,Y,S,A,ALFA,B1,B2,B0;
146 
147  if (isZero(z - 1.)) {
148  H = PI6;
149  } else if (isZero(z + 1.)) {
150  H = -PI12;
151  } else {
152  T = -z;
153  if (T <= -2) {
154  Y = -1/(1+T);
155  S = 1;
156  B1= log(-T);
157  B2= log(1+1/T);
158  A = -PI3+HF*(B1*B1-B2*B2);
159  } else if (T < -1) {
160  Y = -1-T;
161  S = -1;
162  A = log(-T);
163  A = -PI6+A*(A+log(1+1/T));
164  } else if (T <= -0.5) {
165  Y = -(1+T)/T;
166  S = 1;
167  A = log(-T);
168  A = -PI6+A*(-HF*A+log(1+T));
169  } else if (T < 0) {
170  Y = -T/(1+T);
171  S = -1;
172  B1= log(1+T);
173  A = HF*B1*B1;
174  } else if (T <= 1) {
175  Y = T;
176  S = 1;
177  A = 0;
178  } else {
179  Y = 1/T;
180  S = -1;
181  B1= log(T);
182  A = PI6+HF*B1*B1;
183  }
184  H = Y+Y-1;
185  ALFA = H+H;
186  B1 = 0;
187  B2 = 0;
188  B0 = 0;
189  for (int i=19;i>=0;i--){
190  B0 = C[i] + ALFA*B1-B2;
191  B2 = B1;
192  B1 = B0;
193  }
194  H = -(S*(B0-H*B2)+A);
195  }
196  return H;
197  }
198 
199  void FFBLPRBase::addRefs() const {
200  if(!getSettingsHandler()->checkReference("Bernlochner:2017jka")){
201  string ref =
202  "@article{Bernlochner:2017jka,\n"
203  " author = \"Bernlochner, Florian U. and Ligeti, Zoltan and Papucci, Michele and Robinson, Dean J.\",\n"
204  " title = \"{Combined analysis of semileptonic $B$ decays to $D$ and $D^*$: $R(D^{(*)})$, $|V_{cb}|$, and new physics}\",\n"
205  " journal = \"Phys. Rev.\",\n"
206  " volume = \"D95\",\n"
207  " year = \"2017\",\n"
208  " number = \"11\",\n"
209  " pages = \"115008\",\n"
210  " doi = \"10.1103/PhysRevD.95.115008, 10.1103/PhysRevD.97.059902\",\n"
211  " note = \"[erratum: Phys. Rev.D97,no.5,059902(2018)]\",\n"
212  " eprint = \"1703.05330\",\n"
213  " archivePrefix = \"arXiv\",\n"
214  " primaryClass = \"hep-ph\",\n"
215  " SLACcitation = \"%%CITATION = ARXIV:1703.05330;%%\"\n"
216  "}\n";
217  getSettingsHandler()->addReference("Bernlochner:2017jka", ref);
218  }
219  }
220 }
static constexpr double pi2
Definition: Constants.hh:24
double mass() const
returns the invariant mass if the invariant mass squared is negative returns
std::vector< Particle > ParticleList
Definition: Particle.fhh:20
Particle class.
Definition: Particle.hh:30
bool isZero(const std::complex< double > val)
Definition: Math/Utils.hh:25
const FourMomentum & momentum() const
Definition: Particle.cc:56
Various numerical constants.
Hammer base class for BLPR form factors.
Hammer particle class.
4-momentum class
Definition: FourMomentum.hh:30