Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FFBtoD2starLLSW.cc
Go to the documentation of this file.
1 ///
2 /// @file FFBtoD2starLLSW.cc
3 /// @brief \f$ B \rightarrow D_2^* \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  FFBtoD2starLLSW::FFBtoD2starLLSW() {
29  // Create tensor rank and dimensions
30  vector<IndexType> dims = {8};
31  setGroup("LLSW"); //override BLPR base class FF group setting
32  string name{"FFBtoD2starLLSW"};
33 
34  setPrefix("BtoD**2*");
35  addProcessSignature(PID::BPLUS, {-PID::DSSD2STAR});
36  addTensor(Tensor{name, MD::makeEmptySparse(dims, {FF_BDSSD2STAR})});
37 
38  addProcessSignature(PID::BZERO, {PID::DSSD2STARMINUS});
39  addTensor(Tensor{name, MD::makeEmptySparse(dims, {FF_BDSSD2STAR})});
40 
41  setPrefix("BstoDs**2*");
42  addProcessSignature(PID::BS, {PID::DSSDS2STARMINUS});
43  addTensor(Tensor{name, MD::makeEmptySparse(dims, {FF_BSDSSDS2STAR})});
44 
45  setSignatureIndex();
46  }
47 
48  void FFBtoD2starLLSW::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>("t1", 0.71);
57  addSetting<double>("tp", -1.6);
58  addSetting<double>("tau1", -0.5);
59  addSetting<double>("tau2", 2.9);
60  addSetting<double>("eta1", 0.);
61  addSetting<double>("eta2", 0.);
62  addSetting<double>("eta3", 0.);
63  addSetting<double>("laB", 0.4);
64  addSetting<double>("laP", 0.8);
65 
66  initialized = true;
67  }
68 
69  void FFBtoD2starLLSW::evalAtPSPoint(const vector<double>& point, const vector<double>& masses) {
70  Tensor& result = getTensor();
71  result.clearData();
72 
73  if(!initialized){
74  MSG_WARNING("Warning, Setting have not been defined!");
75  }
76 
77  double Mb = 0.;
78  double Mc = 0.;
79  // double unitres = 1.;
80  if(masses.size() >= 2) {
81  Mb = masses[0];
82  Mc = masses[1];
83  //unitres = _units;
84  }
85  else {
86  Mb = this->masses()[0];
87  Mc = this->masses()[1];
88  }
89  const double Mb2 = Mb*Mb;
90  const double Mc2 = Mc*Mc;
91 
92  double Sqq = point[0];
93 
94  // const double sqSqq = sqrt(Sqq);
95  double w = (Mb2 + Mc2 - Sqq)/(2.*Mb*Mc);
96  //safety measure if w==1.0
97  if(isZero(w - 1.0)) w += 1e-6;
98 
99  //LLSW parameters
100  // const double zBC = (*getSetting<double>("mc"))/(*getSetting<double>("mb"));
101  const double eB = 1./(*getSetting<double>("mb")*2.);
102  const double eC = 1./(*getSetting<double>("mc")*2.);
103  const double t1 = (*getSetting<double>("t1"));
104  const double tp = (*getSetting<double>("tp"));
105  const double tau1 = (*getSetting<double>("tau1"));
106  const double tau2 = (*getSetting<double>("tau2"));
107  const double eta1 = (*getSetting<double>("eta1"));
108  const double eta2 = (*getSetting<double>("eta2"));
109  const double eta3 = (*getSetting<double>("eta3"));
110  const double laB = (*getSetting<double>("laB"));
111  const double laP = (*getSetting<double>("laP"));
112 
113  // const double LambdaD32 = -laB + laP*w;
114  const double Fb = laB + laP - tau2 - tau1*(1 + 2*w);
115  const double LOIWtau = t1 + tp*(w-1);
116 
117  //Form factors
118  const double Ka1 = -1 - w - eC*(-((1 + w)*(2*eta1 - eta3)) + (w-1)*(tau1 - tau2)) - (w-1)*eB*Fb;
119  const double Ka2 = -2*eC*(eta2 + tau1);
120  const double Ka3 = 1 - eC*(2*eta1 - 2*eta2 - eta3 + tau1 + tau2) + eB*Fb;
121  const double Kv = -1 - eC*(-2*eta1 + eta3 + tau1 - tau2) - eB*Fb;
122 
123 
124  //Set elements
125  result.element({1}) = Ka1;
126  result.element({2}) = Ka2;
127  result.element({3}) = Ka3;
128  result.element({4}) = Kv;
129 
130  result *= LOIWtau;
131 
132  }
133 
134  std::unique_ptr<FormFactorBase> FFBtoD2starLLSW::clone(const std::string& label) {
135  MAKE_CLONE(FFBtoD2starLLSW, label);
136  }
137 
138 } // 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)