10 #ifndef Pythia8_MultipartonInteractions_H
11 #define Pythia8_MultipartonInteractions_H
13 #include "Pythia8/Basics.h"
14 #include "Pythia8/BeamParticle.h"
15 #include "Pythia8/Event.h"
16 #include "Pythia8/Info.h"
17 #include "Pythia8/PartonSystems.h"
18 #include "Pythia8/PartonVertex.h"
19 #include "Pythia8/PhysicsBase.h"
20 #include "Pythia8/PythiaStdlib.h"
21 #include "Pythia8/Settings.h"
22 #include "Pythia8/SigmaTotal.h"
23 #include "Pythia8/SigmaProcess.h"
24 #include "Pythia8/StandardModel.h"
25 #include "Pythia8/UserHooks.h"
35 class SigmaMultiparton {
40 SigmaMultiparton() : nChan(), needMasses(), useNarrowBW3(), useNarrowBW4(),
41 m3Fix(), m4Fix(), sHatMin(), sigmaT(), sigmaU(), sigmaTval(), sigmaUval(),
42 sigmaTsum(), sigmaUsum(), pickOther(), pickedU(), particleDataPtr(),
47 for (
int i = 0; i < int(sigmaT.size()); ++i)
delete sigmaT[i];
48 for (
int i = 0; i < int(sigmaU.size()); ++i)
delete sigmaU[i];}
51 bool init(
int inState,
int processLevel, Info* infoPtr,
52 BeamParticle* beamAPtr, BeamParticle* beamBPtr);
55 double sigma(
int id1,
int id2,
double x1,
double x2,
double sHat,
56 double tHat,
double uHat,
double alpS,
double alpEM,
57 bool restore =
false,
bool pickOtherIn =
false);
60 bool pickedOther() {
return pickOther;}
63 SigmaProcess* sigmaSel();
64 bool swapTU() {
return pickedU;}
67 int nProc()
const {
return nChan;}
68 int codeProc(
int iProc)
const {
return sigmaT[iProc]->code();}
69 string nameProc(
int iProc)
const {
return sigmaT[iProc]->name();}
74 static const double MASSMARGIN, OTHERFRAC;
78 vector<bool> needMasses, useNarrowBW3, useNarrowBW4;
79 vector<double> m3Fix, m4Fix, sHatMin;
82 vector<SigmaProcess*> sigmaT, sigmaU;
85 vector<double> sigmaTval, sigmaUval;
86 double sigmaTsum, sigmaUsum;
87 bool pickOther, pickedU;
90 ParticleData* particleDataPtr;
100 class MultipartonInteractions :
public PhysicsBase {
105 MultipartonInteractions() : allowRescatter(), allowDoubleRes(), canVetoMPI(),
106 doPartonVertex(), doVarEcm(), pTmaxMatch(), alphaSorder(), alphaEMorder(),
107 alphaSnfmax(), bProfile(), processLevel(), bSelScale(), rescatterMode(),
108 nQuarkIn(), nSample(), enhanceScreening(), pT0paramMode(), alphaSvalue(),
109 Kfactor(), pT0Ref(), ecmRef(), ecmPow(), pTmin(), coreRadius(),
110 coreFraction(), expPow(), ySepResc(), deltaYResc(), sigmaPomP(), mPomP(),
111 pPomP(), mMaxPertDiff(), mMinPertDiff(), a1(), a0now(), a02now(),
112 bstepNow(), a2max(), b2now(), enhanceBmax(), enhanceBnow(), id1Save(),
113 id2Save(), pT2Save(), x1Save(), x2Save(), sHatSave(), tHatSave(),
114 uHatSave(), alpSsave(), alpEMsave(), pT2FacSave(), pT2RenSave(),
115 xPDF1nowSave(), xPDF2nowSave(), scaleLimitPTsave(), dSigmaDtSelSave(),
116 vsc1(), vsc2(), hasBaryonBeams(), hasPomeronBeams(), hasLowPow(),
117 globalRecoilFSR(), iDiffSys(), nMaxGlobalRecoilFSR(), bSelHard(), eCM(),
118 sCM(), pT0(), pT20(), pT2min(), pTmax(), pT2max(), pT20R(), pT20minR(),
119 pT20maxR(), pT20min0maxR(), pT2maxmin(), sigmaND(), pT4dSigmaMax(),
120 pT4dProbMax(), dSigmaApprox(), sigmaInt(), sudExpPT(), zeroIntCorr(),
121 normOverlap(), nAvg(), kNow(), normPi(), bAvg(), bDiv(), probLowB(),
122 radius2B(), radius2C(), fracA(), fracB(), fracC(), fracAhigh(),
123 fracBhigh(), fracChigh(), fracABChigh(), expRev(), cDiv(), cMax(),
124 enhanceBavg(), bIsSet(false), bSetInFirst(), isAtLowB(), pickOtherSel(),
125 id1(), id2(), i1Sel(), i2Sel(), id1Sel(), id2Sel(), bNow(), enhanceB(),
126 pT2(), pT2shift(), pT2Ren(), pT2Fac(), x1(), x2(), xT(), xT2(), tau(),
127 y(), sHat(), tHat(), uHat(), alpS(), alpEM(), xPDF1now(), xPDF2now(),
128 dSigmaSum(), x1Sel(), x2Sel(), sHatSel(), tHatSel(), uHatSel(), nStep(),
129 iStepFrom(), iStepTo(), eCMsave(), eStepMin(), eStepMax(), eStepSize(),
130 eStepSave(), eStepFrom(), eStepTo(), pT0Save(), pT4dSigmaMaxSave(),
131 pT4dProbMaxSave(), sigmaIntSave(), sudExpPTSave(), zeroIntCorrSave(),
132 normOverlapSave(), kNowSave(), bAvgSave(), bDivSave(), probLowBSave(),
133 fracAhighSave(), fracBhighSave(), fracChighSave(), fracABChighSave(),
134 cDivSave(), cMaxSave(), beamOffset(), mGmGmMin(), mGmGmMax(), hasGamma(),
135 isGammaGamma(), isGammaHadron(), isHadronGamma(),
136 partonVertexPtr(), sigma2Sel(), dSigmaDtSel() {}
139 bool init(
bool doMPIinit,
int iDiffSysIn,
140 BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn,
141 PartonVertexPtr partonVertexPtrIn,
bool hasGammaIn =
false);
150 void setupFirstSys(
Event& process);
154 bool limitPTmax(
Event& event);
155 double scaleLimitPT()
const {
return scaleLimitPTsave;}
158 void prepare(
Event& event,
double pTscale = 1000.,
bool rehashB =
false) {
159 if (!bSetInFirst) overlapNext(event, pTscale, rehashB); }
162 double pTnext(
double pTbegAll,
double pTendAll,
Event& event);
165 bool scatter(
Event& event);
168 void setEmpty() {pT2Ren = alpS = alpEM = x1 = x2 = pT2Fac
169 = xPDF1now = xPDF2now = 0.; bIsSet =
false;}
172 double Q2Ren()
const {
return pT2Ren;}
173 double alphaSH()
const {
return alpS;}
174 double alphaEMH()
const {
return alpEM;}
175 double x1H()
const {
return x1;}
176 double x2H()
const {
return x2;}
177 double Q2Fac()
const {
return pT2Fac;}
178 double pdf1()
const {
return (id1 == 21 ? 4./9. : 1.) * xPDF1now;}
179 double pdf2()
const {
return (id2 == 21 ? 4./9. : 1.) * xPDF2now;}
180 double bMPI()
const {
return (bIsSet) ? bNow : 0.;}
181 double enhanceMPI()
const {
return (bIsSet) ? enhanceB / zeroIntCorr : 1.;}
182 double enhanceMPIavg()
const {
return enhanceBavg;}
186 int getVSC1()
const {
return vsc1;}
187 int getVSC2()
const {
return vsc2;}
191 int getBeamOffset()
const {
return beamOffset;}
192 void setBeamOffset(
int offsetIn) {beamOffset = offsetIn;}
196 void accumulate() {
int iBeg = (infoPtr->isNonDiffractive()) ? 0 : 1;
197 for (
int i = iBeg; i < infoPtr->nMPI(); ++i)
198 ++nGen[ infoPtr->codeMPI(i) ];}
199 void statistics(
bool resetStat =
false);
200 void resetStatistics() {
for ( map<int, int>::iterator iter = nGen.begin();
201 iter != nGen.end(); ++iter) iter->second = 0; }
206 static const bool SHIFTFACSCALE, PREPICKRESCATTER;
207 static const double SIGMAFUDGE, RPT20, PT0STEP, SIGMASTEP, PT0MIN,
208 EXPPOWMIN, PROBATLOWB, BSTEP, BMAX, EXPMAX,
209 KCONVERGE, CONVERT2MB, ROOTMIN, ECMDEV, WTACCWARN,
213 bool allowRescatter, allowDoubleRes, canVetoMPI, doPartonVertex, doVarEcm;
214 int pTmaxMatch, alphaSorder, alphaEMorder, alphaSnfmax, bProfile,
215 processLevel, bSelScale, rescatterMode, nQuarkIn, nSample,
216 enhanceScreening, pT0paramMode;
217 double alphaSvalue, Kfactor, pT0Ref, ecmRef, ecmPow, pTmin, coreRadius,
218 coreFraction, expPow, ySepResc, deltaYResc, sigmaPomP, mPomP, pPomP,
219 mMaxPertDiff, mMinPertDiff;
223 static const int XDEP_BBIN;
224 static const double XDEP_A0, XDEP_A1, XDEP_BSTEP, XDEP_BSTEPINC,
225 XDEP_CUTOFF, XDEP_WARN, XDEP_SMB2FM;
229 vector <double> sigmaIntWgt, sigmaSumWgt;
240 double a1, a0now, a02now, bstepNow, a2max, b2now, enhanceBmax, enhanceBnow;
243 int id1Save, id2Save;
244 double pT2Save, x1Save, x2Save, sHatSave, tHatSave, uHatSave,
245 alpSsave, alpEMsave, pT2FacSave, pT2RenSave, xPDF1nowSave,
246 xPDF2nowSave, scaleLimitPTsave;
247 SigmaProcess *dSigmaDtSelSave;
254 bool hasBaryonBeams, hasPomeronBeams, hasLowPow, globalRecoilFSR;
255 int iDiffSys, nMaxGlobalRecoilFSR, bSelHard;
256 double eCM, sCM, pT0, pT20, pT2min, pTmax, pT2max, pT20R, pT20minR,
257 pT20maxR, pT20min0maxR, pT2maxmin, sigmaND, pT4dSigmaMax,
258 pT4dProbMax, dSigmaApprox, sigmaInt, sudExpPT[101],
259 zeroIntCorr, normOverlap, nAvg, kNow, normPi, bAvg, bDiv,
260 probLowB, radius2B, radius2C, fracA, fracB, fracC, fracAhigh,
261 fracBhigh, fracChigh, fracABChigh, expRev, cDiv, cMax,
265 bool bIsSet, bSetInFirst, isAtLowB, pickOtherSel;
266 int id1, id2, i1Sel, i2Sel, id1Sel, id2Sel;
267 double bNow, enhanceB, pT2, pT2shift, pT2Ren, pT2Fac, x1, x2, xT, xT2,
268 tau, y, sHat, tHat, uHat, alpS, alpEM, xPDF1now, xPDF2now,
269 dSigmaSum, x1Sel, x2Sel, sHatSel, tHatSel, uHatSel;
272 int nStep, iStepFrom, iStepTo;
273 double eCMsave, eStepMin, eStepMax, eStepSize, eStepSave, eStepFrom, eStepTo,
274 pT0Save[20], pT4dSigmaMaxSave[20], pT4dProbMaxSave[20],
275 sigmaIntSave[20], sudExpPTSave[20][101], zeroIntCorrSave[20],
276 normOverlapSave[20], kNowSave[20], bAvgSave[20], bDivSave[20],
277 probLowBSave[20], fracAhighSave[20], fracBhighSave[20],
278 fracChighSave[20], fracABChighSave[20], cDivSave[20], cMaxSave[20];
282 double mGmGmMin, mGmGmMax;
283 bool hasGamma, isGammaGamma, isGammaHadron, isHadronGamma;
286 PartonVertexPtr partonVertexPtr;
289 SigmaMultiparton sigma2gg, sigma2qg, sigma2qqbarSame, sigma2qq;
290 SigmaMultiparton* sigma2Sel;
291 SigmaProcess* dSigmaDtSel;
301 vector<int> scatteredA, scatteredB;
304 void upperEnvelope();
307 void jetCrossSection();
310 double sudakov(
double pT2sud,
double enhance = 1.);
313 double fastPT2(
double pT2beg);
317 double sigmaPT2scatter(
bool isFirst =
false);
320 void findScatteredPartons(
Event& event);
323 double sigmaPT2rescatter(
Event& event);
331 void overlapNext(
Event& event,
double pTscale,
bool rehashB);
339 #endif // Pythia8_MultipartonInteractions_H