149 std::vector<Double_t> ciRe;
150 std::vector<Double_t> ciIm;
153 Double_t propV1Re=1, propV2Re=1, propHRe=1;
154 Double_t propV1Im=0, propV2Im=0, propHIm=0;
161 Double_t c1Re = ciRe.at(0);
162 Double_t c2Re = ciRe.at(1);
163 Double_t c3Re = ciRe.at(2);
164 Double_t c41Re = ciRe.at(3);
165 Double_t c42Re = ciRe.at(4);
166 Double_t c5Re = ciRe.at(5);
167 Double_t c6Re = ciRe.at(6);
168 Double_t c7Re = ciRe.at(7);
169 Double_t c1Im = ciIm.at(0);
170 Double_t c2Im = ciIm.at(1);
171 Double_t c3Im = ciIm.at(2);
172 Double_t c41Im = ciIm.at(3);
173 Double_t c42Im = ciIm.at(4);
174 Double_t c5Im = ciIm.at(5);
175 Double_t c6Im = ciIm.at(6);
176 Double_t c7Im = ciIm.at(7);
178 Double_t eta1 = m1_ /
m12;
179 Double_t eta2 = m2_ /
m12;
180 Double_t eta1p2 = eta1*eta2;
182 Double_t eta1sq = eta1*eta1;
183 Double_t eta2sq = eta2*eta2;
184 Double_t eta1p2sq = pow(eta1p2, 2);
186 Double_t etas = (1. - eta1sq - eta2sq)/2.;
187 if (pow(eta1+eta2, 2)>1.) etas = -etas;
190 Double_t xxp = (pow(etas, 2)-eta1p2sq);
193 Double_t A00Re_tmp=0, A00Im_tmp=0,
194 AppRe_tmp=0, AppIm_tmp=0, A0pRe_tmp=0, A0pIm_tmp=0, Ap0Re_tmp=0, Ap0Im_tmp=0,
195 AmmRe_tmp=0, AmmIm_tmp=0, A0mRe_tmp=0, A0mIm_tmp=0, Am0Re_tmp=0, Am0Im_tmp=0,
196 ApmRe_tmp=0, ApmIm_tmp=0, AmpRe_tmp=0, AmpIm_tmp=0;
200 pow(
m12, 4)*sqrt(2./3.)*
203 eta1p2sq * (xsq - eta1p2sq/4.)
204 - (pow(eta1, 4)+pow(eta2, 4)) * xsq/2.
205 + (pow(eta1, 8)+pow(eta2, 8))/8.
207 - (pow(eta1, 4)+pow(eta2, 4))/4.
211 (pow(eta1, 4) + pow(eta2, 4))
212 - 2.*(eta1p2sq + 2.*xxp)
216 + c41Re*2.*xxp*(1.+eta1sq-eta2sq)
217 + c42Re*2.*xxp*(1.-eta1sq+eta2sq)
221 pow(
m12, 4)*sqrt(2./3.)*
224 eta1p2sq * (xsq - eta1p2sq/4.)
225 - (pow(eta1, 4)+pow(eta2, 4)) * xsq/2.
226 + (pow(eta1, 8)+pow(eta2, 8))/8.
228 - (pow(eta1, 4)+pow(eta2, 4))/4.
232 (pow(eta1, 4) + pow(eta2, 4))
233 - 2.*(eta1p2sq + 2.*xxp)
237 + c41Im*2.*xxp*(1.+eta1sq-eta2sq)
238 + c42Im*2.*xxp*(1.-eta1sq+eta2sq)
246 pow(
m12, 4)/sqrt(6.)*
249 1. + 4.*xxp - pow(eta1sq-eta2sq, 2)
252 + c5Im*8.*pow(xxp, 1.5)
257 pow(
m12, 4)/sqrt(6.)*
260 1. + 4.*xxp - pow(eta1sq-eta2sq, 2)
263 - c5Re*8.*pow(xxp, 1.5)
271 pow(
m12, 4)/sqrt(6.)*
274 1. + 4.*xxp - pow(eta1sq-eta2sq, 2)
277 - c5Im*8.*pow(xxp, 1.5)
282 pow(
m12, 4)/sqrt(6.)*
285 1. + 4.*xxp - pow(eta1sq-eta2sq, 2)
288 + c5Re*8.*pow(xxp, 1.5)
295 AmpRe_tmp = pow(
m12, 4)*(c1Re/4.*(1.+4.*xxp-pow(eta1sq-eta2sq, 2)));
296 AmpIm_tmp = pow(
m12, 4)*(c1Im/4.*(1.+4.*xxp-pow(eta1sq-eta2sq, 2)));
299 ApmRe_tmp = AmpRe_tmp;
300 ApmIm_tmp = AmpIm_tmp;
304 Double_t A0m_0p_m0_p0_c4factor = 2.*xxp;
305 Double_t A0m_0p_m0_p0_c7factor = 4.*pow(xxp, 1.5);
308 Double_t A0m_0p_c1factor = (
309 -(pow(eta1, 6)-pow(eta2, 6))/8.
310 + (eta1sq-eta2sq)*(3.*eta1p2sq + 4.*xxp)/8.
311 - pow(eta1sq-eta2sq, 2)/8.
313 + (1. + (eta1sq-eta2sq))/8.
315 Double_t A0m_0p_c6factor = sqrt(xxp)*(1.+eta1sq-eta2sq);
321 + c42Re*A0m_0p_m0_p0_c4factor
322 - c6Im*A0m_0p_c6factor
323 - c7Im*A0m_0p_m0_p0_c7factor
330 + c42Im*A0m_0p_m0_p0_c4factor
331 + c6Re*A0m_0p_c6factor
332 + c7Re*A0m_0p_m0_p0_c7factor
341 + c42Re*A0m_0p_m0_p0_c4factor
342 + c6Im*A0m_0p_c6factor
343 + c7Im*A0m_0p_m0_p0_c7factor
350 + c42Im*A0m_0p_m0_p0_c4factor
351 - c6Re*A0m_0p_c6factor
352 - c7Re*A0m_0p_m0_p0_c7factor
356 A0mIm_tmp *= eta2; A0mRe_tmp *= eta2;
357 A0pIm_tmp *= eta2; A0pRe_tmp *= eta2;
364 Double_t Am0_p0_c1factor = (
365 (pow(eta1, 6)-pow(eta2, 6))/8.
366 - (eta1sq-eta2sq)*(3.*eta1p2sq + 4.*xxp)/8.
367 - pow(eta1sq-eta2sq, 2)/8.
369 + (1. - (eta1sq-eta2sq))/8.
371 Double_t Am0_p0_c6factor = sqrt(xxp)*(1.-eta1sq+eta2sq);
377 + c41Re*A0m_0p_m0_p0_c4factor
378 - c6Im*Am0_p0_c6factor
379 - c7Im*A0m_0p_m0_p0_c7factor
386 + c41Im*A0m_0p_m0_p0_c4factor
387 + c6Re*Am0_p0_c6factor
388 + c7Re*A0m_0p_m0_p0_c7factor
397 + c41Re*A0m_0p_m0_p0_c4factor
398 + c6Im*Am0_p0_c6factor
399 + c7Im*A0m_0p_m0_p0_c7factor
406 + c41Im*A0m_0p_m0_p0_c4factor
407 - c6Re*Am0_p0_c6factor
408 - c7Re*A0m_0p_m0_p0_c7factor
412 Am0Im_tmp *= eta1; Am0Re_tmp *= eta1;
413 Ap0Im_tmp *= eta1; Ap0Re_tmp *= eta1;
419 A00Re_tmp *= ampScale;
420 AmmRe_tmp *= ampScale;
421 AppRe_tmp *= ampScale;
422 A0mRe_tmp *= ampScale;
423 A0pRe_tmp *= ampScale;
424 Am0Re_tmp *= ampScale;
425 Ap0Re_tmp *= ampScale;
426 AmpRe_tmp *= ampScale;
427 ApmRe_tmp *= ampScale;
428 A00Im_tmp *= ampScale;
429 AmmIm_tmp *= ampScale;
430 AppIm_tmp *= ampScale;
431 A0mIm_tmp *= ampScale;
432 A0pIm_tmp *= ampScale;
433 Am0Im_tmp *= ampScale;
434 Ap0Im_tmp *= ampScale;
435 AmpIm_tmp *= ampScale;
436 ApmIm_tmp *= ampScale;
438 std::vector<Double_t> A00_reals, A00_imags; A00_reals.push_back(A00Re_tmp); A00_imags.push_back(A00Im_tmp); A00_reals.push_back(propV1Re); A00_imags.push_back(propV1Im); A00_reals.push_back(propV2Re); A00_imags.push_back(propV2Im); A00_reals.push_back(propHRe); A00_imags.push_back(propHIm);
AnaMelaHelpers::multiplyComplexNumbers(A00_reals, A00_imags, A00Re, A00Im);
439 std::vector<Double_t> Amm_reals, Amm_imags; Amm_reals.push_back(AmmRe_tmp); Amm_imags.push_back(AmmIm_tmp); Amm_reals.push_back(propV1Re); Amm_imags.push_back(propV1Im); Amm_reals.push_back(propV2Re); Amm_imags.push_back(propV2Im); Amm_reals.push_back(propHRe); Amm_imags.push_back(propHIm);
AnaMelaHelpers::multiplyComplexNumbers(Amm_reals, Amm_imags, AmmRe, AmmIm);
440 std::vector<Double_t> App_reals, App_imags; App_reals.push_back(AppRe_tmp); App_imags.push_back(AppIm_tmp); App_reals.push_back(propV1Re); App_imags.push_back(propV1Im); App_reals.push_back(propV2Re); App_imags.push_back(propV2Im); App_reals.push_back(propHRe); App_imags.push_back(propHIm);
AnaMelaHelpers::multiplyComplexNumbers(App_reals, App_imags, AppRe, AppIm);
441 std::vector<Double_t> A0m_reals, A0m_imags; A0m_reals.push_back(A0mRe_tmp); A0m_imags.push_back(A0mIm_tmp); A0m_reals.push_back(propV1Re); A0m_imags.push_back(propV1Im); A0m_reals.push_back(propV2Re); A0m_imags.push_back(propV2Im); A0m_reals.push_back(propHRe); A0m_imags.push_back(propHIm);
AnaMelaHelpers::multiplyComplexNumbers(A0m_reals, A0m_imags, A0mRe, A0mIm);
442 std::vector<Double_t> A0p_reals, A0p_imags; A0p_reals.push_back(A0pRe_tmp); A0p_imags.push_back(A0pIm_tmp); A0p_reals.push_back(propV1Re); A0p_imags.push_back(propV1Im); A0p_reals.push_back(propV2Re); A0p_imags.push_back(propV2Im); A0p_reals.push_back(propHRe); A0p_imags.push_back(propHIm);
AnaMelaHelpers::multiplyComplexNumbers(A0p_reals, A0p_imags, A0pRe, A0pIm);
443 std::vector<Double_t> Am0_reals, Am0_imags; Am0_reals.push_back(Am0Re_tmp); Am0_imags.push_back(Am0Im_tmp); Am0_reals.push_back(propV1Re); Am0_imags.push_back(propV1Im); Am0_reals.push_back(propV2Re); Am0_imags.push_back(propV2Im); Am0_reals.push_back(propHRe); Am0_imags.push_back(propHIm);
AnaMelaHelpers::multiplyComplexNumbers(Am0_reals, Am0_imags, Am0Re, Am0Im);
444 std::vector<Double_t> Ap0_reals, Ap0_imags; Ap0_reals.push_back(Ap0Re_tmp); Ap0_imags.push_back(Ap0Im_tmp); Ap0_reals.push_back(propV1Re); Ap0_imags.push_back(propV1Im); Ap0_reals.push_back(propV2Re); Ap0_imags.push_back(propV2Im); Ap0_reals.push_back(propHRe); Ap0_imags.push_back(propHIm);
AnaMelaHelpers::multiplyComplexNumbers(Ap0_reals, Ap0_imags, Ap0Re, Ap0Im);
445 std::vector<Double_t> Amp_reals, Amp_imags; Amp_reals.push_back(AmpRe_tmp); Amp_imags.push_back(AmpIm_tmp); Amp_reals.push_back(propV1Re); Amp_imags.push_back(propV1Im); Amp_reals.push_back(propV2Re); Amp_imags.push_back(propV2Im); Amp_reals.push_back(propHRe); Amp_imags.push_back(propHIm);
AnaMelaHelpers::multiplyComplexNumbers(Amp_reals, Amp_imags, AmpRe, AmpIm);
446 std::vector<Double_t> Apm_reals, Apm_imags; Apm_reals.push_back(ApmRe_tmp); Apm_imags.push_back(ApmIm_tmp); Apm_reals.push_back(propV1Re); Apm_imags.push_back(propV1Im); Apm_reals.push_back(propV2Re); Apm_imags.push_back(propV2Im); Apm_reals.push_back(propHRe); Apm_imags.push_back(propHIm);
AnaMelaHelpers::multiplyComplexNumbers(Apm_reals, Apm_imags, ApmRe, ApmIm);
450 A00Re!=A00Re || A00Im!=A00Im ||
451 AppRe!=AppRe || AppIm!=AppIm ||
452 AmmRe!=AmmRe || AmmIm!=AmmIm ||
453 A0pRe!=A0pRe || A0pIm!=A0pIm ||
454 A0mRe!=A0mRe || A0mIm!=A0mIm ||
455 Ap0Re!=Ap0Re || Ap0Im!=Ap0Im ||
456 Am0Re!=Am0Re || Am0Im!=Am0Im ||
457 ApmRe!=ApmRe || ApmIm!=ApmIm ||
458 AmpRe!=AmpRe || AmpIm!=AmpIm ||
460 A00Re==0 && A00Im==0 &&
461 AppRe==0 && AppIm==0 &&
462 AmmRe==0 && AmmIm==0 &&
463 A0pRe==0 && A0pIm==0 &&
464 A0mRe==0 && A0mIm==0 &&
465 Ap0Re==0 && Ap0Im==0 &&
466 Am0Re==0 && Am0Im==0 &&
467 ApmRe==0 && ApmIm==0 &&
471 MELAerr <<
"Some of the amplitudes are NaN or all are 0:" << endl;
472 MELAerr <<
"A00Re=" << A00Re <<
", A00Im=" << A00Im << endl;
473 MELAerr <<
"AppRe=" << AppRe <<
", AppIm=" << AppIm << endl;
474 MELAerr <<
"AmmRe=" << AmmRe <<
", AmmIm=" << AmmIm << endl;
475 MELAerr <<
"A0pRe=" << A0pRe <<
", A0pIm=" << A0pIm << endl;
476 MELAerr <<
"A0mRe=" << A0mRe <<
", A0mIm=" << A0mIm << endl;
477 MELAerr <<
"Ap0Re=" << Ap0Re <<
", Ap0Im=" << Ap0Im << endl;
478 MELAerr <<
"Am0Re=" << Am0Re <<
", Am0Im=" << Am0Im << endl;
479 MELAerr <<
"ApmRe=" << ApmRe <<
", ApmIm=" << ApmIm << endl;
480 MELAerr <<
"AmpRe=" << AmpRe <<
", AmpIm=" << AmpIm << endl;
482 MELAerr <<
"Possible causes are" << endl;
484 MELAerr <<
"m1=" << m1_ << endl;
485 MELAerr <<
"m2=" << m2_ << endl;
487 MELAerr <<
"xxp=" << xxp << endl;
489 MELAerr <<
"c1 = (" << c1Re <<
", " << c1Im <<
")" << endl;
490 MELAerr <<
"c2 = (" << c2Re <<
", " << c2Im <<
")" << endl;
491 MELAerr <<
"c3 = (" << c3Re <<
", " << c3Im <<
")" << endl;
492 MELAerr <<
"c41 = (" << c41Re <<
", " << c41Im <<
")" << endl;
493 MELAerr <<
"c42 = (" << c42Re <<
", " << c42Im <<
")" << endl;
494 MELAerr <<
"c5 = (" << c5Re <<
", " << c5Im <<
")" << endl;
495 MELAerr <<
"c6 = (" << c6Re <<
", " << c6Im <<
")" << endl;
496 MELAerr <<
"c7 = (" << c7Re <<
", " << c7Im <<
")" << endl;