26 namespace MD = MultiDimensional;
28 FFBtoD1BLRVar::FFBtoD1BLRVar() {
30 vector<IndexType> dims = {8, 8};
32 string name{
"FFBtoD1BLRVar"};
36 addProcessSignature(PID::BPLUS, {-PID::DSSD1});
39 addProcessSignature(PID::BZERO, {PID::DSSD1MINUS});
42 setPrefix(
"BstoDs**1");
44 addProcessSignature(PID::BS, {PID::DSSDS1MINUS});
50 void FFBtoD1BLRVar::defineSettings() {
51 _FFErrNames = {
"delta_tau1",
"delta_tau2",
"delta_t1",
"delta_tp",
"delta_eta1",
"delta_eta2",
"delta_eta3"};
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>(
"t1", 0.7);
61 addSetting<double>(
"tp", -1.6);
62 addSetting<double>(
"tau1", -0.5);
63 addSetting<double>(
"tau2", 2.9);
64 addSetting<double>(
"eta1", 0.);
65 addSetting<double>(
"eta2", 0.);
66 addSetting<double>(
"eta3", 0.);
67 addSetting<double>(
"laB", 0.4);
68 addSetting<double>(
"laP", 0.8);
72 vector<vector<double>> sliwmat{ {1., 0., 0., 0., 0., 0., 0.},
73 {0., 1., 0., 0., 0., 0., 0.},
74 {0., 0., 1., 0., 0., 0., 0.},
75 {0., 0., 0., 1., 0., 0., 0.},
76 {0., 0., 0., 0., 1., 0., 0.},
77 {0., 0., 0., 0., 0., 1., 0.},
78 {0., 0., 0., 0., 0., 0., 1.}};
79 addSetting<vector<vector<double>>>(
"sliwmatrix",sliwmat);
81 for (
auto elem : _FFErrNames) {
82 addSetting<double>(elem, 0.);
88 void FFBtoD1BLRVar::evalAtPSPoint(
const vector<double>& point,
const vector<double>& masses) {
89 Tensor& result = getTensor();
93 MSG_WARNING(
"Warning, Setting have not been defined!");
99 if(masses.size() >= 2) {
105 Mb = this->masses()[0];
106 Mc = this->masses()[1];
108 const double Mb2 = Mb*Mb;
109 const double Mc2 = Mc*Mc;
111 double Sqq = point[0];
114 double w = (Mb2 + Mc2 - Sqq)/(2.*Mb*Mc);
116 if(
isZero(w - 1.0)) w += 1e-6;
119 const double zBC = (*getSetting<double>(
"mc"))/(*getSetting<double>(
"mb"));
120 const double eB = 1./(*getSetting<double>(
"mb")*2.);
121 const double eC = 1./(*getSetting<double>(
"mc")*2.);
122 const double as = (*getSetting<double>(
"as"))/
pi;
123 const double t1 = (*getSetting<double>(
"t1"));
124 const double tp = (*getSetting<double>(
"tp"));
125 const double tau1 = (*getSetting<double>(
"tau1"));
126 const double tau2 = (*getSetting<double>(
"tau2"));
127 const double eta1 = (*getSetting<double>(
"eta1"));
128 const double eta2 = (*getSetting<double>(
"eta2"));
129 const double eta3 = (*getSetting<double>(
"eta3"));
130 const double laB = (*getSetting<double>(
"laB"));
131 const double laP = (*getSetting<double>(
"laP"));
133 const vector<vector<double>>& sliwmat = (*getSetting<vector<vector<double>>>(
"sliwmatrix"));
135 const double LambdaD32 = -laB + laP * w;
136 const double Fb = laB + laP - tau2 - tau1*(1 + 2*w);
137 const double LOIWtau = t1 + (w-1)*t1*tp;
140 const double Cs = CS(w, zBC);
142 const double Cv1 = CV1(w, zBC);
143 const double Cv2 = CV2(w, zBC);
144 const double Cv3 = CV3(w, zBC);
145 const double Ca1 = CA1(w, zBC);
148 const double Ct1 = CT1(w, zBC);
149 const double Ct2 = CT2(w, zBC);
150 const double Ct3 = CT3(w, zBC);
153 const double Fsc = (-(eC*(4*LambdaD32 + 2*(1 + w)*(6*eta1 + 2*(w-1)*eta2 - eta3) - 2*(w-1)*((1 + 2*w)*tau1 + tau2))) - 2*(1 + w)*(1 + as*Cs) - 2*(w-1)*eB*Fb)/sqrt(6.);
154 const double Fv1 = (-(eC*(4*(1 + w)*LambdaD32 - (-1 + w*w)*(2*eta1 + 3*eta3 + 3*tau1 - 3*tau2))) + (1 - w*w)*(1 + as*Cv1) - (-1 + w*w)*eB*Fb)/sqrt(6.);
155 const double Fv2 = (-3 - eC*(10*eta1 + 4*(w-1)*eta2 - 5*eta3 + (-1 + 4*w)*tau1 + 5*tau2) - as*(3*Cv1 + 2*(1 + w)*Cv2) - 3*eB*Fb)/sqrt(6.);
156 const double Fv3 = (-2 + w + eC*(4*LambdaD32 - 2*(6 + w)*eta1 - 4*(w-1)*eta2 - (-2 + 3*w)*eta3 + (2 + w)*tau1 + (2 + 3*w)*tau2) - as*((2 - w)*Cv1 + 2*(1 + w)*Cv3) + (2 + w)*eB*Fb)/sqrt(6.);
157 const double Fa = (-(eC*(4*LambdaD32 - (1 + w)*(2*eta1 + 3*eta3) - 3*(w-1)*(tau1 - tau2))) + (-1 - w)*(1 + as*Ca1) - (w-1)*eB*Fb)/sqrt(6.);
158 const double Ft1 = (-(eC*(4*LambdaD32 + (1 + w)*(2*eta1 + 3*eta3) - 3*(w-1)*(tau1 - tau2))) + (1 + w)*(1 + as*(Ct1 + (w-1)*Ct2)) + (w-1)*eB*Fb)/sqrt(6.);
159 const double Ft2 = (-(eC*(4*LambdaD32 - (1 + w)*(2*eta1 + 3*eta3) - 3*(w-1)*(tau1 - tau2))) + (-1 - w)*(1 + as*(Ct1 - (w-1)*Ct3)) + (w-1)*eB*Fb)/sqrt(6.);
160 const double Ft3 = (3 - eC*(-10*eta1 - 4*(w-1)*eta2 + 5*eta3 + (-1 + 4*w)*tau1 + 5*tau2) + as*(3*Ct1 - (2 - w)*Ct2 + 3*Ct3) + 3*eB*Fb)/sqrt(6.);
164 const array<double, 7> FscDer = {
165 Fsc / t1, Fsc / LOIWtau * t1 * (w - 1), sqrt(2./3.)*(eB + eC)*(-1 + w)*(1 + 2*w), sqrt(2./3.)*(eB + eC)*(-1 + w),
166 -2*sqrt(6.)*eC*(1 + w), -2*sqrt(2./3.)* eC*(-1 + w*w), sqrt(2./3.)* eC*(1 + w)};
167 const array<double, 7> Fv1Der = {Fv1 / t1, Fv1/LOIWtau * t1 * (w-1), ((eB + 3*eC + 2*eB*w)*(-1 + w*w))/sqrt(6.),
168 ((eB - 3*eC)*(-1 + w*w))/sqrt(6.), sqrt(2./3.)*eC*(-1 + w*w), 0., sqrt(3./2.)*eC*(-1 + w*w)};
169 const array<double, 7> Fv2Der = {Fv2 / t1, Fv2 / LOIWtau * t1 * (w - 1), (eC - 4*eC*w + eB*(3 + 6*w)) / sqrt(6.),
170 (3*eB - 5*eC) / sqrt(6.), -5*sqrt(2./3.)* eC, -2*sqrt(2./3.)* eC*(-1 + w), (5*eC) / sqrt(6.)};
171 const array<double, 7> Fv3Der = {Fv3 / t1, Fv3 / LOIWtau * t1 * (w - 1), -(((2 + w)*(eB - eC + 2*eB*w)) / sqrt(6.)),
172 (-eB*(2 + w) + eC*(2 + 3*w)) / sqrt(6.), -sqrt(2. / 3.)*eC*(6 + w), -2*sqrt(2./3.)* eC*(-1 + w), (eC*(2 - 3*w)) / sqrt(6.)};
173 const array<double, 7> FaDer = {Fa / t1, Fa / LOIWtau * t1 * (w - 1), ((-1 + w)*(eB + 3*eC + 2*eB*w)) / sqrt(6.),
174 ((eB - 3*eC)*(-1 + w)) / sqrt(6.), sqrt(2./3.)* eC*(1 + w), 0., sqrt(3. / 2.)*eC*(1 + w)};
175 const array<double, 7> Ft1Der = {Ft1 / t1, Ft1 / LOIWtau * t1 * (w - 1), -(((-1 + w)*(eB - 3*eC + 2*eB*w)) / sqrt(6.)),
176 -(((eB + 3*eC)*(-1 + w)) / sqrt(6.)), -sqrt(2. / 3.)*eC*(1 + w), 0., -sqrt(3. / 2.)*eC*(1 + w)};
177 const array<double, 7> Ft2Der = {Ft2 / t1, Ft2 / LOIWtau * t1 * (w - 1), -(((-1 + w)*(eB - 3*eC + 2*eB*w)) / sqrt(6.)),
178 -(((eB + 3*eC)*(-1 + w)) / sqrt(6.)), sqrt(2./3.)* eC*(1 + w), 0., sqrt(3. / 2.)*eC*(1 + w)};
179 const array<double, 7> Ft3Der = {Ft3 / t1, Ft3 / LOIWtau * t1 * (w - 1), (eC - 4*eC*w - 3*eB*(1 + 2*w)) / sqrt(6.),
180 -((3*eB + 5*eC) / sqrt(6.)), 5*sqrt(2./3.)* eC, 2*sqrt(2./3.)* eC*(-1 + w), -((5*eC) / sqrt(6.))};
193 for (
size_t i2 = 0; i2 < 7; ++i2) {
194 result.
element({0, i1}) += sliwmat[i2][i1 - 1] * FscDer[i2];
195 result.
element({1, i1}) += sliwmat[i2][i1 - 1] * Fv1Der[i2];
196 result.
element({2, i1}) += sliwmat[i2][i1 - 1] * Fv2Der[i2];
197 result.
element({3, i1}) += sliwmat[i2][i1 - 1] * Fv3Der[i2];
198 result.
element({4, i1}) += sliwmat[i2][i1 - 1] * FaDer[i2];
199 result.
element({5, i1}) += sliwmat[i2][i1 - 1] * Ft1Der[i2];
200 result.
element({6, i1}) += sliwmat[i2][i1 - 1] * Ft2Der[i2];
201 result.
element({7, i1}) += sliwmat[i2][i1 - 1] * Ft3Der[i2];
209 std::unique_ptr<FormFactorBase> FFBtoD1BLRVar::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.
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.
BLR form factors with variations
static constexpr double pi