9 #include "Pythia8/HelicityMatrixElements.h"
21 void HelicityMatrixElement::initPointers(ParticleData* particleDataPtrIn,
22 CoupSM* coupSMPtrIn, Settings* settingsPtrIn) {
24 particleDataPtr = particleDataPtrIn;
25 coupSMPtr = coupSMPtrIn;
26 settingsPtr = settingsPtrIn;
27 for(
int i = 0; i <= 5; i++)
28 gamma.push_back(GammaMatrix(i));
36 HelicityMatrixElement* HelicityMatrixElement::initChannel(
37 vector<HelicityParticle>& p) {
41 for(
int i = 0; i < static_cast<int>(p.size()); i++) {
42 pID.push_back(p[i].
id());
43 pM.push_back(p[i].m());
54 void HelicityMatrixElement::calculateD(vector<HelicityParticle>& p) {
57 for (
int i = 0; i < p[0].spinStates(); i++) {
58 for (
int j = 0; j < p[0].spinStates(); j++) {
67 vector<int> h1(p.size(),0);
68 vector<int> h2(p.size(),0);
71 calculateD(p, h1, h2, 0);
74 p[0].normalize(p[0].D);
82 void HelicityMatrixElement::calculateD(vector<HelicityParticle>& p,
83 vector<int>& h1, vector<int>& h2,
unsigned int i) {
86 for (h1[i] = 0; h1[i] < p[i].spinStates(); h1[i]++) {
87 for (h2[i] = 0; h2[i] < p[i].spinStates(); h2[i]++) {
88 calculateD(p, h1, h2, i+1);
93 p[0].D[h1[0]][h2[0]] += calculateME(h1) * conj(calculateME(h2)) *
94 calculateProductD(p, h1, h2);
103 void HelicityMatrixElement::calculateRho(
unsigned int idx,
104 vector<HelicityParticle>& p) {
107 for (
int i = 0; i < p[idx].spinStates(); i++) {
108 for (
int j = 0; j < p[idx].spinStates(); j++) {
109 p[idx].rho[i][j] = 0;
117 vector<int> h1(p.size(),0);
118 vector<int> h2(p.size(),0);
121 calculateRho(idx, p, h1, h2, 0);
124 p[idx].normalize(p[idx].rho);
132 void HelicityMatrixElement::calculateRho(
unsigned int idx,
133 vector<HelicityParticle>& p, vector<int>& h1, vector<int>& h2,
137 for (h1[i] = 0; h1[i] < p[i].spinStates(); h1[i]++) {
138 for (h2[i] = 0; h2[i] < p[i].spinStates(); h2[i]++) {
139 calculateRho(idx, p, h1, h2, i+1);
145 if (p[1].direction < 0)
146 p[idx].rho[h1[idx]][h2[idx]] += p[0].rho[h1[0]][h2[0]] *
147 p[1].rho[h1[1]][h2[1]] * calculateME(h1)*conj(calculateME(h2)) *
148 calculateProductD(idx, 2, p, h1, h2);
151 p[idx].rho[h1[idx]][h2[idx]] += p[0].rho[h1[0]][h2[0]] *
152 calculateME(h1)*conj(calculateME(h2)) *
153 calculateProductD(idx, 1, p, h1, h2);
163 double HelicityMatrixElement::decayWeight(vector<HelicityParticle>& p) {
165 complex weight = complex(0,0);
171 vector<int> h1(p.size(),0);
172 vector<int> h2(p.size(),0);
175 decayWeight(p, h1, h2, weight, 0);
185 void HelicityMatrixElement::decayWeight(vector<HelicityParticle>& p,
186 vector<int>& h1, vector<int>& h2, complex& weight,
unsigned int i) {
189 for (h1[i] = 0; h1[i] < p[i].spinStates(); h1[i]++) {
190 for (h2[i] = 0; h2[i] < p[i].spinStates(); h2[i]++) {
191 decayWeight(p, h1, h2, weight, i+1);
196 weight += p[0].rho[h1[0]][h2[0]] * calculateME(h1) *
197 conj(calculateME(h2)) * calculateProductD(p, h1, h2);
206 complex HelicityMatrixElement::calculateProductD(
unsigned int idx,
207 unsigned int start, vector<HelicityParticle>& p,
208 vector<int>& h1, vector<int>& h2) {
211 for (
unsigned int i = start; i < p.size(); i++) {
213 answer *= p[i].D[h1[i]][h2[i]];
224 complex HelicityMatrixElement::calculateProductD(
225 vector<HelicityParticle>& p, vector<int>& h1, vector<int>& h2) {
228 for (
unsigned int i = 1; i < p.size(); i++) {
229 answer *= p[i].D[h1[i]][h2[i]];
239 void HelicityMatrixElement::setFermionLine(
int position,
240 HelicityParticle& p0, HelicityParticle& p1) {
242 vector< Wave4 > u0, u1;
245 if (p0.id()*p0.direction < 0) {
246 pMap[position] = position; pMap[position+1] = position+1;
247 for (
int h = 0; h < p0.spinStates(); h++) u0.push_back(p0.wave(h));
248 for (
int h = 0; h < p1.spinStates(); h++) u1.push_back(p1.waveBar(h));
252 pMap[position] = position+1; pMap[position+1] = position;
253 for (
int h = 0; h < p0.spinStates(); h++) u1.push_back(p0.waveBar(h));
254 for (
int h = 0; h < p1.spinStates(); h++) u0.push_back(p1.wave(h));
256 u.push_back(u0); u.push_back(u1);
264 complex HelicityMatrixElement::breitWigner(
double s,
double M,
double G) {
266 return (-M*M + complex(0, 1) * M * G) / (s - M*M + complex(0, 1) * M * G);
274 complex HelicityMatrixElement::sBreitWigner(
double m0,
double m1,
double s,
275 double M,
double G) {
277 double gs = sqrtpos((s - pow2(m0+m1)) * (s - pow2(m0-m1))) / (2*sqrtpos(s));
278 double gM = sqrtpos((M*M - pow2(m0+m1)) * (M*M - pow2(m0-m1))) / (2*M);
279 return M*M / (M*M - s - complex(0,1)*G*M*M/sqrtpos(s)*(gs/gM));
287 complex HelicityMatrixElement::pBreitWigner(
double m0,
double m1,
double s,
288 double M,
double G) {
290 double gs = sqrtpos((s - pow2(m0+m1)) * (s - pow2(m0-m1))) / (2*sqrtpos(s));
291 double gM = sqrtpos((M*M - pow2(m0+m1)) * (M*M - pow2(m0-m1))) / (2*M);
292 return M*M / (M*M - s - complex(0,1)*G*M*M/sqrtpos(s)*pow3(gs/gM));
300 complex HelicityMatrixElement::dBreitWigner(
double m0,
double m1,
double s,
301 double M,
double G) {
303 double gs = sqrtpos((s - pow2(m0+m1)) * (s - pow2(m0-m1))) / (2*sqrtpos(s));
304 double gM = sqrtpos((M*M - pow2(m0+m1)) * (M*M - pow2(m0-m1))) / (2*M);
305 return M*M / (M*M - s - complex(0,1)*G*M*M/sqrtpos(s)*pow5(gs/gM));
323 void HMETwoFermions2W2TwoFermions::initConstants() {
326 if (pID.size() > 4 && abs(pID[4]) == 34 && settingsPtr) {
327 if (abs(pID[0]) < 11) {
328 p0CA = settingsPtr->parm(
"Wprime:aq");
329 p0CV = settingsPtr->parm(
"Wprime:vq");
331 p0CA = settingsPtr->parm(
"Wprime:al");
332 p0CV = settingsPtr->parm(
"Wprime:vl");
334 if (abs(pID[2]) < 11) {
335 p2CA = settingsPtr->parm(
"Wprime:aq");
336 p2CV = settingsPtr->parm(
"Wprime:vq");
338 p2CA = settingsPtr->parm(
"Wprime:al");
339 p2CV = settingsPtr->parm(
"Wprime:vl");
354 void HMETwoFermions2W2TwoFermions::initWaves(vector<HelicityParticle>& p) {
358 setFermionLine(0,p[0],p[1]);
359 setFermionLine(2,p[2],p[3]);
367 complex HMETwoFermions2W2TwoFermions::calculateME(vector<int> h) {
370 for (
int mu = 0; mu <= 3; mu++) {
371 answer += (u[1][h[pMap[1]]] * gamma[mu] * (p0CV + p0CA * gamma[5])
372 * u[0][h[pMap[0]]]) * gamma[4](mu,mu) * (u[3][h[pMap[3]]]
373 * gamma[mu] * (p2CV + p2CA * gamma[5]) * u[2][h[pMap[2]]]);
405 void HMETwoFermions2GammaZ2TwoFermions::initConstants() {
408 sin2W = coupSMPtr->sin2thetaW();
409 cos2W = coupSMPtr->cos2thetaW();
411 zG = particleDataPtr->mWidth(23);
412 zM = particleDataPtr->m0(23);
413 zpG = particleDataPtr->mWidth(32);
414 zpM = particleDataPtr->m0(32);
416 p0CAZ = coupSMPtr->af(abs(pID[0]));
417 p2CAZ = coupSMPtr->af(abs(pID[2]));
418 p0CVZ = coupSMPtr->vf(abs(pID[0]));
419 p2CVZ = coupSMPtr->vf(abs(pID[2]));
421 includeGamma =
false;
426 p0CAZp = zpCoupling(pID[0],
"a");
427 p0CVZp = zpCoupling(pID[0],
"v");
428 p2CAZp = zpCoupling(pID[2],
"a");
429 p2CVZp = zpCoupling(pID[2],
"v");
431 if (abs(pID[4]) == 22) {
433 }
else if (abs(pID[4]) == 23) {
434 int mode = settingsPtr->mode(
"WeakZ0:gmZmode");
435 if (mode == 0) {includeGamma =
true; includeZ =
true;}
436 else if (mode == 1) includeGamma =
true;
437 else if (mode == 2) includeZ =
true;
438 }
else if (abs(pID[4]) == 32) {
439 int mode = settingsPtr->mode(
"Zprime:gmZmode");
440 if (mode == 0) {includeGamma =
true; includeZ =
true; includeZp =
true;}
441 else if (mode == 1) includeGamma =
true;
442 else if (mode == 2) includeZ =
true;
443 else if (mode == 3) includeZp =
true;
444 else if (mode == 4) {includeGamma =
true; includeZ =
true;}
445 else if (mode == 5) {includeGamma =
true; includeZp =
true;}
446 else if (mode == 6) {includeZ =
true; includeZp =
true;}
454 if (abs(pID[4]) == 22) includeGamma =
true;
455 else if (abs(pID[4]) == 23) includeZ =
true;
456 else if (abs(pID[4]) == 32) includeZp =
true;
465 void HMETwoFermions2GammaZ2TwoFermions::initWaves(vector<HelicityParticle>& p)
471 setFermionLine(0, p[0], p[1]);
472 setFermionLine(2, p[2], p[3]);
473 u4.push_back(Wave4(p[2].p() + p[3].p()));
476 p0Q = p[0].charge(); p2Q = p[2].charge();
478 s = max( 1., pow2(p[4].m()));
480 zaxis = (p[0].pAbs() == abs(p[0].pz())) &&
481 (p[1].pAbs() == abs(p[1].pz()));
489 complex HMETwoFermions2GammaZ2TwoFermions::calculateME(vector<int> h) {
493 answer += calculateGammaME(h);
495 answer += calculateZME(h, zM, zG, p0CAZ, p2CAZ, p0CVZ, p2CVZ);
497 answer += calculateZME(h, zpM, zpG, p0CAZp, p2CAZp, p0CVZp, p2CVZp);
506 complex HMETwoFermions2GammaZ2TwoFermions::calculateGammaME(vector<int> h) {
509 for (
int mu = 0; mu <= 3; mu++) {
510 answer += (u[1][h[pMap[1]]] * gamma[mu] * u[0][h[pMap[0]]])
511 * gamma[4](mu,mu) * (u[3][h[pMap[3]]] * gamma[mu] * u[2][h[pMap[2]]]);
513 return p0Q*p2Q * answer / s;
521 complex HMETwoFermions2GammaZ2TwoFermions::calculateZME(
522 vector<int> h,
double m,
double g,
double p0CA,
double p2CA,
double p0CV,
527 if (h[0] == h[1] && zaxis)
return answer;
528 for (
int mu = 0; mu <= 3; mu++) {
529 for (
int nu = 0; nu <= 3; nu++) {
531 (u[1][h[pMap[1]]] * gamma[mu] * (p0CV - p0CA * gamma[5]) *
533 (gamma[4](mu,nu) - gamma[4](mu,mu)*u[4][0](mu) *
534 gamma[4](nu,nu) * u[4][0](nu) / (zM*zM)) *
535 (u[3][h[pMap[3]]] * gamma[nu] * (p2CV - p2CA * gamma[5]) *
539 return answer / (16 * pow2(sin2W * cos2W) * (s - m*m + complex(0, s*g/m)));
547 double HMETwoFermions2GammaZ2TwoFermions::zpCoupling(
int id,
string type) {
549 if (!settingsPtr)
return 0;
552 if (
id == 1) name =
"d";
553 else if (
id == 2) name =
"u";
554 else if (
id == 3) name =
"s";
555 else if (
id == 4) name =
"c";
556 else if (
id == 5) name =
"b";
557 else if (
id == 6) name =
"t";
558 else if (
id == 7) name =
"b'";
559 else if (
id == 8) name =
"t'";
560 else if (
id == 11) name =
"e";
561 else if (
id == 12) name =
"nue";
562 else if (
id == 13) name =
"mu";
563 else if (
id == 14) name =
"numu";
564 else if (
id == 15) name =
"tau";
565 else if (
id == 16) name =
"nutau";
567 return settingsPtr->parm(
"Zprime:" + type + name);
582 void HMEX2TwoFermions::initWaves(vector<HelicityParticle>& p) {
589 for (
int h = 0; h < p[pMap[1]].spinStates(); h++)
590 u1.push_back(p[pMap[1]].wave(h));
593 setFermionLine(2, p[2], p[3]);
608 void HMEW2TwoFermions::initConstants() {
611 if (abs(pID[0]) == 34 && settingsPtr) {
612 if (abs(pID[2]) < 11) {
613 p2CA = settingsPtr->parm(
"Wprime:aq");
614 p2CV = settingsPtr->parm(
"Wprime:vq");
616 p2CA = settingsPtr->parm(
"Wprime:al");
617 p2CV = settingsPtr->parm(
"Wprime:vl");
631 complex HMEW2TwoFermions::calculateME(vector<int> h) {
634 for (
int mu = 0; mu <= 3; mu++) {
636 u[0][h[pMap[1]]](mu) * (u[2][h[pMap[3]]] * gamma[mu]
637 * (p2CV + p2CA * gamma[5]) * u[1][h[pMap[2]]]);
654 complex HMEGamma2TwoFermions::calculateME(vector<int> h) {
657 for (
int mu = 0; mu <= 3; mu++) {
659 u[0][h[pMap[1]]](mu) * (u[2][h[pMap[3]]] * gamma[mu] * u[1][h[pMap[2]]]);
678 void HMEZ2TwoFermions::initConstants() {
681 p2CA = coupSMPtr->af(abs(pID[2]));
682 p2CV = coupSMPtr->vf(abs(pID[2]));
683 if (settingsPtr && abs(pID[0]) == 32) {
684 p2CA = zpCoupling(abs(pID[2]),
"a");
685 p2CV = zpCoupling(abs(pID[2]),
"v");
694 complex HMEZ2TwoFermions::calculateME(vector<int> h) {
697 for (
int mu = 0; mu <= 3; mu++) {
699 u[0][h[pMap[1]]](mu) * (u[2][h[pMap[3]]] * gamma[mu]
700 * (p2CV - p2CA * gamma[5]) * u[1][h[pMap[2]]]);
709 double HMEZ2TwoFermions::zpCoupling(
int id,
string type) {
711 if (!settingsPtr)
return 0;
714 if (
id == 1) name =
"d";
715 else if (
id == 2) name =
"u";
716 else if (
id == 3) name =
"s";
717 else if (
id == 4) name =
"c";
718 else if (
id == 5) name =
"b";
719 else if (
id == 6) name =
"t";
720 else if (
id == 7) name =
"b'";
721 else if (
id == 8) name =
"t'";
722 else if (
id == 11) name =
"e";
723 else if (
id == 12) name =
"nue";
724 else if (
id == 13) name =
"mu";
725 else if (
id == 14) name =
"numu";
726 else if (
id == 15) name =
"tau";
727 else if (
id == 16) name =
"nutau";
729 return settingsPtr->parm(
"Zprime:" + type + name);
763 void HMEHiggs2TwoFermions::initConstants() {
767 if (abs(pID[1]) == 37) {
768 p2CA = pID[1] == 37 ? 1 : -1; p2CV = 1;
771 }
else if (settingsPtr) {
775 if (abs(pID[1]) == 25) {
776 mode = settingsPtr->mode(
"HiggsH1:parity");
777 eta = settingsPtr->parm(
"HiggsH1:etaParity");
778 phi = settingsPtr->parm(
"HiggsH1:phiParity");
779 if (mode == 2) {p2CA = 1; p2CV = 0;}
780 else if (mode == 3) {p2CA = eta; p2CV = complex(0, 1);}
781 else if (mode == 4) {p2CA = cos(phi); p2CV = complex(0, 1) * sin(phi);}
782 else {p2CA = 0; p2CV = complex(0, 1);}
784 }
else if (abs(pID[1]) == 35) {
785 mode = settingsPtr->mode(
"HiggsH2:parity");
786 eta = settingsPtr->parm(
"HiggsH2:etaParity");
787 phi = settingsPtr->parm(
"HiggsH2:phiParity");
788 if (mode == 2) {p2CA = 1; p2CV = 0;}
789 else if (mode == 3) {p2CA = eta; p2CV = complex(0, 1);}
790 else if (mode == 4) {p2CA = cos(phi); p2CV = complex(0, 1) * sin(phi);}
791 else {p2CA = 0; p2CV = complex(0, 1);}
793 }
else if (abs(pID[1]) == 36) {
794 mode = settingsPtr->mode(
"HiggsA3:parity");
795 eta = settingsPtr->parm(
"HiggsA3:etaParity");
796 phi = settingsPtr->parm(
"HiggsA3:phiParity");
797 if (mode == 1) {p2CA = 0; p2CV = complex(0, 1);}
798 else if (mode == 3) {p2CA = eta; p2CV = complex(0, 1);}
799 else if (mode == 4) {p2CA = cos(phi); p2CV = complex(0, 1) * sin(phi);}
800 else {p2CA = 1; p2CV = 0;}
805 if (abs(pID[1]) == 25) {p2CA = 0; p2CV = complex(0, 1);}
806 else if (abs(pID[1]) == 35) {p2CA = 0; p2CV = complex(0, 1);}
807 else if (abs(pID[1]) == 36) {p2CA = 1; p2CV = 0;}
815 void HMEHiggs2TwoFermions::initWaves(vector<HelicityParticle>& p) {
819 setFermionLine(2, p[2], p[3]);
827 complex HMEHiggs2TwoFermions::calculateME(vector<int> h) {
829 return (u[1][h[pMap[3]]] * (p2CV + p2CA * gamma[5]) * u[0][h[pMap[2]]]);
846 void HMETauDecay::initWaves(vector<HelicityParticle>& p) {
849 pMap.resize(p.size());
850 setFermionLine(0, p[0], p[1]);
851 initHadronicCurrent(p);
858 complex HMETauDecay::calculateME(vector<int> h) {
861 for (
int mu = 0; mu <= 3; mu++) {
863 (u[1][h[pMap[1]]] * gamma[mu] * (1 - gamma[5]) * u[0][h[pMap[0]]])
864 * gamma[4](mu,mu) * u[2][0](mu);
874 double HMETauDecay::decayWeightMax(vector<HelicityParticle>& p) {
877 double on = real(p[0].rho[0][0]) > real(p[0].rho[1][1]) ?
878 real(p[0].rho[0][0]) : real(p[0].rho[1][1]);
880 double off = abs(real(p[0].rho[0][1])) + abs(imag(p[0].rho[0][1]));
881 return DECAYWEIGHTMAX * (on + off);
889 void HMETauDecay::calculateResonanceWeights(vector<double>& phase,
890 vector<double>& amplitude, vector<complex>& weight) {
892 for (
unsigned int i = 0; i < phase.size(); i++)
893 weight.push_back(amplitude[i] * (cos(phase[i]) +
894 complex(0,1) * sin(phase[i])));
911 void HMETau2Meson::initConstants() {
913 DECAYWEIGHTMAX = 4*pow4(pM[0]);
921 void HMETau2Meson::initHadronicCurrent(vector<HelicityParticle>& p) {
925 u2.push_back(Wave4(p[2].p()));
940 void HMETau2TwoLeptons::initConstants() {
942 DECAYWEIGHTMAX = 16*pow4(pM[0]);
950 void HMETau2TwoLeptons::initWaves(vector<HelicityParticle>& p) {
954 setFermionLine(0,p[0],p[1]);
955 setFermionLine(2,p[2],p[3]);
963 complex HMETau2TwoLeptons::calculateME(vector<int> h) {
966 for (
int mu = 0; mu <= 3; mu++) {
967 answer += (u[1][h[pMap[1]]] * gamma[mu] * (1 - gamma[5])
968 * u[0][h[pMap[0]]]) * gamma[4](mu,mu) * (u[3][h[pMap[3]]]
969 * gamma[mu] * (1 - gamma[5]) * u[2][h[pMap[2]]]);
994 void HMETau2TwoMesonsViaVector::initConstants() {
997 vecM.clear(); vecG.clear(); vecP.clear(); vecA.clear(); vecW.clear();
1000 if (abs(pID[2]) == 221) {
1001 DECAYWEIGHTMAX = 10;
1002 pM[2] = particleDataPtr->m0(211); pM[3] = particleDataPtr->m0(311);
1003 vecM.push_back(0.8921); vecM.push_back(1.700);
1004 vecG.push_back(0.0513); vecG.push_back(0.235);
1005 vecP.push_back(0); vecP.push_back(M_PI);
1006 vecA.push_back(1); vecA.push_back(0.038);
1011 if (abs(pID[2]) == 111) DECAYWEIGHTMAX = 800;
1012 else if (abs(pID[2]) == 311) DECAYWEIGHTMAX = 6;
1013 pM[2] = particleDataPtr->m0(111); pM[3] = particleDataPtr->m0(211);
1014 vecM.push_back(0.7746); vecM.push_back(1.4080); vecM.push_back(1.700);
1015 vecG.push_back(0.1490); vecG.push_back(0.5020); vecG.push_back(0.235);
1016 vecP.push_back(0); vecP.push_back(M_PI); vecP.push_back(0);
1017 vecA.push_back(1.0); vecA.push_back(0.167); vecA.push_back(0.050);
1019 calculateResonanceWeights(vecP, vecA, vecW);
1027 void HMETau2TwoMesonsViaVector::initHadronicCurrent(
1028 vector<HelicityParticle>& p) {
1031 Wave4 u3(p[3].p() - p[2].p());
1032 Wave4 u4(p[2].p() + p[3].p());
1033 double s1 = m2(u3, u4);
1036 for (
unsigned int i = 0; i < vecW.size(); i++)
1037 sumBW += vecW[i] * pBreitWigner(pM[2], pM[3], s2, vecM[i], vecG[i]);
1038 u2.push_back((u3 - s1 / s2 * u4) * sumBW);
1065 void HMETau2TwoMesonsViaVectorScalar::initConstants() {
1067 DECAYWEIGHTMAX = 5400;
1069 scaM.clear(); scaG.clear(); scaP.clear(); scaA.clear(); scaW.clear();
1070 vecM.clear(); vecG.clear(); vecP.clear(); vecA.clear(); vecW.clear();
1073 scaM.push_back(0.878);
1074 scaG.push_back(0.499);
1077 calculateResonanceWeights(scaP, scaA, scaW);
1080 vecM.push_back(0.89547); vecM.push_back(1.414);
1081 vecG.push_back(0.04619); vecG.push_back(0.232);
1082 vecP.push_back(0); vecP.push_back(1.4399);
1083 vecA.push_back(1); vecA.push_back(0.075);
1084 calculateResonanceWeights(vecP, vecA, vecW);
1092 void HMETau2TwoMesonsViaVectorScalar::initHadronicCurrent(
1093 vector<HelicityParticle>& p) {
1096 Wave4 u3(p[3].p() - p[2].p());
1097 Wave4 u4(p[2].p() + p[3].p());
1098 double s1 = m2(u3,u4);
1100 complex scaSumBW = 0; complex scaSumW = 0;
1101 complex vecSumBW = 0; complex vecSumW = 0; complex vecSumBWM = 0;
1102 for (
unsigned int i = 0; i < scaW.size(); i++) {
1103 scaSumBW += scaW[i] * sBreitWigner(pM[2], pM[3], s2, scaM[i], scaG[i]);
1106 for (
unsigned int i = 0; i < vecW.size(); i++) {
1107 vecSumBW += vecW[i] * pBreitWigner(pM[2], pM[3], s2, vecM[i], vecG[i]);
1108 vecSumBWM += vecW[i] * pBreitWigner(pM[2], pM[3], s2, vecM[i], vecG[i]) /
1112 u2.push_back(vecC * (vecSumBW * u3 - s1 * vecSumBWM * u4) / vecSumW +
1113 scaC * u4 * scaSumBW / scaSumW);
1139 void HMETau2ThreeMesons::initConstants() {
1150 void HMETau2ThreeMesons::initHadronicCurrent(vector<HelicityParticle>& p) {
1164 a1BW = a1BreitWigner(s1);
1171 Wave4 u3 = (f3 - f2) * q2 + (f1 - f3) * q3 + (f2 - f1) * q4;
1172 u3 = u3 - (u3 * gamma[4] * q / s1) * q;
1173 if (f4 != complex(0, 0))
1174 u3 = u3 + complex(0, 1) * f4 * epsilon(q2, q3, q4);
1184 void HMETau2ThreeMesons::initMode() {
1186 if (abs(pID[2]) == 111 && abs(pID[3]) == 111 && abs(pID[4]) == 211)
1188 else if (abs(pID[2]) == 211 && abs(pID[3]) == 211 && abs(pID[4]) == 211)
1190 else if (abs(pID[2]) == 111 && abs(pID[3]) == 211 && abs(pID[4]) == 311)
1192 else if (abs(pID[2]) == 211 && abs(pID[3]) == 211 && abs(pID[4]) == 321)
1194 else if (abs(pID[2]) == 111 && abs(pID[3]) == 211 && abs(pID[4]) == 221)
1196 else if (abs(pID[2]) == 211 && abs(pID[3]) == 321 && abs(pID[4]) == 321)
1198 else if (abs(pID[2]) == 111 && abs(pID[3]) == 311 && abs(pID[4]) == 321)
1200 else if (abs(pID[2]) == 130 && abs(pID[3]) == 211 && abs(pID[4]) == 310)
1202 else if (abs(pID[2]) == 111 && abs(pID[3]) == 111 && abs(pID[4]) == 321)
1204 else if (abs(pID[2]) == 130 && abs(pID[3]) == 130 && abs(pID[4]) == 211)
1206 else if (abs(pID[2]) == 211 && abs(pID[3]) == 310 && abs(pID[4]) == 310)
1208 else if (abs(pID[2]) == 211 && abs(pID[3]) == 311 && abs(pID[4]) == 311)
1218 void HMETau2ThreeMesons::initMomenta(vector<HelicityParticle>& p) {
1220 q = Wave4(p[2].p() + p[3].p() + p[4].p());
1222 if (mode == PimPimPip || mode == Pi0Pi0Pim) {
1223 q2 = Wave4(p[2].p()); q3 = Wave4(p[3].p()); q4 = Wave4(p[4].p());
1225 }
else if (mode == PimKmKp) {
1226 q2 = Wave4(p[3].p()); q3 = Wave4(p[2].p()); q4 = Wave4(p[4].p());
1228 }
else if (mode == PimK0bK0) {
1229 q2 = Wave4(p[3].p()); q3 = Wave4(p[2].p()); q4 = Wave4(p[4].p());
1231 }
else if (mode == PimKsKs) {
1232 q2 = Wave4(p[3].p()); q3 = Wave4(p[2].p()); q4 = Wave4(p[4].p());
1234 }
else if (mode == KlKlPim) {
1235 q2 = Wave4(p[2].p()); q3 = Wave4(p[4].p()); q4 = Wave4(p[3].p());
1237 }
else if (mode == KlPimKs) {
1238 q2 = Wave4(p[4].p()); q3 = Wave4(p[3].p()); q4 = Wave4(p[2].p());
1240 else if (mode == Pi0K0Km) {
1241 q2 = Wave4(p[4].p()); q3 = Wave4(p[2].p()); q4 = Wave4(p[3].p());
1243 else if (mode == Pi0Pi0Km) {
1244 q2 = Wave4(p[2].p()); q3 = Wave4(p[3].p()); q4 = Wave4(p[4].p());
1246 else if (mode == PimPipKm) {
1247 q2 = Wave4(p[4].p()); q3 = Wave4(p[2].p()); q4 = Wave4(p[3].p());
1249 else if (mode == Pi0PimK0b) {
1250 q2 = Wave4(p[3].p()); q3 = Wave4(p[4].p()); q4 = Wave4(p[2].p());
1252 else if (mode == Pi0PimEta) {
1253 q2 = Wave4(p[3].p()); q3 = Wave4(p[2].p()); q4 = Wave4(p[4].p());
1263 double HMETau2ThreeMesons::a1PhaseSpace(
double s) {
1265 double piM = 0.13957;
1266 double rhoM = 0.773;
1267 if (s < pow2(3 * piM))
1269 else if (s < pow2(rhoM + piM)) {
1270 double sum = (s - 9 * piM * piM);
1271 return 4.1 * sum * sum * sum * (1 - 3.3 * sum + 5.8 * sum * sum);
1274 return s * (1.623 + 10.38 / s - 9.32 / (s * s) + 0.65 / (s * s * s));
1283 complex HMETau2ThreeMesons::a1BreitWigner(
double s) {
1287 return a1M * a1M / (a1M * a1M - s - complex(0,1) * a1M * a1G
1288 * a1PhaseSpace(s) / a1PhaseSpace(a1M * a1M));
1296 complex HMETau2ThreeMesons::T(
double m0,
double m1,
double s,
1297 vector<double> &M, vector<double> &G, vector<double> &W) {
1301 for (
unsigned int i = 0; i < M.size(); i++) {
1302 num += W[i] * pBreitWigner(m0, m1, s, M[i], G[i]);
1313 complex HMETau2ThreeMesons::T(
double s, vector<double> &M,
1314 vector<double> &G, vector<double> &W) {
1318 for (
unsigned int i = 0; i < M.size(); i++) {
1319 num += W[i] * breitWigner(s, M[i], G[i]);
1354 void HMETau2ThreePions::initResonances() {
1357 if (mode == PimPimPip) DECAYWEIGHTMAX = 6000;
1360 else DECAYWEIGHTMAX = 3000;
1363 rhoM.clear(); rhoG.clear();
1364 rhoPp.clear(); rhoAp.clear(); rhoWp.clear();
1365 rhoPd.clear(); rhoAd.clear(); rhoWd.clear();
1368 rhoM.push_back(.7743); rhoM.push_back(1.370); rhoM.push_back(1.720);
1369 rhoG.push_back(.1491); rhoG.push_back(.386); rhoG.push_back(.250);
1370 rhoPp.push_back(0); rhoPp.push_back(3.11018); rhoPp.push_back(0);
1371 rhoAp.push_back(1); rhoAp.push_back(0.12); rhoAp.push_back(0);
1372 rhoPd.push_back(-0.471239); rhoPd.push_back(1.66504); rhoPd.push_back(0);
1373 rhoAd.push_back(0.37); rhoAd.push_back(0.87); rhoAd.push_back(0);
1376 f0M = 1.186; f2M = 1.275; sigM = 0.860;
1377 f0G = 0.350; f2G = 0.185; sigG = 0.880;
1378 f0P = -1.69646; f2P = 1.75929; sigP = 0.722566;
1379 f0A = 0.77; f2A = 0.71; sigA = 2.1;
1382 calculateResonanceWeights(rhoPp, rhoAp, rhoWp);
1383 calculateResonanceWeights(rhoPd, rhoAd, rhoWd);
1384 f0W = f0A * (cos(f0P) + complex(0,1) * sin(f0P));
1385 f2W = f2A * (cos(f2P) + complex(0,1) * sin(f2P));
1386 sigW = sigA * (cos(sigP) + complex(0,1) * sin(sigP));
1394 complex HMETau2ThreePions::F1() {
1396 complex answer(0,0);
1399 if (mode == PimPimPip) {
1400 for (
unsigned int i = 0; i < rhoM.size(); i++) {
1401 answer += - rhoWp[i] * pBreitWigner(pM[3], pM[4], s2, rhoM[i], rhoG[i])
1402 - rhoWd[i] / 3.0 * pBreitWigner(pM[2], pM[4], s3, rhoM[i], rhoG[i])
1405 answer += -2.0 / 3.0 * (sigW * sBreitWigner(pM[2], pM[4], s3, sigM, sigG)
1406 + f0W * sBreitWigner(pM[2], pM[4], s3, f0M, f0G));
1407 answer += f2W * (0.5 * (s4 - s3)
1408 * dBreitWigner(pM[3], pM[4], s2, f2M, f2G)
1409 - 1.0 / (18 * s3) * (4 * pow2(pM[2]) - s3)
1410 * (s1 + s3 - pow2(pM[2]))
1411 * dBreitWigner(pM[2], pM[4], s3, f2M, f2G));
1416 for (
unsigned int i = 0; i < rhoM.size(); i++) {
1417 answer += rhoWp[i] * pBreitWigner(pM[3], pM[4], s2, rhoM[i], rhoG[i])
1418 - rhoWd[i] / 3.0 * pBreitWigner(pM[2], pM[4], s3, rhoM[i], rhoG[i])
1419 * (s4 - s2 - pow2(pM[4]) + pow2(pM[2]));
1421 answer += 2.0 / 3.0 * (sigW * sBreitWigner(pM[2], pM[3], s4, sigM, sigG)
1422 + f0W * sBreitWigner(pM[2], pM[3], s4, f0M, f0G));
1423 answer += f2W / (18 * s4) * (s1 - pow2(pM[4]) + s4)
1424 * (4 * pow2(pM[2]) - s4) * dBreitWigner(pM[2], pM[3], s4, f2M, f2G);
1426 return a1BW * answer;
1434 complex HMETau2ThreePions::F2() {
1436 complex answer(0,0);
1439 if (mode == PimPimPip) {
1440 for (
unsigned int i = 0; i < rhoM.size(); i++) {
1441 answer += -rhoWp[i] * pBreitWigner(pM[2], pM[4], s3, rhoM[i], rhoG[i])
1442 - rhoWd[i] / 3.0 * pBreitWigner(pM[3], pM[4], s2, rhoM[i], rhoG[i])
1445 answer += -2.0 / 3.0 * (sigW * sBreitWigner(pM[3], pM[4], s2, sigM, sigG)
1446 + f0W * sBreitWigner(pM[3], pM[4], s2, f0M, f0G));
1447 answer += f2W * (0.5 * (s4 - s2)
1448 * dBreitWigner(pM[2], pM[4], s3, f2M, f2G)
1449 - 1.0 / (18 * s2) * (4 * pow2(pM[2]) - s2) * (s1 + s2 - pow2(pM[2]))
1450 * dBreitWigner(pM[3], pM[4], s2, f2M, f2G));
1455 for (
unsigned int i = 0; i < rhoM.size(); i++) {
1456 answer += -rhoWp[i] / 3.0 *
1457 pBreitWigner(pM[2], pM[4], s3, rhoM[i], rhoG[i]) -
1458 rhoWd[i] * pBreitWigner(pM[3], pM[4], s2, rhoM[i], rhoG[i]) *
1459 (s4 - s3 - pow2(pM[4]) + pow2(pM[3]));
1461 answer += 2.0 / 3.0 * (sigW * sBreitWigner(pM[2], pM[3], s4, sigM, sigG)
1462 + f0W * sBreitWigner(pM[2], pM[3], s4, f0M, f0G));
1463 answer += f2W / (18 * s4) * (s1 - pow2(pM[4]) + s4) *
1464 (4 * pow2(pM[2]) - s4) * dBreitWigner(pM[2], pM[3], s4, f2M, f2G);
1466 return -a1BW * answer;
1474 complex HMETau2ThreePions::F3() {
1476 complex answer(0,0);
1479 if (mode == PimPimPip) {
1480 for (
unsigned int i = 0; i < rhoM.size(); i++) {
1481 answer += -rhoWd[i] * (1.0 / 3.0 * (s3 - s4)
1482 * pBreitWigner(pM[3], pM[4], s2, rhoM[i], rhoG[i]) - 1.0 / 3.0
1483 * (s2 - s4) * pBreitWigner(pM[2], pM[4], s3, rhoM[i], rhoG[i]));
1485 answer += -2.0 / 3.0 * (sigW * sBreitWigner(pM[3], pM[4], s2, sigM, sigG)
1486 + f0W * sBreitWigner(pM[3], pM[4], s2, f0M, f0G));
1487 answer += 2.0 / 3.0 * (sigW * sBreitWigner(pM[2], pM[4], s3, sigM, sigG)
1488 + f0W * sBreitWigner(pM[2], pM[4], s3, f0M, f0G));
1489 answer += f2W * (-1.0 / (18 * s2) * (4 * pow2(pM[2]) - s2)
1490 * (s1 + s2 - pow2(pM[2])) * dBreitWigner(pM[3], pM[4], s2, f2M, f2G)
1491 + 1.0 / (18 * s3) * (4 * pow2(pM[2]) - s3) * (s1 + s3 - pow2(pM[2]))
1492 * dBreitWigner(pM[2], pM[4], s3, f2M, f2G));
1497 for (
unsigned int i = 0; i < rhoM.size(); i++) {
1498 answer += rhoWd[i] * (-1.0 / 3.0 * (s4 - s3 - pow2(pM[4]) + pow2(pM[3]))
1499 * pBreitWigner(pM[3], pM[4], s2, rhoM[i], rhoG[i])
1500 + 1.0 / 3.0 * (s4 - s2 - pow2(pM[4]) + pow2(pM[2]))
1501 * pBreitWigner(pM[2], pM[4], s3, rhoM[i], rhoG[i]));
1503 answer += -f2W / 2.0 * (s2 - s3)
1504 * dBreitWigner(pM[2], pM[3], s4, f2M, f2G);
1506 return a1BW * answer;
1514 double HMETau2ThreePions::a1PhaseSpace(
double s) {
1516 double picM = 0.1753;
1517 double pinM = 0.1676;
1523 double piW = pow2(0.2384)/1.0252088;
1524 double kW = pow2(4.7621);
1530 picG = 5.80900 * pow3(s - picM) * (1.0 - 3.00980 * (s - picM) +
1531 4.5792 * pow2(s - picM));
1533 picG = -13.91400 + 27.67900 * s - 13.39300 * pow2(s) + 3.19240 * pow3(s)
1534 - 0.10487 * pow4(s);
1540 pinG = 6.28450 * pow3(s - pinM) * (1.0 - 2.95950 * (s - pinM) +
1541 4.33550 * pow2(s - pinM));
1543 pinG = -15.41100 + 32.08800 * s - 17.66600 * pow2(s) + 4.93550 * pow3(s)
1544 - 0.37498 * pow4(s);
1547 if (s > pow2(ksM + kM))
1548 kG = 0.5 * sqrt((s - pow2(ksM + kM)) * (s - pow2(ksM - kM))) / s;
1549 return piW*(picG + pinG + kW*kG);
1557 complex HMETau2ThreePions::a1BreitWigner(
double s) {
1560 return a1M*a1M/(a1M*a1M - s - complex(0,1)*a1PhaseSpace(s));
1585 void HMETau2ThreeMesonsWithKaons::initResonances() {
1588 if (mode == PimKmKp) DECAYWEIGHTMAX = 130;
1590 else if (mode == PimK0bK0) DECAYWEIGHTMAX = 115;
1592 else if (mode == PimKsKs || mode == KlKlPim) DECAYWEIGHTMAX = 230;
1594 else if (mode == KlPimKs) DECAYWEIGHTMAX = 230;
1596 else if (mode == Pi0K0Km) DECAYWEIGHTMAX = 125;
1598 else if (mode == Pi0Pi0Km) DECAYWEIGHTMAX = 2.5e4;
1600 else if (mode == PimPipKm) DECAYWEIGHTMAX = 1.8e4;
1602 else if (mode == Pi0PimK0b) DECAYWEIGHTMAX = 3.9e4;
1605 rhoMa.clear(); rhoGa.clear(); rhoWa.clear();
1606 rhoMv.clear(); rhoGv.clear(); rhoWv.clear();
1607 kstarMa.clear(); kstarGa.clear(); kstarWa.clear();
1608 kstarMv.clear(); kstarGv.clear(); kstarWv.clear();
1609 k1Ma.clear(); k1Ga.clear(); k1Wa.clear();
1610 k1Mb.clear(); k1Gb.clear(); k1Wb.clear();
1611 omegaM.clear(); omegaG.clear(); omegaW.clear();
1614 rhoMa.push_back(0.773); rhoGa.push_back(0.145); rhoWa.push_back(1);
1615 rhoMa.push_back(1.370); rhoGa.push_back(0.510); rhoWa.push_back(-0.145);
1616 rhoMv.push_back(0.773); rhoGv.push_back(0.145); rhoWv.push_back(1);
1617 rhoMv.push_back(1.500); rhoGv.push_back(0.220); rhoWv.push_back(-6.5 / 26.0);
1618 rhoMv.push_back(1.750); rhoGv.push_back(0.120); rhoWv.push_back(-1.0 / 26.0);
1621 kstarMa.push_back(0.892); kstarGa.push_back(0.050);
1622 kstarMa.push_back(1.412); kstarGa.push_back(0.227);
1623 kstarWa.push_back(1);
1624 kstarWa.push_back(-0.135);
1625 kstarMv.push_back(0.892); kstarGv.push_back(0.050);
1626 kstarMv.push_back(1.412); kstarGv.push_back(0.227);
1627 kstarMv.push_back(1.714); kstarGv.push_back(0.323);
1628 kstarWv.push_back(1);
1629 kstarWv.push_back(-6.5 / 26.0);
1630 kstarWv.push_back(-1.0 / 26.0);
1633 k1Ma.push_back(1.270); k1Ga.push_back(0.090); k1Wa.push_back(0.33);
1634 k1Ma.push_back(1.402); k1Ga.push_back(0.174); k1Wa.push_back(1);
1635 k1Mb.push_back(1.270); k1Gb.push_back(0.090); k1Wb.push_back(1);
1638 omegaM.push_back(0.782); omegaG.push_back(0.00843); omegaW.push_back(1);
1639 omegaM.push_back(1.020); omegaG.push_back(0.00443); omegaW.push_back(0.05);
1642 kM = 0.49765; piM = 0.13957; piW = 0.0942;
1650 complex HMETau2ThreeMesonsWithKaons::F1() {
1654 if (mode == PimKmKp)
1655 answer = a1BW * T(piM, kM, s2, kstarMa, kstarGa, kstarWa) / 2.0;
1657 else if (mode == PimK0bK0)
1658 answer = a1BW * T(piM, kM, s2, kstarMa, kstarGa, kstarWa) / 2.0;
1660 else if (mode == PimKsKs || mode == KlKlPim)
1661 answer = -a1BW * (T(piM, kM, s2, kstarMa, kstarGa, kstarWa)
1662 + T(piM, kM, s4, kstarMa, kstarGa, kstarWa)) / 2.0;
1664 else if (mode == KlPimKs)
1665 answer = a1BW * (T(piM, kM, s2, kstarMa, kstarGa, kstarWa)
1666 - T(piM, kM, s4, kstarMa, kstarGa, kstarWa)) / 2.0;
1668 else if (mode == Pi0K0Km)
1669 answer = a1BW * (T(piM, kM, s2, kstarMa, kstarGa, kstarWa)
1670 - T(piM, kM, s4, kstarMa, kstarGa, kstarWa)) / 2.0;
1672 else if (mode == Pi0Pi0Km)
1673 answer = T(s1, k1Ma, k1Ga, k1Wa)
1674 * T(piM, kM, s2, kstarMa, kstarGa, kstarWa);
1676 else if (mode == PimPipKm)
1677 answer = T(s1, k1Mb, k1Gb, k1Wb)
1678 * T(piM, piM, s2, rhoMa, rhoGa, rhoWa);
1680 else if (mode == Pi0PimK0b)
1681 answer = T(s1, k1Ma, k1Ga, k1Wa)
1682 * (T(piM, kM, s2, kstarMa, kstarGa, kstarWa)
1683 - T(piM, kM, s4, kstarMa, kstarGa, kstarWa));
1684 return -1.0 / 3.0 * answer;
1691 complex HMETau2ThreeMesonsWithKaons::F2() {
1695 if (mode == PimKmKp)
1696 answer = a1BW * T(piM, piM, s3, rhoMa, rhoGa, rhoWa) / 2.0;
1698 else if (mode == PimK0bK0)
1699 answer = a1BW * T(piM, piM, s3, rhoMa, rhoGa, rhoWa) / 2.0;
1701 else if (mode == PimKsKs || mode == KlKlPim)
1702 answer = a1BW * T(piM, kM, s4, kstarMa, kstarGa, kstarWa) / 2.0;
1704 else if (mode == KlPimKs)
1705 answer = a1BW * (2.0 * T(piM, piM, s3, rhoMa, rhoGa, rhoWa)
1706 + T(piM, kM, s4, kstarMa, kstarGa, kstarWa)) / 2.0;
1708 else if (mode == Pi0K0Km)
1709 answer = a1BW * (2.0 * T(piM, piM, s3, rhoMa, rhoGa, rhoWa)
1710 + T(piM, kM, s4, kstarMa, kstarGa, kstarWa)) / 2.0;
1712 else if (mode == Pi0Pi0Km)
1713 answer = T(s1, k1Ma, k1Ga, k1Wa)
1714 * T(piM, kM, s3, kstarMa, kstarGa, kstarWa);
1716 else if (mode == PimPipKm)
1717 answer = T(s1, k1Ma, k1Ga, k1Wa)
1718 * T(piM, kM, s3, kstarMa, kstarGa, kstarWa);
1720 else if (mode == Pi0PimK0b)
1721 answer = 2.0 * T(s1, k1Mb, k1Gb, k1Wb)
1722 * T(piM, piM, s3, rhoMa, rhoGa, rhoWa)
1723 + T(s1, k1Ma, k1Ga, k1Wa) * T(piM, kM, s4, kstarMa, kstarGa, kstarWa);
1724 return 1.0 / 3.0 * answer;
1732 complex HMETau2ThreeMesonsWithKaons::F4() {
1736 if (mode == PimKmKp)
1737 answer = (sqrt(2.) - 1) * T(piM, piM, s1, rhoMv, rhoGv, rhoWv)
1738 * (sqrt(2.) * T(s3, omegaM, omegaG, omegaW)
1739 + T(piM, kM, s2, kstarMa, kstarGa, kstarWa));
1741 else if (mode == PimK0bK0)
1742 answer = -(sqrt(2.) - 1) * T(piM, piM, s1, rhoMv, rhoGv, rhoWv)
1743 * (sqrt(2.) * T(s3, omegaM, omegaG, omegaW)
1744 + T(piM, kM, s2, kstarMa, kstarGa, kstarWa));
1746 else if (mode == PimKsKs || mode == KlKlPim)
1747 answer = (sqrt(2.) - 1) * T(piM, piM, s1, rhoMv, rhoGv, rhoWv)
1748 * (T(piM, kM, s2, kstarMa, kstarGa, kstarWa)
1749 - T(piM, kM, s4, kstarMa, kstarGa, kstarWa));
1751 else if (mode == KlPimKs)
1752 answer = -(sqrt(2.) - 1) * T(piM, piM, s1, rhoMv, rhoGv, rhoWv)
1753 * (2 * sqrt(2.) * T(s3, omegaM, omegaG, omegaW)
1754 + T(piM, kM, s2, kstarMa, kstarGa, kstarWa)
1755 + T(piM, kM, s4, kstarMa, kstarGa, kstarWa));
1757 else if (mode == Pi0K0Km)
1758 answer = -(sqrt(2.) - 1) * T(piM, piM, s1, rhoMv, rhoGv, rhoWv)
1759 * (T(piM, kM, s4, kstarMa, kstarGa, kstarWa)
1760 - T(piM, kM, s2, kstarMa, kstarGa, kstarWa));
1762 else if (mode == Pi0Pi0Km)
1763 answer = T(piM, kM, s1, kstarMv, kstarGv, kstarWv)
1764 * (T(piM, kM, s2, kstarMa, kstarGa, kstarWa)
1765 - T(piM, kM, s3, kstarMa, kstarGa, kstarWa));
1767 else if (mode == PimPipKm)
1768 answer = -T(piM, kM, s1, kstarMv, kstarGv, kstarWv)
1769 * (T(piM, piM, s2, rhoMa, rhoGa, rhoWa)
1770 + T(piM, kM, s3, kstarMa, kstarGa, kstarWa));
1772 else if (mode == Pi0PimK0b)
1773 answer = T(piM, kM, s1, kstarMv, kstarGv, kstarWv)
1774 * (2.0 * T(piM, piM, s3, rhoMa, rhoGa, rhoWa)
1775 + T(piM, kM, s2, kstarMa, kstarGa, kstarWa)
1776 + T(piM, kM, s4, kstarMa, kstarGa, kstarWa));
1777 return 1.0 / (8.0 * M_PI * M_PI * piW * piW) * answer;
1799 void HMETau2ThreeMesonsGeneric::initResonances() {
1802 if (mode == PimPimPip || mode == Pi0Pi0Pim) DECAYWEIGHTMAX = 1.3e4;
1804 else if (mode == PimKmKp) DECAYWEIGHTMAX = 330;
1806 else if (mode == PimK0bK0) DECAYWEIGHTMAX = 300;
1808 else if (mode == Pi0K0Km) DECAYWEIGHTMAX = 40;
1810 else if (mode == Pi0Pi0Km) DECAYWEIGHTMAX = 9.4e4;
1812 else if (mode == PimPipKm) DECAYWEIGHTMAX = 9.0e3;
1814 else if (mode == Pi0PimK0b) DECAYWEIGHTMAX = 1.2e4;
1816 else if (mode == Pi0PimEta) DECAYWEIGHTMAX = 360;
1819 rhoMa.clear(); rhoGa.clear(); rhoWa.clear();
1820 rhoMv.clear(); rhoGv.clear(); rhoWv.clear();
1821 kstarM.clear(); kstarG.clear(); kstarW.clear();
1822 k1M.clear(); k1G.clear(); k1W.clear();
1825 rhoMa.push_back(0.773); rhoGa.push_back(0.145); rhoWa.push_back(1);
1826 rhoMa.push_back(1.370); rhoGa.push_back(0.510); rhoWa.push_back(-0.145);
1827 rhoMv.push_back(0.773); rhoGv.push_back(0.145); rhoWv.push_back(-26);
1828 rhoMv.push_back(1.5); rhoGv.push_back(0.220); rhoWv.push_back(6.5);
1829 rhoMv.push_back(1.75); rhoGv.push_back(0.120); rhoWv.push_back(1);
1832 kstarM.push_back(0.892); kstarG.push_back(0.0513); kstarW.push_back(1);
1833 k1M.push_back(1.402); k1G.push_back(0.174); k1W.push_back(1);
1836 kM = 0.49765; piM = 0.13957; piW = 0.0942;
1844 complex HMETau2ThreeMesonsGeneric::F1() {
1848 if (mode == PimPimPip || mode == Pi0Pi0Pim)
1849 answer = a1BW * T(piM, piM, s2, rhoMa, rhoGa, rhoWa);
1851 else if (mode == PimKmKp)
1852 answer = -a1BW * T(piM, kM, s2, kstarM, kstarG, kstarW) / 3.0;
1854 else if (mode == PimK0bK0)
1855 answer = -a1BW * T(piM, kM, s2, kstarM, kstarG, kstarW) / 3.0;
1857 else if (mode == Pi0K0Km)
1860 else if (mode == Pi0Pi0Km)
1861 answer = T(s1, k1M, k1G, k1W) * T(piM, kM, s2, kstarM, kstarG, kstarW);
1863 else if (mode == PimPipKm)
1864 answer = -T(s1, k1M, k1G, k1W) * T(piM, piM, s2, rhoMa, rhoGa, rhoWa)
1867 else if (mode == Pi0PimK0b)
1870 else if (mode == Pi0PimEta)
1880 complex HMETau2ThreeMesonsGeneric::F2() {
1884 if (mode == PimPimPip || mode == Pi0Pi0Pim)
1885 answer = -a1BW * T(piM, piM, s3, rhoMa, rhoGa, rhoWa);
1887 else if (mode == PimKmKp)
1888 answer = a1BW * T(piM, piM, s3, rhoMa, rhoGa, rhoWa) / 3.0;
1890 else if (mode == PimK0bK0)
1891 answer = a1BW * T(piM, piM, s3, rhoMa, rhoGa, rhoWa) / 3.0;
1893 else if (mode == Pi0K0Km)
1894 answer = a1BW * T(piM, piM, s3, rhoMa, rhoGa, rhoWa);
1896 else if (mode == Pi0Pi0Km)
1897 answer = -T(s1, k1M, k1G, k1W) * T(piM, kM, s3, kstarM, kstarG, kstarW);
1899 else if (mode == PimPipKm)
1900 answer = T(s1, k1M, k1G, k1W)
1901 * T(piM, kM, s3, kstarM, kstarG, kstarW) / 3.0;
1903 else if (mode == Pi0PimK0b)
1904 answer = T(s1, k1M, k1G, k1W) * T(piM, piM, s3, rhoMa, rhoGa, rhoWa);
1906 else if (mode == Pi0PimEta)
1916 complex HMETau2ThreeMesonsGeneric::F4() {
1920 if (mode == PimPimPip || mode == Pi0Pi0Pim)
1923 else if (mode == PimKmKp)
1924 answer = T(piM, piM, s1, rhoMv, rhoGv, rhoWv)
1925 * (T(piM, piM, s3, rhoMa, rhoGa, rhoWa)
1926 - 0.2 * T(piM, kM, s2, kstarM, kstarG, kstarW)) * (1.25);
1928 else if (mode == PimK0bK0)
1929 answer = -T(piM, piM, s1, rhoMv, rhoGv, rhoWv)
1930 * (T(piM, piM, s3, rhoMa, rhoGa, rhoWa)
1931 - 0.2 * T(piM, kM, s2, kstarM, kstarG, kstarW)) * (1.25);
1933 else if (mode == Pi0K0Km)
1936 else if (mode == Pi0Pi0Km)
1939 else if (mode == PimPipKm)
1940 answer = -T(piM, kM, s1, kstarM, kstarG, kstarW)
1941 * (T(piM, piM, s2, rhoMa, rhoGa, rhoWa)
1942 - 0.2 * T(piM, kM, s3, kstarM, kstarG, kstarW)) * (1.25);
1944 else if (mode == Pi0PimK0b)
1945 answer = 2.0 * T(piM, kM, s1, kstarM, kstarG, kstarW)
1946 * (T(piM, piM, s3, rhoMa, rhoGa, rhoWa)
1947 - 0.2 * T(piM, kM, s2, kstarM, kstarG, kstarW)) * (1.25);
1949 else if (mode == Pi0PimEta)
1950 answer = T(piM, piM, s1, rhoMv, rhoGv, rhoWv)
1951 * T(piM, piM, s4, rhoMa, rhoGa, rhoWa);
1952 return 1.0 / (4.0 * M_PI * M_PI * piW * piW) * answer;
1973 void HMETau2TwoPionsGamma::initConstants() {
1975 DECAYWEIGHTMAX = 4e4;
1978 rhoM.clear(); rhoG.clear(); rhoW.clear();
1979 omegaM.clear(); omegaG.clear(); omegaW.clear();
1982 rhoM.push_back(0.773); rhoG.push_back(0.145); rhoW.push_back(1);
1983 rhoM.push_back(1.7); rhoG.push_back(0.26); rhoW.push_back(-0.1);
1984 omegaM.push_back(0.782); omegaG.push_back(0.0085); omegaW.push_back(1);
1992 void HMETau2TwoPionsGamma::initWaves(vector<HelicityParticle>& p) {
1996 pMap.resize(p.size());
1997 setFermionLine(0, p[0], p[1]);
2001 Wave4 q(p[2].p() + p[3].p() + p[4].p());
2002 Wave4 q2(p[2].p()), q3(p[3].p()), q4(p[4].p());
2004 double s2 = m2(q3 + q2);
2005 complex f = F(s1, rhoM, rhoG, rhoW) * F(0, rhoM, rhoG, rhoW)
2006 * F(s2, omegaM, omegaG, omegaW);
2007 double q4q2 = m2(q4, q2);
2008 double q4q3 = m2(q4, q3);
2009 double q3q2 = m2(q3, q2);
2010 for (
int h = 0; h < 2; h++) {
2011 Wave4 e = p[2].wave(h);
2012 complex q4e = q4*gamma[4]*e;
2013 complex q3e = q3*gamma[4]*e;
2014 u2.push_back(f * (e * (piM*piM*q4q2 - q3q2*(q4q3 - q4q2))
2015 - q3 * (q3e*q4q2 - q4e*q3q2)
2016 + q2 * (q3e*q4q3 - q4e*(piM*piM + q3q2))));
2025 complex HMETau2TwoPionsGamma::calculateME(vector<int> h) {
2027 complex answer(0,0);
2028 for (
int mu = 0; mu <= 3; mu++) {
2030 (u[1][h[pMap[1]]] * gamma[mu] * (1 - gamma[5]) * u[0][h[pMap[0]]])
2031 * gamma[4](mu,mu) * u[2][h[2]](mu);
2040 complex HMETau2TwoPionsGamma::F(
double s, vector<double> M, vector<double> G,
2043 complex answer(0, 0);
2044 for (
unsigned int i = 0; i < M.size(); i++)
2045 answer += W[i] / (M[i]*M[i] - s - complex(0, 1) * M[i] * G[i]);
2080 void HMETau2FourPions::initConstants() {
2082 if (abs(pID[3]) == 111) DECAYWEIGHTMAX = 5e8;
2083 else DECAYWEIGHTMAX = 5e9;
2084 pinM = particleDataPtr->m0(111);
2085 picM = particleDataPtr->m0(211);
2086 sigM = 0.8; omeM = 0.782; a1M = 1.23; rhoM = 0.7761;
2087 sigG = 0.8; omeG = 0.00841; a1G = 0.45; rhoG = 0.1445;
2088 sigP = 0.43585; omeP = 0.0;
2089 sigA = 1.39987; omeA = 1.0;
2090 sigW = sigA*(cos(sigP)+complex(0,1)*sin(sigP));
2091 omeW = omeA*(cos(omeP)+complex(0,1)*sin(omeP));
2100 void HMETau2FourPions::initHadronicCurrent(vector<HelicityParticle>& p) {
2105 Wave4 q(p[2].p() + p[3].p() + p[4].p()+ p[5].p());
2106 Wave4 q2(p[2].p()), q3(p[3].p()), q4(p[4].p()), q5(p[5].p());
2112 if (abs(pID[3]) == 111)
2113 u2.push_back(G(1,s)*(t1(q,q3,q4,q5,q2) + t1(q,q3,q2,q5,q4) +
2114 t1(q,q4,q3,q5,q2) + t1(q,q4,q2,q5,q3) +
2115 t1(q,q2,q3,q5,q4) + t1(q,q2,q4,q5,q3) +
2116 t2(q,q3,q5,q4,q2) + t2(q,q4,q5,q3,q2) +
2117 t2(q,q2,q5,q4,q3) - t2(q,q5,q3,q4,q2) -
2118 t2(q,q5,q4,q3,q2) - t2(q,q5,q2,q4,q3)));
2121 else if (abs(pID[3]) == 211)
2122 u2.push_back(G(2,s)*(t1(q,q3,q5,q4,q2) + t1(q,q4,q5,q3,q2) +
2123 t1(q,q3,q4,q5,q2) + t1(q,q4,q3,q5,q2) +
2124 t1(q,q2,q4,q3,q5) + t1(q,q2,q3,q4,q5) +
2125 t2(q,q2,q4,q3,q5) + t2(q,q2,q3,q4,q5) -
2126 t2(q,q3,q2,q4,q5) - t2(q,q4,q2,q3,q5)) +
2127 G(3,s)*(t3(q,q3,q5,q4,q2) + t3(q,q4,q5,q3,q2) -
2128 t3(q,q3,q4,q5,q2) - t3(q,q4,q3,q5,q2) -
2129 t3(q,q3,q2,q4,q5) - t3(q,q4,q2,q3,q5)));
2138 Wave4 HMETau2FourPions::t1(Wave4 &q, Wave4 &q1, Wave4 &q2,
2139 Wave4 &q3, Wave4 &q4) {
2141 Wave4 a1Q(q2 + q3 + q4);
2142 Wave4 rhoQ(q3 + q4);
2143 double a1S = m2(a1Q);
2144 double rhoS = m2(rhoQ);
2147 double gM = sqrtpos(rhoM*rhoM - 4*picM*picM) * (rhoM*rhoM - 4*picM*picM)
2149 double dm = (rhoFormFactor1(0) - rhoFormFactor1(rhoM*rhoM) +
2150 rhoM*rhoM * rhoFormFactor2(rhoM*rhoM)) / gM;
2151 return - a1FormFactor(a1S) / (a1D(a1S) * rhoD(rhoS)) * pow2(a1M) *
2152 (rhoM*rhoM + rhoM*rhoG*dm) *
2153 (m2(q,a1Q) * (m2(q3,a1Q) * q4 - m2(q4,a1Q) * q3) +
2154 (m2(q,q4) * m2(q1,q3) - m2(q,q3) * m2(q1,q4)) * a1Q);
2162 Wave4 HMETau2FourPions::t2(Wave4 &q, Wave4 &, Wave4 &q2,
2163 Wave4 &q3, Wave4 &q4) {
2165 Wave4 a1Q(q2 + q3 + q4);
2166 Wave4 sigQ(q3 + q4);
2167 double a1S = m2(a1Q);
2168 double sigS = m2(sigQ);
2169 return sigW * a1FormFactor(a1S) / (a1D(a1S) * sigD(sigS)) *
2170 pow2(a1M) * pow2(sigM) * (m2(q,a1Q) * a1S * q2 - m2(q,q2) * a1S * a1Q);
2178 Wave4 HMETau2FourPions::t3(Wave4 &q, Wave4 &q1, Wave4 &q2,
2179 Wave4 &q3, Wave4 &q4) {
2180 Wave4 omeQ(q2 + q3 + q4);
2181 Wave4 rhoQ(q3 + q4);
2182 double omeS = m2(omeQ);
2183 double rhoS = m2(rhoQ);
2186 double gM = sqrtpos(rhoM*rhoM - 4*picM*picM) * (rhoM*rhoM - 4*picM*picM)
2188 double dm = (rhoFormFactor1(0) - rhoFormFactor1(rhoM*rhoM) +
2189 rhoM*rhoM * rhoFormFactor2(rhoM*rhoM)) / gM;
2190 return omeW * omeFormFactor(omeS) / (omeD(omeS) * rhoD(rhoS)) *
2191 pow2(omeM) * (rhoM*rhoM + rhoM*rhoG*dm) *
2192 ((m2(q,q3) * m2(q1,q4) - m2(q,q4) * m2(q1,q3)) * q2 +
2193 (m2(q,q4) * m2(q1,q2) - m2(q,q2) * m2(q1,q4)) * q3 +
2194 (m2(q,q2) * m2(q1,q3) - m2(q,q3) * m2(q1,q2)) * q4);
2202 complex HMETau2FourPions::a1D(
double s) {
2208 double piM = 0.16960;
2209 double rM = 0.83425;
2217 rG = 0.003052*pow3(s - piM)*(1.0 + 151.088*(s - piM) +
2218 174.495*pow2(s - piM));
2222 rG = 2.60817 - 2.47790*s + 0.66539*pow2(s) - 0.0678183*pow3(s) +
2223 1.66577*(s-1.23701)/s;
2224 return s - a1M*a1M + complex(0,1) * sqrtpos(s) * rG;
2232 complex HMETau2FourPions::rhoD(
double s) {
2234 double gQ = sqrtpos(s - 4*picM*picM) * (s - 4*picM*picM) / sqrtpos(s);
2235 double gM = sqrtpos(rhoM*rhoM - 4*picM*picM) * (rhoM*rhoM - 4*picM*picM)
2237 double dm = (rhoFormFactor1(s) - rhoFormFactor1(rhoM*rhoM) -
2238 (s - rhoM*rhoM) * rhoFormFactor2(rhoM*rhoM)) / gM;
2241 if (s < 4*picM*picM) gQ = 0;
2242 return s - rhoM*rhoM - rhoM*rhoG*dm + complex(0,1)*rhoM*rhoG*(gQ/gM);
2250 complex HMETau2FourPions::sigD(
double s) {
2253 double piM = abs(pID[3]) == 111 ? pinM : picM;
2254 double gQ = sqrtpos(1.0 - 4*piM*piM/s);
2255 double gM = sqrtpos(1.0 - 4*piM*piM/(sigM*sigM));
2256 return s - sigM*sigM + complex(0,1)*sigM*sigG*gQ/gM;
2264 complex HMETau2FourPions::omeD(
double s) {
2267 double q = sqrtpos(s);
2268 double x = q - omeM;
2272 g = 1 + 17.560*x + 141.110*pow2(x) + 894.884*pow3(x) + 4977.35*pow4(x) +
2273 7610.66*pow5(x) - 42524.4*pow6(x);
2275 g = -1333.26 + 4860*q - 6000.81*pow2(q) + 2504.97*pow3(q);
2277 return s - omeM*omeM + complex(0,1)*omeM*omeG*g;
2285 double HMETau2FourPions::a1FormFactor(
double s) {
2287 return pow2((1.0 + a1M*a1M/lambda2) / (1.0 + s/lambda2));
2295 double HMETau2FourPions::rhoFormFactor1(
double s) {
2298 if (s > 4. * picM * picM) {
2299 double thr = sqrtpos(1 - 4. * picM * picM / s);
2300 f = thr * log((1. + thr) / (1. - thr)) * (s - 4. * picM * picM) / M_PI;
2301 }
else if (s < 0.0000001) f = -8. * picM * picM / M_PI;
2310 double HMETau2FourPions::rhoFormFactor2(
double s) {
2312 double f = sqrtpos(1 - 4*picM*picM/s);
2313 if (s > 4*picM*picM)
2314 f = f / (M_PI * s) * (s*f + (2*picM*picM + s)*log((1 + f) / (1 - f)));
2325 double HMETau2FourPions::omeFormFactor(
double ) {
2335 double HMETau2FourPions::G(
int i,
double s) {
2338 double s0(0), s1(0), s2(0), s3(0), s4(0), s5(0);
2341 double a1(0), b1(0);
2342 double a2(0), b2(0), c2(0), d2(0), e2(0);
2343 double a3(0), b3(0), c3(0), d3(0), e3(0);
2344 double a4(0), b4(0);
2345 double a5(0), b5(0);
2349 s0 = 0.614403; s1 = 0.656264; s2 = 1.57896;
2350 s3 = 3.08198; s4 = 3.12825; s5 = 3.17488;
2351 a1 = -23383.7; b1 = 38059.2;
2352 a2 = 230.368; b2 = -4.39368; c2 = 687.002;
2353 d2 = -732.581; e2 = 207.087;
2354 a3 = 1633.92; b3 = -2596.21; c3 = 1703.08;
2355 d3 = -501.407; e3 = 54.5919;
2356 a4 = -2982.44; b4 = 986.009;
2357 a5 = 6948.99; b5 = -2188.74;
2362 s0 = 0.614403; s1 = 0.635161; s2 = 2.30794;
2363 s3 = 3.08198; s4 = 3.12825; s5 = 3.17488;
2364 a1 = -54171.5; b1 = 88169.3;
2365 a2 = 454.638; b2 = -3.07152; c2 = -48.7086;
2366 d2 = 81.9702; e2 = -24.0564;
2367 a3 = -162.421; b3 = 308.977; c3 = -27.7887;
2368 d3 = -48.5957; e3 = 10.6168;
2369 a4 = -2650.29; b4 = 879.776;
2370 a5 = 6936.99; b5 = -2184.97;
2375 s0 = 0.81364; s1 = 0.861709; s2 = 1.92621;
2376 s3 = 3.08198; s4 = 3.12825; s5 = 3.17488;
2377 a1 = -84888.9; b1 = 104332;
2378 a2 = 2698.15; b2 = -3.08302; c2 = 1936.11;
2379 d2 = -1254.59; e2 = 201.291;
2380 a3 = 7171.65; b3 = -6387.9; c3 = 3056.27;
2381 d3 = -888.63; e3 = 108.632;
2382 a4 = -5607.48; b4 = 1917.27;
2383 a5 = 26573; b5 = -8369.76;
2392 return a2*pow(s,b2) + c2*pow2(s) + d2*pow3(s) + e2*pow4(s);
2394 return a3 + b3*s + c3*pow2(s) + d3*pow3(s) + e3*pow4(s);
2422 void HMETau2FivePions::initConstants() {
2425 if (abs(pID[2]) == 211 && abs(pID[3]) == 211 && abs(pID[4]) == 211 &&
2426 abs(pID[5]) == 211 && abs(pID[6]) == 211)
2427 DECAYWEIGHTMAX = 4e4;
2429 else if (abs(pID[2]) == 111 && abs(pID[3]) == 111 && abs(pID[4]) == 211 &&
2430 abs(pID[5]) == 211 && abs(pID[6]) == 211)
2431 DECAYWEIGHTMAX = 1e7;
2433 else if (abs(pID[2]) == 111 && abs(pID[3]) == 111 && abs(pID[4]) == 111 &&
2434 abs(pID[5]) == 111 && abs(pID[6]) == 211)
2435 DECAYWEIGHTMAX = 1e5;
2438 a1M = 1.260; a1G = 0.400;
2439 rhoM = 0.776; rhoG = 0.150;
2440 omegaM = 0.782; omegaG = 0.0085; omegaW = 11.5;
2441 sigmaM = 0.800; sigmaG = 0.600; sigmaW = 1;
2449 void HMETau2FivePions::initHadronicCurrent(vector<HelicityParticle>& p) {
2453 Wave4 q(p[2].p() + p[3].p() + p[4].p() + p[5].p() + p[6].p());
2454 Wave4 q2(p[2].p()), q3(p[3].p()), q4(p[4].p()), q5(p[5].p()), q6(p[6].p());
2456 if (abs(pID[2]) == 211 && abs(pID[3]) == 211 && abs(pID[4]) == 211 &&
2457 abs(pID[5]) == 211 && abs(pID[6]) == 211)
2458 u2.push_back(Jb(q, q2, q3, q5, q6, q4) + Jb(q, q4, q3, q5, q6, q2)
2459 + Jb(q, q2, q4, q5, q6, q3) + Jb(q, q2, q3, q6, q5, q4)
2460 + Jb(q, q4, q3, q6, q5, q2) + Jb(q, q2, q4, q6, q5, q3));
2462 else if (abs(pID[2]) == 111 && abs(pID[3]) == 111 && abs(pID[4]) == 211 &&
2463 abs(pID[5]) == 211 && abs(pID[6]) == 211)
2464 u2.push_back(Ja(q, q6, q4, q2, q5, q3) + Ja(q, q6, q5, q2, q4, q3)
2465 + Ja(q, q6, q4, q3, q5, q2) + Ja(q, q6, q5, q3, q4, q2)
2466 + Jb(q, q4, q5, q6, q2, q3) + Jb(q, q2, q3, q4, q6, q5)
2467 + Jb(q, q2, q3, q5, q6, q4));
2469 else if (abs(pID[2]) == 111 && abs(pID[3]) == 111 && abs(pID[4]) == 111 &&
2470 abs(pID[5]) == 111 && abs(pID[6]) == 211)
2471 u2.push_back(Jb(q, q2, q3, q6, q4, q5) + Jb(q, q5, q3, q6, q4, q2)
2472 + Jb(q, q3, q4, q6, q2, q5) + Jb(q, q2, q4, q6, q3, q5)
2473 + Jb(q, q2, q5, q6, q4, q3) + Jb(q, q4, q5, q6, q2, q3));
2483 Wave4 HMETau2FivePions::Ja(Wave4 &q, Wave4 &q1, Wave4 &q2,
2484 Wave4 &q3, Wave4 &q4, Wave4 &q5) {
2486 Wave4 j = epsilon(q1, q2, q3);
2487 return omegaW * (breitWigner(m2(q), a1M, a1G)
2488 * breitWigner(m2(q1 + q2 + q3), omegaM, omegaG)
2489 * breitWigner(m2(q4 + q5), rhoM, rhoG)
2490 * epsilon(q4 - q5, j, q)
2491 * (breitWigner(m2(q2 + q3), rhoM, rhoG)
2492 + breitWigner(m2(q1 + q3), rhoM, rhoG)
2493 + breitWigner(m2(q1 + q2), rhoM, rhoG)));
2501 Wave4 HMETau2FivePions::Jb(Wave4 &q, Wave4 &q1, Wave4 &q2,
2502 Wave4 &q3, Wave4 &q4, Wave4 &q5) {
2505 Wave4 a1Q = q1 + q2 + q3;
2506 double a1S = m2(a1Q);
2507 Wave4 j = (m2(q2, q1 - q3) / a1S * a1Q - q1 + q3)
2508 * breitWigner(m2(q1 + q3), rhoM, rhoG)
2509 + (m2(q1, q2 - q3) / a1S * a1Q - q2 + q3)
2510 * breitWigner(m2(q2 + q3), rhoM, rhoG);
2511 j = (j * gamma[4] * q / s) * q - j;
2512 return sigmaW * (breitWigner(s, a1M, a1G) * breitWigner(a1S, a1M, a1G)
2513 * breitWigner(m2(q4 + q5), sigmaM, sigmaG) * j);
2517 complex HMETau2FivePions::breitWigner(
double s,
double M,
double G) {
2519 return M * M / (M * M - s - complex(0, 1) * M * G);