10 #ifndef Pythia8_SimpleSpaceShower_H
11 #define Pythia8_SimpleSpaceShower_H
13 #include "Pythia8/SpaceShower.h"
14 #include "Pythia8/SimpleWeakShowerMEs.h"
22 class SpaceDipoleEnd {
27 SpaceDipoleEnd(
int systemIn = 0,
int sideIn = 0,
int iRadiatorIn = 0,
28 int iRecoilerIn = 0,
double pTmaxIn = 0.,
int colTypeIn = 0,
29 int chgTypeIn = 0,
int weakTypeIn = 0,
int MEtypeIn = 0,
30 bool normalRecoilIn =
true,
int weakPolIn = 0,
31 int iColPartnerIn = 0,
int idColPartnerIn = 0) :
32 system(systemIn), side(sideIn), iRadiator(iRadiatorIn),
33 iRecoiler(iRecoilerIn), pTmax(pTmaxIn), colType(colTypeIn),
34 chgType(chgTypeIn), weakType(weakTypeIn), MEtype(MEtypeIn),
35 normalRecoil(normalRecoilIn), weakPol(weakPolIn),
36 iColPartner(iColPartnerIn), idColPartner(idColPartnerIn),
37 nBranch(0), idDaughter(), idMother(), idSister(), iFinPol(), x1(), x2(),
38 m2Dip(), pT2(), z(), xMo(), Q2(), mSister(), m2Sister(), pT2corr(),
39 pT2Old(0.), zOld(0.5), asymPol(), m2IF(), mColPartner(),
43 void store(
int idDaughterIn,
int idMotherIn,
int idSisterIn,
44 double x1In,
double x2In,
double m2DipIn,
double pT2In,
double zIn,
45 double xMoIn,
double Q2In,
double mSisterIn,
double m2SisterIn,
46 double pT2corrIn,
int iColPartnerIn,
double m2IFIn,
double mColPartnerIn)
47 {idDaughter = idDaughterIn; idMother = idMotherIn;
48 idSister = idSisterIn; x1 = x1In; x2 = x2In; m2Dip = m2DipIn;
49 pT2 = pT2In; z = zIn; xMo = xMoIn; Q2 = Q2In; mSister = mSisterIn;
50 m2Sister = m2SisterIn; pT2corr = pT2corrIn; iColPartner = iColPartnerIn;
51 m2IF = m2IFIn; mColPartner = mColPartnerIn;}
54 int system, side, iRadiator, iRecoiler;
56 int colType, chgType, weakType, MEtype;
58 int weakPol, iColPartner, idColPartner;
61 int nBranch, idDaughter, idMother, idSister, iFinPol;
62 double x1, x2, m2Dip, pT2, z, xMo, Q2, mSister, m2Sister, pT2corr,
63 pT2Old, zOld, asymPol, m2IF, mColPartner;
80 iSysSel(), pTmaxFudge(), doQCDshower(), doQEDshowerByQ(), doQEDshowerByL(),
81 useSamePTasMPI(), doWeakShower(), doMEcorrections(), doMEafterFirst(),
82 doPhiPolAsym(), doPhiPolAsymHard(), doPhiIntAsym(), doRapidityOrder(),
83 useFixedFacScale(), doSecondHard(), canVetoEmission(), hasUserHooks(),
84 alphaSuseCMW(), singleWeakEmission(), vetoWeakJets(), weakExternal(),
85 doRapidityOrderMPI(), doMPI(), doDipoleRecoil(), doPartonVertex(),
86 pTmaxMatch(), pTdampMatch(), alphaSorder(), alphaSnfmax(), alphaEMorder(),
87 nQuarkIn(), enhanceScreening(), weakMode(), pT0paramMode(), pTdampFudge(),
88 mc(), mb(), m2c(), m2b(), renormMultFac(), factorMultFac(),
89 fixedFacScale2(), alphaSvalue(), alphaS2pi(), Lambda3flav(), Lambda4flav(),
90 Lambda5flav(), Lambda3flav2(), Lambda4flav2(), Lambda5flav2(), pT0Ref(),
91 ecmRef(), ecmPow(), pTmin(), sCM(), eCM(), pT0(), pTminChgQ(), pTminChgL(),
92 pT20(), pT2min(), pT2minChgQ(), pT2minChgL(), pTweakCut(), pT2weakCut(),
93 pTmaxFudgeMPI(), strengthIntAsym(), weakEnhancement(), mZ(), gammaZ(),
94 thetaWRat(), mW(), gammaW(), weakMaxWt(), vetoWeakDeltaR2(), sideA(),
95 twoHard(), dopTlimit1(), dopTlimit2(), dopTdamp(), tChannel(),
96 doUncertaintiesNow(), iNow(), iRec(), idDaughter(), nRad(), idResFirst(),
97 idResSecond(), xDaughter(), x1Now(), x2Now(), m2ColPair(), mColPartner(),
98 m2ColPartner(), m2Dip(), m2Rec(), pT2damp(), pTbegRef(), pdfScale2(),
99 doTrialNow(), canEnhanceEmission(), canEnhanceTrial(), canEnhanceET(),
100 iDipNow(), iSysNow(), dipEndNow(), iDipSel(), dipEndSel() {
110 virtual bool limitPTmax(
Event& event,
double Q2Fac = 0.,
114 virtual void prepare(
int iSys,
Event& event,
bool limitPTmaxIn =
true);
117 virtual void update(
int iSys,
Event& event,
bool hasWeakRad =
false);
120 virtual double pTnext(
Event& event,
double pTbegAll,
double pTendAll,
121 int nRadIn = -1,
bool doTrialIn =
false);
124 virtual bool branch(
Event& event);
127 virtual void list()
const;
130 virtual bool initUncertainties();
133 virtual bool doRestart()
const {
return rescatterFail;}
136 virtual bool wasGamma2qqbar() {
return gamma2qqbar; }
139 virtual bool getHasWeaklyRadiated() {
return hasWeaklyRadiated;}
142 virtual int system()
const {
return iSysSel;}
145 virtual double enhancePTmax()
const {
return pTmaxFudge;}
150 static const int MAXLOOPTINYPDF;
151 static const double MCMIN, MBMIN, CTHRESHOLD, BTHRESHOLD, EVALPDFSTEP,
152 TINYPDF, TINYKERNELPDF, TINYPT2, HEAVYPT2EVOL, HEAVYXEVOL,
153 EXTRASPACEQ, LAMBDA3MARGIN, PT2MINWARN, LEPTONXMIN, LEPTONXMAX,
154 LEPTONPT2MIN, LEPTONFUDGE, WEAKPSWEIGHT, HEADROOMQ2Q, HEADROOMQ2G,
155 HEADROOMG2G, HEADROOMG2Q, HEADROOMHQG, REJECTFACTOR, PROBLIMIT;
158 bool rescatterFail, gamma2qqbar, hasWeaklyRadiated;
163 bool doQCDshower, doQEDshowerByQ, doQEDshowerByL, useSamePTasMPI,
164 doWeakShower, doMEcorrections, doMEafterFirst, doPhiPolAsym,
165 doPhiPolAsymHard, doPhiIntAsym, doRapidityOrder, useFixedFacScale,
166 doSecondHard, canVetoEmission, hasUserHooks, alphaSuseCMW,
167 singleWeakEmission, vetoWeakJets, weakExternal, doRapidityOrderMPI,
168 doMPI, doDipoleRecoil, doPartonVertex;
169 int pTmaxMatch, pTdampMatch, alphaSorder, alphaSnfmax, alphaEMorder,
170 nQuarkIn, enhanceScreening, weakMode, pT0paramMode;
171 double pTdampFudge, mc, mb, m2c, m2b, renormMultFac, factorMultFac,
172 fixedFacScale2, alphaSvalue, alphaS2pi, Lambda3flav, Lambda4flav,
173 Lambda5flav, Lambda3flav2, Lambda4flav2, Lambda5flav2, pT0Ref,
174 ecmRef, ecmPow, pTmin, sCM, eCM, pT0, pTminChgQ, pTminChgL, pT20,
175 pT2min, pT2minChgQ, pT2minChgL, pTweakCut, pT2weakCut, pTmaxFudgeMPI,
176 strengthIntAsym, weakEnhancement, mZ, gammaZ, thetaWRat, mW, gammaW,
177 weakMaxWt, vetoWeakDeltaR2;
187 bool sideA, twoHard, dopTlimit1, dopTlimit2, dopTdamp, tChannel,
189 int iNow, iRec, idDaughter, nRad, idResFirst, idResSecond;
190 double xDaughter, x1Now, x2Now, m2ColPair, mColPartner, m2ColPartner,
191 m2Dip, m2Rec, pT2damp, pTbegRef, pdfScale2;
194 bool doTrialNow, canEnhanceEmission, canEnhanceTrial, canEnhanceET;
195 string splittingNameNow, splittingNameSel;
196 map< double, pair<string,double> > enhanceFactors;
197 void storeEnhanceFactor(
double pT2,
string name,
double enhanceFactorIn)
198 { enhanceFactors.insert(make_pair(pT2,make_pair(name,enhanceFactorIn)));}
201 vector<int> nRadA,nRadB;
204 vector<SpaceDipoleEnd> dipEnd;
207 vector<Vec4> weakMomenta;
210 int iDipNow, iSysNow;
216 void pT2nextQCD(
double pT2begDip,
double pT2endDip);
220 double m2Threshold,
double xMaxAbs,
double zMinAbs,
221 double zMaxMassive,
int iColPartner);
224 void pT2nextQED(
double pT2begDip,
double pT2endDip);
227 void pT2nextWeak(
double pT2begDip,
double pT2endDip);
230 int findMEtype(
int iSys,
Event& event,
bool weakRadiation =
false);
233 double calcMEmax(
int MEtype,
int idMother,
int idDaughterIn);
236 double calcMEcorr(
int MEtype,
int idMother,
int idDaughterIn,
double M2,
237 double z,
double Q2,
double m2Sister);
240 double calcMEcorrWeak(
int MEtype,
double m2,
double z,
248 int findColPartner(
Event& event,
int iSideA,
int iSideB,
int iSystem);
251 void calcUncertainties(
bool accept,
double pAcceptIn,
double pT20in,
261 #endif // Pythia8_SimpleSpaceShower_H