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/PythiaStdlib.h"
19 #include "Pythia8/Settings.h"
20 #include "Pythia8/SigmaTotal.h"
21 #include "Pythia8/SigmaProcess.h"
22 #include "Pythia8/StandardModel.h"
23 #include "Pythia8/UserHooks.h"
33 class SigmaMultiparton {
42 for (
int i = 0; i < int(sigmaT.size()); ++i)
delete sigmaT[i];
43 for (
int i = 0; i < int(sigmaU.size()); ++i)
delete sigmaU[i];}
46 bool init(
int inState,
int processLevel, Info* infoPtr,
47 Settings* settingsPtr, ParticleData* particleDataPtr, Rndm* rndmPtrIn,
48 BeamParticle* beamAPtr, BeamParticle* beamBPtr, Couplings* couplingsPtr);
51 double sigma(
int id1,
int id2,
double x1,
double x2,
double sHat,
52 double tHat,
double uHat,
double alpS,
double alpEM,
53 bool restore =
false,
bool pickOtherIn =
false);
56 bool pickedOther() {
return pickOther;}
59 SigmaProcess* sigmaSel();
60 bool swapTU() {
return pickedU;}
63 int nProc()
const {
return nChan;}
64 int codeProc(
int iProc)
const {
return sigmaT[iProc]->code();}
65 string nameProc(
int iProc)
const {
return sigmaT[iProc]->name();}
70 static const double MASSMARGIN, OTHERFRAC;
74 vector<bool> needMasses;
75 vector<double> m3Fix, m4Fix, sHatMin;
78 vector<SigmaProcess*> sigmaT, sigmaU;
81 vector<double> sigmaTval, sigmaUval;
82 double sigmaTsum, sigmaUsum;
83 bool pickOther, pickedU;
95 class MultipartonInteractions {
100 MultipartonInteractions() : bIsSet(false) {}
103 bool init(
bool doMPIinit,
int iDiffSysIn, Info* infoPtrIn,
104 Settings& settings, ParticleData* particleDataPtr, Rndm* rndmPtrIn,
105 BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn,
106 Couplings* couplingsPtrIn, PartonSystems* partonSystemsPtrIn,
107 SigmaTotal* sigmaTotPtrIn, UserHooks* userHooksPtrIn,
117 void setupFirstSys(
Event& process);
120 bool limitPTmax(
Event& event);
123 void prepare(
Event& event,
double pTscale = 1000.) {
124 if (!bSetInFirst) overlapNext(event, pTscale); }
127 double pTnext(
double pTbegAll,
double pTendAll,
Event& event);
130 bool scatter(
Event& event);
133 void setEmpty() {pT2Ren = alpS = alpEM = x1 = x2 = pT2Fac
134 = xPDF1now = xPDF2now = 0.; bIsSet =
false;}
137 double Q2Ren()
const {
return pT2Ren;}
138 double alphaSH()
const {
return alpS;}
139 double alphaEMH()
const {
return alpEM;}
140 double x1H()
const {
return x1;}
141 double x2H()
const {
return x2;}
142 double Q2Fac()
const {
return pT2Fac;}
143 double pdf1()
const {
return xPDF1now;}
144 double pdf2()
const {
return xPDF2now;}
145 double bMPI()
const {
return (bIsSet) ? bNow / bAvg : 0.;}
146 double enhanceMPI()
const {
return (bIsSet) ? enhanceB / zeroIntCorr : 1.;}
150 int getVSC1()
const {
return vsc1;}
151 int getVSC2()
const {
return vsc2;}
155 void accumulate() {
int iBeg = (infoPtr->isNonDiffractive()) ? 0 : 1;
156 for (
int i = iBeg; i < infoPtr->nMPI(); ++i)
157 ++nGen[ infoPtr->codeMPI(i) ];}
158 void statistics(
bool resetStat =
false, ostream& os = cout);
159 void resetStatistics() {
for ( map<int, int>::iterator iter = nGen.begin();
160 iter != nGen.end(); ++iter) iter->second = 0; }
165 static const bool SHIFTFACSCALE, PREPICKRESCATTER;
166 static const double SIGMAFUDGE, RPT20, PT0STEP, SIGMASTEP, PT0MIN,
167 EXPPOWMIN, PROBATLOWB, BSTEP, BMAX, EXPMAX,
168 KCONVERGE, CONVERT2MB, ROOTMIN, ECMDEV, WTACCWARN;
171 bool allowRescatter, allowDoubleRes, canVetoMPI;
172 int pTmaxMatch, alphaSorder, alphaEMorder, alphaSnfmax, bProfile,
173 processLevel, bSelScale, rescatterMode, nQuarkIn, nSample,
175 double alphaSvalue, Kfactor, pT0Ref, ecmRef, ecmPow, pTmin, coreRadius,
176 coreFraction, expPow, ySepResc, deltaYResc, sigmaPomP, mPomP, pPomP,
177 mMaxPertDiff, mMinPertDiff;
181 static const int XDEP_BBIN;
182 static const double XDEP_A0, XDEP_A1, XDEP_BSTEP, XDEP_BSTEPINC,
183 XDEP_CUTOFF, XDEP_WARN, XDEP_SMB2FM;
187 vector <double> sigmaIntWgt, sigmaSumWgt;
198 double a1, a0now, a02now, bstepNow, a2max, b2now, enhanceBmax, enhanceBnow;
201 int id1Save, id2Save;
202 double pT2Save, x1Save, x2Save, sHatSave, tHatSave, uHatSave,
203 alpSsave, alpEMsave, pT2FacSave, pT2RenSave, xPDF1nowSave,
205 SigmaProcess *dSigmaDtSelSave;
212 bool hasBaryonBeams, hasLowPow, globalRecoilFSR;
213 int iDiffSys, nMaxGlobalRecoilFSR;
214 double eCM, sCM, pT0, pT20, pT2min, pTmax, pT2max, pT20R, pT20minR,
215 pT20maxR, pT20min0maxR, pT2maxmin, sigmaND, pT4dSigmaMax,
216 pT4dProbMax, dSigmaApprox, sigmaInt, sudExpPT[101],
217 zeroIntCorr, normOverlap, nAvg, kNow, normPi, bAvg, bDiv,
218 probLowB, radius2B, radius2C, fracA, fracB, fracC, fracAhigh,
219 fracBhigh, fracChigh, fracABChigh, expRev, cDiv, cMax;
222 bool bIsSet, bSetInFirst, isAtLowB, pickOtherSel;
223 int id1, id2, i1Sel, i2Sel, id1Sel, id2Sel;
224 double bNow, enhanceB, pT2, pT2shift, pT2Ren, pT2Fac, x1, x2, xT, xT2,
225 tau, y, sHat, tHat, uHat, alpS, alpEM, xPDF1now, xPDF2now,
226 dSigmaSum, x1Sel, x2Sel, sHatSel, tHatSel, uHatSel;
229 int nStep, iStepFrom, iStepTo;
230 double eCMsave, eStepSize, eStepSave, eStepFrom, eStepTo, pT0Save[5],
231 pT4dSigmaMaxSave[5], pT4dProbMaxSave[5], sigmaIntSave[5],
232 sudExpPTSave[5][101], zeroIntCorrSave[5], normOverlapSave[5],
233 kNowSave[5], bAvgSave[5], bDivSave[5], probLowBSave[5],
234 fracAhighSave[5], fracBhighSave[5], fracChighSave[5],
235 fracABChighSave[5], cDivSave[5], cMaxSave[5];
244 BeamParticle* beamAPtr;
245 BeamParticle* beamBPtr;
248 Couplings* couplingsPtr;
251 PartonSystems* partonSystemsPtr;
254 SigmaTotal* sigmaTotPtr;
257 UserHooks* userHooksPtr;
260 SigmaMultiparton sigma2gg, sigma2qg, sigma2qqbarSame, sigma2qq;
261 SigmaMultiparton* sigma2Sel;
262 SigmaProcess* dSigmaDtSel;
272 vector<int> scatteredA, scatteredB;
275 void upperEnvelope();
278 void jetCrossSection();
281 double sudakov(
double pT2sud,
double enhance = 1.);
284 double fastPT2(
double pT2beg);
288 double sigmaPT2scatter(
bool isFirst =
false);
291 void findScatteredPartons(
Event& event);
294 double sigmaPT2rescatter(
Event& event);
302 void overlapNext(
Event& event,
double pTscale);
310 #endif // Pythia8_MultipartonInteractions_H