Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FFBtoD0starLLSW.cc
Go to the documentation of this file.
1 ///
2 /// @file FFBtoD0starLLSW.cc
3 /// @brief \f$ B \rightarrow D_0^* \f$ LLSW 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/IndexLabels.hh"
14 #include "Hammer/Math/Constants.hh"
15 #include "Hammer/Math/Utils.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  FFBtoD0starLLSW::FFBtoD0starLLSW() {
29  // Create tensor rank and dimensions
30  vector<IndexType> dims = {4};
31  setGroup("LLSW"); //override BLPR base class FF group setting
32  string name{"FFBtoD0starLLSW"};
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 FFBtoD0starLLSW::defineSettings() {
49  //_FFErrNames = ;
50  setPath(getFFErrPrefixGroup().get());
51  setUnits("GeV");
52 
53  //Pole mass scheme as in EvtGen
54  addSetting<double>("mb",4.2);
55  addSetting<double>("mc",1.4);
56  addSetting<double>("zt1", 0.68);
57  addSetting<double>("ztp", -0.2);
58  addSetting<double>("zeta1", 0.3);
59  addSetting<double>("chi1", 0.);
60  addSetting<double>("chi2", 0.);
61  addSetting<double>("laB", 0.4);
62  addSetting<double>("laS", 0.76);
63 
64  initialized = true;
65  }
66 
67  void FFBtoD0starLLSW::evalAtPSPoint(const vector<double>& point, const vector<double>& masses) {
68  Tensor& result = getTensor();
69  result.clearData();
70 
71  if(!initialized){
72  MSG_WARNING("Warning, Setting have not been defined!");
73  }
74 
75  double Mb = 0.;
76  double Mc = 0.;
77  // double unitres = 1.;
78  if(masses.size() >= 2) {
79  Mb = masses[0];
80  Mc = masses[1];
81  //unitres = _units;
82  }
83  else {
84  Mb = this->masses()[0];
85  Mc = this->masses()[1];
86  }
87  const double Mb2 = Mb*Mb;
88  const double Mc2 = Mc*Mc;
89 
90  double Sqq = point[0];
91 
92  // const double sqSqq = sqrt(Sqq);
93  double w = (Mb2 + Mc2 - Sqq)/(2.*Mb*Mc);
94  //safety measure if w==1.0
95  if(isZero(w - 1.0)) w += 1e-6;
96 
97  //LLSW parameters
98  // const double zBC = (*getSetting<double>("mc"))/(*getSetting<double>("mb"));
99  const double eB = 1./(*getSetting<double>("mb")*2.);
100  const double eC = 1./(*getSetting<double>("mc")*2.);
101  const double zt1 = (*getSetting<double>("zt1"));
102  const double ztp = (*getSetting<double>("ztp"));
103  const double zeta1 = (*getSetting<double>("zeta1"));
104  const double chi1 = (*getSetting<double>("chi1"));
105  const double chi2 = (*getSetting<double>("chi2"));
106  const double laB = (*getSetting<double>("laB"));
107  const double laS = (*getSetting<double>("laS"));
108 
109  const double LambdaD12 = -laB + laS*w;
110  const double Gb = (-(laB*(2 + w)) + laS*(1 + 2*w))/(1 + w) - 2*(w-1)*zeta1;
111  const double LOIWzeta = zt1 + (w-1)*ztp;
112 
113  //Form factors
114  const double gp = -(eC*((3*LambdaD12)/(1 + w) - 2*(w-1)*zeta1)) - eB*Gb;
115  const double gm = 1 + eC*(6*chi1 - 2*(1 + w)*chi2);
116 
117 
118  //Set elements
119  result.element({1}) = gp;
120  result.element({2}) = gm;
121 
122  result *= LOIWzeta;
123 
124  }
125 
126  std::unique_ptr<FormFactorBase> FFBtoD0starLLSW::clone(const std::string& label) {
127  MAKE_CLONE(FFBtoD0starLLSW, label);
128  }
129 
130 } // 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
LLSW form factors
Tensor indices label definitions.
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
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)