26 namespace MD = MultiDimensional;
28 FFBtoD2starBLRVar::FFBtoD2starBLRVar() {
30 vector<IndexType> dims = {8, 8};
32 string name{
"FFBtoD2starBLRVar"};
34 setPrefix(
"BtoD**2*");
36 addProcessSignature(PID::BPLUS, {-PID::DSSD2STAR});
39 addProcessSignature(PID::BZERO, {PID::DSSD2STARMINUS});
42 setPrefix(
"BstoDs**2*");
44 addProcessSignature(PID::BS, {PID::DSSDS2STARMINUS});
50 void FFBtoD2starBLRVar::defineSettings() {
51 _FFErrNames = {
"delta_t1",
"delta_tp",
"delta_tau1",
"delta_tau2",
"delta_eta1",
"delta_eta2",
"delta_eta3"};
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>(
"t1", 0.7);
60 addSetting<double>(
"tp", -1.6);
61 addSetting<double>(
"tau1", -0.5);
62 addSetting<double>(
"tau2", 2.9);
63 addSetting<double>(
"eta1", 0.);
64 addSetting<double>(
"eta2", 0.);
65 addSetting<double>(
"eta3", 0.);
66 addSetting<double>(
"laB", 0.4);
67 addSetting<double>(
"laP", 0.8);
71 vector<vector<double>> sliwmat{ {1., 0., 0., 0., 0., 0., 0.},
72 {0., 1., 0., 0., 0., 0., 0.},
73 {0., 0., 1., 0., 0., 0., 0.},
74 {0., 0., 0., 1., 0., 0., 0.},
75 {0., 0., 0., 0., 1., 0., 0.},
76 {0., 0., 0., 0., 0., 1., 0.},
77 {0., 0., 0., 0., 0., 0., 1.}};
78 addSetting<vector<vector<double>>>(
"sliwmatrix",sliwmat);
80 for (
auto elem : _FFErrNames) {
81 addSetting<double>(elem, 0.);
87 void FFBtoD2starBLRVar::evalAtPSPoint(
const vector<double>& point,
const vector<double>& masses) {
88 Tensor& result = getTensor();
92 MSG_WARNING(
"Warning, Setting have not been defined!");
98 if(masses.size() >= 2) {
104 Mb = this->masses()[0];
105 Mc = this->masses()[1];
107 const double Mb2 = Mb*Mb;
108 const double Mc2 = Mc*Mc;
110 double Sqq = point[0];
113 double w = (Mb2 + Mc2 - Sqq)/(2.*Mb*Mc);
115 if(
isZero(w - 1.0)) w += 1e-6;
118 const double zBC = (*getSetting<double>(
"mc"))/(*getSetting<double>(
"mb"));
119 const double eB = 1./(*getSetting<double>(
"mb")*2.);
120 const double eC = 1./(*getSetting<double>(
"mc")*2.);
121 const double as = (*getSetting<double>(
"as"))/
pi;
122 const double t1 = (*getSetting<double>(
"t1"));
123 const double tp = (*getSetting<double>(
"tp"));
124 const double tau1 = (*getSetting<double>(
"tau1"));
125 const double tau2 = (*getSetting<double>(
"tau2"));
126 const double eta1 = (*getSetting<double>(
"eta1"));
127 const double eta2 = (*getSetting<double>(
"eta2"));
128 const double eta3 = (*getSetting<double>(
"eta3"));
129 const double laB = (*getSetting<double>(
"laB"));
130 const double laP = (*getSetting<double>(
"laP"));
132 const vector<vector<double>>& sliwmat = (*getSetting<vector<vector<double>>>(
"sliwmatrix"));
135 const double Fb = laB + laP - tau2 - tau1*(1 + 2*w);
136 const double LOIWtau = t1 + (w-1)*t1*tp;
140 const double Cps = CP(w, zBC);
141 const double Cv1 = CV1(w, zBC);
144 const double Ca1 = CA1(w, zBC);
145 const double Ca2 = CA2(w, zBC);
146 const double Ca3 = CA3(w, zBC);
147 const double Ct1 = CT1(w, zBC);
148 const double Ct2 = CT2(w, zBC);
149 const double Ct3 = CT3(w, zBC);
152 const double Kp = 1 + eC*(-2*eta1 - 2*(w-1)*eta2 + eta3 + (1 + 2*w)*tau1 + tau2) + as*Cps + eB*Fb;
153 const double Ka1 = -(eC*(-((1 + w)*(2*eta1 - eta3)) + (w-1)*(tau1 - tau2))) + (-1 - w)*(1 + as*Ca1) - (w-1)*eB*Fb;
154 const double Ka2 = -2*eC*(eta2 + tau1) + as*Ca2;
155 const double Ka3 = 1 - eC*(2*eta1 - 2*eta2 - eta3 + tau1 + tau2) + as*(Ca1 + Ca3) + eB*Fb;
156 const double Kv = -1 - eC*(-2*eta1 + eta3 + tau1 - tau2) - as*Cv1 - eB*Fb;
157 const double Kt1 = 1 - eC*(2*eta1 - eta3) + as*(Ct1 + ((w-1)*(Ct2 - Ct3))/2.);
158 const double Kt2 = -(eC*(tau1 - tau2)) + ((1 + w)*as*(Ct2 + Ct3))/2. + eB*Fb;
159 const double Kt3 = 2*eC*(-eta2 + tau1) - as*Ct2;
162 const array<double, 7> KpDer = {Kp / t1, Kp / LOIWtau * t1 * (w - 1),-(eB - eC)*(1 + 2*w), -eB + eC, -2*eC, -2*eC*(-1 + w), eC};
163 const array<double, 7> Ka1Der = {Ka1 / t1, Ka1 / LOIWtau * t1 * (w - 1), (-1 + w)*(eB - eC + 2*eB*w), (eB + eC)*(-1 + w), 2*eC*(1 + w), 0,
165 const array<double, 7> Ka2Der = { Ka2 / t1, Ka2 / LOIWtau * t1 * (w - 1), -2*eC, 0., 0., -2*eC, 0.};
166 const array<double, 7> Ka3Der = {Ka3 / t1, Ka3 / LOIWtau * t1 * (w - 1), -eC - eB*(1 + 2*w), -eB - eC, -2*eC, 2*eC, eC};
167 const array<double, 7> KvDer = {Kv / t1, Kv / LOIWtau * t1 * (w - 1), eB - eC + 2*eB*w, eB + eC, 2*eC, 0., -eC};
168 const array<double, 7> Kt1Der = {Kt1 / t1, Kt1 / LOIWtau * t1 * (w - 1), 0., 0., -2*eC, 0., eC};
169 const array<double, 7> Kt2Der = {Kt2 / t1, Kt2 / LOIWtau * t1 * (w - 1), -eC - eB*(1 + 2*w), -eB + eC, 0., 0., 0.};
170 const array<double, 7> Kt3Der = {Kt3 / t1, Kt3 / LOIWtau * t1 * (w - 1), 2*eC, 0., 0., -2*eC, 0.};
183 for(
size_t i2 = 0; i2<7; ++i2) {
184 result.
element({0, i1}) += sliwmat[i2][i1-1]*KpDer[i2];
185 result.
element({1, i1}) += sliwmat[i2][i1-1]*Ka1Der[i2];
186 result.
element({2, i1}) += sliwmat[i2][i1-1]*Ka2Der[i2];
187 result.
element({3, i1}) += sliwmat[i2][i1-1]*Ka3Der[i2];
188 result.
element({4, i1}) += sliwmat[i2][i1-1]*KvDer[i2];
189 result.
element({5, i1}) += sliwmat[i2][i1-1]*Kt1Der[i2];
190 result.
element({6, i1}) += sliwmat[i2][i1-1]*Kt2Der[i2];
191 result.
element({7, i1}) += sliwmat[i2][i1-1]*Kt3Der[i2];
199 std::unique_ptr<FormFactorBase> FFBtoD2starBLRVar::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