File indexing completed on 2025-01-18 10:06:24
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef Pythia8_HelicityMatrixElements_H
0009 #define Pythia8_HelicityMatrixElements_H
0010
0011 #include "Pythia8/Basics.h"
0012 #include "Pythia8/Event.h"
0013 #include "Pythia8/HelicityBasics.h"
0014 #include "Pythia8/PythiaComplex.h"
0015 #include "Pythia8/PythiaStdlib.h"
0016 #include "Pythia8/StandardModel.h"
0017
0018 namespace Pythia8 {
0019
0020
0021
0022
0023
0024 class HelicityMatrixElement {
0025
0026 public:
0027
0028
0029 HelicityMatrixElement() : DECAYWEIGHTMAX(), particleDataPtr(),
0030 coupSMPtr(), settingsPtr() {};
0031 virtual ~HelicityMatrixElement() {};
0032
0033
0034 virtual void initPointers(ParticleData*, CoupSM* , Settings* = 0);
0035
0036
0037 virtual HelicityMatrixElement* initChannel(vector<HelicityParticle>&);
0038
0039
0040 virtual double decayWeight(vector<HelicityParticle>&);
0041
0042
0043 virtual double decayWeightMax(vector<HelicityParticle>&)
0044 {return DECAYWEIGHTMAX;}
0045
0046
0047 virtual complex calculateME(vector<int>){return complex(0,0);}
0048
0049
0050 virtual void calculateD(vector<HelicityParticle>&);
0051
0052
0053 virtual void calculateRho(unsigned int, vector<HelicityParticle>&);
0054
0055
0056 void setFermionLine(int, HelicityParticle&, HelicityParticle&);
0057
0058
0059 virtual complex breitWigner(double s, double M, double G);
0060 virtual complex sBreitWigner(double m0, double m1, double s,
0061 double M, double G);
0062 virtual complex pBreitWigner(double m0, double m1, double s,
0063 double M, double G);
0064 virtual complex dBreitWigner(double m0, double m1, double s,
0065 double M, double G);
0066
0067 protected:
0068
0069
0070 double DECAYWEIGHTMAX;
0071
0072
0073 vector< GammaMatrix > gamma;
0074
0075
0076 vector< int > pMap;
0077
0078
0079 vector< int > pID;
0080
0081
0082 vector< double > pM;
0083
0084
0085 vector< vector< Wave4 > > u;
0086
0087
0088 virtual void initConstants() {};
0089
0090
0091 virtual void initWaves(vector<HelicityParticle>&) {};
0092
0093
0094 ParticleData* particleDataPtr;
0095
0096
0097 CoupSM* coupSMPtr;
0098
0099
0100 Settings* settingsPtr;
0101
0102 private:
0103
0104
0105 void calculateRho(unsigned int, vector<HelicityParticle>&,
0106 vector<int>&, vector<int>&, unsigned int);
0107
0108
0109 void calculateD(vector<HelicityParticle>&, vector<int>&, vector<int>&,
0110 unsigned int);
0111
0112
0113 void decayWeight(vector<HelicityParticle>&, vector<int>&, vector<int>&,
0114 complex&, unsigned int);
0115
0116
0117 complex calculateProductD(unsigned int, unsigned int,
0118 vector<HelicityParticle>&, vector<int>&, vector<int>&);
0119
0120
0121 complex calculateProductD(vector<HelicityParticle>&,
0122 vector<int>&, vector<int>&);
0123
0124 };
0125
0126
0127
0128
0129
0130
0131 class HMETwoFermions2W2TwoFermions : public HelicityMatrixElement {
0132
0133 public:
0134
0135 HMETwoFermions2W2TwoFermions() : p0CA(), p2CA(), p0CV(), p2CV() {}
0136
0137 void initConstants();
0138
0139 void initWaves(vector<HelicityParticle>&);
0140
0141 complex calculateME(vector<int>);
0142
0143 private:
0144
0145
0146 double p0CA, p2CA, p0CV, p2CV;
0147
0148 };
0149
0150
0151
0152
0153
0154
0155 class HMETwoFermions2GammaZ2TwoFermions : public HelicityMatrixElement {
0156
0157 public:
0158
0159 HMETwoFermions2GammaZ2TwoFermions() : p0CAZ(), p2CAZ(), p0CVZ(), p2CVZ(),
0160 p0CAZp(), p2CAZp(), p0CVZp(), p2CVZp(), cos2W(), sin2W(), zG(), zM(),
0161 zpG(), zpM(), s(), p0Q(), p2Q(), sMin(), zaxis(), includeGamma(),
0162 includeZ(), includeZp() {}
0163
0164 void initConstants();
0165
0166 void initWaves(vector<HelicityParticle>&);
0167
0168 complex calculateME(vector<int>);
0169
0170 private:
0171
0172
0173 complex calculateGammaME(vector<int>);
0174
0175
0176 complex calculateZME(vector<int>, double, double, double, double,
0177 double, double);
0178
0179
0180 complex calculateZMEMasslessFermions(vector<int>, double, double, double,
0181 double, double, double);
0182
0183
0184 double zpCoupling(int id, string type);
0185
0186
0187 double p0CAZ, p2CAZ, p0CVZ, p2CVZ, p0CAZp, p2CAZp, p0CVZp, p2CVZp;
0188
0189
0190 double cos2W, sin2W, zG, zM, zpG, zpM, s;
0191
0192
0193 double p0Q, p2Q;
0194
0195
0196 double sMin;
0197
0198
0199 bool zaxis, includeGamma, includeZ, includeZp;
0200
0201 };
0202
0203
0204
0205
0206
0207
0208 class HMETwoGammas2TwoFermions : public HelicityMatrixElement {
0209
0210 public:
0211
0212 void initWaves(vector<HelicityParticle>&);
0213
0214 complex calculateME(vector<int>);
0215
0216 private:
0217
0218 double tm, um, m;
0219 Vec4 q0, q1;
0220
0221 };
0222
0223
0224
0225
0226
0227 class HMEX2TwoFermions : public HelicityMatrixElement {
0228
0229 public:
0230
0231 void initWaves(vector<HelicityParticle>&);
0232
0233 };
0234
0235
0236
0237
0238
0239 class HMEW2TwoFermions : public HMEX2TwoFermions {
0240
0241 public:
0242
0243 HMEW2TwoFermions() : p2CA(), p2CV() {}
0244
0245 void initConstants();
0246
0247 complex calculateME(vector<int>);
0248
0249 private:
0250
0251
0252 double p2CA, p2CV;
0253
0254 };
0255
0256
0257
0258
0259
0260 class HMEGamma2TwoFermions : public HMEX2TwoFermions {
0261
0262 public:
0263
0264 complex calculateME(vector<int>);
0265
0266 };
0267
0268
0269
0270
0271
0272 class HMEZ2TwoFermions : public HMEX2TwoFermions {
0273
0274 public:
0275
0276 HMEZ2TwoFermions() : p2CA(), p2CV() {}
0277
0278 void initConstants();
0279
0280 complex calculateME(vector<int>);
0281
0282 private:
0283
0284
0285 double zpCoupling(int id, string type);
0286
0287
0288 double p2CA, p2CV;
0289
0290 };
0291
0292
0293
0294
0295
0296
0297
0298
0299
0300 class HMEHiggs2TwoFermions : public HelicityMatrixElement {
0301
0302 public:
0303
0304 void initConstants();
0305
0306 void initWaves(vector<HelicityParticle>&);
0307
0308 complex calculateME(vector<int>);
0309
0310 private:
0311
0312
0313 complex p2CA, p2CV;
0314
0315 };
0316
0317
0318
0319
0320
0321 class HMETauDecay : public HelicityMatrixElement {
0322
0323 public:
0324
0325 virtual void initWaves(vector<HelicityParticle>&);
0326
0327 virtual complex calculateME(vector<int>);
0328
0329 virtual double decayWeightMax(vector<HelicityParticle>&);
0330
0331 protected:
0332
0333 virtual void initHadronicCurrent(vector<HelicityParticle>&) {};
0334
0335 virtual void calculateResonanceWeights(vector<double>&, vector<double>&,
0336 vector<complex>&);
0337
0338 };
0339
0340
0341
0342
0343
0344 class HMETau2Meson : public HMETauDecay {
0345
0346 public:
0347
0348 void initConstants();
0349
0350 void initHadronicCurrent(vector<HelicityParticle>&);
0351
0352 };
0353
0354
0355
0356
0357
0358 class HMETau2TwoLeptons : public HMETauDecay {
0359
0360 public:
0361
0362 void initConstants();
0363
0364 void initWaves(vector<HelicityParticle>&);
0365
0366 complex calculateME(vector<int>);
0367
0368 };
0369
0370
0371
0372
0373
0374
0375 class HMETau2TwoMesonsViaVector : public HMETauDecay {
0376
0377 public:
0378
0379 void initConstants();
0380
0381 void initHadronicCurrent(vector<HelicityParticle>&);
0382
0383 private:
0384
0385
0386 vector<double> vecM, vecG, vecP, vecA;
0387 vector<complex> vecW;
0388
0389 };
0390
0391
0392
0393
0394
0395
0396 class HMETau2TwoMesonsViaVectorScalar : public HMETauDecay {
0397
0398 public:
0399
0400 HMETau2TwoMesonsViaVectorScalar() : scaC(), vecC() {}
0401
0402 void initConstants();
0403
0404 void initHadronicCurrent(vector<HelicityParticle>&);
0405
0406 private:
0407
0408
0409 double scaC, vecC;
0410
0411
0412 vector<double> scaM, scaG, scaP, scaA, vecM, vecG, vecP, vecA;
0413 vector<complex> scaW, vecW;
0414
0415 };
0416
0417
0418
0419
0420
0421 class HMETau2ThreeMesons : public HMETauDecay {
0422
0423 public:
0424
0425 HMETau2ThreeMesons() = default;
0426
0427 void initConstants();
0428
0429 void initHadronicCurrent(vector<HelicityParticle>&);
0430
0431 protected:
0432
0433
0434 enum Mode{Pi0Pi0Pim, PimPimPip, Pi0PimK0b, PimPipKm, Pi0PimEta, PimKmKp,
0435 Pi0K0Km, KlPimKs, Pi0Pi0Km, KlKlPim, PimKsKs, PimK0bK0, Uknown};
0436 Mode mode{};
0437
0438
0439 virtual void initMode();
0440 virtual void initResonances() {;}
0441
0442
0443 virtual void initMomenta(vector<HelicityParticle>&);
0444
0445
0446 double s1{}, s2{}, s3{}, s4{};
0447 Wave4 q{}, q2{}, q3{}, q4{};
0448
0449
0450 complex a1BW{};
0451
0452
0453 virtual complex F1() {return complex(0, 0);}
0454 virtual complex F2() {return complex(0, 0);}
0455 virtual complex F3() {return complex(0, 0);}
0456 virtual complex F4() {return complex(0, 0);}
0457
0458
0459 virtual double a1PhaseSpace(double);
0460 virtual complex a1BreitWigner(double);
0461
0462
0463 complex T(double m0, double m1, double s,
0464 vector<double>& M, vector<double>& G, vector<double>& W);
0465 complex T(double s, vector<double>& M, vector<double>& G, vector<double>& W);
0466
0467 };
0468
0469
0470
0471
0472
0473 class HMETau2ThreePions : public HMETau2ThreeMesons {
0474
0475 public:
0476
0477 HMETau2ThreePions() : f0M(), f0G(), f0P(), f0A(), f2M(), f2G(), f2P(),
0478 f2A(), sigM(), sigG(), sigP(), sigA() {}
0479
0480 private:
0481
0482 void initResonances();
0483
0484
0485 vector<double> rhoM, rhoG, rhoPp, rhoAp, rhoPd, rhoAd;
0486 double f0M, f0G, f0P, f0A, f2M, f2G, f2P, f2A;
0487 double sigM, sigG, sigP, sigA;
0488 vector<complex> rhoWp, rhoWd;
0489 complex f0W, f2W, sigW;
0490
0491
0492 complex F1();
0493 complex F2();
0494 complex F3();
0495
0496
0497 double a1PhaseSpace(double);
0498 complex a1BreitWigner(double);
0499
0500 };
0501
0502
0503
0504
0505
0506 class HMETau2ThreeMesonsWithKaons : public HMETau2ThreeMesons {
0507
0508 public:
0509
0510 HMETau2ThreeMesonsWithKaons() : kM(), piM(), piW() {}
0511
0512 private:
0513
0514 void initResonances();
0515
0516
0517 vector<double> rhoMa, rhoGa, rhoWa, rhoMv, rhoGv, rhoWv;
0518 vector<double> kstarMa, kstarGa, kstarWa, kstarMv, kstarGv, kstarWv;
0519 vector<double> k1Ma, k1Ga, k1Wa, k1Mb, k1Gb, k1Wb;
0520 vector<double> omegaM, omegaG, omegaW;
0521 double kM, piM, piW;
0522
0523
0524 complex F1();
0525 complex F2();
0526 complex F4();
0527
0528 };
0529
0530
0531
0532
0533
0534 class HMETau2ThreeMesonsGeneric : public HMETau2ThreeMesons {
0535
0536 public:
0537
0538 HMETau2ThreeMesonsGeneric() : kM(), piM(), piW() {}
0539
0540 private:
0541
0542 void initResonances();
0543
0544
0545 vector<double> rhoMa, rhoGa, rhoWa, rhoMv, rhoGv, rhoWv;
0546 vector<double> kstarM, kstarG, kstarW, k1M, k1G, k1W;
0547 double kM, piM, piW;
0548
0549
0550 complex F1();
0551 complex F2();
0552 complex F4();
0553
0554 };
0555
0556
0557
0558
0559
0560 class HMETau2TwoPionsGamma : public HMETauDecay {
0561
0562 public:
0563
0564 HMETau2TwoPionsGamma() : piM() {}
0565
0566 void initConstants();
0567
0568 void initWaves(vector<HelicityParticle>&);
0569
0570 complex calculateME(vector<int>);
0571
0572 protected:
0573
0574
0575 vector<double> rhoM, rhoG, rhoW, omegaM, omegaG, omegaW;
0576 double piM;
0577
0578
0579 complex F(double s, vector<double> M, vector<double> G, vector<double> W);
0580
0581 };
0582
0583
0584
0585
0586
0587 class HMETau2FourPions : public HMETauDecay {
0588
0589 public:
0590
0591 HMETau2FourPions() : a1M(), a1G(), rhoM(), rhoG(), sigM(), sigG(), omeM(),
0592 omeG(), picM(), pinM(), sigA(), sigP(), omeA(), omeP(), lambda2() {}
0593
0594 void initConstants();
0595
0596 void initHadronicCurrent(vector<HelicityParticle>& p);
0597
0598 private:
0599
0600
0601 double G(int i, double s);
0602
0603
0604 Wave4 t1(Wave4&, Wave4&, Wave4&, Wave4&, Wave4&);
0605 Wave4 t2(Wave4&, Wave4&, Wave4&, Wave4&, Wave4&);
0606 Wave4 t3(Wave4&, Wave4&, Wave4&, Wave4&, Wave4&);
0607
0608
0609 complex a1D(double s);
0610 complex rhoD(double s);
0611 complex sigD(double s);
0612 complex omeD(double s);
0613
0614
0615 double a1FormFactor(double s);
0616 double rhoFormFactor1(double s);
0617 double rhoFormFactor2(double s);
0618 double omeFormFactor(double s);
0619
0620
0621 double a1M, a1G, rhoM, rhoG, sigM, sigG, omeM, omeG;
0622
0623
0624 double picM, pinM;
0625
0626
0627 double sigA, sigP, omeA, omeP;
0628 complex sigW, omeW;
0629
0630
0631 double lambda2;
0632
0633 };
0634
0635
0636
0637
0638
0639 class HMETau2FivePions : public HMETauDecay {
0640
0641 public:
0642
0643 HMETau2FivePions() : a1M(), a1G(), rhoM(), rhoG(), omegaM(), omegaG(),
0644 omegaW(), sigmaM(), sigmaG(), sigmaW() {}
0645
0646 void initConstants();
0647
0648 void initHadronicCurrent(vector<HelicityParticle>&);
0649
0650 private:
0651
0652
0653 Wave4 Ja(Wave4 &q, Wave4 &q1, Wave4 &q2, Wave4 &q3, Wave4 &q4, Wave4 &q5);
0654 Wave4 Jb(Wave4 &q, Wave4 &q1, Wave4 &q2, Wave4 &q3, Wave4 &q4, Wave4 &q5);
0655
0656
0657 complex breitWigner(double s, double M, double G);
0658
0659
0660 double a1M, a1G, rhoM, rhoG, omegaM, omegaG, omegaW, sigmaM, sigmaG, sigmaW;
0661
0662 };
0663
0664
0665
0666
0667
0668 class HMETau2PhaseSpace : public HMETauDecay {
0669
0670 public:
0671
0672 void initWaves(vector<HelicityParticle>&) {};
0673
0674 complex calculateME(vector<int>) {return 1;}
0675
0676 void calculateD(vector<HelicityParticle>&) {};
0677
0678 void calculateRho(unsigned int, vector<HelicityParticle>&) {};
0679
0680 double decayWeight(vector<HelicityParticle>&) {return 1.0;}
0681
0682 double decayWeightMax(vector<HelicityParticle>&) {return 1.0;}
0683
0684 };
0685
0686
0687
0688 }
0689
0690 #endif