Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FFBtoDstarISGW2.cc
Go to the documentation of this file.
1 ///
2 /// @file FFBtoDstarISGW2.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  FFBtoDstarISGW2::FFBtoDstarISGW2() {
29  // Create tensor rank and dimensions
30  vector<IndexType> dims = {8};
31  string name{"FFBtoDstarISGW2"};
32 
33  setPrefix("BtoD*");
34  addProcessSignature(PID::BPLUS, {-PID::DSTAR});
35  addTensor(Tensor{name, MD::makeEmptySparse(dims, {FF_BDSTAR})});
36 
37  addProcessSignature(PID::BZERO, {PID::DSTARMINUS});
38  addTensor(Tensor{name, MD::makeEmptySparse(dims, {FF_BDSTAR})});
39 
40  setPrefix("BstoDs*");
41  addProcessSignature(PID::BS, {PID::DSSTARMINUS});
42  addTensor(Tensor{name, MD::makeEmptySparse(dims, {FF_BSDSSTAR})});
43 
44  setSignatureIndex();
45  }
46 
47  void FFBtoDstarISGW2::defineSettings() {
48  //_FFErrNames = ;
49  setPath(getFFErrPrefixGroup().get());
50  setUnits("GeV");
51 
52  initialized = true;
53  }
54 
55  void FFBtoDstarISGW2::evalAtPSPoint(const vector<double>& point, const vector<double>& masses) {
56  Tensor& result = getTensor();
57  result.clearData();
58 
59  if(!initialized){
60  MSG_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 EvtISGW2FF3S1
82  switch(result.labels()[0]){
83  case FF_BDSTAR:
84  msb=5.2;
85  msd=0.33;
86  bb2=0.431*0.431;
87  mbb=5.31;
88  nf = 4.0;
89  cf=0.989;
90  msq=1.82;
91  bx2=0.38*0.38;
92  mbx=0.75*2.01+0.25*1.87;
93  nfp = 3.0;
94  break;
95  case FF_BSDSSTAR:
96  msb=5.2;
97  msd=0.55;
98  bb2=0.54*0.54;
99  mbb=5.38;
100  nf = 4.0;
101  cf=0.984;
102  msq=1.82;
103  bx2=0.49*0.49;
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 
115  const double mup=1.0/(1.0/msq+1.0/msb);
116  const double mum=1.0/(1.0/msq-1.0/msb);
117  const double bbx2=0.5*(bb2+bx2);
118  const double mb=Mb/unitres;
119  const double mx=Mc/unitres;
120  const double tm=(mb-mx)*(mb-mx);
121  if ( t > tm ) t = 0.99*tm;
122 
123  const double wt=1.0+(tm-t)/(2.0*mbb*mbx);
124  const double mqm = 0.1;
125 
126  const double r2=3.0/(4.0*msb*msq)+3*msd*msd/(2*mbb*mbx*bbx2) +
127  (16.0/(mbb*mbx*(33.0-2.0*nfp)))*
128  log(Getas(mqm,mqm)/Getas(msq,msq));
129  const double ai = -1.0* ( 6.0/( 33.0 - 2.0*nf));
130 
131  const double cji = pow(( Getas( msb,msb ) / Getas( msq,msq ) ),ai);
132  const double zji = msq / msb;
133 
134  const double gammaji = GetGammaji( zji );
135  const double chiji = -1.0 - ( gammaji / ( 1- zji ));
136 
137  const double betaji_g = (2.0/3.0)+gammaji;
138  const double betaji_f = (-2.0/3.0)+gammaji;
139  const double betaji_appam = -1.0-chiji+(4.0/(3.0*(1.0-zji)))+
140  (2.0*(1+zji)*gammaji/(3.0*(1.0-zji)*(1.0-zji)));
141 
142  const double betaji_apmam = (1.0/3.0)-chiji-(4.0/(3.0*(1.0-zji)))-
143  (2.0*(1+zji)*gammaji/(3.0*(1.0-zji)*(1.0-zji)))+
144  gammaji;
145 
146  const double r_g = cji*(1+(betaji_g*Getas( msq,sqrt(mb*msq) )/(pi)));
147  const double r_f = cji*(1+(betaji_f*Getas( msq,sqrt(mb*msq) )/(pi)));
148  const double r_apmam = cji*(1+(betaji_apmam*Getas( msq,sqrt(mb*msq) )/(pi)));
149 
150 
151  const double f3=sqrt(mtx/mtb)*pow(sqrt(bx2*bb2)/bbx2,1.5)/
152  ((1.0+r2*(tm-t)/12.0)*(1.0+r2*(tm-t)/12.0));
153 
154  const double f3f=sqrt(mbx*mbb/(mtx*mtb))*f3;
155  const double f3g=sqrt(mtx*mtb/(mbx*mbb))*f3;
156  const double f3appam=sqrt(mtb*mtb*mtb*mbx/(mbb*mbb*mbb*mtx))*f3;
157  const double f3apmam=sqrt(mtx*mtb/(mbx*mbb))*f3;
158 
159  const double f=cf*mtb*(1+wt+msd*(wt-1)/(2*mup))*f3f*r_f;
160  const double g=0.5*(1/msq-msd*bb2/(2*mum*mtx*bbx2))*f3g*r_g;
161 
162  const double appam=cji*(msd*bx2*(1-msd*bx2/(2*mtb*bbx2))/
163  ((1+wt)*msq*msb*bbx2)-
164  betaji_appam*Getas( msq,sqrt(msq*mb) )/
165  (mtb*pi))*f3appam;
166 
167  const double apmam=-1.0*(mtb/msb-msd*bx2/(2*mup*bbx2)+wt*msd*mtb*bx2*
168  (1-msd*bx2/(2*mtb*bbx2))/((wt+1)*msq*msb*bbx2))*
169  f3apmam*r_apmam/mtx;
170 
171  const double ap=0.5*(appam+apmam);
172  const double am=0.5*(appam-apmam);
173 
174  // const double vf = (g)*(Mb+Mc);
175  // const double a1f = (f)/(Mb+Mc);
176  // const double a2f = -1.0*(ap)*(Mb+Mc);
177  // const double a3f = ((Mb+Mc)/(2.0*Mc))*a1f-((Mb-Mc)/(2.0*Mc))*a2f;
178  // const double a0f = a3f + ( (Sqq*am)/(2.0*Mc));
179 
180  //resulting FF
181  // const double fv1=(Mb+Mc)/sqrt(Mb*Mc)*a1f;
182  // const double fv2=-(Mb/Mc)*(sqrt(Mb+Mc))*((a2f/(Mb+Mc))+((2.0*Mc/Sqq)*(a3f-a0f)));
183  // const double fv3=-sqrt(Mb*Mc)*((a2f/(Mb+Mc))-((2.0*Mc/Sqq)*(a3f-a0f)));
184  // const double fa=-2.*sqrt(Mb*Mc)*vf/(Mb+Mc);
185 
186  //Temporary NP form factors
187  const double MbcSqq = pow(mb + mx, 2.) - t;
188  const double fs = -2 * mx * f / MbcSqq;
189 // double Fpt = -(Mb + Mc) * f / MbcSqq;
190 // double Fmt = (Mb - Mc) * f / MbcSqq;
191 // double Fzt = 0.;
192 
193  // set elements, mapping to amplitude FF basis
194  // Fs
195  result.element({0}) = fs;
196  // Ff
197  result.element({1}) = f*unitres;
198  // Fg
199  result.element({2}) = g/unitres;
200  // Fm
201  result.element({3}) = am/unitres;
202  //Fp
203  result.element({4}) = ap/unitres;
204  //Fzt
205  // result.element({5}) = 0;
206  //Fmt
207  // result.element({6}) = 0;
208  //Fpt
209  // result.element({7}) = 0;
210 
211 
212 
213 
214  }
215 
216  std::unique_ptr<FormFactorBase> FFBtoDstarISGW2::clone(const std::string& label) {
217  MAKE_CLONE(FFBtoDstarISGW2, label);
218  }
219 
220 } // 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.
ISGW2 form factors
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