Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FFBtoDISGW2.cc
Go to the documentation of this file.
1 ///
2 /// @file FFBtoDISGW2.cc
3 /// @brief \f$ B \rightarrow D \f$ ISGW2 form factors
4 /// @brief Ported directly from EvtGen
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/Particle.hh"
17 #include "Hammer/Tools/Pdg.hh"
19 #include <cmath>
20 #include <iostream>
21 
22 using namespace std;
23 
24 namespace Hammer {
25 
26  namespace MD = MultiDimensional;
27 
28  FFBtoDISGW2::FFBtoDISGW2() {
29  // Create tensor rank and dimensions
30  vector<IndexType> dims = {4};
31  string name{"FFBtoDISGW2"};
32 
33  setPrefix("BtoD");
34  addProcessSignature(PID::BPLUS, {-PID::D0});
35  addTensor(Tensor{name, MD::makeEmptySparse(dims, {FF_BD})});
36 
37  addProcessSignature(PID::BZERO, {PID::DMINUS});
38  addTensor(Tensor{name, MD::makeEmptySparse(dims, {FF_BD})});
39 
40  setPrefix("BstoDs");
41  addProcessSignature(PID::BS, {PID::DSMINUS});
42  addTensor(Tensor{name, MD::makeEmptySparse(dims, {FF_BSDS})});
43 
44  setSignatureIndex();
45  }
46 
47  void FFBtoDISGW2::defineSettings() {
48  //_FFErrNames = ;
49  setPath(getFFErrPrefixGroup().get());
50  setUnits("GeV");
51 
52  initialized = true;
53  }
54 
55  void FFBtoDISGW2::evalAtPSPoint(const vector<double>& point, const vector<double>& masses) {
56  Tensor& result = getTensor();
57  result.clearData();
58 
59  if(!initialized){
60  MSG_WARNING("Warning, Setting have not been defined!");
61  }
62 
63  double Mb = 0.;
64  double Mc = 0.;
65  double unitres = 1.;
66  if(masses.size() >= 2) {
67  Mb = masses[0];
68  Mc = masses[1];
69  unitres = _units;
70  }
71  else {
72  Mb = this->masses()[0];
73  Mc = this->masses()[1];
74  }
75 
76  double Sqq = point[0];
77  double t=Sqq/(unitres*unitres);
78 
79 #pragma clang diagnostic push
80 #pragma clang diagnostic ignored "-Wswitch-enum"
81  //Ported from EvtGen EvtISGW2FF1S0
82  switch(result.labels()[0]){
83  case FF_BD:
84  msb=5.2;
85  msd=0.33;
86  bb2=0.431*0.431;
87  mbb=5.31;
88  nf = 4.0;
89 
90  msq=1.82;
91  bx2=0.45*0.45;
92  mbx=0.75*2.01+0.25*1.87;
93  nfp = 3.0;
94  break;
95  case FF_BSDS:
96  msb=5.2;
97  msd=0.55;
98  bb2=0.54*0.54;
99  mbb=5.38;
100  nf = 4.0;
101 
102  msq=1.82;
103  bx2=0.56*0.56;
104  mbx=0.75*2.11+0.25*1.97;
105  nfp = 3.0;
106  break;
107  default:
108  MSG_ERROR("Unknown assignments for parametrization " + getFFErrPrefixGroup().get() + ".");
109  }
110 #pragma clang diagnostic pop
111 
112  const double mtb = msb + msd;
113  const double mtx = msq + msd;
114  const double mb=Mb/unitres;
115  const double mx=Mc/unitres;
116 
117  const double mup=1.0/(1.0/msq+1.0/msb);
118  const double bbx2=0.5*(bb2+bx2);
119  const double tm=(mb-mx)*(mb-mx);
120  if ( t>tm ) t=0.99*tm;
121 
122  const double mqm = 0.1;
123  const double r2=3.0/(4.0*msb*msq)+3*msd*msd/(2*mbb*mbx*bbx2) +
124  (16.0/(mbb*mbx*(33.0-2.0*nfp)))*
125  log(Getas(mqm,mqm)/Getas(msq,msq));
126 
127  const double f3 = sqrt(mtx/mtb)*pow(sqrt(bx2*bb2)/bbx2,1.5) /
128  ((1.0+r2*(tm-t)/12.0)*(1.0+r2*(tm-t)/12.0));
129 
130  const double ai = -1.0* ( 6.0/( 33.0 - 2.0*nf));
131  const double cji = pow(( Getas( msb,msb ) / Getas( msq,msq ) ),ai);
132 
133  const double zji = msq / msb;
134 
135  const double gammaji = GetGammaji( zji );
136  const double chiji = -1.0 - ( gammaji / ( 1- zji ));
137  const double betaji_fppfm = gammaji - (2.0/3.0)*chiji;
138  const double betaji_fpmfm = gammaji + (2.0/3.0)*chiji;
139  const double rfppfm = cji *(1.0 + betaji_fppfm*Getas( msq,sqrt(msb*msq) )/pi);
140  const double rfpmfm = cji *(1.0 + betaji_fpmfm*Getas( msq,sqrt(msb*msq) )/pi);
141  const double f3fppfm = f3*pow(( mbb / mtb ),-0.5)*pow((mbx/mtx),0.5);
142  const double f3fpmfm = f3*pow(( mbb / mtb ),0.5)*pow((mbx/mtx),-0.5);
143  const double fppfm = f3fppfm* rfppfm * ( 2.0 - ( ( mtx/msq)*(1- ( (msd*msq*bb2)
144  /(2.0*mup*mtx*bbx2)))));
145  const double fpmfm = f3fpmfm* rfpmfm * ( mtb/msq) * ( 1 - ( ( msd*msq*bb2)/
146  ( 2.0*mup*mtx*bbx2)));
147 
148  const double fp = (fppfm + fpmfm)/2.0;
149  const double fm = (fppfm - fpmfm)/2.0;
150 
151  const double f0 = (fm/((mb*mb-mx*mx)/t))+fp;
152 
153  //Temporary scalar NP form factors
154  const double MbcSqq = pow(mb + mx, 2.) - t;
155  const double fs = fp * MbcSqq / (mb + mx);
156 // double ft = fp / (Mb + Mc);
157 
158  // set elements, mapping to amplitude FF basis
159  // Fs
160  result.element({0}) = unitres*fs;
161  // Fz
162  result.element({1}) = f0;
163  //Fp
164  result.element({2}) = fp;
165  //Ft
166  // result.element({3}) = 0;
167  }
168 
169  std::unique_ptr<FormFactorBase> FFBtoDISGW2::clone(const std::string& label) {
170  MAKE_CLONE(FFBtoDISGW2, label);
171  }
172 
173 } // 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
ISGW2 form factors
LabelsList labels() const
get the labels of all the indices at once
Definition: Tensor.cc:83
Tensor indices label definitions.
Sparse tensor data container.
Multidimensional tensor class with complex numbers as elements.
Definition: Tensor.hh:33
void clearData()
sets all the elements to 0
Definition: Tensor.cc:229
Various numerical constants.
Hammer particle data class.
#define MSG_ERROR(x)
Definition: Logging.hh:367
Hammer particle class.
#define MAKE_CLONE(OBJ, LABEL)
static constexpr double pi
Definition: Constants.hh:21