Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-18 09:25:24

0001 // DireSplittingsEW.h is a part of the PYTHIA event generator.
0002 // Copyright (C) 2025 Stefan Prestel, Torbjorn Sjostrand.
0003 // PYTHIA is licenced under the GNU GPL v2 or later, see COPYING for details.
0004 // Please respect the MCnet Guidelines, see GUIDELINES for details.
0005 
0006 // Header file for the Dire electroweak splitings.
0007 
0008 #ifndef Pythia8_DireSplittingsEW_H
0009 #define Pythia8_DireSplittingsEW_H
0010 
0011 #define DIRE_SPLITTINGSEW_VERSION "2.002"
0012 
0013 #include "Pythia8/Basics.h"
0014 #include "Pythia8/BeamParticle.h"
0015 #include "Pythia8/ParticleData.h"
0016 #include "Pythia8/PythiaStdlib.h"
0017 #include "Pythia8/Settings.h"
0018 
0019 #include "Pythia8/DireSplittingsQCD.h"
0020 
0021 namespace Pythia8 {
0022 
0023 //==========================================================================
0024 
0025 class DireSplittingEW : public DireSplittingQCD {
0026 
0027 public:
0028 
0029   // Constructor and destructor.
0030   DireSplittingEW(string idIn, int softRS, Settings* settings,
0031     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0032     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0033     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0034       coupSM,info, direInfo) {init();}
0035   virtual ~DireSplittingEW() {}
0036 
0037   void init();
0038 
0039   // Z0 and W+- properties needed for gamma/Z0 mixing and weak showers.
0040   double mZ, gammaZ, thetaW, mW, gammaW, aem0, enhance;
0041   bool doQEDshowerByQ, doQEDshowerByL;
0042 
0043   AlphaEM     alphaEM;
0044 
0045   // Function to calculate the correct running coupling/2*Pi value, including
0046   // renormalisation scale variations + threshold matching.
0047   double aem2Pi ( double pT2);
0048 
0049   bool useFastFunctions() { return true; }
0050 
0051   virtual vector <int> radAndEmt(int idDaughter, int)
0052    { return createvector<int>(motherID(idDaughter))(sisterID(idDaughter)); }
0053   virtual int nEmissions()  { return 1; }
0054   virtual bool isPartial()  { return true; }
0055 
0056   virtual bool canUseForBranching() { return true; }
0057 
0058   virtual int couplingType (int, int) { return 2; }
0059   virtual double coupling (double = 0., double = 0., double = 0., double = -1.,
0060     pair<int,bool> = pair<int,bool>(), pair<int,bool> = pair<int,bool>()) {
0061     return (aem0 / (2.*M_PI));
0062   }
0063   virtual double couplingScale2 (double = 0., double = 0., double = 0.,
0064     pair<int,bool> = pair<int,bool>(), pair<int,bool> = pair<int,bool>()) {
0065     return -1.;
0066   }
0067 
0068 };
0069 
0070 //==========================================================================
0071 
0072 class Dire_fsr_ew_Q2QZ : public DireSplittingEW {
0073 
0074 public:
0075 
0076   Dire_fsr_ew_Q2QZ(string idIn, int softRS, Settings* settings,
0077     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0078     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0079     DireSplittingEW(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0080       coupSM, info, direInfo){}
0081 
0082   bool canRadiate ( const Event&, pair<int,int>,
0083     unordered_map<string,bool> = unordered_map<string,bool>(),
0084     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr);
0085   bool canRadiate ( const Event&, int, int,
0086     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr)
0087     {return false;}
0088 
0089   int kinMap ();
0090 
0091   // Return id of mother after splitting.
0092   int motherID(int idDaughter);
0093 
0094   // Return id of emission.
0095   int sisterID(int idDaughter);
0096 
0097   // Return id of recombined radiator (before splitting!)
0098   int radBefID(int idRadAfter, int idEmtAfter);
0099 
0100   // Return colours of recombined radiator (before splitting!)
0101   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0102     int colEmtAfter, int acolEmtAfter);
0103 
0104   double gaugeFactor ( int=0, int=0);
0105   double symmetryFactor ( int=0, int=0);
0106 
0107   // Pick z for new splitting.
0108   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0109 
0110   // New overestimates, z-integrated versions.
0111   double overestimateInt(double zMinAbs,double zMaxAbs,
0112     double pT2Old, double m2dip, int order = -1);
0113 
0114   // Return kernel for new splitting.
0115   double overestimateDiff(double z, double m2dip, int order = -1);
0116 
0117   // Functions to calculate the kernel from SplitInfo information.
0118   bool calc(const Event& state = Event(), int order = -1);
0119 
0120 };
0121 
0122 class Dire_fsr_ew_Q2ZQ : public DireSplittingEW {
0123 
0124 public:
0125 
0126   Dire_fsr_ew_Q2ZQ(string idIn, int softRS, Settings* settings,
0127     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0128     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0129     DireSplittingEW(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0130       coupSM, info, direInfo){}
0131 
0132   bool canRadiate ( const Event&, pair<int,int>,
0133     unordered_map<string,bool> = unordered_map<string,bool>(),
0134     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr);
0135   bool canRadiate ( const Event&, int, int,
0136     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr)
0137     {return false;}
0138 
0139   int kinMap ();
0140 
0141   // Return id of mother after splitting.
0142   int motherID(int idDaughter);
0143 
0144   // Return id of emission.
0145   int sisterID(int idDaughter);
0146 
0147   // Return id of recombined radiator (before splitting!)
0148   int radBefID(int idRadAfter, int idEmtAfter);
0149 
0150   // Return colours of recombined radiator (before splitting!)
0151   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0152     int colEmtAfter, int acolEmtAfter);
0153 
0154   double gaugeFactor ( int=0, int=0);
0155   double symmetryFactor ( int=0, int=0);
0156 
0157   // Pick z for new splitting.
0158   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0159 
0160   // New overestimates, z-integrated versions.
0161   double overestimateInt(double zMinAbs,double zMaxAbs,
0162     double pT2Old, double m2dip, int order = -1);
0163 
0164   // Return kernel for new splitting.
0165   double overestimateDiff(double z, double m2dip, int order = -1);
0166 
0167   // Functions to calculate the kernel from SplitInfo information.
0168   bool calc(const Event& state = Event(), int order = -1);
0169 
0170 };
0171 
0172 class Dire_fsr_ew_Z2QQ1 : public DireSplittingEW {
0173 
0174 public:
0175 
0176   Dire_fsr_ew_Z2QQ1(string idIn, int softRS, Settings* settings,
0177     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0178     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0179     DireSplittingEW(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0180       coupSM, info, direInfo){}
0181 
0182   bool canRadiate ( const Event&, pair<int,int>,
0183     unordered_map<string,bool> = unordered_map<string,bool>(),
0184     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr);
0185   bool canRadiate ( const Event&, int, int,
0186     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr)
0187     {return false;}
0188 
0189   int kinMap ();
0190 
0191   // Return id of mother after splitting.
0192   int motherID(int idDaughter);
0193 
0194   // Return id of emission.
0195   int sisterID(int idDaughter);
0196 
0197   // Return id of recombined radiator (before splitting!)
0198   int radBefID(int idRadAfter, int idEmtAfter);
0199 
0200   // Return colours of recombined radiator (before splitting!)
0201   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0202     int colEmtAfter, int acolEmtAfter);
0203 
0204   double gaugeFactor ( int=0, int=0);
0205   double symmetryFactor ( int=0, int=0);
0206 
0207   // Pick z for new splitting.
0208   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0209 
0210   // New overestimates, z-integrated versions.
0211   double overestimateInt(double zMinAbs,double zMaxAbs,
0212     double pT2Old, double m2dip, int order = -1);
0213 
0214   // Return kernel for new splitting.
0215   double overestimateDiff(double z, double m2dip, int order = -1);
0216 
0217   // Functions to calculate the kernel from SplitInfo information.
0218   bool calc(const Event& state = Event(), int order = -1);
0219 
0220 };
0221 
0222 class Dire_fsr_ew_Z2QQ2 : public DireSplittingEW {
0223 
0224 public:
0225 
0226   Dire_fsr_ew_Z2QQ2(string idIn, int softRS, Settings* settings,
0227     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0228     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0229     DireSplittingEW(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0230       coupSM, info, direInfo){}
0231 
0232   bool canRadiate ( const Event&, pair<int,int>,
0233     unordered_map<string,bool> = unordered_map<string,bool>(),
0234     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr);
0235   bool canRadiate ( const Event&, int, int,
0236     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr)
0237     {return false;}
0238 
0239   int kinMap ();
0240 
0241   // Return id of mother after splitting.
0242   int motherID(int idDaughter);
0243 
0244   // Return id of emission.
0245   int sisterID(int idDaughter);
0246 
0247   // Return id of recombined radiator (before splitting!)
0248   int radBefID(int idRadAfter, int idEmtAfter);
0249 
0250   // Return colours of recombined radiator (before splitting!)
0251   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0252     int colEmtAfter, int acolEmtAfter);
0253 
0254   double gaugeFactor ( int=0, int=0);
0255   double symmetryFactor ( int=0, int=0);
0256 
0257   // Pick z for new splitting.
0258   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0259 
0260   // New overestimates, z-integrated versions.
0261   double overestimateInt(double zMinAbs,double zMaxAbs,
0262     double pT2Old, double m2dip, int order = -1);
0263 
0264   // Return kernel for new splitting.
0265   double overestimateDiff(double z, double m2dip, int order = -1);
0266 
0267   // Functions to calculate the kernel from SplitInfo information.
0268   bool calc(const Event& state = Event(), int order = -1);
0269 
0270 };
0271 
0272 class Dire_fsr_ew_W2QQ1 : public DireSplittingEW {
0273 
0274 public:
0275 
0276   Dire_fsr_ew_W2QQ1(string idIn, int softRS, Settings* settings,
0277     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0278     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0279     DireSplittingEW(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0280       coupSM, info, direInfo){}
0281 
0282   bool canRadiate ( const Event&, pair<int,int>,
0283     unordered_map<string,bool> = unordered_map<string,bool>(),
0284     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr);
0285   bool canRadiate ( const Event&, int, int,
0286     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr)
0287     {return false;}
0288 
0289   int kinMap ();
0290 
0291   // Return id of mother after splitting.
0292   int motherID(int idDaughter);
0293 
0294   // Return id of emission.
0295   int sisterID(int idDaughter);
0296 
0297   // Return id of recombined radiator (before splitting!)
0298   int radBefID(int idRadAfter, int idEmtAfter);
0299 
0300   // Return colours of recombined radiator (before splitting!)
0301   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0302     int colEmtAfter, int acolEmtAfter);
0303 
0304   double gaugeFactor ( int=0, int=0);
0305   double symmetryFactor ( int=0, int=0);
0306 
0307   // Pick z for new splitting.
0308   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0309 
0310   // New overestimates, z-integrated versions.
0311   double overestimateInt(double zMinAbs,double zMaxAbs,
0312     double pT2Old, double m2dip, int order = -1);
0313 
0314   // Return kernel for new splitting.
0315   double overestimateDiff(double z, double m2dip, int order = -1);
0316 
0317   // Functions to calculate the kernel from SplitInfo information.
0318   bool calc(const Event& state = Event(), int order = -1);
0319 
0320 };
0321 
0322 class Dire_fsr_ew_W2QQ2 : public DireSplittingEW {
0323 
0324 public:
0325 
0326   Dire_fsr_ew_W2QQ2(string idIn, int softRS, Settings* settings,
0327     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0328     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0329     DireSplittingEW(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0330       coupSM, info, direInfo){}
0331 
0332   bool canRadiate ( const Event&, pair<int,int>,
0333     unordered_map<string,bool> = unordered_map<string,bool>(),
0334     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr);
0335   bool canRadiate ( const Event&, int, int,
0336     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr)
0337     {return false;}
0338 
0339   int kinMap ();
0340 
0341   // Return id of mother after splitting.
0342   int motherID(int idDaughter);
0343 
0344   // Return id of emission.
0345   int sisterID(int idDaughter);
0346 
0347   // Return id of recombined radiator (before splitting!)
0348   int radBefID(int idRadAfter, int idEmtAfter);
0349 
0350   // Return colours of recombined radiator (before splitting!)
0351   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0352     int colEmtAfter, int acolEmtAfter);
0353 
0354   double gaugeFactor ( int=0, int=0);
0355   double symmetryFactor ( int=0, int=0);
0356 
0357   // Pick z for new splitting.
0358   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0359 
0360   // New overestimates, z-integrated versions.
0361   double overestimateInt(double zMinAbs,double zMaxAbs,
0362     double pT2Old, double m2dip, int order = -1);
0363 
0364   // Return kernel for new splitting.
0365   double overestimateDiff(double z, double m2dip, int order = -1);
0366 
0367   // Functions to calculate the kernel from SplitInfo information.
0368   bool calc(const Event& state = Event(), int order = -1);
0369 
0370 };
0371 
0372 //==========================================================================
0373 
0374 class Dire_fsr_ew_H2WW : public DireSplittingEW {
0375 
0376 public:
0377 
0378   Dire_fsr_ew_H2WW(string idIn, int softRS, Settings* settings,
0379     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0380     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0381     DireSplittingEW(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0382       coupSM, info, direInfo){}
0383 
0384   bool canRadiate ( const Event&, pair<int,int>,
0385     unordered_map<string,bool> = unordered_map<string,bool>(),
0386     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr);
0387   bool canRadiate ( const Event&, int, int,
0388     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr)
0389     {return false;}
0390 
0391   int kinMap ();
0392 
0393   // Return id of mother after splitting.
0394   int motherID(int idDaughter);
0395 
0396   // Return id of emission.
0397   int sisterID(int idDaughter);
0398 
0399   // Return id of recombined radiator (before splitting!)
0400   int radBefID(int idRadAfter, int idEmtAfter);
0401 
0402   // Return colours of recombined radiator (before splitting!)
0403   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0404     int colEmtAfter, int acolEmtAfter);
0405 
0406   double gaugeFactor ( int=0, int=0);
0407   double symmetryFactor ( int=0, int=0);
0408 
0409   // Pick z for new splitting.
0410   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0411 
0412   // New overestimates, z-integrated versions.
0413   double overestimateInt(double zMinAbs,double zMaxAbs,
0414     double pT2Old, double m2dip, int order = -1);
0415 
0416   // Return kernel for new splitting.
0417   double overestimateDiff(double z, double m2dip, int order = -1);
0418 
0419   // Functions to calculate the kernel from SplitInfo information.
0420   bool calc(const Event& state = Event(), int order = -1);
0421 
0422 };
0423 
0424 //==========================================================================
0425 
0426 class Dire_fsr_ew_H2AA : public DireSplittingEW {
0427 
0428 public:
0429 
0430   Dire_fsr_ew_H2AA(string idIn, int softRS, Settings* settings,
0431     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0432     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0433     DireSplittingEW(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0434       coupSM, info, direInfo) {
0435     widthToAA = particleDataPtr->particleDataEntryPtr(25)->resWidthChan(
0436       particleDataPtr->m0(25), 22, 22);
0437     widthTot = settings->parm("MEM:WidthH");
0438   }
0439 
0440   bool canRadiate ( const Event&, pair<int,int>,
0441     unordered_map<string,bool> = unordered_map<string,bool>(),
0442     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr);
0443   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
0444     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr);
0445   bool isPartial()  { return false; }
0446 
0447   bool isSymmetric( const Particle* rad, const Particle* emt) {
0448    if (rad->id() == 22 && emt->id() == 22) return true;
0449    return false;
0450   }
0451 
0452   int couplingType (int, int);
0453   double coupling (double = 0., double = 0., double = 0., double = -1.,
0454   pair<int,bool> = pair<int,bool>(), pair<int,bool> = pair<int,bool>());
0455 
0456   int kinMap ();
0457 
0458   // Return id of mother after splitting.
0459   int motherID(int idDaughter);
0460 
0461   // Return id of emission.
0462   int sisterID(int idDaughter);
0463 
0464   // Return id of recombined radiator (before splitting!)
0465   int radBefID(int idRadAfter, int idEmtAfter);
0466 
0467   vector <int> recPositions( const Event& state, int iRad, int iEmt);
0468 
0469   // Return colours of recombined radiator (before splitting!)
0470   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0471     int colEmtAfter, int acolEmtAfter);
0472 
0473   double gaugeFactor ( int=0, int=0);
0474   double symmetryFactor ( int=0, int=0);
0475 
0476   // Pick z for new splitting.
0477   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0478 
0479   // New overestimates, z-integrated versions.
0480   double overestimateInt(double zMinAbs,double zMaxAbs,
0481     double pT2Old, double m2dip, int order = -1);
0482 
0483   // Return kernel for new splitting.
0484   double overestimateDiff(double z, double m2dip, int order = -1);
0485 
0486   // Functions to calculate the kernel from SplitInfo information.
0487   bool calc(const Event& state = Event(), int order = -1);
0488 
0489   double widthToAA, widthTot;
0490 
0491 };
0492 
0493 //==========================================================================
0494 
0495 class Dire_fsr_ew_H2GG : public DireSplittingEW {
0496 
0497 public:
0498 
0499   Dire_fsr_ew_H2GG(string idIn, int softRS, Settings* settings,
0500     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0501     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0502     DireSplittingEW(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0503       coupSM, info, direInfo) {
0504     widthToGG = particleDataPtr->particleDataEntryPtr(25)->resWidthChan(
0505       particleDataPtr->m0(25), 21, 21);
0506     widthTot = settings->parm("MEM:WidthH");
0507   }
0508 
0509   bool canRadiate ( const Event&, pair<int,int>,
0510     unordered_map<string,bool> = unordered_map<string,bool>(),
0511     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr);
0512   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
0513     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr);
0514   bool isPartial()  { return false; }
0515 
0516   bool isSymmetric( const Particle* rad, const Particle* emt) {
0517    if (rad->id() == 21 && emt->id() == 21) return true;
0518    return false;
0519   }
0520 
0521   int couplingType (int, int);
0522   double coupling (double = 0., double = 0., double = 0., double = -1.,
0523   pair<int,bool> = pair<int,bool>(), pair<int,bool> = pair<int,bool>());
0524 
0525   int kinMap ();
0526 
0527   // Return id of mother after splitting.
0528   int motherID(int idDaughter);
0529 
0530   // Return id of emission.
0531   int sisterID(int idDaughter);
0532 
0533   // Return id of recombined radiator (before splitting!)
0534   int radBefID(int idRadAfter, int idEmtAfter);
0535 
0536   vector <int> recPositions( const Event& state, int iRad, int iEmt);
0537 
0538   // Return colours of recombined radiator (before splitting!)
0539   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0540     int colEmtAfter, int acolEmtAfter);
0541 
0542   double gaugeFactor ( int=0, int=0);
0543   double symmetryFactor ( int=0, int=0);
0544 
0545   // Pick z for new splitting.
0546   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0547 
0548   // New overestimates, z-integrated versions.
0549   double overestimateInt(double zMinAbs,double zMaxAbs,
0550     double pT2Old, double m2dip, int order = -1);
0551 
0552   // Return kernel for new splitting.
0553   double overestimateDiff(double z, double m2dip, int order = -1);
0554 
0555   // Functions to calculate the kernel from SplitInfo information.
0556   bool calc(const Event& state = Event(), int order = -1);
0557 
0558   double widthToGG, widthTot;
0559 
0560 };
0561 
0562 //==========================================================================
0563 
0564 class Dire_fsr_ew_W2WA : public DireSplittingEW {
0565 
0566 public:
0567 
0568   Dire_fsr_ew_W2WA(string idIn, int softRS, Settings* settings,
0569     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0570     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0571     DireSplittingEW(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0572       coupSM, info, direInfo){}
0573 
0574   bool canRadiate ( const Event&, pair<int,int>,
0575     unordered_map<string,bool> = unordered_map<string,bool>(),
0576     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr);
0577   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
0578     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr);
0579 
0580   int kinMap ();
0581 
0582   // Return id of mother after splitting.
0583   int motherID(int idDaughter);
0584 
0585   // Return id of emission.
0586   int sisterID(int idDaughter);
0587 
0588   // Return id of recombined radiator (before splitting!)
0589   int radBefID(int idRadAfter, int idEmtAfter);
0590 
0591   vector <int> recPositions( const Event& state, int iRad, int iEmt);
0592 
0593   // Return colours of recombined radiator (before splitting!)
0594   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0595     int colEmtAfter, int acolEmtAfter);
0596 
0597   vector<pair<int,int> > radAndEmtCols(int iRad, int, Event state) {
0598     vector< pair<int,int> > ret;
0599     if (state[iRad].idAbs() != 24) return ret;
0600     ret = createvector<pair<int,int> >(make_pair(0, 0))(make_pair(0, 0));
0601     return ret;
0602   }
0603 
0604   double gaugeFactor ( int=0, int=0);
0605   double symmetryFactor ( int=0, int=0);
0606 
0607   // Pick z for new splitting.
0608   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0609 
0610   // New overestimates, z-integrated versions.
0611   double overestimateInt(double zMinAbs,double zMaxAbs,
0612     double pT2Old, double m2dip, int order = -1);
0613 
0614   // Return kernel for new splitting.
0615   double overestimateDiff(double z, double m2dip, int order = -1);
0616 
0617   // Functions to calculate the kernel from SplitInfo information.
0618   bool calc(const Event& state = Event(), int order = -1);
0619 
0620 };
0621 
0622 //==========================================================================
0623 
0624 class Dire_isr_ew_Q2QZ : public DireSplittingEW {
0625 
0626 public:
0627 
0628   Dire_isr_ew_Q2QZ(string idIn, int softRS, Settings* settings,
0629     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0630     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0631     DireSplittingEW(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0632       coupSM, info, direInfo){}
0633 
0634   bool canRadiate ( const Event&, pair<int,int>,
0635     unordered_map<string,bool> = unordered_map<string,bool>(),
0636     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr);
0637   bool canRadiate ( const Event&, int, int,
0638     Settings* = nullptr, PartonSystems* = nullptr, BeamParticle* = nullptr)
0639     {return false;}
0640 
0641   int kinMap ();
0642 
0643   // Return id of mother after splitting.
0644   int motherID(int idDaughter);
0645 
0646   // Return id of emission.
0647   int sisterID(int idDaughter);
0648 
0649   // Return id of recombined radiator (before splitting!)
0650   int radBefID(int idRadAfter, int idEmtAfter);
0651 
0652   // Return colours of recombined radiator (before splitting!)
0653   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0654     int colEmtAfter, int acolEmtAfter);
0655 
0656   double gaugeFactor ( int=0, int=0);
0657   double symmetryFactor ( int=0, int=0);
0658 
0659   // Pick z for new splitting.
0660   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0661 
0662   // New overestimates, z-integrated versions.
0663   double overestimateInt(double zMinAbs,double zMaxAbs,
0664     double pT2Old, double m2dip, int order = -1);
0665 
0666   // Return kernel for new splitting.
0667   double overestimateDiff(double z, double m2dip, int order = -1);
0668 
0669   // Functions to calculate the kernel from SplitInfo information.
0670   bool calc(const Event& state = Event(), int order = -1);
0671 
0672 };
0673 
0674 } // end namespace Pythia8
0675 
0676 #endif // Pythia8_DireSplittingLibrary_H