Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FFBtoDCLN.cc
Go to the documentation of this file.
1 ///
2 /// @file FFBtoDCLN.cc
3 /// @brief \f$ B \rightarrow D \f$ CLN form factors
4 /// @brief Ported from EvtGen HQET3 (custom class; F Bernlochner)
5 ///
6 
7 //**** This file is a part of the HAMMER library
8 //**** Copyright (C) 2016 - 2020 The HAMMER Collaboration
9 //**** HAMMER is licensed under version 3 of the GPL; see COPYING for details
10 //**** Please note the MCnet academic guidelines; see GUIDELINES for details
11 
12 // -*- C++ -*-
14 #include "Hammer/IndexLabels.hh"
15 #include "Hammer/Math/Constants.hh"
16 #include "Hammer/Math/Utils.hh"
17 #include "Hammer/Particle.hh"
18 #include "Hammer/Tools/Pdg.hh"
20 #include <cmath>
21 #include <iostream>
22 
23 using namespace std;
24 
25 namespace Hammer {
26 
27  namespace MD = MultiDimensional;
28 
29  FFBtoDCLN::FFBtoDCLN() {
30  // Create tensor rank and dimensions
31  vector<IndexType> dims = {4};
32  string name{"FFBtoDCLN"};
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 FFBtoDCLN::defineSettings() {
49  //_FFErrNames = ;
50  setPath(getFFErrPrefixGroup().get());
51  setUnits("GeV");
52 
53  addSetting<double>("a",1.0); //zero recoil expansion
54  addSetting<double>("RhoSq",1.186); //taken from HFLAV
55  addSetting<double>("G1",1.082); //this value was taken from a BCL-Lattice fit!
56  addSetting<double>("Delta",1.);//large errors!
57  addSetting<double>("as",0.26); //mbmc scale
58  addSetting<double>("la",0.48); //CLN
59  addSetting<double>("mcOnmb",0.29); //CLN
60  initialized = true;
61  }
62 
63  void FFBtoDCLN::evalAtPSPoint(const vector<double>& point, const vector<double>& masses) {
64  Tensor& result = getTensor();
65  result.clearData();
66 
67  if(!initialized){
68  MSG_WARNING("Warning, Setting have not been defined!");
69  }
70 
71  double Mb = 0.;
72  double Mc = 0.;
73  double unitres = 1.;
74  if(masses.size() >= 2) {
75  Mb = masses[0];
76  Mc = masses[1];
77  unitres = _units;
78  }
79  else {
80  Mb = this->masses()[0];
81  Mc = this->masses()[1];
82  }
83  const double Mb2 = Mb*Mb;
84  const double Mc2 = Mc*Mc;
85 
86  double Sqq = point[0];
87 
88  // const double sqMbMc = sqrt(Mb*Mc);
89  double w = (Mb2 + Mc2 - Sqq)/(2.*Mb*Mc);
90  //safety measure if w==1.0
91  if(isZero(w - 1.0)) w += 1e-6;
92  const double a = *getSetting<double>("a");
93  const double zCon = (sqrt(w+1) - sqrt2*a)/(sqrt(w+1) + sqrt2*a);
94 
95  const double RhoSq=*getSetting<double>("RhoSq");
96  const double G1par=*getSetting<double>("G1");
97  const double Delta=*getSetting<double>("Delta");
98  const double as = *getSetting<double>("as")/pi;
99  const double LambdaBar = *getSetting<double>("la");
100  const double zR = *getSetting<double>("mcOnmb");
101 
102  const double rC=Mc/Mb;
103 
104  //MSbar masses
105  const double mbMu = Mb - unitres*LambdaBar - Mb*as*(4./3. + log(zR));
106  const double mcMu = Mc - unitres*LambdaBar - Mc*as*(4./3. - log(zR));
107 
108  //define the variables. Added normalization to Fp.
109  const double V1wOnV1 = 1. - 8.* RhoSq * zCon + (51. * RhoSq - 10.) * zCon * zCon - (252. * RhoSq - 84.) * zCon * zCon *zCon;
110  const double Fp=((1. + rC)/(2.*sqrt(rC))*V1wOnV1)
111  *G1par;
112  const double S1wOnV1w = 1 + Delta*(-0.019 + 0.041*(w - 1.) - 0.015*pow(w - 1.,2.)); // From 1005.4306 as in EVtGen HQET3 (custom class; F Bernlochner); may need updating
113  const double Fz = (sqrt(rC)/(1. + rC)*(1+w)*S1wOnV1w*V1wOnV1)
114  *G1par;
115  //Scalar check!
116  const double Fs = Fz*Mb2*(1.-rC*rC)/(mbMu - mcMu);
117  //double Fz = (pow(2.*sqrt(rC)/(1.+rC),2.)*(1+w)*1.0036*(1.-0.0068*(w-1)+0.0017*pow((w-1),2.)-0.0013*pow((w-1),3.)))/(2.);
118 
119 
120  // set elements, mapping to amplitude FF basis
121  // Fs
122  result.element({0}) = Fs;
123  // Fz
124  result.element({1}) = Fz;
125  // Fp
126  result.element({2}) = Fp;
127  // Ft
128  // result.element({3}) = 0;
129 
130  }
131 
132  std::unique_ptr<FormFactorBase> FFBtoDCLN::clone(const std::string& label) {
133  MAKE_CLONE(FFBtoDCLN, label);
134  }
135 
136 } // 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.
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
CLN form factors
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