Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:06:21

0001 // DireSplittingsQCD.h is a part of the PYTHIA event generator.
0002 // Copyright (C) 2024 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 of QCD splittings for the Dire parton shower.
0007 
0008 #ifndef Pythia8_DireSplittingsQCD_H
0009 #define Pythia8_DireSplittingsQCD_H
0010 
0011 #define ZETA3 1.202056903159594
0012 #define DIRE_SPLITTINGSQCD_VERSION "2.002"
0013 
0014 #include "Pythia8/Basics.h"
0015 #include "Pythia8/BeamParticle.h"
0016 #include "Pythia8/ParticleData.h"
0017 #include "Pythia8/PythiaStdlib.h"
0018 #include "Pythia8/Settings.h"
0019 #include "Pythia8/StandardModel.h"
0020 
0021 #include "Pythia8/DireSplittings.h"
0022 
0023 namespace Pythia8 {
0024 
0025 //==========================================================================
0026 
0027 class DireSplittingQCD : public DireSplitting {
0028 
0029 public:
0030 
0031   // Constructor and destructor.
0032   DireSplittingQCD(string idIn, int softRS, Settings* settings,
0033     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0034     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0035   DireSplitting(idIn,
0036     softRS, settings, particleData, rndm, beamA, beamB, coupSM, info,
0037     direInfo)
0038     { init();
0039       asSchemeISR=settingsPtr->mode("DireSpace:alphasScheme");
0040       asSchemeFSR=settingsPtr->mode("DireTimes:alphasScheme"); }
0041   virtual ~DireSplittingQCD() {}
0042 
0043   void init();
0044 
0045   // VARIABLES
0046   double CA, TR, CF, pTmin, pT2minVariations;
0047   int NF_qcd_fsr, orderSave;
0048   bool usePDFalphas, doVariations, doCorrelations, doMECs;
0049   double alphaSorder, alphaS2pi;
0050 
0051   AlphaStrong alphaS;
0052 
0053   static const double SMALL_TEVOL;
0054 
0055   // AUXILIARY FUNCTIONS
0056   double getNF(double pT2);
0057   double GammaQCD2(double NF=5.);
0058   double GammaQCD3(double NF=5.);
0059   double betaQCD0(double NF=5.);
0060   double betaQCD1(double NF=5.);
0061   double betaQCD2(double NF=5.);
0062 
0063   // Function to calculate the correct running coupling/2*Pi value, including
0064   // renormalisation scale variations + threshold matching.
0065   double as2Pi(double pT2, int orderNow = -1, double renormMultFacNow = -1.);
0066 
0067   double softRescaleInt(int order);
0068   double softRescaleDiff(int order, double pT2, double renormMultFacNow = -1.);
0069   double beta0Endpoint(int order, double m2dip, double pT2, double z,
0070     double renormMultFacNow = -1.);
0071 
0072   double polevl(double x,double* coef,int N );
0073   double  DiLog(double x);
0074 
0075   vector<int> sharedColor(const Event& event, int iRad, int iRec);
0076   bool hasSharedColor(const Event& event, int iRad, int iRec);
0077 
0078   int findCol(int col, vector<int> iExc, const Event&, int type);
0079 
0080   bool useFastFunctions() { return true; }
0081 
0082   virtual vector <int> radAndEmt(int idDaughter, int)
0083    { return createvector<int>(motherID(idDaughter))(sisterID(idDaughter)); }
0084   virtual bool isPartial()  { return true; }
0085 
0086   virtual int couplingType (int, int) { return 1; }
0087   virtual double coupling (double z, double pT2, double m2dip,
0088     double renormMultFacNow = -1.,
0089     pair<int,bool> radBef = pair<int,bool>(),
0090     pair<int,bool> recBef = pair<int,bool>()) {
0091     if (!usePDFalphas && alphaSorder == 0) return alphaS2pi;
0092     double scale2 = couplingScale2 ( z, pT2, m2dip, radBef, recBef);
0093     if (scale2 < 0.) scale2 = pT2;
0094     if (z      < 0.) scale2 = pT2;
0095     // Return coupling. Set up such the argument is NOT RESCALED in as2Pi
0096     // function - rather guarantee that INPUT pT2/scale has desired value.
0097     double fac = (renormMultFacNow > 0.) ? renormMultFacNow : renormMultFac;
0098     return as2Pi(scale2, orderSave, fac);
0099   }
0100 
0101   // Function determining the argument of the running coupling based on the
0102   // splitting variables. Current default: Evolution variable.
0103   // DireTimes:alphasScheme = 0 : default
0104   // DireTimes:alphasScheme = 1 : collinear kinematic kT for all splittings
0105   //                              involving incoming particles.
0106   // DireTimes:alphasScheme = 2 : eikonal factor sij*sjk/sik
0107   int asSchemeISR, asSchemeFSR;
0108   virtual double couplingScale2 (double z, double pT2, double m2dip,
0109     pair<int,bool> radBef, pair<int,bool> recBef) {
0110     if        ( radBef.second &&  recBef.second) {
0111       if (asSchemeFSR == 0) return pT2;
0112       if (asSchemeFSR == 1) return pT2;
0113       if (asSchemeFSR == 2) {
0114         double ycs = pT2/m2dip/(1.-z);
0115         double sij = ycs*m2dip;
0116         double sjk = (1.-z)*m2dip;
0117         double sik = m2dip - sij - sjk;
0118         return sij*sjk/sik;
0119       }
0120     } else if ( radBef.second && !recBef.second) {
0121       if (asSchemeFSR == 0) return pT2;
0122       if (asSchemeFSR == 1) {
0123         double zcs = z;
0124         double xcs = m2dip * zcs * (1.-zcs) / (pT2 + m2dip * zcs * (1.-zcs));
0125         double kt2 = m2dip * (1.-xcs) / xcs * zcs * (1.-zcs);
0126         return kt2;
0127       }
0128       if (asSchemeFSR == 2) {
0129         double zcs = z;
0130         double xcs = m2dip * zcs * (1.-zcs) / (pT2 + m2dip * zcs * (1.-zcs));
0131         return (1-zcs)*(1-xcs)/xcs/zcs*m2dip;
0132       }
0133     } else if (!radBef.second &&  recBef.second) {
0134       if (asSchemeISR == 0) return pT2;
0135       if (asSchemeISR == 1) {
0136         double xcs = z;
0137         double ucs = pT2/m2dip / (1.-z);
0138         double kt2 = m2dip * (1-xcs) / xcs * ucs * (1.-ucs);
0139         return kt2;
0140       }
0141       if (asSchemeISR == 2) {
0142         double xcs = z;
0143         double ucs = pT2/m2dip / (1.-z);
0144         return  (1-xcs)/xcs*ucs/(1-ucs)*m2dip;
0145       }
0146     } else if (!radBef.second && !recBef.second) {
0147       if (asSchemeISR == 0) return pT2;
0148       if (asSchemeISR == 1) {
0149         double xcs = ( z * (1.-z) - pT2/m2dip) / (1.-z);
0150         double vcs = pT2/m2dip / (1.-z);
0151         double kt2 = m2dip * vcs * (1.-xcs-vcs) / xcs;
0152         return kt2;
0153       }
0154       if (asSchemeISR == 2) {
0155         double xcs = ( z * (1.-z) - pT2/m2dip) / (1.-z);
0156         double vcs = pT2/m2dip / (1.-z);
0157         double sab = m2dip/xcs;
0158         double saj = vcs*sab;
0159         double sjb = sab-saj-m2dip;
0160         return abs(saj*sjb/sab);
0161       }
0162     }
0163     return -1.;
0164   }
0165 
0166   // Functions that allow different ordering variables for emissions.
0167   // Note: Only works after splitInfo has been properly filled.
0168   virtual double getJacobian( const Event& = Event(),
0169     PartonSystems* partonSystems = 0);
0170   virtual unordered_map<string, double> getPhasespaceVars(
0171     const Event& = Event(), PartonSystems* = 0);
0172 
0173   bool useBackboneGluons, doGeneralizedKernel;
0174   double sCoef(int powz) { vector<double> tmp
0175     = settingsPtr->pvec("DireGeneralizedKernel:softCoeffs:" + name());
0176     return tmp[powz+1]; }
0177   double sExp(int powz) { vector<double> tmp
0178     = settingsPtr->pvec("DireGeneralizedKernel:softExps:" + name());
0179     return tmp[powz+1]; }
0180   double kCoef(int powz) { vector<double> tmp
0181     = settingsPtr->pvec("DireGeneralizedKernel:kappaCoeffs:" + name());
0182     return tmp[powz+1]; }
0183   double kExp(int powz){ vector<double> tmp
0184     = settingsPtr->pvec("DireGeneralizedKernel:kappaExps:" + name());
0185     return tmp[powz+1]; }
0186   double cCoef(int powz) { vector<double> tmp
0187     = settingsPtr->pvec("DireGeneralizedKernel:collCoeffs:" + name());
0188     return tmp[powz+1]; }
0189   double cExp(int powz) { vector<double> tmp
0190     = settingsPtr->pvec("DireGeneralizedKernel:collExps:" + name());
0191     return tmp[powz+1]; }
0192   double fCoef() { double tmp
0193     = settingsPtr->parm("DireGeneralizedKernel:finCoeffs:" + name());
0194     return tmp; }
0195 
0196   bool hasMECBef(const Event& state, double pT2);
0197   bool hasMECAft(const Event& state, double pT2);
0198 
0199 };
0200 
0201 //==========================================================================
0202 
0203 class Dire_fsr_qcd_Q2QGG : public DireSplittingQCD {
0204 
0205 public:
0206 
0207   Dire_fsr_qcd_Q2QGG(string idIn, int softRS, Settings* settings,
0208     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0209     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0210     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0211       coupSM, info, direInfo), is_sai_endpoint_save(false) {}
0212 
0213   bool canRadiate ( const Event&, pair<int,int>,
0214     unordered_map<string,bool> = unordered_map<string,bool>(),
0215     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0216 
0217   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
0218     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0219 
0220   vector <int> radAndEmt(int idDaughter, int) {
0221     return createvector<int>(idDaughter)(21)(21);}
0222   int nEmissions()          { return 2; }
0223   int kinMap()              { return 2;}
0224   bool canUseForBranching() { return true; }
0225 
0226   vector<pair<int,int> > radAndEmtCols(int iRad, int colType, Event state);
0227 
0228   // Return colours of recombined radiator (before splitting!)
0229   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0230     int colEmtAfter, int acolEmtAfter);
0231 
0232   // Return id of recombined radiator (before splitting!)
0233   int radBefID(int idRadAfter, int idEmtAfter);
0234 
0235   double gaugeFactor ( int=0, int=0 );
0236   double symmetryFactor ( int=0, int=0 );
0237 
0238   // Pick z for new splitting.
0239   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0240 
0241   // New overestimates, z-integrated versions.
0242   double overestimateInt(double zMinAbs,double zMaxAbs,
0243     double pT2Old, double m2dip, int order = -1);
0244 
0245   // Return kernel for new splitting.
0246   double overestimateDiff(double z, double m2dip, int order = -1);
0247 
0248   // Functions to calculate the kernel from SplitInfo information.
0249   bool calc(const Event& state = Event(), int order = -1);
0250 
0251   double counterTerm(double si1, double si2, double sj1,
0252     double sj2, double sij, double s12);
0253 
0254   // Treatment of additional virtual corrections.
0255   bool allow_sai_endpoint_for_kinematics() { return true; }
0256   bool allow_xa_endpoint_for_kinematics()  { return false; }
0257   // Functions to set if kernel should contribute to a kinematical endpoint.
0258   void try_sai_endpoint() { is_sai_endpoint_save = (rndmPtr->flat() < 0.5); }
0259   void try_xa_endpoint()                   { return; }
0260   // Return endpoint information.
0261   bool is_sai_endpoint()                   { return is_sai_endpoint_save; }
0262   bool is_xa_endpoint()                    { return false; }
0263   bool is_sai_endpoint_save;
0264 
0265 };
0266 
0267 //==========================================================================
0268 
0269 class Dire_fsr_qcd_G2GGG : public DireSplittingQCD {
0270 
0271 public:
0272 
0273   Dire_fsr_qcd_G2GGG(string idIn, int softRS, Settings* settings,
0274     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0275     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0276     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0277       coupSM, info, direInfo), is_sai_endpoint_save(false) {}
0278 
0279   bool canRadiate ( const Event&, pair<int,int>,
0280     unordered_map<string,bool> = unordered_map<string,bool>(),
0281     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0282 
0283   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
0284     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0285 
0286   vector <int> radAndEmt(int,int) { return createvector<int>(21)(21)(21);}
0287   int nEmissions()                { return 2; }
0288   int kinMap()                    { return 2;}
0289   bool canUseForBranching()       { return true; }
0290 
0291   vector<pair<int,int> > radAndEmtCols(int iRad, int colType, Event state);
0292 
0293   // Return colours of recombined radiator (before splitting!)
0294   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0295     int colEmtAfter, int acolEmtAfter);
0296 
0297   // Return id of recombined radiator (before splitting!)
0298   int radBefID(int idRadAfter, int idEmtAfter);
0299 
0300   double gaugeFactor ( int=0, int=0 );
0301   double symmetryFactor ( int=0, int=0 );
0302 
0303   // Pick z for new splitting.
0304   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0305 
0306   // New overestimates, z-integrated versions.
0307   double overestimateInt(double zMinAbs,double zMaxAbs,
0308     double pT2Old, double m2dip, int order = -1);
0309 
0310   // Return kernel for new splitting.
0311   double overestimateDiff(double z, double m2dip, int order = -1);
0312 
0313   // Functions to calculate the kernel from SplitInfo information.
0314   bool calc(const Event& state = Event(), int order = -1);
0315 
0316   double counterTerm(double si1, double si2, double sj1,
0317     double sj2, double sij, double s12);
0318 
0319   // Treatment of additional virtual corrections.
0320   bool allow_sai_endpoint_for_kinematics() { return true; }
0321   bool allow_xa_endpoint_for_kinematics()  { return false; }
0322   // Functions to set if kernel should contribute to a kinematical endpoint.
0323   void try_sai_endpoint() { is_sai_endpoint_save = (rndmPtr->flat() < 0.5); }
0324   void try_xa_endpoint()                   { return; }
0325   // Return endpoint information.
0326   bool is_sai_endpoint()                   { return is_sai_endpoint_save; }
0327   bool is_xa_endpoint()                    { return false; }
0328   bool is_sai_endpoint_save;
0329 
0330 };
0331 
0332 //==========================================================================
0333 
0334 class Dire_fsr_qcd_Q2Qqqbar : public DireSplittingQCD {
0335 
0336 public:
0337 
0338   Dire_fsr_qcd_Q2Qqqbar(int idEmtAfterIn, string idIn, int softRS,
0339     Settings* settings,
0340     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0341     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0342     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0343       coupSM, info, direInfo), idEmtAfterSave(idEmtAfterIn),
0344       is_sai_endpoint_save(false)
0345       { nGluonToQuark = settingsPtr->mode("TimeShower:nGluonToQuark"); }
0346 
0347   bool canRadiate ( const Event&, pair<int,int>,
0348     unordered_map<string,bool> = unordered_map<string,bool>(),
0349     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0350 
0351   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
0352     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0353 
0354   virtual vector <int> radAndEmt(int idRadBef, int) {
0355     return createvector<int>(idRadBef)(idEmtAfterSave)(-idEmtAfterSave);
0356   }
0357 
0358   int nEmissions()            { return 2;}
0359   int kinMap()                { return 2;}
0360   bool canUseForBranching()   { return true; }
0361 
0362   vector<pair<int,int> > radAndEmtCols(int iRad, int colType, Event state);
0363 
0364   // Return colours of recombined radiator (before splitting!)
0365   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0366     int colEmtAfter, int acolEmtAfter);
0367 
0368   // Return id of recombined radiator (before splitting!)
0369   int radBefID(int idRadAfter, int idEmtAfter);
0370 
0371   double gaugeFactor ( int=0, int=0 );
0372   double symmetryFactor ( int=0, int=0 );
0373 
0374   // Pick z for new splitting.
0375   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0376 
0377   // New overestimates, z-integrated versions.
0378   double overestimateInt(double zMinAbs,double zMaxAbs,
0379     double pT2Old, double m2dip, int order = -1);
0380 
0381   // Return kernel for new splitting.
0382   double overestimateDiff(double z, double m2dip, int order = -1);
0383 
0384   // Functions to calculate the kernel from SplitInfo information.
0385   bool calc(const Event& state = Event(), int order = -1);
0386 
0387   int nGluonToQuark, idEmtAfterSave;
0388 
0389   double counterTerm(double si1, double si2, double sj1,
0390     double sj2, double sij, double s12);
0391 
0392   // Treatment of additional virtual corrections.
0393   bool allow_sai_endpoint_for_kinematics() { return true; }
0394   bool allow_xa_endpoint_for_kinematics()  { return false; }
0395   // Functions to set if kernel should contribute to a kinematical endpoint.
0396   void try_sai_endpoint() { is_sai_endpoint_save = (rndmPtr->flat() < 0.5); }
0397   void try_xa_endpoint()                   { return; }
0398   // Return endpoint information.
0399   bool is_sai_endpoint()                   { return is_sai_endpoint_save; }
0400   bool is_xa_endpoint()                    { return false; }
0401   bool is_sai_endpoint_save;
0402 
0403 };
0404 
0405 //==========================================================================
0406 
0407 class Dire_fsr_qcd_G2Gqqbar : public DireSplittingQCD {
0408 
0409 public:
0410 
0411   Dire_fsr_qcd_G2Gqqbar(int idEmtAfterIn, string idIn, int softRS,
0412     Settings* settings, ParticleData* particleData, Rndm* rndm,
0413     BeamParticle* beamA, BeamParticle* beamB, CoupSM* coupSM, Info* info,
0414     DireInfo* direInfo) :
0415     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0416       coupSM, info, direInfo),
0417     idEmtAfterSave(idEmtAfterIn), is_sai_endpoint_save(false)
0418       { nGluonToQuark = settingsPtr->mode("TimeShower:nGluonToQuark"); }
0419 
0420   bool canRadiate ( const Event&, pair<int,int>,
0421     unordered_map<string,bool> = unordered_map<string,bool>(),
0422     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0423 
0424   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
0425     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0426 
0427   virtual vector <int> radAndEmt(int, int colType) {
0428     int sign = (colType > 0) ? 1 : -1;
0429     int idEmtAft = sign * idEmtAfterSave;
0430     return createvector<int>(21)(idEmtAft)(-idEmtAft);
0431   }
0432 
0433   int nEmissions()            { return 2; }
0434   int kinMap()                { return 2;}
0435   bool canUseForBranching()   { return true; }
0436 
0437   vector<pair<int,int> > radAndEmtCols(int iRad, int colType, Event state);
0438 
0439   // Return colours of recombined radiator (before splitting!)
0440   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0441     int colEmtAfter, int acolEmtAfter);
0442 
0443   // Return id of recombined radiator (before splitting!)
0444   int radBefID(int idRadAfter, int idEmtAfter);
0445 
0446   double gaugeFactor ( int=0, int=0 );
0447   double symmetryFactor ( int=0, int=0 );
0448 
0449   // Pick z for new splitting.
0450   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0451 
0452   // New overestimates, z-integrated versions.
0453   double overestimateInt(double zMinAbs,double zMaxAbs,
0454     double pT2Old, double m2dip, int order = -1);
0455 
0456   // Return kernel for new splitting.
0457   double overestimateDiff(double z, double m2dip, int order = -1);
0458 
0459   // Functions to calculate the kernel from SplitInfo information.
0460   bool calc(const Event& state = Event(), int order = -1);
0461 
0462   int nGluonToQuark, idEmtAfterSave;
0463 
0464   double counterTerm(double si1, double si2, double sj1,
0465     double sj2, double sij, double s12);
0466 
0467   // Treatment of additional virtual corrections.
0468   bool allow_sai_endpoint_for_kinematics() { return true; }
0469   bool allow_xa_endpoint_for_kinematics()  { return false; }
0470   // Functions to set if kernel should contribute to a kinematical endpoint.
0471   void try_sai_endpoint() { is_sai_endpoint_save = (rndmPtr->flat() < 0.5); }
0472   void try_xa_endpoint()                   { return; }
0473   // Return endpoint information.
0474   bool is_sai_endpoint()                   { return is_sai_endpoint_save; }
0475   bool is_xa_endpoint()                    { return false; }
0476   bool is_sai_endpoint_save;
0477 
0478 };
0479 
0480 //==========================================================================
0481 
0482 class Dire_fsr_qcd_Q2QG : public DireSplittingQCD {
0483 
0484 public:
0485 
0486   Dire_fsr_qcd_Q2QG(string idIn, int softRS, Settings* settings,
0487     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0488     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0489     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0490       coupSM, info, direInfo){}
0491 
0492   bool canRadiate ( const Event&, pair<int,int>,
0493     unordered_map<string,bool> = unordered_map<string,bool>(),
0494     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0495   int nEmissions() { return 1; }
0496 
0497   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
0498     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0499 
0500   int kinMap ();
0501 
0502   // Return id of mother after splitting.
0503   int motherID(int idDaughter);
0504 
0505   // Return id of emission.
0506   int sisterID(int idDaughter);
0507 
0508   // Return id of recombined radiator (before splitting!)
0509   int radBefID(int idRadAfter, int idEmtAfter);
0510 
0511   vector <int> recPositions( const Event&, int, int);
0512 
0513   // Return colours of recombined radiator (before splitting!)
0514   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0515     int colEmtAfter, int acolEmtAfter);
0516 
0517   double gaugeFactor ( int=0, int=0 );
0518   double symmetryFactor ( int=0, int=0 );
0519 
0520   // Pick z for new splitting.
0521   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0522 
0523   // New overestimates, z-integrated versions.
0524   double overestimateInt(double zMinAbs,double zMaxAbs,
0525     double pT2Old, double m2dip, int order = -1);
0526 
0527   // Return kernel for new splitting.
0528   double overestimateDiff(double z, double m2dip, int order = -1);
0529 
0530   // Functions to calculate the kernel from SplitInfo information.
0531   bool calc(const Event& state = Event(), int order = -1);
0532 
0533 };
0534 
0535 //==========================================================================
0536 
0537 class Dire_fsr_qcd_Q2GQ : public DireSplittingQCD {
0538 
0539 public:
0540 
0541   Dire_fsr_qcd_Q2GQ(string idIn, int softRS, Settings* settings,
0542     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0543     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0544     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0545       coupSM, info, direInfo){}
0546 
0547   bool canRadiate ( const Event&, pair<int,int>,
0548     unordered_map<string,bool> = unordered_map<string,bool>(),
0549     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0550 
0551   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
0552     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0553 
0554   int nEmissions() { return 1; }
0555 
0556   int kinMap ();
0557 
0558   // Return id of mother after splitting.
0559   int motherID(int idDaughter);
0560 
0561   // Return id of emission.
0562   int sisterID(int idDaughter);
0563 
0564   // Return id of recombined radiator (before splitting!)
0565   int radBefID(int idRadAfter, int idEmtAfter);
0566 
0567   vector <int> recPositions( const Event&, int, int);
0568 
0569   // Return colours of recombined radiator (before splitting!)
0570   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0571     int colEmtAfter, int acolEmtAfter);
0572 
0573   double gaugeFactor ( int=0, int=0 );
0574   double symmetryFactor ( int=0, int=0 );
0575 
0576   // Pick z for new splitting.
0577   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0578 
0579   // New overestimates, z-integrated versions.
0580   double overestimateInt(double zMinAbs,double zMaxAbs,
0581     double pT2Old, double m2dip, int order = -1);
0582 
0583   // Return kernel for new splitting.
0584   double overestimateDiff(double z, double m2dip, int order = -1);
0585 
0586   // Functions to calculate the kernel from SplitInfo information.
0587   bool calc(const Event& state = Event(), int order = -1);
0588 
0589 };
0590 
0591 //==========================================================================
0592 
0593 class Dire_fsr_qcd_G2GG1 : public DireSplittingQCD {
0594 
0595 public:
0596 
0597   Dire_fsr_qcd_G2GG1(string idIn, int softRS, Settings* settings,
0598     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0599     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0600     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0601       coupSM, info, direInfo){}
0602 
0603   bool canRadiate ( const Event&, pair<int,int>,
0604     unordered_map<string,bool> = unordered_map<string,bool>(),
0605     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0606 
0607   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
0608     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0609 
0610   int nEmissions() { return 1; }
0611 
0612   int kinMap ();
0613 
0614   // Return id of mother after splitting.
0615   int motherID(int idDaughter);
0616 
0617   // Return id of emission.
0618   int sisterID(int idDaughter);
0619 
0620   // Return id of recombined radiator (before splitting!)
0621   int radBefID(int idRadAfter, int idEmtAfter);
0622 
0623   vector <int> recPositions( const Event&, int, int);
0624 
0625   // Return colours of recombined radiator (before splitting!)
0626   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0627     int colEmtAfter, int acolEmtAfter);
0628 
0629   double gaugeFactor ( int=0, int=0 );
0630   double symmetryFactor ( int=0, int=0 );
0631 
0632   // Pick z for new splitting.
0633   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0634 
0635   // New overestimates, z-integrated versions.
0636   double overestimateInt(double zMinAbs,double zMaxAbs,
0637     double pT2Old, double m2dip, int order = -1);
0638 
0639   // Return kernel for new splitting.
0640   double overestimateDiff(double z, double m2dip, int order = -1);
0641 
0642   // Functions to calculate the kernel from SplitInfo information.
0643   bool calc(const Event& state = Event(), int order = -1);
0644 
0645 };
0646 
0647 //==========================================================================
0648 
0649 class Dire_fsr_qcd_G2GG2 : public DireSplittingQCD {
0650 
0651 public:
0652 
0653   Dire_fsr_qcd_G2GG2(string idIn, int softRS, Settings* settings,
0654     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0655     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0656     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0657       coupSM, info, direInfo){}
0658 
0659   bool canRadiate ( const Event&, pair<int,int>,
0660     unordered_map<string,bool> = unordered_map<string,bool>(),
0661     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0662 
0663   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
0664     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0665 
0666   int nEmissions() { return 1; }
0667 
0668   int kinMap ();
0669 
0670   // Return id of mother after splitting.
0671   int motherID(int idDaughter);
0672 
0673   // Return id of emission.
0674   int sisterID(int idDaughter);
0675 
0676   // Return id of recombined radiator (before splitting!)
0677   int radBefID(int idRadAfter, int idEmtAfter);
0678 
0679   vector <int> recPositions( const Event&, int, int);
0680 
0681   // Return colours of recombined radiator (before splitting!)
0682   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0683     int colEmtAfter, int acolEmtAfter);
0684 
0685   double gaugeFactor ( int=0, int=0 );
0686   double symmetryFactor ( int=0, int=0 );
0687 
0688   // Pick z for new splitting.
0689   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0690 
0691   // New overestimates, z-integrated versions.
0692   double overestimateInt(double zMinAbs,double zMaxAbs,
0693     double pT2Old, double m2dip, int order = -1);
0694 
0695   // Return kernel for new splitting.
0696   double overestimateDiff(double z, double m2dip, int order = -1);
0697 
0698   // Functions to calculate the kernel from SplitInfo information.
0699   bool calc(const Event& state = Event(), int order = -1);
0700 
0701 };
0702 
0703 //==========================================================================
0704 
0705 class Dire_fsr_qcd_G2QQ1 : public DireSplittingQCD {
0706 
0707 public:
0708 
0709   Dire_fsr_qcd_G2QQ1(string idIn, int softRS, Settings* settings,
0710     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0711     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0712     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0713       coupSM, info, direInfo){}
0714 
0715   bool canRadiate ( const Event&, pair<int,int>,
0716     unordered_map<string,bool> = unordered_map<string,bool>(),
0717     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0718 
0719   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
0720     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0721 
0722   int nEmissions() { return 1; }
0723   bool isPartial() { return false; }
0724   int kinMap ();
0725 
0726   // Return id of mother after splitting.
0727   int motherID(int idDaughter);
0728 
0729   // Return id of emission.
0730   int sisterID(int idDaughter);
0731 
0732   // Return id of recombined radiator (before splitting!)
0733   int radBefID(int idRadAfter, int idEmtAfter);
0734 
0735   vector <int> recPositions( const Event&, int, int);
0736 
0737   // Return colours of recombined radiator (before splitting!)
0738   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0739     int colEmtAfter, int acolEmtAfter);
0740 
0741   double gaugeFactor ( int=0, int=0 );
0742   double symmetryFactor ( int=0, int=0 );
0743 
0744   // Pick z for new splitting.
0745   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0746 
0747   // New overestimates, z-integrated versions.
0748   double overestimateInt(double zMinAbs,double zMaxAbs,
0749     double pT2Old, double m2dip, int order = -1);
0750 
0751   // Return kernel for new splitting.
0752   double overestimateDiff(double z, double m2dip, int order = -1);
0753 
0754   // Functions to calculate the kernel from SplitInfo information.
0755   bool calc(const Event& state = Event(), int order = -1);
0756 
0757 };
0758 
0759 //==========================================================================
0760 
0761 class Dire_fsr_qcd_G2QQ2 : public DireSplittingQCD {
0762 
0763 public:
0764 
0765   Dire_fsr_qcd_G2QQ2(string idIn, int softRS, Settings* settings,
0766     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0767     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0768     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0769       coupSM, info, direInfo){}
0770 
0771   bool canRadiate ( const Event&, pair<int,int>,
0772     unordered_map<string,bool> = unordered_map<string,bool>(),
0773     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0774 
0775   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
0776     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0777 
0778   int nEmissions() { return 1; }
0779   bool isPartial() { return false; }
0780 
0781   int kinMap ();
0782 
0783   // Return id of mother after splitting.
0784   int motherID(int idDaughter);
0785 
0786   // Return id of emission.
0787   int sisterID(int idDaughter);
0788 
0789   // Return id of recombined radiator (before splitting!)
0790   int radBefID(int idRadAfter, int idEmtAfter);
0791 
0792   vector <int> recPositions( const Event&, int, int);
0793 
0794   // Return colours of recombined radiator (before splitting!)
0795   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0796     int colEmtAfter, int acolEmtAfter);
0797 
0798   double gaugeFactor ( int=0, int=0 );
0799   double symmetryFactor ( int=0, int=0 );
0800 
0801   // Pick z for new splitting.
0802   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0803 
0804   // New overestimates, z-integrated versions.
0805   double overestimateInt(double zMinAbs,double zMaxAbs,
0806     double pT2Old, double m2dip, int order = -1);
0807 
0808   // Return kernel for new splitting.
0809   double overestimateDiff(double z, double m2dip, int order = -1);
0810 
0811   // Functions to calculate the kernel from SplitInfo information.
0812   bool calc(const Event& state = Event(), int order = -1);
0813 
0814 };
0815 
0816 //==========================================================================
0817 
0818 class Dire_fsr_qcd_Q2qQqbarDist : public DireSplittingQCD {
0819 
0820 public:
0821 
0822   Dire_fsr_qcd_Q2qQqbarDist(string idIn, int softRS, Settings* settings,
0823     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0824     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0825     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0826       coupSM, info, direInfo){}
0827 
0828   bool canRadiate ( const Event&, pair<int,int>,
0829     unordered_map<string,bool> = unordered_map<string,bool>(),
0830     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0831 
0832   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
0833     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0834 
0835   int nEmissions() { return 2; }
0836   bool isPartial() { return false; }
0837 
0838   int kinMap ();
0839 
0840   // Return id of mother after splitting.
0841   int motherID(int idDaughter);
0842 
0843   // Return id of emission.
0844   int sisterID(int idDaughter);
0845 
0846   // Return id of recombined radiator (before splitting!)
0847   int radBefID(int idRadAfter, int idEmtAfter);
0848 
0849   // Return colours of recombined radiator (before splitting!)
0850   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0851     int colEmtAfter, int acolEmtAfter);
0852 
0853   double gaugeFactor ( int=0, int=0 );
0854   double symmetryFactor ( int=0, int=0 );
0855 
0856   // Pick z for new splitting.
0857   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0858 
0859   // New overestimates, z-integrated versions.
0860   double overestimateInt(double zMinAbs,double zMaxAbs,
0861     double pT2Old, double m2dip, int order = -1);
0862 
0863   // Return kernel for new splitting.
0864   double overestimateDiff(double z, double m2dip, int order = -1);
0865 
0866   // Functions to calculate the kernel from SplitInfo information.
0867   bool calc(const Event& state = Event(), int order = -1);
0868 
0869 };
0870 
0871 //==========================================================================
0872 
0873 class Dire_fsr_qcd_Q2QbarQQId : public DireSplittingQCD {
0874 
0875 public:
0876 
0877   Dire_fsr_qcd_Q2QbarQQId(string idIn, int softRS, Settings* settings,
0878     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0879     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0880     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0881       coupSM, info, direInfo){}
0882 
0883   bool canRadiate ( const Event&, pair<int,int>,
0884     unordered_map<string,bool> = unordered_map<string,bool>(),
0885     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0886 
0887   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
0888     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0889 
0890   int nEmissions() { return 2; }
0891   bool isPartial() { return false; }
0892 
0893   int kinMap ();
0894 
0895   // Return id of mother after splitting.
0896   int motherID(int idDaughter);
0897 
0898   // Return id of emission.
0899   int sisterID(int idDaughter);
0900 
0901   // Return id of recombined radiator (before splitting!)
0902   int radBefID(int idRadAfter, int idEmtAfter);
0903 
0904   // Return colours of recombined radiator (before splitting!)
0905   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0906     int colEmtAfter, int acolEmtAfter);
0907 
0908   double gaugeFactor ( int=0, int=0 );
0909   double symmetryFactor ( int=0, int=0 );
0910 
0911   // Pick z for new splitting.
0912   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0913 
0914   // New overestimates, z-integrated versions.
0915   double overestimateInt(double zMinAbs,double zMaxAbs,
0916     double pT2Old, double m2dip, int order = -1);
0917 
0918   // Return kernel for new splitting.
0919   double overestimateDiff(double z, double m2dip, int order = -1);
0920 
0921   // Functions to calculate the kernel from SplitInfo information.
0922   bool calc(const Event& state = Event(), int order = -1);
0923 
0924 };
0925 
0926 //==========================================================================
0927 
0928 class Dire_isr_qcd_Q2QG : public DireSplittingQCD {
0929 
0930 public:
0931 
0932   Dire_isr_qcd_Q2QG(string idIn, int softRS, Settings* settings,
0933     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0934     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0935     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0936       coupSM, info, direInfo){}
0937 
0938   bool canRadiate ( const Event&, pair<int,int>,
0939     unordered_map<string,bool> = unordered_map<string,bool>(),
0940     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0941 
0942   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
0943     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0944 
0945   int nEmissions() { return 1; }
0946 
0947   int kinMap ();
0948 
0949   // Return id of mother after splitting.
0950   int motherID(int idDaughter);
0951 
0952   // Return id of emission.
0953   int sisterID(int idDaughter);
0954 
0955   // Return id of recombined radiator (before splitting!)
0956   int radBefID(int idRadAfter, int idEmtAfter);
0957 
0958   vector <int> recPositions( const Event&, int, int);
0959 
0960   // Return colours of recombined radiator (before splitting!)
0961   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
0962     int colEmtAfter, int acolEmtAfter);
0963 
0964   double gaugeFactor ( int=0, int=0 );
0965   double symmetryFactor ( int=0, int=0 );
0966 
0967   // Pick z for new splitting.
0968   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
0969 
0970   // New overestimates, z-integrated versions.
0971   double overestimateInt(double zMinAbs,double zMaxAbs,
0972     double pT2Old, double m2dip, int order = -1);
0973 
0974   // Return kernel for new splitting.
0975   double overestimateDiff(double z, double m2dip, int order = -1);
0976 
0977   // Functions to calculate the kernel from SplitInfo information.
0978   bool calc(const Event& state = Event(), int order = -1);
0979 
0980 };
0981 
0982 //==========================================================================
0983 
0984 class Dire_isr_qcd_G2GG1 : public DireSplittingQCD {
0985 
0986 public:
0987 
0988   Dire_isr_qcd_G2GG1(string idIn, int softRS, Settings* settings,
0989     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
0990     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
0991     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
0992       coupSM, info, direInfo){}
0993 
0994   bool canRadiate ( const Event&, pair<int,int>,
0995     unordered_map<string,bool> = unordered_map<string,bool>(),
0996     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
0997 
0998   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
0999     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
1000 
1001   int nEmissions() { return 1; }
1002 
1003   int kinMap ();
1004 
1005   // Return id of mother after splitting.
1006   int motherID(int idDaughter);
1007 
1008   // Return id of emission.
1009   int sisterID(int idDaughter);
1010 
1011   // Return id of recombined radiator (before splitting!)
1012   int radBefID(int idRadAfter, int idEmtAfter);
1013 
1014   vector <int> recPositions( const Event&, int, int);
1015 
1016   // Return colours of recombined radiator (before splitting!)
1017   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
1018     int colEmtAfter, int acolEmtAfter);
1019 
1020   double gaugeFactor ( int=0, int=0 );
1021   double symmetryFactor ( int=0, int=0 );
1022 
1023   // Pick z for new splitting.
1024   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
1025 
1026   // New overestimates, z-integrated versions.
1027   double overestimateInt(double zMinAbs,double zMaxAbs,
1028     double pT2Old, double m2dip, int order = -1);
1029 
1030   // Return kernel for new splitting.
1031   double overestimateDiff(double z, double m2dip, int order = -1);
1032 
1033   // Functions to calculate the kernel from SplitInfo information.
1034   bool calc(const Event& state = Event(), int order = -1);
1035 
1036 };
1037 
1038 //==========================================================================
1039 
1040 class Dire_isr_qcd_G2GG2 : public DireSplittingQCD {
1041 
1042 public:
1043 
1044   Dire_isr_qcd_G2GG2(string idIn, int softRS, Settings* settings,
1045     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
1046     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
1047     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
1048       coupSM, info, direInfo){}
1049 
1050   bool canRadiate ( const Event&, pair<int,int>,
1051     unordered_map<string,bool> = unordered_map<string,bool>(),
1052     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
1053 
1054   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
1055     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
1056 
1057   int nEmissions() { return 1; }
1058 
1059   int kinMap ();
1060 
1061   // Return id of mother after splitting.
1062   int motherID(int idDaughter);
1063 
1064   // Return id of emission.
1065   int sisterID(int idDaughter);
1066 
1067   // Return id of recombined radiator (before splitting!)
1068   int radBefID(int idRadAfter, int idEmtAfter);
1069 
1070   vector <int> recPositions( const Event&, int, int);
1071 
1072   // Return colours of recombined radiator (before splitting!)
1073   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
1074     int colEmtAfter, int acolEmtAfter);
1075 
1076   double gaugeFactor ( int=0, int=0 );
1077   double symmetryFactor ( int=0, int=0 );
1078 
1079   // Pick z for new splitting.
1080   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
1081 
1082   // New overestimates, z-integrated versions.
1083   double overestimateInt(double zMinAbs,double zMaxAbs,
1084     double pT2Old, double m2dip, int order = -1);
1085 
1086   // Return kernel for new splitting.
1087   double overestimateDiff(double z, double m2dip, int order = -1);
1088 
1089   // Functions to calculate the kernel from SplitInfo information.
1090   bool calc(const Event& state = Event(), int order = -1);
1091 
1092 };
1093 
1094 //==========================================================================
1095 
1096 class Dire_isr_qcd_G2QQ : public DireSplittingQCD {
1097 
1098 public:
1099 
1100   Dire_isr_qcd_G2QQ(string idIn, int softRS, Settings* settings,
1101     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
1102     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
1103     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
1104       coupSM, info, direInfo){}
1105 
1106   bool canRadiate ( const Event&, pair<int,int>,
1107     unordered_map<string,bool> = unordered_map<string,bool>(),
1108     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
1109 
1110   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
1111     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
1112 
1113   int nEmissions() { return 1; }
1114   bool isPartial() { return false; }
1115 
1116   int kinMap ();
1117 
1118   // Return id of mother after splitting.
1119   int motherID(int idDaughter);
1120 
1121   // Return id of emission.
1122   int sisterID(int idDaughter);
1123 
1124   // Return id of recombined radiator (before splitting!)
1125   int radBefID(int idRadAfter, int idEmtAfter);
1126 
1127   vector <int> recPositions( const Event&, int, int);
1128 
1129   // Return colours of recombined radiator (before splitting!)
1130   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
1131     int colEmtAfter, int acolEmtAfter);
1132 
1133   double gaugeFactor ( int=0, int=0 );
1134   double symmetryFactor ( int=0, int=0 );
1135 
1136   // Pick z for new splitting.
1137   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
1138 
1139   // New overestimates, z-integrated versions.
1140   double overestimateInt(double zMinAbs,double zMaxAbs,
1141     double pT2Old, double m2dip, int order = -1);
1142 
1143   // Return kernel for new splitting.
1144   double overestimateDiff(double z, double m2dip, int order = -1);
1145 
1146   // Functions to calculate the kernel from SplitInfo information.
1147   bool calc(const Event& state = Event(), int order = -1);
1148 
1149 };
1150 
1151 //==========================================================================
1152 
1153 class Dire_isr_qcd_Q2GQ : public DireSplittingQCD {
1154 
1155 public:
1156 
1157   Dire_isr_qcd_Q2GQ(string idIn, int softRS, Settings* settings,
1158     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
1159     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
1160     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
1161       coupSM, info, direInfo){}
1162 
1163   bool canRadiate ( const Event&, pair<int,int>,
1164     unordered_map<string,bool> = unordered_map<string,bool>(),
1165     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
1166 
1167   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
1168     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
1169 
1170   int nEmissions() { return 1; }
1171   bool isPartial() { return false; }
1172 
1173   int kinMap ();
1174 
1175   // Return id of mother after splitting.
1176   int motherID(int idDaughter);
1177 
1178   // Return id of emission.
1179   int sisterID(int idDaughter);
1180 
1181   // Return id of recombined radiator (before splitting!)
1182   int radBefID(int idRadAfter, int idEmtAfter);
1183 
1184   vector <int> recPositions( const Event&, int, int);
1185 
1186   // Return colours of recombined radiator (before splitting!)
1187   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
1188     int colEmtAfter, int acolEmtAfter);
1189 
1190   double gaugeFactor ( int=0, int=0 );
1191   double symmetryFactor ( int=0, int=0 );
1192 
1193   // Pick z for new splitting.
1194   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
1195 
1196   // New overestimates, z-integrated versions.
1197   double overestimateInt(double zMinAbs,double zMaxAbs,
1198     double pT2Old, double m2dip, int order = -1);
1199 
1200   // Return kernel for new splitting.
1201   double overestimateDiff(double z, double m2dip, int order = -1);
1202 
1203   // Functions to calculate the kernel from SplitInfo information.
1204   bool calc(const Event& state = Event(), int order = -1);
1205 
1206 };
1207 
1208 //==========================================================================
1209 
1210 // Class inheriting from SplittingQCD class.
1211 class Dire_isr_qcd_Q2qQqbarDist : public DireSplittingQCD {
1212 
1213 public:
1214 
1215   Dire_isr_qcd_Q2qQqbarDist(string idIn, int softRS, Settings* settings,
1216     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
1217     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
1218     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
1219       coupSM, info, direInfo){}
1220 
1221   bool canRadiate ( const Event&, pair<int,int>,
1222     unordered_map<string,bool> = unordered_map<string,bool>(),
1223     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
1224 
1225   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
1226     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
1227 
1228   int nEmissions() { return 2; }
1229   bool isPartial() { return false; }
1230 
1231   int kinMap ();
1232 
1233   // Return id of mother after splitting.
1234   int motherID(int idDaughter);
1235 
1236   // Return id of emission.
1237   int sisterID(int idDaughter);
1238 
1239   // Return id of recombined radiator (before splitting!)
1240   int radBefID(int idRadAfter, int idEmtAfter);
1241 
1242   // Return colours of recombined radiator (before splitting!)
1243   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
1244     int colEmtAfter, int acolEmtAfter);
1245 
1246   double gaugeFactor ( int=0, int=0 );
1247   double symmetryFactor ( int=0, int=0 );
1248 
1249   // Pick z for new splitting.
1250   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
1251 
1252   // New overestimates, z-integrated versions.
1253   double overestimateInt(double zMinAbs,double zMaxAbs,
1254     double pT2Old, double m2dip, int order = -1);
1255 
1256   // Return kernel for new splitting.
1257   double overestimateDiff(double z, double m2dip, int order = -1);
1258 
1259   // Functions to calculate the kernel from SplitInfo information.
1260   bool calc(const Event& state = Event(), int order = -1);
1261 
1262 };
1263 
1264 //==========================================================================
1265 
1266 class Dire_isr_qcd_Q2QbarQQId : public DireSplittingQCD {
1267 
1268 public:
1269 
1270   Dire_isr_qcd_Q2QbarQQId(string idIn, int softRS, Settings* settings,
1271     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
1272     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
1273     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
1274       coupSM, info, direInfo){}
1275 
1276   bool canRadiate ( const Event&, pair<int,int>,
1277     unordered_map<string,bool> = unordered_map<string,bool>(),
1278     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
1279 
1280   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
1281     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
1282 
1283   int nEmissions() { return 2; }
1284   bool isPartial() { return false; }
1285 
1286   int kinMap ();
1287 
1288   // Return id of mother after splitting.
1289   int motherID(int idDaughter);
1290 
1291   // Return id of emission.
1292   int sisterID(int idDaughter);
1293 
1294   // Return id of recombined radiator (before splitting!)
1295   int radBefID(int idRadAfter, int idEmtAfter);
1296 
1297   // Return colours of recombined radiator (before splitting!)
1298   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
1299     int colEmtAfter, int acolEmtAfter);
1300 
1301   double gaugeFactor ( int=0, int=0 );
1302   double symmetryFactor ( int=0, int=0 );
1303 
1304   // Pick z for new splitting.
1305   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
1306 
1307   // New overestimates, z-integrated versions.
1308   double overestimateInt(double zMinAbs,double zMaxAbs,
1309     double pT2Old, double m2dip, int order = -1);
1310 
1311   // Return kernel for new splitting.
1312   double overestimateDiff(double z, double m2dip, int order = -1);
1313 
1314   // Functions to calculate the kernel from SplitInfo information.
1315   bool calc(const Event& state = Event(), int order = -1);
1316 
1317 };
1318 
1319 //==========================================================================
1320 
1321 class Dire_fsr_qcd_Q2QG_notPartial : public DireSplittingQCD {
1322 
1323 public:
1324 
1325   Dire_fsr_qcd_Q2QG_notPartial(string idIn, int softRS, Settings* settings,
1326     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
1327     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
1328     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
1329       coupSM, info, direInfo){}
1330 
1331   bool canRadiate ( const Event&, pair<int,int>,
1332     unordered_map<string,bool> = unordered_map<string,bool>(),
1333     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
1334 
1335   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
1336     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
1337 
1338   int nEmissions() { return 1; }
1339 
1340   int kinMap ();
1341   bool canUseForBranching() { return true; }
1342   bool isPartial()  { return false; }
1343   vector<pair<int,int> > radAndEmtCols(int iRad, int, Event state);
1344 
1345   // Return id of mother after splitting.
1346   int motherID(int idDaughter);
1347 
1348   // Return id of emission.
1349   int sisterID(int idDaughter);
1350 
1351   // Return id of recombined radiator (before splitting!)
1352   int radBefID(int idRadAfter, int idEmtAfter);
1353 
1354   vector <int> recPositions( const Event&, int, int);
1355 
1356   // Return colours of recombined radiator (before splitting!)
1357   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
1358     int colEmtAfter, int acolEmtAfter);
1359 
1360   double gaugeFactor ( int=0, int=0 );
1361   double symmetryFactor ( int=0, int=0 );
1362 
1363   // Pick z for new splitting.
1364   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
1365 
1366   // New overestimates, z-integrated versions.
1367   double overestimateInt(double zMinAbs,double zMaxAbs,
1368     double pT2Old, double m2dip, int order = -1);
1369 
1370   // Return kernel for new splitting.
1371   double overestimateDiff(double z, double m2dip, int order = -1);
1372 
1373   // Functions to calculate the kernel from SplitInfo information.
1374   bool calc(const Event& state = Event(), int order = -1);
1375 
1376 };
1377 
1378 
1379 //==========================================================================
1380 
1381 class Dire_fsr_qcd_G2GG_notPartial : public DireSplittingQCD {
1382 
1383 public:
1384 
1385   Dire_fsr_qcd_G2GG_notPartial(string idIn, int softRS, Settings* settings,
1386     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
1387     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
1388     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
1389       coupSM, info, direInfo){}
1390 
1391   bool canRadiate ( const Event&, pair<int,int>,
1392     unordered_map<string,bool> = unordered_map<string,bool>(),
1393     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
1394 
1395   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
1396     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
1397 
1398   int nEmissions() { return 1; }
1399 
1400   int kinMap ();
1401   bool canUseForBranching() { return true; }
1402   bool isPartial()  { return false; }
1403   vector<pair<int,int> > radAndEmtCols(int iRad, int, Event state);
1404 
1405   // Return id of mother after splitting.
1406   int motherID(int idDaughter);
1407 
1408   // Return id of emission.
1409   int sisterID(int idDaughter);
1410 
1411   // Return id of recombined radiator (before splitting!)
1412   int radBefID(int idRadAfter, int idEmtAfter);
1413 
1414   vector <int> recPositions( const Event&, int, int);
1415 
1416   // Return colours of recombined radiator (before splitting!)
1417   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
1418     int colEmtAfter, int acolEmtAfter);
1419 
1420   double gaugeFactor ( int=0, int=0 );
1421   double symmetryFactor ( int=0, int=0 );
1422 
1423   // Pick z for new splitting.
1424   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
1425 
1426   // New overestimates, z-integrated versions.
1427   double overestimateInt(double zMinAbs,double zMaxAbs,
1428     double pT2Old, double m2dip, int order = -1);
1429 
1430   // Return kernel for new splitting.
1431   double overestimateDiff(double z, double m2dip, int order = -1);
1432 
1433   // Functions to calculate the kernel from SplitInfo information.
1434   bool calc(const Event& state = Event(), int order = -1);
1435 
1436 };
1437 
1438 //==========================================================================
1439 
1440 class Dire_fsr_qcd_G2QQ_notPartial : public DireSplittingQCD {
1441 
1442 public:
1443 
1444   Dire_fsr_qcd_G2QQ_notPartial(string idIn, int softRS, Settings* settings,
1445     ParticleData* particleData, Rndm* rndm, BeamParticle* beamA,
1446     BeamParticle* beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
1447     DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
1448       coupSM, info, direInfo){}
1449 
1450   bool canRadiate ( const Event&, pair<int,int>,
1451     unordered_map<string,bool> = unordered_map<string,bool>(),
1452     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
1453 
1454   bool canRadiate ( const Event&, int iRadBef, int iRecBef,
1455     Settings* = NULL, PartonSystems* = NULL, BeamParticle* = NULL);
1456 
1457   int nEmissions() { return 1; }
1458 
1459   int kinMap ();
1460   bool canUseForBranching() { return true; }
1461   bool isPartial()  { return false; }
1462   vector<pair<int,int> > radAndEmtCols(int iRad, int, Event state);
1463 
1464   // Return id of mother after splitting.
1465   int motherID(int idDaughter);
1466 
1467   // Return id of emission.
1468   int sisterID(int idDaughter);
1469 
1470   // Return id of recombined radiator (before splitting!)
1471   int radBefID(int idRadAfter, int idEmtAfter);
1472 
1473   vector <int> recPositions( const Event&, int, int);
1474 
1475   // Return colours of recombined radiator (before splitting!)
1476   pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
1477     int colEmtAfter, int acolEmtAfter);
1478 
1479   double gaugeFactor ( int=0, int=0 );
1480   double symmetryFactor ( int=0, int=0 );
1481 
1482   // Pick z for new splitting.
1483   double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
1484 
1485   // New overestimates, z-integrated versions.
1486   double overestimateInt(double zMinAbs,double zMaxAbs,
1487     double pT2Old, double m2dip, int order = -1);
1488 
1489   // Return kernel for new splitting.
1490   double overestimateDiff(double z, double m2dip, int order = -1);
1491 
1492   // Functions to calculate the kernel from SplitInfo information.
1493   bool calc(const Event& state = Event(), int order = -1);
1494 
1495 };
1496 
1497 //==========================================================================
1498 
1499 } // end namespace Pythia8
1500 
1501 #endif // Pythia8_DireSplittingsQCD_H