26 namespace MD = MultiDimensional;
28 FFBtoD0starBLRVar::FFBtoD0starBLRVar() {
30 vector<IndexType> dims = {4, 6};
32 string name{
"FFBtoD0starBLRVar"};
34 setPrefix(
"BtoD**0*");
36 addProcessSignature(PID::BPLUS, {-PID::DSSD0STAR});
39 addProcessSignature(PID::BZERO, {PID::DSSD0STARMINUS});
42 setPrefix(
"BstoDs**0*");
44 addProcessSignature(PID::BS, {PID::DSSDS0STARMINUS});
50 void FFBtoD0starBLRVar::defineSettings() {
51 _FFErrNames = {
"delta_zt1",
"delta_ztp",
"delta_zeta1",
"delta_chi1",
"delta_chi2"};
53 setPath(getFFErrPrefixGroup().
get());
57 addSetting<double>(
"as",0.26);
58 addSetting<double>(
"mb",4.710);
59 addSetting<double>(
"mc",4.710 - 3.400);
60 addSetting<double>(
"zt1", 0.7);
61 addSetting<double>(
"ztp", 0.2);
62 addSetting<double>(
"zeta1", 0.6);
63 addSetting<double>(
"chi1", 0.);
64 addSetting<double>(
"chi2", 0.);
65 addSetting<double>(
"laB", 0.4);
66 addSetting<double>(
"laS", 0.76);
70 vector<vector<double>> sliwmat{ {1., 0., 0., 0., 0.},
74 {0., 0., 0., 0., 1.}};
75 addSetting<vector<vector<double>>>(
"sliwmatrix",sliwmat);
77 for (
auto elem : _FFErrNames) {
78 addSetting<double>(elem, 0.);
84 void FFBtoD0starBLRVar::evalAtPSPoint(
const vector<double>& point,
const vector<double>& masses) {
85 Tensor& result = getTensor();
89 MSG_WARNING(
"Warning, Setting have not been defined!");
95 if(masses.size() >= 2) {
101 Mb = this->masses()[0];
102 Mc = this->masses()[1];
104 const double Mb2 = Mb*Mb;
105 const double Mc2 = Mc*Mc;
107 double Sqq = point[0];
110 double w = (Mb2 + Mc2 - Sqq)/(2.*Mb*Mc);
112 if(
isZero(w - 1.0)) w += 1e-6;
115 const double zBC = (*getSetting<double>(
"mc"))/(*getSetting<double>(
"mb"));
116 const double eB = 1./(*getSetting<double>(
"mb")*2.);
117 const double eC = 1./(*getSetting<double>(
"mc")*2.);
118 const double as = (*getSetting<double>(
"as"))/
pi;
119 const double zt1 = (*getSetting<double>(
"zt1"));
120 const double ztp = (*getSetting<double>(
"ztp"));
121 const double zeta1 = (*getSetting<double>(
"zeta1"));
122 const double chi1 = (*getSetting<double>(
"chi1"));
123 const double chi2 = (*getSetting<double>(
"chi2"));
124 const double laB = (*getSetting<double>(
"laB"));
125 const double laS = (*getSetting<double>(
"laS"));
127 const vector<vector<double>>& sliwmat = (*getSetting<vector<vector<double>>>(
"sliwmatrix"));
129 const double LambdaD12 = -laB + laS * w;
130 const double Gb = (-(laB*(2 + w)) + laS*(1 + 2*w))/(1 + w) - 2*(w-1)*zeta1;
131 const double LOIWzeta = zt1 + (w-1)*zt1*ztp;
135 const double Cps = CP(w, zBC);
139 const double Ca1 = CA1(w, zBC);
140 const double Ca2 = CA2(w, zBC);
141 const double Ca3 = CA3(w, zBC);
142 const double Ct1 = CT1(w, zBC);
147 const double gps = eC*(3*LambdaD12 - 2*(-1 + w*w)*zeta1 + (w-1)*(6*chi1 - 2*(1 + w)*chi2)) + (w-1)*(1 + as*Cps) - (1 + w)*eB*Gb;
148 const double gp = -(eC*((3*LambdaD12)/(1 + w) - 2*(w-1)*zeta1)) + ((w-1)*as*(Ca2 + Ca3))/2. - eB*Gb;
149 const double gm = 1 + eC*(6*chi1 - 2*(1 + w)*chi2) + as*(Ca1 + ((w-1)*(Ca2 - Ca3))/2.);
150 const double gt = 1 + eC*((3*LambdaD12)/(1 + w) - 2*(w-1)*zeta1 + 6*chi1 - 2*(1 + w)*chi2) + as*Ct1 - eB*Gb;
153 const array<double, 5> gpsDer = {gps / zt1, gps / LOIWzeta * zt1 * (w - 1), 2*(eB - eC)*(-1 + w*w), 6*eC*(-1 + w), -2*eC*(-1 + w*w)};
154 const array<double, 5> gpDer = {gp / zt1, gp / LOIWzeta * zt1 * (w - 1), 2*(eB + eC)*(-1 + w), 0., 0.};
155 const array<double, 5> gmDer = {gm / zt1, gm / LOIWzeta * zt1 * (w - 1), 0., 6*eC, -2*eC*(1 + w)};
156 const array<double, 5> gtDer = {gt / zt1, gt / LOIWzeta * zt1 * (w - 1), 2*(eB - eC)*(-1 + w), 6*eC, -2*eC*(1 + w)};
165 for (
size_t i2 = 0; i2 < 5; ++i2) {
166 result.
element({0, i1}) += sliwmat[i2][i1 - 1] * gpsDer[i2];
167 result.
element({1, i1}) += sliwmat[i2][i1 - 1] * gpDer[i2];
168 result.
element({2, i1}) += sliwmat[i2][i1 - 1] * gmDer[i2];
169 result.
element({3, i1}) += sliwmat[i2][i1 - 1] * gtDer[i2];
177 std::unique_ptr<FormFactorBase> FFBtoD0starBLRVar::clone(
const std::string& label) {
TensorData makeEmptySparse(const IndexList &dimensions, const LabelsList &labels)
std::complex< double > & element(const IndexList &indices={})
access an element given its indices
Tensor & toVector()
forces conversion of a tensor to vector type
Tensor indices label definitions.
BLR form factors with variations
Sparse tensor data container.
Multidimensional tensor class with complex numbers as elements.
bool isZero(const std::complex< double > val)
void clearData()
sets all the elements to 0
Various numerical constants.
Hammer particle data class.
static constexpr double pi