Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FFBtoD0starISGW2.cc
Go to the documentation of this file.
1 ///
2 /// @file FFBtoD0starISGW2.cc
3 /// @brief \f$ B \rightarrow D_0^* \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/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  FFBtoD0starISGW2::FFBtoD0starISGW2() {
30  // Create tensor rank and dimensions
31  vector<IndexType> dims = {4};
32  string name{"FFBtoD0starISGW2"};
33 
34  setPrefix("BtoD**0*");
35  addProcessSignature(PID::BPLUS, {-PID::DSSD0STAR});
36  addTensor(Tensor{name, MD::makeEmptySparse(dims, {FF_BDSSD0STAR})});
37 
38  addProcessSignature(PID::BZERO, {PID::DSSD0STARMINUS});
39  addTensor(Tensor{name, MD::makeEmptySparse(dims, {FF_BDSSD0STAR})});
40 
41  setPrefix("BstoDs**0*");
42  addProcessSignature(PID::BS, {PID::DSSDS0STARMINUS});
43  addTensor(Tensor{name, MD::makeEmptySparse(dims, {FF_BSDSSDS0STAR})});
44 
45  setSignatureIndex();
46  }
47 
48  void FFBtoD0starISGW2::defineSettings() {
49  //_FFErrNames = ;
50  setPath(getFFErrPrefixGroup().get());
51  setUnits("GeV");
52 
53  initialized = true;
54  }
55 
56  void FFBtoD0starISGW2::evalAtPSPoint(const vector<double>& point, const vector<double>& masses) {
57  Tensor& result = getTensor();
58  result.clearData();
59 
60  if(!initialized){
61  MSG_WARNING("Warning, Setting have not been defined!");
62  }
63 
64  double Mb = 0.;
65  double Mc = 0.;
66  double unitres = 1.;
67  if(masses.size() >= 2) {
68  Mb = masses[0];
69  Mc = masses[1];
70  unitres = _units;
71  }
72  else {
73  Mb = this->masses()[0];
74  Mc = this->masses()[1];
75  }
76  // const double Mb2 = Mb*Mb;
77  // const double Mc2 = Mc*Mc;
78 
79  double Sqq = point[0];
80  double t=Sqq/(unitres*unitres);
81 
82 #pragma clang diagnostic push
83 #pragma clang diagnostic ignored "-Wswitch-enum"
84  //Ported from EvtGen EvtISGW2FF3P0
85  switch(result.labels()[0]){
86  case FF_BDSSD0STAR:
87  msb = 5.2;
88  msd = 0.33;
89  bb2 = 0.431*0.431;
90  mbb = 5.31;
91 
92  msq = 1.82;
93  bx2 = 0.33*0.33;
94  mbx = (3.0*2.49+2.40)/4.0;
95  nfp = 3.0;
96  break;
97  case FF_BSDSSDS0STAR:
98  msb=5.2;
99  msd=0.55;
100  bb2=0.54*0.54;
101  mbb=5.38;
102 
103  msq=1.82;
104  bx2=0.41*0.41;
105  mbx=(3.0*2.54+2.46)/4.0;
106  nfp = 3.0;
107  break;
108  default:
109  MSG_ERROR("Unknown assignments for parametrization " + getFFErrPrefixGroup().get() + ".");
110  }
111 #pragma clang diagnostic pop
112 
113  const double mtb = msb + msd;
114  const double mtx = msq + msd;
115 
116  const double mb = Mb/unitres;
117  const double mx = Mc/unitres;
118 
119  const double bbx2 = 0.5*(bb2+bx2);
120  const double tm = (mb-mx)*(mb-mx);
121  if( t > tm ) { t = 0.99*tm; }
122 
123  const double mqm = 0.1;
124  const double r2=3.0/(4.0*msb*msq)+3*msd*msd/(2*mbb*mbx*bbx2) + (16.0/(mbb*mbx*(33.0-2.0*nfp)))*log(Getas(mqm)/Getas(msq));
125 
126  const double f5 = sqrt(mtx/mtb)*pow(sqrt(bx2*bb2)/bbx2,5.0/2.0)/(pow((1.0+r2*(tm-t)/18.0),3.0));
127 
128  const double f5uppum = f5*pow(( mbb / mtb ),-0.5)*pow((mbx/mtx),0.5);
129  const double f5upmum = f5*pow(( mbb / mtb ),0.5)*pow((mbx/mtx),-0.5);
130 
131  const double uppum = -1.0*f5uppum*sqrt(2.0/(3.0*bb2))*msd;
132  const double upmum = 1.0*f5upmum*sqrt(2.0/(3.0*bb2))*msd*mtb/mtx;
133 
134  //FF Basis map
135  const double gppgm = mb/sqrt(mb*mx)*uppum;
136  const double gpmgm = mx/sqrt(mb*mx)*upmum;
137 
138  const double gp = (gppgm + gpmgm)/2.0;
139  const double gm = (gppgm - gpmgm)/2.0;
140 
141  //Set elements
142  result.element({1}) = gp;
143  result.element({2}) = gm;
144 
145  }
146 
147  std::unique_ptr<FormFactorBase> FFBtoD0starISGW2::clone(const std::string& label) {
149  }
150 
151 } // 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
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.
ISGW2 form factors
#define MSG_ERROR(x)
Definition: Logging.hh:367
Hammer particle class.
#define MAKE_CLONE(OBJ, LABEL)