26 namespace MD = MultiDimensional;
28 FFBtoDstarCLNVar::FFBtoDstarCLNVar() {
30 vector<IndexType> dims = {8, 5};
32 string name{
"FFBtoDstarCLNVar"};
36 addProcessSignature(PID::BPLUS, {-PID::DSTAR});
39 addProcessSignature(PID::BZERO, {PID::DSTARMINUS});
44 addProcessSignature(PID::BS, {PID::DSSTARMINUS});
50 void FFBtoDstarCLNVar::defineSettings() {
51 _FFErrNames = {
"delta_RhoSq",
"delta_R1",
"delta_R2",
"delta_R0"};
52 setPath(getFFErrPrefixGroup().
get());
55 addSetting<double>(
"a",1.0);
56 addSetting<double>(
"RhoSq",1.207);
57 addSetting<double>(
"F1",0.908);
58 addSetting<double>(
"R1",1.401);
59 addSetting<double>(
"R2",0.854);
60 addSetting<double>(
"R0",1.15);
61 addSetting<double>(
"as",0.26);
62 addSetting<double>(
"la",0.48);
63 addSetting<double>(
"mcOnmb",0.29);
67 vector<vector<double>> RhoRsmat{{1., 0., 0., 0.},
71 addSetting<vector<vector<double>>>(
"RhoRsmatrix",RhoRsmat);
74 for (
auto elem : _FFErrNames) {
75 addSetting<double>(elem, 0.);
80 void FFBtoDstarCLNVar::evalAtPSPoint(
const vector<double>& point,
const vector<double>& masses) {
81 Tensor& result = getTensor();
85 MSG_WARNING(
"Warning, Setting have not been defined!");
91 if(masses.size() >= 2) {
97 Mb = this->masses()[0];
98 Mc = this->masses()[1];
100 const double Mb2 = Mb*Mb;
101 const double Mc2 = Mc*Mc;
103 double Sqq = point[0];
106 double w = (Mb2 + Mc2 - Sqq)/(2.*Mb*Mc);
108 if(
isZero(w - 1.0)) w += 1e-6;
109 const double a = *getSetting<double>(
"a");
110 const double zCon = (sqrt(w+1) -
sqrt2*a)/(sqrt(w+1) +
sqrt2*a);
112 const double RhoSq=*getSetting<double>(
"RhoSq");
113 const double R0par=*getSetting<double>(
"R0");
114 const double R1par=*getSetting<double>(
"R1");
115 const double R2par=*getSetting<double>(
"R2");
116 const double F1par=*getSetting<double>(
"F1");
117 const double as = *getSetting<double>(
"as")/
pi;
118 const double LambdaBar = *getSetting<double>(
"la");
119 const double zR = *getSetting<double>(
"mcOnmb");
121 const vector<vector<double>>& RhoRsmat = (*getSetting<vector<vector<double>>>(
"RhoRsmatrix"));
123 const double rC=Mc/Mb;
124 const double rC2 = rC*rC;
125 const double sqrC = sqrt(rC);
128 const double mbMu = Mb - unitres*LambdaBar - Mb*as*(4./3. + log(zR));
129 const double mcMu = Mc - unitres*LambdaBar - Mc*as*(4./3. - log(zR));
132 const double Ha1= F1par*(1. - 8.* RhoSq * zCon +
133 (53. * RhoSq - 15.) * pow(zCon, 2.)
134 - (231. * RhoSq - 91.) * pow(zCon, 3.));
135 const double R0 = R0par - 0.11 * (w - 1.) + 0.01 * pow(w - 1., 2.);
136 const double R1 = R1par - 0.12 * (w - 1.) + 0.05 * pow(w - 1., 2.);
137 const double R2 = R2par + 0.11 * (w - 1.) - 0.06 * pow(w - 1., 2.);
139 const double Ff = (Ha1*(Mb2*pow(1 + rC,2) - Sqq))/(2.*Mb*sqrC);
140 const double Fg = (Ha1*R1)/(2.*Mb*sqrC);
141 const double Fm = -(Ha1*(R2*(-1 + rC2) - 2*rC*(-1 + R0 + R0*rC - w)))/(2.*Mb*sqrC*(1 + rC2 - 2*rC*w));
142 const double Fp = -(Ha1*R2)/(2.*Mb*sqrC);
144 const double Fps = -(Ff + Mb2*(Fp*(1-rC2) + Fm*(1 + rC2 - 2*rC*w)))/(mbMu + mcMu);
165 const double Ha1p = F1par*(-8.*zCon + 53.*pow(zCon, 2.) - 231.*pow(zCon, 3.));
166 const vector<vector<double>> FRhoRsmat{{(Ff*Ha1p)/Ha1,0.,0.,0.},
167 {(Fg*Ha1p)/Ha1,Ha1/(2.*Mb*sqrC),0.,0.},
168 {(Fm*Ha1p)/Ha1,0.,-(Ha1*(-1. + rC2))/(2.*Mb*sqrC*(1. + rC2 - 2.*rC*w)),
169 (Ha1*sqrC*(1. + rC))/(Mb*(1. + rC2 - 2.*rC*w))},
170 {(Fp*Ha1p)/Ha1,0.,-Ha1/(2.*Mb*sqrC),0.}};
172 for(
IndexType idxd = 0; idxd < 4; ++idxd){
177 for(
IndexType idxr = 0; idxr < 4; ++idxr){
178 fentry += FRhoRsmat[0][idxr]*RhoRsmat[idxr][idxd];
179 gentry += FRhoRsmat[1][idxr]*RhoRsmat[idxr][idxd];
180 fmentry += FRhoRsmat[2][idxr]*RhoRsmat[idxr][idxd];
181 fpentry += FRhoRsmat[3][idxr]*RhoRsmat[idxr][idxd];
186 if(!
isZero(fmentry)) { result.
element({3, idxd1}) = fmentry; }
187 if(!
isZero(fpentry)) { result.
element({4, idxd1}) = fpentry; }
193 std::unique_ptr<FormFactorBase> FFBtoDstarCLNVar::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 indices label definitions.
CLN form factors with variations
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