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/PythiaStdlib.h"
20 #include "Pythia8/Settings.h"
21 #include "Pythia8/SigmaTotal.h"
22 #include "Pythia8/SigmaProcess.h"
23 #include "Pythia8/StandardModel.h"
24 #include "Pythia8/UserHooks.h"
34 class SigmaMultiparton {
43 for (
int i = 0; i < int(sigmaT.size()); ++i)
delete sigmaT[i];
44 for (
int i = 0; i < int(sigmaU.size()); ++i)
delete sigmaU[i];}
47 bool init(
int inState,
int processLevel, Info* infoPtr,
48 Settings* settingsPtr, ParticleData* particleDataPtr, Rndm* rndmPtrIn,
49 BeamParticle* beamAPtr, BeamParticle* beamBPtr, Couplings* couplingsPtr);
52 double sigma(
int id1,
int id2,
double x1,
double x2,
double sHat,
53 double tHat,
double uHat,
double alpS,
double alpEM,
54 bool restore =
false,
bool pickOtherIn =
false);
57 bool pickedOther() {
return pickOther;}
60 SigmaProcess* sigmaSel();
61 bool swapTU() {
return pickedU;}
64 int nProc()
const {
return nChan;}
65 int codeProc(
int iProc)
const {
return sigmaT[iProc]->code();}
66 string nameProc(
int iProc)
const {
return sigmaT[iProc]->name();}
71 static const double MASSMARGIN, OTHERFRAC;
75 vector<bool> needMasses;
76 vector<double> m3Fix, m4Fix, sHatMin;
79 vector<SigmaProcess*> sigmaT, sigmaU;
82 vector<double> sigmaTval, sigmaUval;
83 double sigmaTsum, sigmaUsum;
84 bool pickOther, pickedU;
96 class MultipartonInteractions {
101 MultipartonInteractions() : bIsSet(false) {}
104 bool init(
bool doMPIinit,
int iDiffSysIn, Info* infoPtrIn,
105 Settings& settings, ParticleData* particleDataPtr, Rndm* rndmPtrIn,
106 BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn,
107 Couplings* couplingsPtrIn, PartonSystems* partonSystemsPtrIn,
108 SigmaTotal* sigmaTotPtrIn, UserHooks* userHooksPtrIn,
109 PartonVertex* partonVertexPtrIn,
bool hasGammaIn =
false);
118 void setupFirstSys(
Event& process);
122 bool limitPTmax(
Event& event);
123 double scaleLimitPT()
const {
return scaleLimitPTsave;}
126 void prepare(
Event& event,
double pTscale = 1000.,
bool rehashB =
false) {
127 if (!bSetInFirst) overlapNext(event, pTscale, rehashB); }
130 double pTnext(
double pTbegAll,
double pTendAll,
Event& event);
133 bool scatter(
Event& event);
136 void setEmpty() {pT2Ren = alpS = alpEM = x1 = x2 = pT2Fac
137 = xPDF1now = xPDF2now = 0.; bIsSet =
false;}
140 double Q2Ren()
const {
return pT2Ren;}
141 double alphaSH()
const {
return alpS;}
142 double alphaEMH()
const {
return alpEM;}
143 double x1H()
const {
return x1;}
144 double x2H()
const {
return x2;}
145 double Q2Fac()
const {
return pT2Fac;}
146 double pdf1()
const {
return (id1 == 21 ? 4./9. : 1.) * xPDF1now;}
147 double pdf2()
const {
return (id2 == 21 ? 4./9. : 1.) * xPDF2now;}
148 double bMPI()
const {
return (bIsSet) ? bNow : 0.;}
149 double enhanceMPI()
const {
return (bIsSet) ? enhanceB / zeroIntCorr : 1.;}
150 double enhanceMPIavg()
const {
return enhanceBavg;}
154 int getVSC1()
const {
return vsc1;}
155 int getVSC2()
const {
return vsc2;}
159 int getBeamOffset()
const {
return beamOffset;}
160 void setBeamOffset(
int offsetIn) {beamOffset = offsetIn;}
164 void accumulate() {
int iBeg = (infoPtr->isNonDiffractive()) ? 0 : 1;
165 for (
int i = iBeg; i < infoPtr->nMPI(); ++i)
166 ++nGen[ infoPtr->codeMPI(i) ];}
167 void statistics(
bool resetStat =
false);
168 void resetStatistics() {
for ( map<int, int>::iterator iter = nGen.begin();
169 iter != nGen.end(); ++iter) iter->second = 0; }
174 static const bool SHIFTFACSCALE, PREPICKRESCATTER;
175 static const double SIGMAFUDGE, RPT20, PT0STEP, SIGMASTEP, PT0MIN,
176 EXPPOWMIN, PROBATLOWB, BSTEP, BMAX, EXPMAX,
177 KCONVERGE, CONVERT2MB, ROOTMIN, ECMDEV, WTACCWARN,
181 bool allowRescatter, allowDoubleRes, canVetoMPI, doPartonVertex;
182 int pTmaxMatch, alphaSorder, alphaEMorder, alphaSnfmax, bProfile,
183 processLevel, bSelScale, rescatterMode, nQuarkIn, nSample,
184 enhanceScreening, pT0paramMode;
185 double alphaSvalue, Kfactor, pT0Ref, ecmRef, ecmPow, pTmin, coreRadius,
186 coreFraction, expPow, ySepResc, deltaYResc, sigmaPomP, mPomP, pPomP,
187 mMaxPertDiff, mMinPertDiff;
191 static const int XDEP_BBIN;
192 static const double XDEP_A0, XDEP_A1, XDEP_BSTEP, XDEP_BSTEPINC,
193 XDEP_CUTOFF, XDEP_WARN, XDEP_SMB2FM;
197 vector <double> sigmaIntWgt, sigmaSumWgt;
208 double a1, a0now, a02now, bstepNow, a2max, b2now, enhanceBmax, enhanceBnow;
211 int id1Save, id2Save;
212 double pT2Save, x1Save, x2Save, sHatSave, tHatSave, uHatSave,
213 alpSsave, alpEMsave, pT2FacSave, pT2RenSave, xPDF1nowSave,
214 xPDF2nowSave, scaleLimitPTsave;
215 SigmaProcess *dSigmaDtSelSave;
222 bool hasBaryonBeams, hasPomeronBeams, hasLowPow, globalRecoilFSR;
223 int iDiffSys, nMaxGlobalRecoilFSR, bSelHard;
224 double eCM, sCM, pT0, pT20, pT2min, pTmax, pT2max, pT20R, pT20minR,
225 pT20maxR, pT20min0maxR, pT2maxmin, sigmaND, pT4dSigmaMax,
226 pT4dProbMax, dSigmaApprox, sigmaInt, sudExpPT[101],
227 zeroIntCorr, normOverlap, nAvg, kNow, normPi, bAvg, bDiv,
228 probLowB, radius2B, radius2C, fracA, fracB, fracC, fracAhigh,
229 fracBhigh, fracChigh, fracABChigh, expRev, cDiv, cMax,
233 bool bIsSet, bSetInFirst, isAtLowB, pickOtherSel;
234 int id1, id2, i1Sel, i2Sel, id1Sel, id2Sel;
235 double bNow, enhanceB, pT2, pT2shift, pT2Ren, pT2Fac, x1, x2, xT, xT2,
236 tau, y, sHat, tHat, uHat, alpS, alpEM, xPDF1now, xPDF2now,
237 dSigmaSum, x1Sel, x2Sel, sHatSel, tHatSel, uHatSel;
240 int nStep, iStepFrom, iStepTo;
241 double eCMsave, eStepSize, eStepSave, eStepFrom, eStepTo, pT0Save[5],
242 pT4dSigmaMaxSave[5], pT4dProbMaxSave[5], sigmaIntSave[5],
243 sudExpPTSave[5][101], zeroIntCorrSave[5], normOverlapSave[5],
244 kNowSave[5], bAvgSave[5], bDivSave[5], probLowBSave[5],
245 fracAhighSave[5], fracBhighSave[5], fracChighSave[5],
246 fracABChighSave[5], cDivSave[5], cMaxSave[5];
250 double mGmGmMin, mGmGmMax;
251 bool hasGamma, isGammaGamma, isGammaHadron, isHadronGamma;
260 BeamParticle* beamAPtr;
261 BeamParticle* beamBPtr;
264 Couplings* couplingsPtr;
267 PartonSystems* partonSystemsPtr;
270 SigmaTotal* sigmaTotPtr;
273 UserHooks* userHooksPtr;
276 PartonVertex* partonVertexPtr;
279 SigmaMultiparton sigma2gg, sigma2qg, sigma2qqbarSame, sigma2qq;
280 SigmaMultiparton* sigma2Sel;
281 SigmaProcess* dSigmaDtSel;
291 vector<int> scatteredA, scatteredB;
294 void upperEnvelope();
297 void jetCrossSection();
300 double sudakov(
double pT2sud,
double enhance = 1.);
303 double fastPT2(
double pT2beg);
307 double sigmaPT2scatter(
bool isFirst =
false);
310 void findScatteredPartons(
Event& event);
313 double sigmaPT2rescatter(
Event& event);
321 void overlapNext(
Event& event,
double pTscale,
bool rehashB);
329 #endif // Pythia8_MultipartonInteractions_H