26 namespace MD = MultiDimensional;
28 FFBtoD1starBLRVar::FFBtoD1starBLRVar() {
30 vector<IndexType> dims = {8, 6};
32 string name{
"FFBtoD1starBLRVar"};
34 setPrefix(
"BtoD**1*");
36 addProcessSignature(PID::BPLUS, {-PID::DSSD1STAR});
39 addProcessSignature(PID::BZERO, {PID::DSSD1STARMINUS});
42 setPrefix(
"BstoDs**1*");
44 addProcessSignature(PID::BS, {PID::DSSDS1STARMINUS});
50 void FFBtoD1starBLRVar::defineSettings() {
51 _FFErrNames = {
"delta_zt1",
"delta_ztp",
"delta_zeta1",
"delta_chi1",
"delta_chi2"};
52 setPath(getFFErrPrefixGroup().
get());
56 addSetting<double>(
"as",0.26);
57 addSetting<double>(
"mb",4.710);
58 addSetting<double>(
"mc",4.710 - 3.400);
59 addSetting<double>(
"zt1", 0.7);
60 addSetting<double>(
"ztp", 0.2);
61 addSetting<double>(
"zeta1", 0.6);
62 addSetting<double>(
"chi1", 0.);
63 addSetting<double>(
"chi2", 0.);
64 addSetting<double>(
"laB", 0.4);
65 addSetting<double>(
"laS", 0.76);
69 vector<vector<double>> sliwmat{{1., 0., 0., 0., 0.},
73 {0., 0., 0., 0., 1.}};
74 addSetting<vector<vector<double>>>(
"sliwmatrix", sliwmat);
76 for (
auto elem : _FFErrNames) {
77 addSetting<double>(elem, 0.);
83 void FFBtoD1starBLRVar::evalAtPSPoint(
const vector<double>& point,
const vector<double>& masses) {
84 Tensor& result = getTensor();
88 MSG_WARNING(
"Warning, Setting have not been defined!");
94 if(masses.size() >= 2) {
100 Mb = this->masses()[0];
101 Mc = this->masses()[1];
103 const double Mb2 = Mb*Mb;
104 const double Mc2 = Mc*Mc;
106 double Sqq = point[0];
109 double w = (Mb2 + Mc2 - Sqq)/(2.*Mb*Mc);
111 if(
isZero(w - 1.0)) w += 1e-6;
114 const double zBC = (*getSetting<double>(
"mc"))/(*getSetting<double>(
"mb"));
115 const double eB = 1./(*getSetting<double>(
"mb")*2.);
116 const double eC = 1./(*getSetting<double>(
"mc")*2.);
117 const double as = (*getSetting<double>(
"as"))/
pi;
118 const double zt1 = (*getSetting<double>(
"zt1"));
119 const double ztp = (*getSetting<double>(
"ztp"));
120 const double zeta1 = (*getSetting<double>(
"zeta1"));
121 const double chi1 = (*getSetting<double>(
"chi1"));
122 const double chi2 = (*getSetting<double>(
"chi2"));
123 const double laB = (*getSetting<double>(
"laB"));
124 const double laS = (*getSetting<double>(
"laS"));
126 const vector<vector<double>>& sliwmat = (*getSetting<vector<vector<double>>>(
"sliwmatrix"));
128 const double LambdaD12 = -laB + laS * w;
129 const double Gb = (-(laB*(2 + w)) + laS*(1 + 2*w))/(1 + w) - 2*(w-1)*zeta1;
130 const double LOIWzeta = zt1 + (w-1)*zt1*ztp;
133 const double Cs = CS(w, zBC);
135 const double Cv1 = CV1(w, zBC);
136 const double Cv2 = CV2(w, zBC);
137 const double Cv3 = CV3(w, zBC);
138 const double Ca1 = CA1(w, zBC);
141 const double Ct1 = CT1(w, zBC);
142 const double Ct2 = CT2(w, zBC);
143 const double Ct3 = CT3(w, zBC);
146 const double Gs = 1 - eC*(LambdaD12/(1 + w) - 2*(w-1)*zeta1 + 2*chi1 - 2*(1 + w)*chi2) + as*Cs - eB*Gb;
147 const double Gv1 = eC*(LambdaD12 - 2*(w-1)*chi1) + (w-1)*(1 + as*Cv1) - (1 + w)*eB*Gb;
148 const double Gv2 = eC*(2*zeta1 - 2*chi2) - as*Cv2;
149 const double Gv3 = -1 - eC*(LambdaD12/(1 + w) + 2*zeta1 - 2*chi1 + 2*chi2) - as*(Cv1 + Cv3) + eB*Gb;
150 const double Ga = 1 + eC*(LambdaD12/(1 + w) - 2*chi1) + as*Ca1 - eB*Gb;
151 const double Gt1 = -1 + eC*(LambdaD12/(1 + w) + 2*chi1) - as*(Ct1 + (w-1)*Ct2) + eB*Gb;
152 const double Gt2 = 1 + eC*(LambdaD12/(1 + w) - 2*chi1) + as*(Ct1 - (w-1)*Ct3) + eB*Gb;
153 const double Gt3 = eC*(2*zeta1 + 2*chi2) - as*Ct2;
157 const array<double, 5> GsDer = {Gs / zt1, Gs / LOIWzeta * zt1 * (w - 1), 2*(eB + eC)*(-1 + w), -2*eC, 2*eC*(1 + w)};
158 const array<double, 5> Gv1Der = {Gv1 / zt1, Gv1 / LOIWzeta * zt1 * (w - 1), 2*eB*(-1 + w*w), -2*eC*(-1 + w), 0};
159 const array<double, 5> Gv2Der = {Gv2 / zt1, Gv2 / LOIWzeta * zt1 * (w - 1), 2*eC, 0, -2*eC};
160 const array<double, 5> Gv3Der = {Gv3 / zt1, Gv3 / LOIWzeta * zt1 * (w - 1), -2*(eC + eB*(-1 + w)), 2*eC, -2*eC};
161 const array<double, 5> GaDer = {Ga / zt1, Ga / LOIWzeta * zt1 * (w - 1), 2*eB*(-1 + w), -2*eC, 0};
162 const array<double, 5> Gt1Der = {Gt1 / zt1, Gt1 / LOIWzeta * zt1 * (w - 1), -2*eB*(-1 + w), 2*eC, 0};
163 const array<double, 5> Gt2Der = {Gt2 / zt1, Gt2 / LOIWzeta * zt1 * (w - 1), -2*eB*(-1 + w), -2*eC, 0};
164 const array<double, 5> Gt3Der = {Gt3 / zt1, Gt3 / LOIWzeta * zt1 * (w - 1), 2*eC, 0, 2*eC};
177 for (
size_t i2 = 0; i2 < 5; ++i2) {
178 result.
element({0, i1}) += sliwmat[i2][i1 - 1] * GsDer[i2];
179 result.
element({1, i1}) += sliwmat[i2][i1 - 1] * Gv1Der[i2];
180 result.
element({2, i1}) += sliwmat[i2][i1 - 1] * Gv2Der[i2];
181 result.
element({3, i1}) += sliwmat[i2][i1 - 1] * Gv3Der[i2];
182 result.
element({4, i1}) += sliwmat[i2][i1 - 1] * GaDer[i2];
183 result.
element({5, i1}) += sliwmat[i2][i1 - 1] * Gt1Der[i2];
184 result.
element({6, i1}) += sliwmat[i2][i1 - 1] * Gt2Der[i2];
185 result.
element({7, i1}) += sliwmat[i2][i1 - 1] * Gt3Der[i2];
193 std::unique_ptr<FormFactorBase> FFBtoD1starBLRVar::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