27 namespace MD = MultiDimensional;
29 FFBtoDstarBLPRVar::FFBtoDstarBLPRVar() {
31 vector<IndexType> dims = {8, 8};
33 string name{
"FFBtoDstarBLPRVar"};
37 addProcessSignature(PID::BPLUS, {-PID::DSTAR});
40 addProcessSignature(PID::BZERO, {PID::DSTARMINUS});
45 addProcessSignature(PID::BS, {PID::DSSTARMINUS});
51 void FFBtoDstarBLPRVar::defineSettings() {
52 _FFErrNames = {
"delta_RhoSq",
"delta_chi21",
"delta_chi2p",
"delta_chi3p",
"delta_eta1",
"delta_etap",
"delta_dV20"};
53 setPath(getFFErrPrefixGroup().
get());
56 addSetting<double>(
"RhoSq",1.24);
57 addSetting<double>(
"a",1.509/
sqrt2);
59 addSetting<double>(
"as",0.26);
60 addSetting<double>(
"mb",4.710);
61 addSetting<double>(
"mc",4.710 - 3.400);
62 addSetting<double>(
"la",0.57115);
64 addSetting<double>(
"ebR/eb",0.861);
65 addSetting<double>(
"ecR/ec",0.822);
67 addSetting<double>(
"chi21",-0.06);
68 addSetting<double>(
"chi2p",-0.00);
69 addSetting<double>(
"chi3p",0.05);
70 addSetting<double>(
"eta1",0.30);
71 addSetting<double>(
"etap",-0.05);
72 addSetting<double>(
"dV20",0.);
76 vector<vector<double>> sliwmat{ {1., 0., 0., 0., 0., 0., 0.},
77 {0., 1., 0., 0., 0., 0., 0.},
78 {0., 0., 1., 0., 0., 0., 0.},
79 {0., 0., 0., 1., 0., 0., 0.},
80 {0., 0., 0., 0., 1., 0., 0.},
81 {0., 0., 0., 0., 0., 1., 0.},
82 {0., 0., 0., 0., 0., 0., 1.}};
83 addSetting<vector<vector<double>>>(
"sliwmatrix",sliwmat);
85 for (
auto elem : _FFErrNames) {
86 addSetting<double>(elem, 0.);
93 void FFBtoDstarBLPRVar::evalAtPSPoint(
const vector<double>& point,
const vector<double>& masses) {
94 Tensor& result = getTensor();
98 MSG_WARNING(
"Warning, Settings have not been defined!");
104 if(masses.size() >= 2) {
110 Mb = this->masses()[0];
111 Mc = this->masses()[1];
113 const double Mb2 = Mb*Mb;
114 const double Mb3 = Mb*Mb*Mb;
115 const double Mc2 = Mc*Mc;
117 double Sqq = point[0];
120 const double sqMbMc = sqrt(Mb*Mc);
121 double w = (Mb2 + Mc2 - Sqq)/(2.*Mb*Mc);
123 if(
isZero(w - 1.0)) w += 1e-6;
126 const double a = *getSetting<double>(
"a");
127 const double zCon = (sqrt(w+1) -
sqrt2*a)/(sqrt(w+1) +
sqrt2*a);
130 const double zBC = (*getSetting<double>(
"mc"))/(*getSetting<double>(
"mb"));
131 const double eb = (*getSetting<double>(
"la"))/(*getSetting<double>(
"mb")*2.);
132 const double ebReb = (*getSetting<double>(
"ebR/eb"));
133 const double ec = (*getSetting<double>(
"la"))/(*getSetting<double>(
"mc")*2.);
134 const double ecRec = (*getSetting<double>(
"ecR/ec"));
135 const double as = (*getSetting<double>(
"as"))/
pi;
138 const double RhoSq = *getSetting<double>(
"RhoSq");
139 const double chi21 = (*getSetting<double>(
"chi21"));
140 const double chi2p = (*getSetting<double>(
"chi2p"));
141 const double chi3p = (*getSetting<double>(
"chi3p"));
142 const double eta1 = (*getSetting<double>(
"eta1"));
143 const double etap = (*getSetting<double>(
"etap"));
145 const vector<vector<double>>& sliwmat = (*getSetting<vector<vector<double>>>(
"sliwmatrix"));
148 const double L1 = -4.*(w-1)*(chi21 + (w-1.)*chi2p)+12.*chi3p*(w-1.);
149 const double L2 = -4.*chi3p*(w-1.);
150 const double L3 = 4.*(chi21 + (w-1.)*chi2p);
152 const double L4b = (2.*(eta1 + etap*(w-1.))-1.*ebReb);
155 const double L5c = -ecRec;
157 const double L6c = -2.*(ecRec + (eta1 + etap*(w-1.)))/(w+1.);
160 const double rD = 1867./5280.;
162 const double V21 = 57.0;
163 const double V20 = 7.5 + (*getSetting<double>(
"dV20"));
167 const double Cps = CP(w, zBC);
168 const double Cv1 = CV1(w, zBC);
171 const double Ca1 = CA1(w, zBC);
172 const double Ca2 = CA2(w, zBC);
173 const double Ca3 = CA3(w, zBC);
174 const double Ct1 = CT1(w, zBC);
175 const double Ct2 = CT2(w, zBC);
176 const double Ct3 = CT3(w, zBC);
179 const double w0 = 2*a*a - 1.;
184 Cv1zp = (CV1(w0 + 1e-5, zBC) - Cv1z)/1e-5;
185 Cv2zp = (CV2(w0 + 1e-5, zBC) - Cv2z)/1e-5;
186 Cv3zp = (CV3(w0 + 1e-5, zBC) - Cv3z)/1e-5;
188 Cv1zpp = (Cv1zp - (Cv1z - CV1(w0 - 1e-5, zBC))/1e-5)/1e-5;
189 Cv2zpp = (Cv2zp - (Cv2z - CV2(w0 - 1e-5, zBC))/1e-5)/1e-5;
190 Cv3zpp = (Cv3zp - (Cv3z - CV3(w0 - 1e-5, zBC))/1e-5)/1e-5;
211 const double a2 = a*a;
212 const double a4 = a2*a2;
213 const double a6 = a4*a2;
214 const double Xi = 64*a4*RhoSq - 16*a2 - V21;
215 const double xiIW = 1 - 8*a2*RhoSq*zCon + zCon*zCon*(
216 V21*RhoSq - V20 + (eb - ec)*(2*Xi*etap * (1-rD)/(1+rD))
217 + (eb + ec)*(Xi* (12*chi3p - 4*chi21) - 16*((a2-1)*Xi - 16* a4)*chi2p)
218 + as*(Xi*(Cv1zp +(Cv3z + rD*Cv2z)/(1 + rD)) + 2*a2*(Xi - 32*a2)*(Cv3zp + rD*Cv2zp)/(1+rD) - 64*a6*(Cv3zpp + rD*Cv2zpp)/(1+rD) -32*a4*Cv1zpp ));
219 const double xiIWN = 1 - 8*a2*RhoSq*(1-a)/(1+a) + pow((1-a)/(1+a),2.)*(
220 V21*RhoSq - V20 + (eb - ec)*(2*Xi*etap * (1-rD)/(1+rD))
221 + (eb + ec)*(Xi* (12*chi3p - 4*chi21) - 16*((a2-1)*Xi - 16* a4)*chi2p)
222 + as*(Xi*(Cv1zp +(Cv3z + rD*Cv2z)/(1 + rD)) + 2*a2*(Xi - 32*a2)*(Cv3zp + rD*Cv2zp)/(1+rD) - 64*a6*(Cv3zpp + rD*Cv2zpp)/(1+rD) -32*a4*Cv1zpp ));
225 const double h=xiIW/xiIWN + 2.*(eb+ec)*chi1;
228 const double Hps = 1.+as*Cps+ec*(L2+L3*(w-1)+L5c-L6c*(w+1))+eb*(L1-L4b);
229 const double Hv = 1.+as*Cv1+ec*(L2-L5c)+eb*(L1-L4b);
230 const double Ha1 = 1.+as*Ca1+ec*(L2-L5c*(w-1)/(w+1))+eb*(L1-L4b*(w-1)/(w+1));
231 const double Ha2 = as*Ca2+ec*(L3+L6c);
232 const double Ha3 = 1.+as*(Ca1+Ca3)+ec*(L2-L3-L5c+L6c)+eb*(L1-L4b);
233 const double Ht1 = 1.+as*(Ct1+0.5*(w-1)*(Ct2-Ct3))+ec*(L2)+eb*(L1);
234 const double Ht2 = 0.5*(w+1)*as*(Ct2+Ct3)+ec*(L5c)-eb*(L4b);
235 const double Ht3 = as*(Ct2)+ec*(L6c-L3);
240 result.
element({0, 0}) = -((Hps * Mc) / sqMbMc);
242 result.
element({1, 0}) = (Ha1 * ((Mb + Mc)*(Mb + Mc) - Sqq)) / (2. * sqMbMc);
244 result.
element({2, 0}) = Hv / (2. * sqMbMc);
246 result.
element({3, 0}) = -(Ha2 * sqrt(Mc / Mb3)) / 2. + Ha3 / (2. * sqMbMc);
248 result.
element({4, 0}) = -(Ha2 * sqrt(Mc / Mb3)) / 2. - Ha3 / (2. * sqMbMc);
250 result.
element({5, 0}) = (Ht3 * Mc) / (2. * pow(Mb * Mc, 1.5));
252 result.
element({6, 0}) = (Ht1 * (Mb - Mc)) / (2. * sqMbMc) - (Ht2 * (Mb + Mc)) / (2. * sqMbMc);
254 result.
element({7, 0}) = (Ht2 * (Mb - Mc)) / (2. * sqMbMc) - (Ht1 * (Mb + Mc)) / (2. * sqMbMc);
258 const double rC = Mc/Mb;
259 const double sqrC = sqrt(rC);
260 const double wSq = w*w;
261 const double zConSq = zCon*zCon;
262 const double wm1Sq = (w-1)*(w-1);
263 const double am1Sq = (a-1)*(a-1);
264 const double ap1Sq = (a+1)*(a+1);
267 vector<vector<double>> FFmat{
268 {0, 4*(eb - ec)*(-1 + w)*sqrC, 4*(eb - ec)*wm1Sq*sqrC, -4*(3*eb - ec)*(-1 + w)*sqrC, 2*(eb - ec)*sqrC, 2*(eb - ec)*(-1 + w)*sqrC, 0},
269 {0, -4*eb*Mb*(-1 + wSq)*sqrC, -4*eb*Mb*wm1Sq*(1 + w)*sqrC, 4*(3*eb - ec)*Mb*(-1 + wSq)*sqrC, -2*eb*Mb*(-1 + w)*sqrC, -2*eb*Mb*wm1Sq*sqrC, 0},
270 {0, (-2*eb*(-1 + w))/(Mb*sqrC), (-2*eb*wm1Sq)/(Mb*sqrC), (2*(3*eb - ec)*(-1 + w))/(Mb*sqrC), -(eb/(Mb*sqrC)), -((eb*(-1 + w))/(Mb*sqrC)), 0},
271 {0, (-2*(eb*(-1 + w) + ec*(1 + rC)))/(Mb*sqrC), (-2*(-1 + w)*(eb*(-1 + w) + ec*(1 + rC)))/(Mb*sqrC), (2*(3*eb - ec)*(-1 + w))/(Mb*sqrC), -((eb + ec + eb*w - ec*rC)/(Mb*(1 + w)*sqrC)), -(((-1 + w)*(eb + ec + eb*w - ec*rC))/(Mb*(1 + w)*sqrC)), 0},
272 {0, (2*(ec + eb*(-1 + w) - ec*rC))/(Mb*sqrC), (2*(-1 + w)*(ec + eb*(-1 + w) - ec*rC))/(Mb*sqrC), (-2*(3*eb - ec)*(-1 + w))/(Mb*sqrC), (eb + ec + eb*w + ec*rC)/(Mb*(1 + w)*sqrC), ((-1 + w)*(eb + ec + eb*w + ec*rC))/(Mb*(1 + w)*sqrC), 0},
273 {0, (-2*ec)/(Mb2*sqrC), (-2*ec*(-1 + w))/(Mb2*sqrC), 0, -(ec/(Mb2*(1 + w)*sqrC)), -((ec*(-1 + w))/(Mb2*(1 + w)*sqrC)), 0},
274 {0, (2*eb*(-1 + w)*(-1 + rC))/sqrC, (2*eb*wm1Sq*(-1 + rC))/sqrC, (-2*(3*eb - ec)*(-1 + w)*(-1 + rC))/sqrC, (eb*(1 + rC))/sqrC, (eb*(-1 + w)*(1 + rC))/sqrC, 0},
275 {0, (2*eb*(-1 + w)*(1 + rC))/sqrC, (2*eb*wm1Sq*(1 + rC))/sqrC, (-2*(3*eb - ec)*(-1 + w)*(1 + rC))/sqrC, (eb*(-1 + rC))/sqrC, (eb*(-1 + w)*(-1 + rC))/sqrC, 0}};
278 const vector<double> xiIWL = {
279 -8*a2*zCon + zConSq*(V21 + (64*a4*Cv1zp + (64*a4*Cv3z)/(1 + rD) + (128*a6*Cv3zp)/(1 + rD) + (64*a4*Cv2z*rD)/(1 + rD) + (128*a6*Cv2zp*rD)/(1 + rD))*as - 256*a4*(eb + ec)*chi21 - 16*(-64*a4 + 64*a6)*(eb + ec)*chi2p + 768*a4*(eb + ec)*chi3p - (128*a4*(-1 + rD)*(eb - ec)*etap)/(1 + rD)),
280 -4*zConSq*(eb + ec)*Xi,
281 -16*zConSq*(eb + ec)*(-(a2*(-16 + V21)) + V21 + 64*a6*RhoSq - 32*a4*(1 + 2*RhoSq)),
282 12*zConSq*(eb + ec)*Xi,
284 (-2*(-1 + rD)*zConSq*(eb - ec)*Xi)/(1 + rD),
287 const vector<double> xiIWLN = {
288 (8*a4 + a2*(-8 + V21) + V21 - 2*a*V21)/ap1Sq + ((64*am1Sq*a4*Cv1zp)/ap1Sq + (64*am1Sq*a4*Cv3z)/(ap1Sq*(1 + rD)) + (128*am1Sq*a6*Cv3zp)/(ap1Sq*(1 + rD)) + (64*am1Sq*a4*Cv2z*rD)/(ap1Sq*(1 + rD)) + (128*am1Sq*a6*Cv2zp*rD)/(ap1Sq*(1 + rD)))*as - (256*am1Sq*a4*(eb + ec)*chi21)/ap1Sq - (16*am1Sq*(-64*a4 + 64*a6)*(eb + ec)*chi2p)/ap1Sq + (768*am1Sq*a4*(eb + ec)*chi3p)/ap1Sq - (128*am1Sq*a4*(-1 + rD)*(eb - ec)*etap)/(ap1Sq*(1 + rD)),
289 (-4*am1Sq*(eb + ec)*Xi)/ap1Sq,
290 (-16*am1Sq*(eb + ec)*(-(a2*(-16 + V21)) + V21 + 64*a6*RhoSq - 32*a4*(1 + 2*RhoSq)))/ap1Sq,
291 (12*am1Sq*(eb + ec)*Xi)/ap1Sq,
293 (-2*am1Sq*(-1 + rD)*(eb - ec)*Xi)/(ap1Sq*(1 + rD)),
294 (-1 + 2*a - a2)/ap1Sq};
296 for(
size_t n = 0; n < 8; ++n){
298 for(
size_t idx = 0; idx < 7; ++idx){
299 complex<double> entry = 0;
300 auto idxi =
static_cast<IndexType>(idx+1u);
301 for(
size_t idx1 = 0; idx1 < 7; ++idx1){
302 entry += sliwmat[idx1][idx]*(FFmat[n][idx1] + result.
element({ni, 0})*(xiIWL[idx1]/xiIW - xiIWLN[idx1]/xiIWN));
304 result.
element({ni, idxi}) = entry;
312 std::unique_ptr<FormFactorBase> FFBtoDstarBLPRVar::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
BLPRVar form factors with variations
Tensor indices label definitions.
static constexpr double sqrt2
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