10 #ifndef Pythia8_TimeShower_H
11 #define Pythia8_TimeShower_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"
37 TimeDipoleEnd() : iRadiator(-1), iRecoiler(-1), pTmax(0.), colType(0),
38 chgType(0), gamType(0), weakType(0), isrType(0), system(0), systemRec(0),
39 MEtype(0), iMEpartner(-1), weakPol(0), isOctetOnium(false),
40 isHiddenValley(false), colvType(0), MEmix(0.), MEorder(true),
41 MEsplit(true), MEgluinoRec(false), isFlexible(false) { }
42 TimeDipoleEnd(
int iRadiatorIn,
int iRecoilerIn,
double pTmaxIn = 0.,
43 int colIn = 0,
int chgIn = 0,
int gamIn = 0,
int weakTypeIn = 0,
44 int isrIn = 0,
int systemIn = 0,
int MEtypeIn = 0,
int iMEpartnerIn = -1,
45 int weakPolIn = 0,
bool isOctetOniumIn =
false,
46 bool isHiddenValleyIn =
false,
int colvTypeIn = 0,
double MEmixIn = 0.,
47 bool MEorderIn =
true,
bool MEsplitIn =
true,
bool MEgluinoRecIn =
false,
48 bool isFlexibleIn =
false) :
49 iRadiator(iRadiatorIn), iRecoiler(iRecoilerIn), pTmax(pTmaxIn),
50 colType(colIn), chgType(chgIn), gamType(gamIn), weakType(weakTypeIn),
51 isrType(isrIn), system(systemIn), systemRec(systemIn), MEtype(MEtypeIn),
52 iMEpartner(iMEpartnerIn), weakPol(weakPolIn), isOctetOnium(isOctetOniumIn),
53 isHiddenValley(isHiddenValleyIn), colvType(colvTypeIn), MEmix(MEmixIn),
54 MEorder (MEorderIn), MEsplit(MEsplitIn), MEgluinoRec(MEgluinoRecIn),
55 isFlexible(isFlexibleIn) { }
58 int iRadiator, iRecoiler;
60 int colType, chgType, gamType, weakType, isrType, system, systemRec,
61 MEtype, iMEpartner, weakPol;
62 bool isOctetOnium, isHiddenValley;
65 bool MEorder, MEsplit, MEgluinoRec, isFlexible;
69 double mRad, m2Rad, mRec, m2Rec, mDip, m2Dip, m2DipCorr,
70 pT2, m2, z, mFlavour, asymPol, flexFactor;
83 TimeShower() {beamOffset = 0;}
86 virtual ~TimeShower() {}
90 void initPtr(Info* infoPtrIn, Settings* settingsPtrIn,
91 ParticleData* particleDataPtrIn, Rndm* rndmPtrIn,
92 CoupSM* coupSMPtrIn, PartonSystems* partonSystemsPtrIn,
93 UserHooks* userHooksPtrIn, MergingHooks* mergingHooksPtrIn = 0) {
94 infoPtr = infoPtrIn; settingsPtr = settingsPtrIn;
95 particleDataPtr = particleDataPtrIn; rndmPtr = rndmPtrIn;
96 coupSMPtr = coupSMPtrIn; partonSystemsPtr = partonSystemsPtrIn;
97 userHooksPtr = userHooksPtrIn; mergingHooksPtr = mergingHooksPtrIn;}
100 virtual void init( BeamParticle* beamAPtrIn = 0,
101 BeamParticle* beamBPtrIn = 0);
104 void reassignBeamPtrs( BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn,
105 int beamOffsetIn = 0) {beamAPtr = beamAPtrIn; beamBPtr = beamBPtrIn;
106 beamOffset = beamOffsetIn;}
109 virtual bool limitPTmax(
Event& event,
double Q2Fac = 0.,
113 double enhancePTmax() {
return pTmaxFudge;}
116 virtual int shower(
int iBeg,
int iEnd,
Event& event,
double pTmax,
120 virtual int showerQED(
int i1,
int i2,
Event& event,
double pTmax);
123 double pTLastInShower() {
return pTLastBranch;}
126 virtual void prepareGlobal(
Event& event);
129 virtual void prepare(
int iSys,
Event& event,
bool limitPTmaxIn =
true);
132 virtual void rescatterUpdate(
int iSys,
Event& event);
135 virtual void update(
int iSys,
Event& event,
bool hasWeakRad =
false);
138 virtual double pTnext(
Event& event,
double pTbegAll,
double pTendAll,
139 bool isFirstTrial =
false);
142 virtual bool branch(
Event& event,
bool isInterleaved =
false);
145 int system()
const {
return iSysSel;};
148 bool getHasWeaklyRadiated() {
return hasWeaklyRadiated;}
151 virtual void list( ostream& os = cout)
const;
159 Settings* settingsPtr;
162 ParticleData* particleDataPtr;
171 BeamParticle* beamAPtr;
172 BeamParticle* beamBPtr;
176 PartonSystems* partonSystemsPtr;
179 UserHooks* userHooksPtr;
182 WeakShowerMEs weakShowerMEs;
186 double pTmaxFudge, pTLastBranch;
191 static const double MCMIN, MBMIN, SIMPLIFYROOT, XMARGIN, XMARGINCOMB,
192 TINYPDF, LARGEM2, THRESHM2, LAMBDA3MARGIN, WEAKPSWEIGHT, WG2QEXTRA;
194 static const bool FIXRESCATTER, VETONEGENERGY;
195 static const double MAXVIRTUALITYFRACTION, MAXNEGENERGYFRACTION;
198 bool doQCDshower, doQEDshowerByQ, doQEDshowerByL, doQEDshowerByGamma,
199 doWeakShower, doMEcorrections, doMEafterFirst, doPhiPolAsym,
200 doInterleave, allowBeamRecoil, dampenBeamRecoil, recoilToColoured,
201 useFixedFacScale, allowRescatter, canVetoEmission, doHVshower,
202 brokenHVsym, globalRecoil, useLocalRecoilNow, doSecondHard,
203 singleWeakEmission, alphaSuseCMW, vetoWeakJets;
204 int pTmaxMatch, pTdampMatch, alphaSorder, alphaSnfmax, nGluonToQuark,
205 weightGluonToQuark, alphaEMorder, nGammaToQuark, nGammaToLepton,
206 nCHV, idHV, nMaxGlobalRecoil, weakMode;
207 double pTdampFudge, mc, mb, m2c, m2b, renormMultFac, factorMultFac,
208 fixedFacScale2, alphaSvalue, alphaS2pi, Lambda3flav, Lambda4flav,
209 Lambda5flav, Lambda3flav2, Lambda4flav2, Lambda5flav2,
210 scaleGluonToQuark, extraGluonToQuark, pTcolCutMin, pTcolCut,
211 pT2colCut, pTchgQCut, pT2chgQCut, pTchgLCut, pT2chgLCut,
212 pTweakCut, pT2weakCut, mMaxGamma, m2MaxGamma, octetOniumFraction,
213 octetOniumColFac, mZ, gammaZ, thetaWRat, mW, gammaW, CFHV,
214 alphaHVfix, pThvCut, pT2hvCut, mHV, pTmaxFudgeMPI,
215 weakEnhancement, vetoWeakDeltaR2;
222 bool dopTlimit1, dopTlimit2, dopTdamp, hasWeaklyRadiated;
223 double pT2damp, kRad, kEmt, pdfScale2;
226 vector<TimeDipoleEnd> dipEnd;
227 TimeDipoleEnd* dipSel;
231 void setupQCDdip(
int iSys,
int i,
int colTag,
int colSign,
Event& event,
232 bool isOctetOnium =
false,
bool limitPTmaxIn =
true);
233 void setupQEDdip(
int iSys,
int i,
int chgType,
int gamType,
Event& event,
234 bool limitPTmaxIn =
true);
235 void setupWeakdip(
int iSys,
int i,
int weakType,
Event& event,
236 bool limitPTmaxIn =
true);
237 void setupHVdip(
int iSys,
int i,
Event& event,
bool limitPTmaxIn =
true);
240 void pT2nextQCD(
double pT2begDip,
double pT2sel, TimeDipoleEnd& dip,
244 void pT2nextQED(
double pT2begDip,
double pT2sel, TimeDipoleEnd& dip,
248 void pT2nextWeak(
double pT2begDip,
double pT2sel, TimeDipoleEnd& dip,
252 void pT2nextHV(
double pT2begDip,
double pT2sel, TimeDipoleEnd& dip,
256 void findMEtype(
Event& event, TimeDipoleEnd& dip);
259 int findMEparticle(
int id,
bool isHiddenColour =
false);
262 double gammaZmix(
Event& event,
int iRes,
int iDau1,
int iDau2);
265 double findMEcorr(TimeDipoleEnd* dip, Particle& rad, Particle& partner,
266 Particle& emt,
bool cutEdge =
true);
269 double findMEcorrWeak(TimeDipoleEnd* dip, Vec4 rad, Vec4 rec,
270 Vec4 emt, Vec4 p3, Vec4 p4, Vec4 radBef, Vec4 recBef);
273 double calcMEcorr(
int kind,
int combiIn,
double mixIn,
double x1,
274 double x2,
double r1,
double r2,
double r3 = 0.,
bool cutEdge =
true);
277 void findAsymPol(
Event& event, TimeDipoleEnd* dip);
280 bool rescatterPropagateRecoil(
Event& event, Vec4& pNew);
284 vector<int> hardPartons;
287 int nProposed, nHard, nFinalBorn, nMaxGlobalBranch;
289 int nGlobal, globalRecoilMode;
294 MergingHooks* mergingHooksPtr;
302 #endif // Pythia8_TimeShower_H