8 #ifndef Pythia8_HelicityMatrixElements_H
9 #define Pythia8_HelicityMatrixElements_H
11 #include "Pythia8/Basics.h"
12 #include "Pythia8/Event.h"
13 #include "Pythia8/HelicityBasics.h"
14 #include "Pythia8/PythiaComplex.h"
15 #include "Pythia8/PythiaStdlib.h"
16 #include "Pythia8/StandardModel.h"
24 class HelicityMatrixElement {
29 HelicityMatrixElement() : DECAYWEIGHTMAX(), particleDataPtr(),
30 coupSMPtr(), settingsPtr() {};
31 virtual ~HelicityMatrixElement() {};
34 virtual void initPointers(ParticleData*, CoupSM* , Settings* = 0);
37 virtual HelicityMatrixElement* initChannel(vector<HelicityParticle>&);
40 virtual double decayWeight(vector<HelicityParticle>&);
43 virtual double decayWeightMax(vector<HelicityParticle>&)
44 {
return DECAYWEIGHTMAX;}
47 virtual complex calculateME(vector<int>){
return complex(0,0);}
50 virtual void calculateD(vector<HelicityParticle>&);
53 virtual void calculateRho(
unsigned int, vector<HelicityParticle>&);
56 void setFermionLine(
int, HelicityParticle&, HelicityParticle&);
59 virtual complex breitWigner(
double s,
double M,
double G);
60 virtual complex sBreitWigner(
double m0,
double m1,
double s,
62 virtual complex pBreitWigner(
double m0,
double m1,
double s,
64 virtual complex dBreitWigner(
double m0,
double m1,
double s,
70 double DECAYWEIGHTMAX;
73 vector< GammaMatrix > gamma;
85 vector< vector< Wave4 > > u;
88 virtual void initConstants() {};
91 virtual void initWaves(vector<HelicityParticle>&) {};
94 ParticleData* particleDataPtr;
100 Settings* settingsPtr;
105 void calculateRho(
unsigned int, vector<HelicityParticle>&,
106 vector<int>&, vector<int>&,
unsigned int);
109 void calculateD(vector<HelicityParticle>&, vector<int>&, vector<int>&,
113 void decayWeight(vector<HelicityParticle>&, vector<int>&, vector<int>&,
114 complex&,
unsigned int);
117 complex calculateProductD(
unsigned int,
unsigned int,
118 vector<HelicityParticle>&, vector<int>&, vector<int>&);
121 complex calculateProductD(vector<HelicityParticle>&,
122 vector<int>&, vector<int>&);
131 class HMETwoFermions2W2TwoFermions :
public HelicityMatrixElement {
135 HMETwoFermions2W2TwoFermions() : p0CA(), p2CA(), p0CV(), p2CV() {}
137 void initConstants();
139 void initWaves(vector<HelicityParticle>&);
141 complex calculateME(vector<int>);
146 double p0CA, p2CA, p0CV, p2CV;
155 class HMETwoFermions2GammaZ2TwoFermions :
public HelicityMatrixElement {
159 HMETwoFermions2GammaZ2TwoFermions() : p0CAZ(), p2CAZ(), p0CVZ(), p2CVZ(),
160 p0CAZp(), p2CAZp(), p0CVZp(), p2CVZp(), cos2W(), sin2W(), zG(), zM(),
161 zpG(), zpM(), s(), p0Q(), p2Q(), zaxis(), includeGamma(), includeZ(),
164 void initConstants();
166 void initWaves(vector<HelicityParticle>&);
168 complex calculateME(vector<int>);
173 complex calculateGammaME(vector<int>);
176 complex calculateZME(vector<int>,
double,
double,
double,
double,
180 double zpCoupling(
int id,
string type);
183 double p0CAZ, p2CAZ, p0CVZ, p2CVZ, p0CAZp, p2CAZp, p0CVZp, p2CVZp;
186 double cos2W, sin2W, zG, zM, zpG, zpM, s;
192 bool zaxis, includeGamma, includeZ, includeZp;
200 class HMEX2TwoFermions :
public HelicityMatrixElement {
204 void initWaves(vector<HelicityParticle>&);
212 class HMEW2TwoFermions :
public HMEX2TwoFermions {
216 HMEW2TwoFermions() : p2CA(), p2CV() {}
218 void initConstants();
220 complex calculateME(vector<int>);
233 class HMEGamma2TwoFermions :
public HMEX2TwoFermions {
237 complex calculateME(vector<int>);
245 class HMEZ2TwoFermions :
public HMEX2TwoFermions {
249 HMEZ2TwoFermions() : p2CA(), p2CV() {}
251 void initConstants();
253 complex calculateME(vector<int>);
258 double zpCoupling(
int id,
string type);
273 class HMEHiggs2TwoFermions :
public HelicityMatrixElement {
277 void initConstants();
279 void initWaves(vector<HelicityParticle>&);
281 complex calculateME(vector<int>);
294 class HMETauDecay :
public HelicityMatrixElement {
298 virtual void initWaves(vector<HelicityParticle>&);
300 virtual complex calculateME(vector<int>);
302 virtual double decayWeightMax(vector<HelicityParticle>&);
306 virtual void initHadronicCurrent(vector<HelicityParticle>&) {};
308 virtual void calculateResonanceWeights(vector<double>&, vector<double>&,
317 class HMETau2Meson :
public HMETauDecay {
321 void initConstants();
323 void initHadronicCurrent(vector<HelicityParticle>&);
331 class HMETau2TwoLeptons :
public HMETauDecay {
335 void initConstants();
337 void initWaves(vector<HelicityParticle>&);
339 complex calculateME(vector<int>);
348 class HMETau2TwoMesonsViaVector :
public HMETauDecay {
352 void initConstants();
354 void initHadronicCurrent(vector<HelicityParticle>&);
359 vector<double> vecM, vecG, vecP, vecA;
360 vector<complex> vecW;
369 class HMETau2TwoMesonsViaVectorScalar :
public HMETauDecay {
373 HMETau2TwoMesonsViaVectorScalar() : scaC(), vecC() {}
375 void initConstants();
377 void initHadronicCurrent(vector<HelicityParticle>&);
385 vector<double> scaM, scaG, scaP, scaA, vecM, vecG, vecP, vecA;
386 vector<complex> scaW, vecW;
394 class HMETau2ThreeMesons :
public HMETauDecay {
398 HMETau2ThreeMesons() =
default;
400 void initConstants();
402 void initHadronicCurrent(vector<HelicityParticle>&);
407 enum Mode{Pi0Pi0Pim, PimPimPip, Pi0PimK0b, PimPipKm, Pi0PimEta, PimKmKp,
408 Pi0K0Km, KlPimKs, Pi0Pi0Km, KlKlPim, PimKsKs, PimK0bK0, Uknown};
412 virtual void initMode();
413 virtual void initResonances() {;}
416 virtual void initMomenta(vector<HelicityParticle>&);
419 double s1{}, s2{}, s3{}, s4{};
420 Wave4 q{}, q2{}, q3{}, q4{};
426 virtual complex F1() {
return complex(0, 0);}
427 virtual complex F2() {
return complex(0, 0);}
428 virtual complex F3() {
return complex(0, 0);}
429 virtual complex F4() {
return complex(0, 0);}
432 virtual double a1PhaseSpace(
double);
433 virtual complex a1BreitWigner(
double);
436 complex T(
double m0,
double m1,
double s,
437 vector<double>& M, vector<double>& G, vector<double>& W);
438 complex T(
double s, vector<double>& M, vector<double>& G, vector<double>& W);
446 class HMETau2ThreePions :
public HMETau2ThreeMesons {
450 HMETau2ThreePions() : f0M(), f0G(), f0P(), f0A(), f2M(), f2G(), f2P(),
451 f2A(), sigM(), sigG(), sigP(), sigA() {}
455 void initResonances();
458 vector<double> rhoM, rhoG, rhoPp, rhoAp, rhoPd, rhoAd;
459 double f0M, f0G, f0P, f0A, f2M, f2G, f2P, f2A;
460 double sigM, sigG, sigP, sigA;
461 vector<complex> rhoWp, rhoWd;
462 complex f0W, f2W, sigW;
470 double a1PhaseSpace(
double);
471 complex a1BreitWigner(
double);
479 class HMETau2ThreeMesonsWithKaons :
public HMETau2ThreeMesons {
483 HMETau2ThreeMesonsWithKaons() : kM(), piM(), piW() {}
487 void initResonances();
490 vector<double> rhoMa, rhoGa, rhoWa, rhoMv, rhoGv, rhoWv;
491 vector<double> kstarMa, kstarGa, kstarWa, kstarMv, kstarGv, kstarWv;
492 vector<double> k1Ma, k1Ga, k1Wa, k1Mb, k1Gb, k1Wb;
493 vector<double> omegaM, omegaG, omegaW;
507 class HMETau2ThreeMesonsGeneric :
public HMETau2ThreeMesons {
511 HMETau2ThreeMesonsGeneric() : kM(), piM(), piW() {}
515 void initResonances();
518 vector<double> rhoMa, rhoGa, rhoWa, rhoMv, rhoGv, rhoWv;
519 vector<double> kstarM, kstarG, kstarW, k1M, k1G, k1W;
533 class HMETau2TwoPionsGamma :
public HMETauDecay {
537 HMETau2TwoPionsGamma() : piM() {}
539 void initConstants();
541 void initWaves(vector<HelicityParticle>&);
543 complex calculateME(vector<int>);
548 vector<double> rhoM, rhoG, rhoW, omegaM, omegaG, omegaW;
552 complex F(
double s, vector<double> M, vector<double> G, vector<double> W);
560 class HMETau2FourPions :
public HMETauDecay {
564 HMETau2FourPions() : a1M(), a1G(), rhoM(), rhoG(), sigM(), sigG(), omeM(),
565 omeG(), picM(), pinM(), sigA(), sigP(), omeA(), omeP(), lambda2() {}
567 void initConstants();
569 void initHadronicCurrent(vector<HelicityParticle>& p);
574 double G(
int i,
double s);
577 Wave4 t1(Wave4&, Wave4&, Wave4&, Wave4&, Wave4&);
578 Wave4 t2(Wave4&, Wave4&, Wave4&, Wave4&, Wave4&);
579 Wave4 t3(Wave4&, Wave4&, Wave4&, Wave4&, Wave4&);
582 complex a1D(
double s);
583 complex rhoD(
double s);
584 complex sigD(
double s);
585 complex omeD(
double s);
588 double a1FormFactor(
double s);
589 double rhoFormFactor1(
double s);
590 double rhoFormFactor2(
double s);
591 double omeFormFactor(
double s);
594 double a1M, a1G, rhoM, rhoG, sigM, sigG, omeM, omeG;
600 double sigA, sigP, omeA, omeP;
612 class HMETau2FivePions :
public HMETauDecay {
616 HMETau2FivePions() : a1M(), a1G(), rhoM(), rhoG(), omegaM(), omegaG(),
617 omegaW(), sigmaM(), sigmaG(), sigmaW() {}
619 void initConstants();
621 void initHadronicCurrent(vector<HelicityParticle>&);
626 Wave4 Ja(Wave4 &q, Wave4 &q1, Wave4 &q2, Wave4 &q3, Wave4 &q4, Wave4 &q5);
627 Wave4 Jb(Wave4 &q, Wave4 &q1, Wave4 &q2, Wave4 &q3, Wave4 &q4, Wave4 &q5);
630 complex breitWigner(
double s,
double M,
double G);
633 double a1M, a1G, rhoM, rhoG, omegaM, omegaG, omegaW, sigmaM, sigmaG, sigmaW;
641 class HMETau2PhaseSpace :
public HMETauDecay {
645 void initWaves(vector<HelicityParticle>&) {};
647 complex calculateME(vector<int>) {
return 1;}
649 void calculateD(vector<HelicityParticle>&) {};
651 void calculateRho(
unsigned int, vector<HelicityParticle>&) {};
653 double decayWeight(vector<HelicityParticle>&) {
return 1.0;}
655 double decayWeightMax(vector<HelicityParticle>&) {
return 1.0;}
663 #endif // end Pythia8_HelicityMatrixElements_H