10 #ifndef Pythia8_SimpleTimeShower_H
11 #define Pythia8_SimpleTimeShower_H
13 #include "Pythia8/TimeShower.h"
14 #include "Pythia8/SimpleWeakShowerMEs.h"
27 TimeDipoleEnd() : iRadiator(-1), iRecoiler(-1), pTmax(0.), colType(0),
28 chgType(0), gamType(0), weakType(0), isrType(0), system(0), systemRec(0),
29 MEtype(0), iMEpartner(-1), weakPol(0), isOctetOnium(false),
30 isHiddenValley(false), colvType(0), MEmix(0.), MEorder(true),
31 MEsplit(true), MEgluinoRec(false), isFlexible(false), flavour(), iAunt(),
32 mRad(), m2Rad(), mRec(), m2Rec(), mDip(), m2Dip(), m2DipCorr(), pT2(),
33 m2(), z(), mFlavour(), asymPol(), flexFactor(), pAccept() { }
34 TimeDipoleEnd(
int iRadiatorIn,
int iRecoilerIn,
double pTmaxIn = 0.,
35 int colIn = 0,
int chgIn = 0,
int gamIn = 0,
int weakTypeIn = 0,
36 int isrIn = 0,
int systemIn = 0,
int MEtypeIn = 0,
int iMEpartnerIn = -1,
37 int weakPolIn = 0,
bool isOctetOniumIn =
false,
38 bool isHiddenValleyIn =
false,
int colvTypeIn = 0,
double MEmixIn = 0.,
39 bool MEorderIn =
true,
bool MEsplitIn =
true,
bool MEgluinoRecIn =
false,
40 bool isFlexibleIn =
false) :
41 iRadiator(iRadiatorIn), iRecoiler(iRecoilerIn), pTmax(pTmaxIn),
42 colType(colIn), chgType(chgIn), gamType(gamIn), weakType(weakTypeIn),
43 isrType(isrIn), system(systemIn), systemRec(systemIn), MEtype(MEtypeIn),
44 iMEpartner(iMEpartnerIn), weakPol(weakPolIn), isOctetOnium(isOctetOniumIn),
45 isHiddenValley(isHiddenValleyIn), colvType(colvTypeIn), MEmix(MEmixIn),
46 MEorder (MEorderIn), MEsplit(MEsplitIn), MEgluinoRec(MEgluinoRecIn),
47 isFlexible(isFlexibleIn), hasJunction(false), flavour(), iAunt(), mRad(),
48 m2Rad(), mRec(), m2Rec(), mDip(), m2Dip(), m2DipCorr(), pT2(), m2(), z(),
49 mFlavour(), asymPol(), flexFactor(), pAccept() { }
52 int iRadiator, iRecoiler;
54 int colType, chgType, gamType, weakType, isrType, system, systemRec,
55 MEtype, iMEpartner, weakPol;
56 bool isOctetOnium, isHiddenValley;
59 bool MEorder, MEsplit, MEgluinoRec, isFlexible;
64 double mRad, m2Rad, mRec, m2Rec, mDip, m2Dip, m2DipCorr,
65 pT2, m2, z, mFlavour, asymPol, flexFactor, pAccept;
79 pTLastBranch(), doQCDshower(), doQEDshowerByQ(), doQEDshowerByL(),
80 doQEDshowerByOther(), doQEDshowerByGamma(), doWeakShower(),
81 doMEcorrections(), doMEextended(), doMEafterFirst(), doPhiPolAsym(),
82 doPhiPolAsymHard(), doInterleave(), allowBeamRecoil(), dampenBeamRecoil(),
83 recoilToColoured(), useFixedFacScale(), allowRescatter(),
84 canVetoEmission(), doHVshower(), brokenHVsym(), globalRecoil(),
85 useLocalRecoilNow(), doSecondHard(), hasUserHooks(), singleWeakEmission(),
86 alphaSuseCMW(), vetoWeakJets(), allowMPIdipole(), weakExternal(),
87 recoilDeadCone(), doDipoleRecoil(), doPartonVertex(), pTmaxMatch(),
88 pTdampMatch(), alphaSorder(), alphaSnfmax(), nGluonToQuark(),
89 weightGluonToQuark(), alphaEMorder(), nGammaToQuark(), nGammaToLepton(),
90 nCHV(), idHV(), alphaHVorder(), nMaxGlobalRecoil(), weakMode(),
91 pTdampFudge(), mc(), mb(), m2c(), m2b(), renormMultFac(), factorMultFac(),
92 fixedFacScale2(), alphaSvalue(), alphaS2pi(), Lambda3flav(), Lambda4flav(),
93 Lambda5flav(), Lambda3flav2(), Lambda4flav2(), Lambda5flav2(),
94 scaleGluonToQuark(), extraGluonToQuark(), pTcolCutMin(), pTcolCut(),
95 pT2colCut(), pTchgQCut(), pT2chgQCut(), pTchgLCut(), pT2chgLCut(),
96 pTweakCut(), pT2weakCut(), mMaxGamma(), m2MaxGamma(), octetOniumFraction(),
97 octetOniumColFac(), mZ(), gammaZ(), thetaWRat(), mW(), gammaW(), CFHV(),
98 nFlavHV(), alphaHVfix(), LambdaHV(), pThvCut(), pT2hvCut(), mHV(),
99 pTmaxFudgeMPI(), weakEnhancement(), vetoWeakDeltaR2(), twoHard(),
100 dopTlimit1(), dopTlimit2(), dopTdamp(), pT2damp(), kRad(), kEmt(),
101 pdfScale2(), doTrialNow(), canEnhanceEmission(), canEnhanceTrial(),
102 canEnhanceET(), doUncertaintiesNow(), dipSel(), iDipSel(), nHard(),
103 nFinalBorn(), nMaxGlobalBranch(), nGlobal(), globalRecoilMode(),
104 limitMUQ(), weakHardSize() { beamOffset = 0;}
114 virtual bool limitPTmax(
Event& event,
double Q2Fac = 0.,
118 virtual int shower(
int iBeg,
int iEnd,
Event& event,
double pTmax,
122 virtual int showerQED(
int i1,
int i2,
Event& event,
double pTmax);
125 virtual void prepareGlobal(
Event& event);
128 virtual void prepare(
int iSys,
Event& event,
bool limitPTmaxIn =
true);
131 virtual void rescatterUpdate(
int iSys,
Event& event);
134 virtual void update(
int iSys,
Event& event,
bool hasWeakRad =
false);
137 virtual double pTnext(
Event& event,
double pTbegAll,
double pTendAll,
138 bool isFirstTrial =
false,
bool doTrialIn =
false);
141 virtual bool branch(
Event& event,
bool isInterleaved =
false);
144 virtual void list()
const;
147 virtual bool initUncertainties();
150 virtual bool getHasWeaklyRadiated() {
return hasWeaklyRadiated;}
153 virtual int system()
const {
return iSysSel;}
156 virtual double enhancePTmax() {
return pTmaxFudge;}
159 virtual double pTLastInShower() {
return pTLastBranch;}
164 static const double MCMIN, MBMIN, SIMPLIFYROOT, XMARGIN, XMARGINCOMB,
165 TINYPDF, LARGEM2, THRESHM2, LAMBDA3MARGIN, WEAKPSWEIGHT, WG2QEXTRA,
166 REJECTFACTOR, PROBLIMIT;
168 static const bool FIXRESCATTER, VETONEGENERGY;
169 static const double MAXVIRTUALITYFRACTION, MAXNEGENERGYFRACTION;
172 bool hasWeaklyRadiated;
174 double pTmaxFudge, pTLastBranch;
177 bool doQCDshower, doQEDshowerByQ, doQEDshowerByL, doQEDshowerByOther,
178 doQEDshowerByGamma, doWeakShower, doMEcorrections, doMEextended,
179 doMEafterFirst, doPhiPolAsym, doPhiPolAsymHard, doInterleave,
180 allowBeamRecoil, dampenBeamRecoil, recoilToColoured, useFixedFacScale,
181 allowRescatter, canVetoEmission, doHVshower, brokenHVsym,
182 globalRecoil, useLocalRecoilNow, doSecondHard, hasUserHooks,
183 singleWeakEmission, alphaSuseCMW, vetoWeakJets, allowMPIdipole,
184 weakExternal, recoilDeadCone, doDipoleRecoil, doPartonVertex;
185 int pTmaxMatch, pTdampMatch, alphaSorder, alphaSnfmax, nGluonToQuark,
186 weightGluonToQuark, alphaEMorder, nGammaToQuark, nGammaToLepton,
187 nCHV, idHV, alphaHVorder, nMaxGlobalRecoil, weakMode;
188 double pTdampFudge, mc, mb, m2c, m2b, renormMultFac, factorMultFac,
189 fixedFacScale2, alphaSvalue, alphaS2pi, Lambda3flav, Lambda4flav,
190 Lambda5flav, Lambda3flav2, Lambda4flav2, Lambda5flav2,
191 scaleGluonToQuark, extraGluonToQuark, pTcolCutMin, pTcolCut,
192 pT2colCut, pTchgQCut, pT2chgQCut, pTchgLCut, pT2chgLCut,
193 pTweakCut, pT2weakCut, mMaxGamma, m2MaxGamma, octetOniumFraction,
194 octetOniumColFac, mZ, gammaZ, thetaWRat, mW, gammaW, CFHV, nFlavHV,
195 alphaHVfix, LambdaHV, pThvCut, pT2hvCut, mHV, pTmaxFudgeMPI,
196 weakEnhancement, vetoWeakDeltaR2;
206 bool twoHard, dopTlimit1, dopTlimit2, dopTdamp;
207 double pT2damp, kRad, kEmt, pdfScale2;
210 bool doTrialNow, canEnhanceEmission, canEnhanceTrial, canEnhanceET,
212 string splittingNameNow, splittingNameSel;
213 map< double, pair<string,double> > enhanceFactors;
214 void storeEnhanceFactor(
double pT2,
string name,
double enhanceFactorIn)
215 { enhanceFactors.insert(make_pair(pT2,make_pair(name,enhanceFactorIn)));}
218 vector<TimeDipoleEnd> dipEnd;
223 void setupQCDdip(
int iSys,
int i,
int colTag,
int colSign,
Event& event,
224 bool isOctetOnium =
false,
bool limitPTmaxIn =
true);
225 void setupQEDdip(
int iSys,
int i,
int chgType,
int gamType,
Event& event,
226 bool limitPTmaxIn =
true);
227 void setupWeakdip(
int iSys,
int i,
int weakType,
Event& event,
228 bool limitPTmaxIn =
true);
230 void setupWeakdipExternal(
Event& event,
bool limitPTmaxIn =
true);
231 void setupHVdip(
int iSys,
int i,
Event& event,
bool limitPTmaxIn =
true);
234 void pT2nextQCD(
double pT2begDip,
double pT2sel,
TimeDipoleEnd& dip,
238 void pT2nextQED(
double pT2begDip,
double pT2sel,
TimeDipoleEnd& dip,
242 void pT2nextWeak(
double pT2begDip,
double pT2sel,
TimeDipoleEnd& dip,
246 void pT2nextHV(
double pT2begDip,
double pT2sel,
TimeDipoleEnd& dip,
253 int findMEparticle(
int id,
bool isHiddenColour =
false);
256 double gammaZmix(
Event& event,
int iRes,
int iDau1,
int iDau2);
260 Particle& emt,
bool cutEdge =
true);
267 double calcMEcorr(
int kind,
int combiIn,
double mixIn,
double x1,
268 double x2,
double r1,
double r2,
double r3 = 0.,
bool cutEdge =
true);
274 bool rescatterPropagateRecoil(
Event& event,
Vec4& pNew);
278 vector<int> hardPartons;
282 int nHard, nFinalBorn, nMaxGlobalBranch;
284 map<int,int> nProposed;
286 int nGlobal, globalRecoilMode;
293 void calcUncertainties(
bool ,
double ,
double ,
double ,
297 vector<Vec4> weakMomenta;
298 vector<int> weak2to2lines;
307 #endif // Pythia8_SimpleTimeShower_H