10 #ifndef Pythia8_SpaceShower_H
11 #define Pythia8_SpaceShower_H
13 #include "Pythia8/Basics.h"
14 #include "Pythia8/BeamParticle.h"
15 #include "Pythia8/Event.h"
16 #include "Pythia8/Info.h"
17 #include "Pythia8/ParticleData.h"
18 #include "Pythia8/PartonSystems.h"
19 #include "Pythia8/PythiaStdlib.h"
20 #include "Pythia8/Settings.h"
21 #include "Pythia8/StandardModel.h"
22 #include "Pythia8/UserHooks.h"
23 #include "Pythia8/MergingHooks.h"
24 #include "Pythia8/WeakShowerMEs.h"
32 class SpaceDipoleEnd {
37 SpaceDipoleEnd(
int systemIn = 0,
int sideIn = 0,
int iRadiatorIn = 0,
38 int iRecoilerIn = 0,
double pTmaxIn = 0.,
int colTypeIn = 0,
39 int chgTypeIn = 0,
int weakTypeIn = 0,
int MEtypeIn = 0,
40 bool normalRecoilIn =
true,
int weakPolIn = 0) :
41 system(systemIn), side(sideIn), iRadiator(iRadiatorIn),
42 iRecoiler(iRecoilerIn), pTmax(pTmaxIn), colType(colTypeIn),
43 chgType(chgTypeIn), weakType(weakTypeIn), MEtype(MEtypeIn),
44 normalRecoil(normalRecoilIn), weakPol(weakPolIn), nBranch(0),
45 pT2Old(0.), zOld(0.5) { }
48 void store(
int idDaughterIn,
int idMotherIn,
int idSisterIn,
49 double x1In,
double x2In,
double m2DipIn,
double pT2In,
double zIn,
50 double xMoIn,
double Q2In,
double mSisterIn,
double m2SisterIn,
51 double pT2corrIn) {idDaughter = idDaughterIn; idMother = idMotherIn;
52 idSister = idSisterIn; x1 = x1In; x2 = x2In; m2Dip = m2DipIn;
53 pT2 = pT2In; z = zIn; xMo = xMoIn; Q2 = Q2In; mSister = mSisterIn;
54 m2Sister = m2SisterIn; pT2corr = pT2corrIn;}
57 int system, side, iRadiator, iRecoiler;
59 int colType, chgType, weakType, MEtype;
64 int nBranch, idDaughter, idMother, idSister, iFinPol;
65 double x1, x2, m2Dip, pT2, z, xMo, Q2, mSister, m2Sister, pT2corr,
66 pT2Old, zOld, asymPol;
79 SpaceShower() {beamOffset = 0;}
82 virtual ~SpaceShower() {}
86 void initPtr(Info* infoPtrIn, Settings* settingsPtrIn,
87 ParticleData* particleDataPtrIn, Rndm* rndmPtrIn, CoupSM* coupSMPtrIn,
88 PartonSystems* partonSystemsPtrIn, UserHooks* userHooksPtrIn,
89 MergingHooks* mergingHooksPtrIn = 0) {
90 infoPtr = infoPtrIn; settingsPtr = settingsPtrIn;
91 particleDataPtr = particleDataPtrIn; rndmPtr = rndmPtrIn;
92 coupSMPtr = coupSMPtrIn; partonSystemsPtr = partonSystemsPtrIn;
93 userHooksPtr = userHooksPtrIn; mergingHooksPtr = mergingHooksPtrIn;}
96 virtual void init(BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn);
99 void reassignBeamPtrs( BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn,
100 int beamOffsetIn = 0) {beamAPtr = beamAPtrIn; beamBPtr = beamBPtrIn;
101 beamOffset = beamOffsetIn;}
104 virtual bool limitPTmax(
Event& event,
double Q2Fac = 0.,
108 virtual double enhancePTmax()
const {
return pTmaxFudge;}
111 virtual void prepare(
int iSys,
Event& event,
bool limitPTmaxIn =
true);
115 virtual void update(
int ,
Event&,
bool hasWeakRad =
false);
118 virtual double pTnext(
Event& event,
double pTbegAll,
double pTendAll,
122 virtual bool branch(
Event& event);
125 int system()
const {
return iSysSel;}
128 bool doRestart()
const {
return rescatterFail;}
131 bool getHasWeaklyRadiated() {
return hasWeaklyRadiated;}
134 virtual void list(ostream& os = cout)
const;
142 Settings* settingsPtr;
145 ParticleData* particleDataPtr;
154 BeamParticle* beamAPtr;
155 BeamParticle* beamBPtr;
159 PartonSystems* partonSystemsPtr;
162 UserHooks* userHooksPtr;
165 WeakShowerMEs weakShowerMEs;
175 static const int MAXLOOPTINYPDF;
176 static const double MCMIN, MBMIN, CTHRESHOLD, BTHRESHOLD, EVALPDFSTEP,
177 TINYPDF, TINYKERNELPDF, TINYPT2, HEAVYPT2EVOL, HEAVYXEVOL,
178 EXTRASPACEQ, LAMBDA3MARGIN, PT2MINWARN, LEPTONXMIN, LEPTONXMAX,
179 LEPTONPT2MIN, LEPTONFUDGE, WEAKPSWEIGHT, HEADROOMQ2Q, HEADROOMQ2G,
180 HEADROOMG2G, HEADROOMG2Q;
183 bool doQCDshower, doQEDshowerByQ, doQEDshowerByL, useSamePTasMPI,
184 doWeakShower, doMEcorrections, doMEafterFirst, doPhiPolAsym,
185 doPhiIntAsym, doRapidityOrder, useFixedFacScale, doSecondHard,
186 canVetoEmission, alphaSuseCMW, singleWeakEmission, vetoWeakJets;
187 int pTmaxMatch, pTdampMatch, alphaSorder, alphaSnfmax, alphaEMorder,
188 nQuarkIn, enhanceScreening, weakMode;
189 double pTdampFudge, mc, mb, m2c, m2b, renormMultFac, factorMultFac,
190 fixedFacScale2, alphaSvalue, alphaS2pi, Lambda3flav, Lambda4flav,
191 Lambda5flav, Lambda3flav2, Lambda4flav2, Lambda5flav2, pT0Ref,
192 ecmRef, ecmPow, pTmin, sCM, eCM, pT0, pTminChgQ, pTminChgL, pT20,
193 pT2min, pT2minChgQ, pT2minChgL, pTweakCut, pT2weakCut, pTmaxFudgeMPI,
194 strengthIntAsym, weakEnhancement, mZ, gammaZ, thetaWRat, mW, gammaW,
195 weakMaxWt, vetoWeakDeltaR2;
202 bool sideA, dopTlimit1, dopTlimit2, dopTdamp, hasWeaklyRadiated, tChannel;
203 int iNow, iRec, idDaughter, nRad, idResFirst, idResSecond;
204 double xDaughter, x1Now, x2Now, m2Dip, m2Rec, pT2damp, pTbegRef, pdfScale2;
207 vector<int> nRadA,nRadB;
210 vector<SpaceDipoleEnd> dipEnd;
213 int iDipNow, iSysNow;
214 SpaceDipoleEnd* dipEndNow;
216 SpaceDipoleEnd* dipEndSel;
219 void pT2nextQCD(
double pT2begDip,
double pT2endDip);
222 void pT2nearQCDthreshold( BeamParticle&
beam,
double m2Massive,
223 double m2Threshold,
double xMaxAbs,
double zMinAbs,
227 void pT2nextQED(
double pT2begDip,
double pT2endDip);
230 void pT2nextWeak(
double pT2begDip,
double pT2endDip);
233 int findMEtype(
int iSys,
Event& event,
bool weakRadiation =
false);
236 double calcMEmax(
int MEtype,
int idMother,
int idDaughterIn);
239 double calcMEcorr(
int MEtype,
int idMother,
int idDaughterIn,
double M2,
240 double z,
double Q2,
double m2Sister);
243 double calcMEcorrWeak(
int MEtype,
double m2,
double z,
244 double pT2, Vec4 pMother, Vec4 pB, Vec4 pDaughter,
245 Vec4 pB0, Vec4 p1, Vec4 p2, Vec4 pSister);
248 void findAsymPol(
Event& event, SpaceDipoleEnd* dip);
251 MergingHooks* mergingHooksPtr;
259 #endif // Pythia8_SpaceShower_H