Belle II Software development
EvtBToDstarlnuNP.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include "generators/evtgen/EvtGenModelRegister.h"
10#include "generators/evtgen/models/EvtBToDstarlnuNP.h"
11
12#include "EvtGenBase/EvtGenKine.hh"
13#include "EvtGenBase/EvtPDL.hh"
14#include "EvtGenBase/EvtParticle.hh"
15#include "EvtGenBase/EvtDiracSpinor.hh"
16#include "EvtGenBase/EvtTensor4C.hh"
17#include "EvtGenBase/EvtVector4C.hh"
18#include "EvtGenBase/EvtScalarParticle.hh"
19
22
23using std::endl;
24
26{
27 return "BTODSTARLNUNP";
28}
29
31{
32 return new EvtBToDstarlnuNP;
33}
34
35void EvtBToDstarlnuNP::decay(EvtParticle* p)
36{
37 p->initializePhaseSpace(getNDaug(), getDaugs());
38 CalcAmp(p, _amp2);
39}
40
42{
43 setProbMax(CalcMaxProb());
44}
45
47{
48 // First choose format of NP coefficients from the .DEC file
49 // Cartesian(x,y)(0) or Polar(R,phase)(1)
50 int n = getNArg();
51 if (!(n == 0 || (n - 1) % 3 == 0)) {
52 EvtGenReport(EVTGEN_ERROR, "EvtGen")
53 << "Error in parameters in the BTODSTARLNUNP decay model." << endl;
54 EvtGenReport(EVTGEN_ERROR, "EvtGen")
55 << "Will terminate execution!" << endl;
56 ::abort();
57 }
58
59 checkNDaug(3);
60
61 // We expect the parent to be a scalar and
62 // the daughters to be D* l+ nu_l
63
64 checkSpinParent(EvtSpinType::SCALAR);
65 checkSpinDaughter(1, EvtSpinType::DIRAC);
66 checkSpinDaughter(2, EvtSpinType::NEUTRINO);
67
68 EvtId mId = getDaug(0);
69 EvtId IdDst0 = EvtPDL::getId("D*0"), IdaDst0 = EvtPDL::getId("anti-D*0"),
70 IdDstp = EvtPDL::getId("D*+"), IdDstm = EvtPDL::getId("D*-");
71 if (mId != IdDst0 && mId != IdaDst0 && mId != IdDstp && mId != IdDstm) {
72 EvtGenReport(EVTGEN_ERROR, "EvtGen")
73 << "EvtBToDstarlnuNP generator expected a D* 1st daughter, found: "
74 << EvtPDL::name(getDaug(0)) << endl;
75 EvtGenReport(EVTGEN_ERROR, "EvtGen")
76 << "Will terminate execution!" << endl;
77 ::abort();
78 }
79
80 auto getInteger = [this](int i) -> int {
81 double a = getArg(i);
82 if (a - static_cast<int>(a) != 0)
83 {
84 EvtGenReport(EVTGEN_ERROR, "EvtGen")
85 << "Parameters is not integer in the BTODSTARLNUNP decay model: " << i << " " << a << endl;
86 EvtGenReport(EVTGEN_ERROR, "EvtGen")
87 << "Will terminate execution!" << endl;
88 ::abort();
89 }
90 return static_cast<int>(a);
91 };
92
93 if (n > 0) { // parse arguments
94 int i = 0, coordsyst = getInteger(i++);
95 while (i < n) {
96 int id = getInteger(i++); // New Physics cooeficient Id
97 double a0 = getArg(i++);
98 double a1 = getArg(i++);
99 EvtComplex c = (coordsyst) ? EvtComplex(a0 * cos(a1), a0 * sin(a1)) : EvtComplex(a0, a1);
100 if (id == 0) _Cvl = c;
101 if (id == 1) _Cvr = c;
102 if (id == 2) _Csl = c;
103 if (id == 3) _Csr = c;
104 if (id == 4) _cT = c;
105 }
106 }
107}
108
109static EvtTensor4C asymProd(const EvtVector4R& a, const EvtVector4R& b)
110{
111 // t_{ij} = eps_{ijkl} a^{k} b^{l}
112 // eps_{ijkl} is the Levi-Civita symbol -- antisymmetric tensor
113
114 EvtTensor4C res;
115 double t01 = a.get(2) * b.get(3) - a.get(3) * b.get(2);
116 res.set(0, 1, t01);
117 res.set(1, 0, -t01);
118 double t02 = a.get(3) * b.get(1) - a.get(1) * b.get(3);
119 res.set(0, 2, t02);
120 res.set(2, 0, -t02);
121 double t03 = a.get(1) * b.get(2) - a.get(2) * b.get(1);
122 res.set(0, 3, t03);
123 res.set(3, 0, -t03);
124 double t12 = a.get(0) * b.get(3) - a.get(3) * b.get(0);
125 res.set(1, 2, t12);
126 res.set(2, 1, -t12);
127 double t13 = a.get(2) * b.get(0) - a.get(0) * b.get(2);
128 res.set(1, 3, t13);
129 res.set(3, 1, -t13);
130 double t23 = a.get(0) * b.get(1) - a.get(1) * b.get(0);
131 res.set(2, 3, t23);
132 res.set(3, 2, -t23);
133 return res;
134}
135
136static EvtComplex asymProd(const EvtTensor4C& t1, const EvtTensor4C& t2)
137{
138 // returns eps_ijkl*t1(i,j)*t2(k,l);
139 // eps_ijkl is the antisymmetric Levi-Civita tensor
140 EvtComplex sum;
141 sum += t1.get(0, 1) * t2.get(2, 3);
142 sum -= t1.get(0, 1) * t2.get(3, 2);
143 sum -= t1.get(0, 2) * t2.get(1, 3);
144 sum += t1.get(0, 2) * t2.get(3, 1);
145 sum += t1.get(0, 3) * t2.get(1, 2);
146 sum -= t1.get(0, 3) * t2.get(2, 1);
147 sum -= t1.get(1, 0) * t2.get(2, 3);
148 sum += t1.get(1, 0) * t2.get(3, 2);
149 sum += t1.get(1, 2) * t2.get(0, 3);
150 sum -= t1.get(1, 2) * t2.get(3, 0);
151 sum -= t1.get(1, 3) * t2.get(0, 2);
152 sum += t1.get(1, 3) * t2.get(2, 0);
153 sum += t1.get(2, 0) * t2.get(1, 3);
154 sum -= t1.get(2, 0) * t2.get(3, 1);
155 sum -= t1.get(2, 1) * t2.get(0, 3);
156 sum += t1.get(2, 1) * t2.get(3, 0);
157 sum += t1.get(2, 3) * t2.get(0, 1);
158 sum -= t1.get(2, 3) * t2.get(1, 0);
159 sum -= t1.get(3, 0) * t2.get(1, 2);
160 sum += t1.get(3, 0) * t2.get(2, 1);
161 sum += t1.get(3, 1) * t2.get(0, 2);
162 sum -= t1.get(3, 1) * t2.get(2, 0);
163 sum -= t1.get(3, 2) * t2.get(0, 1);
164 sum += t1.get(3, 2) * t2.get(1, 0);
165 return sum;
166}
167
168/************************************************************************************
169 * Hadronic form factors evaluated according to the BGL parametrization
170 */
171static void getFF(double mB, double mV, double q2,
172 double& V, double& A0, double& A1, double& A2, double& T1, double& T2, double& T3)
173{
174
175 /* Quark masses from PDG */
176 const double m_c = 1.27, // +- 0.02 GeV PDG
177 m_b = 4.18; // +- 0.025 GeV PDG
178
179 double rmB = 1 / mB, r = mV / mB, r2 = r * r;
180 double c = 0.5 / sqrt(mB * mV), mBaV = mB + mV, mBsV = mB - mV, rmBaV = 1 / mBaV, rmBsV = 1 / mBsV;
181 double w = (mB * mB + mV * mV - q2) / (2 * mB * mV), w2 = w * w, sqrtwa1 = sqrt(w + 1);
182 double u = 1 + r2 - 2 * r * w;
183 double z = (sqrtwa1 - sqrt(2)) / (sqrtwa1 + sqrt(2));
184
185 /* FF parameter values are taken from Table I of arXiv:2111.01176 */
186 const double
187 a0f = 0.0123, // +- 0.0001
188 a1f = 0.0222, // +- 0.0096
189 a2f = -0.522, // +- 0.196
190
191 a0g = 0.0318, // +- 0.0010
192 a1g = -0.133, // +- 0.063
193 a2g = -0.62, // +- 1.46
194
195 a0F2 = 0.0515, // +- 0.0021
196 a1F2 = -0.149, // +- 0.059
197 a2F2 = 0.987, // +- 0.932
198
199 // Eq. (24) from kinematical constraint at w=1
200 a0F1 = a0f * (1 - r) / (sqrt(2) * pow(1 + sqrt(r), 2)),
201 a1F1 = 0.0021, // +- 0.0015
202 // Eq. (25) from kinematical constraint at w = wmax = 1.5 after substituting all other constants
203 a2F1 = -0.5162 * (104.455 * a0f + 34.7622 * a1F1 - 29.3161 * (a0F2 + 0.0557 * a1F2 + 0.0031 * a2F2)),
204
205 nI = 2.6,
206 chi1minT0 = 5.131e-4,
207 chi1plusT0 = 3.894e-4,
208 chi1plusL0 = 1.9421e-2;
209
210 /* Blaschke factor calculation is based on Eq. (20) */
211 auto BlaschkeFactor = [mB, mV](double zl, unsigned n, const double * m) -> double {
212 double B = 1, t2 = sqrt(4 * mB * mV), mBV = mB + mV, mBV2 = mBV * mBV;
213 for (unsigned i = 0; i < n; i++)
214 {
215 double t1 = sqrt(mBV2 - m[i] * m[i]), zp = (t1 - t2) / (t1 + t2); // zp is based on Eq. (21)
216 B *= (zl - zp) / (1 - zl * zp);
217 }
218 return B;
219 };
220
221 static const double mP1plus[] = {6.739, 6.750, 7.145, 7.150};
222 double P1plus = BlaschkeFactor(z, sizeof(mP1plus) / sizeof(mP1plus[0]), mP1plus);
223
224 static const double mP1min[] = {6.329, 6.920, 7.020};
225 double P1min = BlaschkeFactor(z, sizeof(mP1min) / sizeof(mP1min[0]), mP1min);
226
227 static const double mP0min[] = {6.275, 6.842, 7.250};
228 double P0min = BlaschkeFactor(z, sizeof(mP0min) / sizeof(mP0min[0]), mP0min);
229
230 /* Eq. (22) phi_i(z) function evaluations */
231 double zm = 1 - z, zp = 1 + z, szm = sqrt(zm), d1 = (1 + r) * zm + 2 * sqrt(r) * zp, d2 = d1 * d1, d4 = d2 * d2;
232 double phif = 4 * r / (mB * mB) * sqrt(nI / (3 * M_PI * chi1plusT0)) * zp * (zm * szm) / d4;
233 double phig = 16 * r2 * sqrt(nI / (3 * M_PI * chi1minT0)) * zp * zp / (szm * d4);
234 double phiF1 = 4 * r / (mB * mB * mB) * sqrt(nI / (6 * M_PI * chi1plusT0)) * zp * (zm * zm * szm) / (d4 * d1);
235 double phiF2 = 8 * sqrt(2) * r2 * sqrt(nI / (M_PI * chi1plusL0)) * zp * zp / (szm * d4);
236
237 /* Eq. (18) form factor evaluations */
238 double ffunc = (a0f + z * (a1f + z * (a2f))) / (P1plus * phif);
239 double gfunc = (a0g + z * (a1g + z * (a2g))) / (P1min * phig);
240 double F1func = (a0F1 + z * (a1F1 + z * (a2F1))) / (P1plus * phiF1);
241 double F2func = (a0F2 + z * (a1F2 + z * (a2F2))) / (P0min * phiF2);
242 /* BGL Parametrization ends here. */
243
244 /* Transform them into the output form factors */
245 double hVw = mB * sqrt(r) * gfunc;
246 double hA1w = ffunc / (mB * sqrt(r) * (1 + w));
247 double hA2w = hA1w / (1 - w) + (F1func * (w - r) - F2func * mB * mB * r * (w2 - 1)) / (mB * mB * sqrt(r) * u * (w2 - 1));
248 double hA3w = (F1func * (r * w - 1) + mB * mB * sqrt(r) * (1 + w) * (F2func * r * sqrt(r) * (w - 1) + hA1w * w * u)) /
249 (mB * mB * sqrt(r) * u * (w2 - 1));
250
251 // arXiv:1309.0301 Eq 48b
252 double cA1 = (m_b - m_c) * rmBsV * hA1w, cV = (m_b + m_c) * rmBaV * hVw;
253 double hT1 = (0.5 * ((1 - r) * (1 - r) * (w + 1) * cA1 - (1 + r) * (1 + r) * (w - 1) * cV)) / u;
254 double hT2 = (0.5 * (1 - r2) * (w + 1) * (cA1 - cV)) / u;
255 double hT3 = (-0.5 * (2 * r * (w + 1) * cA1 + (m_b - m_c) * rmBsV * u * (hA3w - r * hA2w) - (1 + r) * (1 + r) * cV)) / (u *
256 (1 + r));
257
258 /************************************************************************************/
259
260 // Form Factors :
261 // arXiv:1309.0301 Eq 39
262 V = c * mBaV * hVw;
263 A0 = c * ((mBaV * mBaV - q2) / (2 * mV) * hA1w - (mBaV * mBsV + q2) / (2 * mB) * hA2w - (mBaV * mBsV - q2) / (2 * mV) * hA3w);
264 A1 = c * (mBaV * mBaV - q2) / mBaV * hA1w;
265 A2 = c * mBaV * (hA3w + r * hA2w);
266 T1 = c * (mBaV * hT1 - mBsV * hT2);
267 T2 = c * ((mBaV - q2 * rmBaV) * hT1 - (mBsV - q2 * rmBsV) * hT2);
268 T3 = c * (mBsV * hT1 - mBaV * hT2 - 2 * mBaV * mBsV * rmB * hT3);
269}
270
271static EvtId EM, MUM, TAUM, EP, MUP, TAUP, D0, D0B, DP, DM, DSM, DSP;
272static bool cafirst = true;
273void EvtBToDstarlnuNP::CalcAmp(EvtParticle* parent, EvtAmp& amp)
274{
275 if (cafirst) {
276 cafirst = false;
277 EM = EvtPDL::getId("e-"); EP = EvtPDL::getId("e+");
278 MUM = EvtPDL::getId("mu-"); MUP = EvtPDL::getId("mu+");
279 TAUM = EvtPDL::getId("tau-"); TAUP = EvtPDL::getId("tau+");
280
281 D0 = EvtPDL::getId("D0"); D0B = EvtPDL::getId("anti-D0");
282 DP = EvtPDL::getId("D+"); DM = EvtPDL::getId("D-");
283 DSP = EvtPDL::getId("D_s+"); DSM = EvtPDL::getId("D_s-");
284 }
285
286 EvtParticle
287 *pvm = parent->getDaug(0), // vector meson
288 *plp = parent->getDaug(1), // charged lepton
289 *pnu = parent->getDaug(2); // neutrino
290 EvtId pId = parent->getId(), lId = plp->getId();
291
292 //Add the lepton and neutrino 4 momenta to find q2
293 EvtVector4R q = plp->getP4() + pnu->getP4();
294 double q2 = q.mass2(), m_V = pvm->mass(), m_B = parent->mass();
295 double m_BaV = m_B + m_V, m_BsV = m_B - m_V;
296
297 double a1f, a2f, vf, a0f, a3f;
298 /* Tensor form factors */
299 double T1, T2, T3;
300 getFF(m_B, m_V, q2, vf, a0f, a1f, a2f, T1, T2, T3);
301 a3f = (m_BaV * a1f - m_BsV * a2f) / (2.0 * m_V);
302
303 double c1 = (m_BaV * m_BsV * (T1 - T2)) / q2;
304 double c2 = (T1 - T2 - T3 * q2 / (m_BaV * m_BsV)) * 2 / q2;
305
306 if (pId == D0 || pId == D0B || pId == DP || pId == DM || pId == DSP || pId == DSM)
307 vf = -vf;
308
309 EvtVector4R p(m_B, 0., 0., 0.);
310 const EvtVector4R& k = pvm->getP4();
311 EvtVector4R pak = p + k;
312
313 EvtDiracSpinor
314 nu = pnu->spParentNeutrino(), lp0 = plp->spParent(0), lp1 = plp->spParent(1);
315
316 /* Various lepton currents */
317 EvtComplex p1, p2;
318 EvtVector4C l1, l2, a1, a2;
319 EvtTensor4C z1, z2, w1, w2;
320 if (lId == EM || lId == MUM || lId == TAUM) {
321 l1 = EvtLeptonVCurrent(nu, lp0);
322 l2 = EvtLeptonVCurrent(nu, lp1);
323 a1 = EvtLeptonACurrent(nu, lp0);
324 a2 = EvtLeptonACurrent(nu, lp1);
325 p1 = EvtLeptonPCurrent(nu, lp0);
326 p2 = EvtLeptonPCurrent(nu, lp1);
327 z1 = EvtLeptonTCurrent(nu, lp0);
328 z2 = EvtLeptonTCurrent(nu, lp1);
329 } else if (lId == EP || lId == MUP || lId == TAUP) {
330 vf = -vf; /*This takes care of sign flip in vector hadronic current when you conjugate it*/
331 l1 = EvtLeptonVCurrent(lp0, nu);
332 l2 = EvtLeptonVCurrent(lp1, nu);
333 a1 = EvtLeptonACurrent(lp0, nu);
334 a2 = EvtLeptonACurrent(lp1, nu);
335 p1 = EvtLeptonPCurrent(lp0, nu);
336 p2 = EvtLeptonPCurrent(lp1, nu);
337 z1 = EvtLeptonTCurrent(lp0, nu);
338 z2 = EvtLeptonTCurrent(lp1, nu);
339 }
340
341 /* Quark masses from PDG */
342 double m_c = 1.27, m_b = 4.18;
343
344 /* New Physics */
345 EvtComplex C_V_L = 1, //Standard Model
346 C_V_R = _Cvr,
347 C_S_L = _Csl,
348 C_S_R = _Csr,
349 C_T = _cT;
350
351 C_V_L += _Cvl;
352
353 /*Eq 12 Axial vector hadronic tensor*/
354 EvtTensor4C tA = (a1f * m_BaV) * EvtTensor4C::g();
355 tA.addDirProd(-(a2f / m_BaV) * p, pak);
356 tA.addDirProd(-2 * m_V / q2 * (a3f - a0f) * p, q);
357
358 /*Eq 11 Vector hadronic tensor*/
359 EvtTensor4C tV = EvtComplex(0.0, (-2 * vf / m_BaV)) * asymProd(p, k);
360
361 EvtTensor4C tVA = 0.5 * (C_V_L + C_V_R) * tV + 0.5 * (C_V_R - C_V_L) * tA;
362
363 EvtComplex tS = 0.5 * (C_S_R - C_S_L) * 2 * m_V / (m_b + m_c) * a0f;
364
365 pak *= T1;
366 EvtVector4C qc1(q); qc1 *= c1;
367 EvtTensor4C tt, tt5;
368 EvtComplex sum1, sum2, TT1, TT2;
369 for (int i = 0; i < 3; i++) {
370 EvtVector4C eps = pvm->epsParent(i).conj(), epsTVA = tVA.cont1(eps);
371 EvtComplex epsq = eps * q, epsqc2 = epsq * c2;
372
373 /*Eq 14 Tensor component */
374 for (int i2 = 0; i2 < 4; i2++) {
375 for (int i3 = 0; i3 < 4; i3++) {
376 tt.set(i2, i3, eps.get(i2) * (-pak.get(i3) + qc1.get(i3)) + p.get(i2)*k.get(i3)*epsqc2);
377 }
378 }
379 if (lId == EM || lId == MUM || lId == TAUM) {
380 TT1 = EvtComplex(0.0, 1.0) * C_T * (asymProd(z1, tt));
381 TT2 = EvtComplex(0.0, 1.0) * C_T * (asymProd(z2, tt));
382 sum1 = l1.cont(epsTVA) - a1.cont(epsTVA) - epsq * tS * p1 + TT1;
383 sum2 = l2.cont(epsTVA) - a2.cont(epsTVA) - epsq * tS * p2 + TT2;
384 } else if (lId == EP || lId == MUP || lId == TAUP) {
385 TT1 = EvtComplex(0.0, -1.0) * conj(C_T) * (asymProd(z1, tt));
386 TT2 = EvtComplex(0.0, -1.0) * conj(C_T) * (asymProd(z2, tt));
387 sum1 = l1.cont(epsTVA) - a1.cont(epsTVA) - epsq * tS * p1 + TT1;
388 sum2 = l2.cont(epsTVA) - a2.cont(epsTVA) - epsq * tS * p2 + TT2;
389 }
390
391 amp.vertex(i, 0, sum1);
392 amp.vertex(i, 1, sum2);
393 }
394}
395
397{
398 //This routine takes the arguements parent, meson, and lepton
399 //number, and a form factor model, and returns a maximum
400 //probability for this semileptonic form factor model. A
401 //brute force method is used. The 2D cos theta lepton and
402 //q2 phase space is probed.
403
404 //Start by declaring a particle at rest.
405
406 //It only makes sense to have a scalar parent. For now.
407 //This should be generalized later.
408
409 EvtId pId = getParentId(), mId = getDaug(0), l1Id = getDaug(1), l2Id = getDaug(2);
410
411 EvtScalarParticle* scalar_part;
412 EvtParticle* root_part;
413
414 scalar_part = new EvtScalarParticle;
415
416 //cludge to avoid generating random numbers!
417 scalar_part->noLifeTime();
418
419 EvtVector4R p_init;
420
421 p_init.set(EvtPDL::getMass(pId), 0.0, 0.0, 0.0);
422 scalar_part->init(pId, p_init);
423 root_part = (EvtParticle*)scalar_part;
424 root_part->setDiagonalSpinDensity();
425
426 EvtId listdaug[3];
427 listdaug[0] = mId;
428 listdaug[1] = l1Id;
429 listdaug[2] = l2Id;
430
431 EvtAmp amp;
432 amp.init(pId, 3, listdaug);
433
434 root_part->makeDaughters(3, listdaug);
435 EvtParticle* daughter, *lep, *trino;
436 daughter = root_part->getDaug(0);
437 lep = root_part->getDaug(1);
438 trino = root_part->getDaug(2);
439
440 //cludge to avoid generating random numbers!
441 daughter->noLifeTime();
442 lep->noLifeTime();
443 trino->noLifeTime();
444
445 //Initial particle is unpolarized, well it is a scalar so it is
446 //trivial
447 EvtSpinDensity rho;
448 rho.setDiag(root_part->getSpinStates());
449
450 EvtVector4R p4meson, p4lepton, p4nu, p4w;
451 double mass[3], m = root_part->mass(), maxfoundprob = 0.0;
452
453 for (int massiter = 0; massiter < 3; massiter++) {
454 mass[0] = EvtPDL::getMeanMass(mId);
455 mass[1] = EvtPDL::getMeanMass(l1Id);
456 mass[2] = EvtPDL::getMeanMass(l2Id);
457 if (massiter == 1) {
458 mass[0] = EvtPDL::getMinMass(mId);
459 }
460 if (massiter == 2) {
461 mass[0] = EvtPDL::getMaxMass(mId);
462 if ((mass[0] + mass[1] + mass[2]) > m)
463 mass[0] = m - mass[1] - mass[2] - 0.00001;
464 }
465
466 double q2min = mass[1] * mass[1], q2max = (m - mass[0]) * (m - mass[0]);
467
468 for (int imax = 40, i = 0; i < imax; i++) {
469 double q2 = q2min + ((i + 0.5) * (q2max - q2min)) / imax;
470 double erho = (m * m + mass[0] * mass[0] - q2) / (2.0 * m);
471 double prho = sqrt(erho * erho - mass[0] * mass[0]);
472 p4meson.set(erho, 0.0, 0.0, -1.0 * prho);
473 p4w.set(m - erho, 0.0, 0.0, prho);
474
475 //This is in the W rest frame
476 double elepton = (q2 + mass[1] * mass[1]) / (2.0 * sqrt(q2));
477 double plepton = sqrt(elepton * elepton - mass[1] * mass[1]);
478
479 double probctl[3];
480 for (int j = 0; j < 3; j++) {
481 double costl = 0.99 * (j - 1.0);
482
483 //These are in the W rest frame. Need to boost out into
484 //the B frame.
485 p4lepton.set(elepton, 0.0, plepton * sqrt(1.0 - costl * costl),
486 plepton * costl);
487 p4nu.set(plepton, 0.0,
488 -1.0 * plepton * sqrt(1.0 - costl * costl),
489 -1.0 * plepton * costl);
490
491 EvtVector4R boost((m - erho), 0.0, 0.0, 1.0 * prho);
492 p4lepton = boostTo(p4lepton, boost);
493 p4nu = boostTo(p4nu, boost);
494
495 //Now initialize the daughters...
496
497 daughter->init(mId, p4meson);
498 lep->init(l1Id, p4lepton);
499 trino->init(l2Id, p4nu);
500
501 CalcAmp(root_part, amp);
502
503 //Now find the probability at this q2 and cos theta lepton point
504 //and compare to maxfoundprob.
505
506 //Do a little magic to get the probability!!
507 probctl[j] = rho.normalizedProb(amp.getSpinDensity());
508 }
509
510 //probclt contains prob at ctl=-1,0,1.
511 //prob=a+b*ctl+c*ctl^2
512
513 double a = probctl[1];
514 double b = 0.5 * (probctl[2] - probctl[0]);
515 double c = 0.5 * (probctl[2] + probctl[0]) - probctl[1];
516
517 double prob = probctl[0];
518 if (probctl[1] > prob)
519 prob = probctl[1];
520 if (probctl[2] > prob)
521 prob = probctl[2];
522
523 if (fabs(c) > 1e-20) {
524 double ctlx = -0.5 * b / c;
525 if (fabs(ctlx) < 1.0) {
526 double probtmp = a + b * ctlx + c * ctlx * ctlx;
527 if (probtmp > prob)
528 prob = probtmp;
529 }
530 }
531
532 if (prob > maxfoundprob) {
533 maxfoundprob = prob;
534 }
535 }
536 if (EvtPDL::getWidth(mId) <= 0.0) {
537 // if the particle is narrow don't bother with changing the mass.
538 massiter = 4;
539 }
540 }
541 root_part->deleteTree();
542
543 maxfoundprob *= 1.1;
544 return maxfoundprob;
545}
Implementation of with new physics contributions and the BGL hadronic form factor parameterization.
EvtComplex _cT
C_T – tensor current.
EvtDecayBase * clone() override
The function which makes a copy of the model.
EvtComplex _Cvl
Strength of the left handed part of the vector hadronic current.
void decay(EvtParticle *p) override
The method to calculate a decay amplitude.
EvtComplex _Cvr
Strength of the Right handed part of the vector hadronic current.
EvtComplex _Csr
(g_S + g_P) strength of pseudoscalar current with constraint _Csl = -_Csr
std::string getName() override
The function which returns the name of the model.
void CalcAmp(EvtParticle *, EvtAmp &)
The method to evaluate the decay amplitude.
void init() override
Initialization method.
EvtComplex _Csl
(g_S - g_P) strength of pseudoscalar current
void initProbMax() override
The method to evaluate the maximum amplitude.
double CalcMaxProb()
The method to evaluate the maximum decay amplitude.
#define B2_EVTGEN_REGISTER_MODEL(classname)
Class to register B2_EVTGEN_REGISTER_MODEL.
double sqrt(double a)
sqrt for double
Definition beamHelpers.h:28