10 #ifndef Pythia8_MultipartonInteractions_H
11 #define Pythia8_MultipartonInteractions_H
14 #include "BeamParticle.h"
17 #include "PartonSystems.h"
18 #include "PythiaStdlib.h"
20 #include "SigmaTotal.h"
21 #include "SigmaProcess.h"
22 #include "StandardModel.h"
23 #include "UserHooks.h"
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,
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;}
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;
103 bool init(
bool doMPIinit,
int diffractiveModeIn,
Info* infoPtrIn,
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;}
154 void accumulate() {
int iBeg = (infoPtr->isMinBias()) ? 0 : 1;
155 for (
int i = iBeg; i < infoPtr->nMPI(); ++i)
156 ++nGen[ infoPtr->codeMPI(i) ];}
157 void statistics(
bool resetStat =
false, ostream& os = cout);
158 void resetStatistics() {
for ( map<int, int>::iterator iter = nGen.begin();
159 iter != nGen.end(); ++iter) iter->second = 0; }
164 static const bool SHIFTFACSCALE, PREPICKRESCATTER;
165 static const double SIGMAFUDGE, RPT20, PT0STEP, SIGMASTEP, PT0MIN,
166 EXPPOWMIN, PROBATLOWB, BSTEP, BMAX, EXPMAX,
167 KCONVERGE, CONVERT2MB, ROOTMIN, ECMDEV;
170 bool allowRescatter, allowDoubleRes, canVetoMPI;
171 int pTmaxMatch, alphaSorder, alphaEMorder, bProfile, processLevel,
172 rescatterMode, nQuarkIn, nSample, enhanceScreening;
173 double alphaSvalue, Kfactor, pT0Ref, ecmRef, ecmPow, pTmin, coreRadius,
174 coreFraction, expPow, ySepResc, deltaYResc, sigmaPomP, mPomP, pPomP,
175 mMaxPertDiff, mMinPertDiff;
179 static const int XDEP_BBIN;
180 static const double XDEP_A0, XDEP_A1, XDEP_BSTEP, XDEP_BSTEPINC,
181 XDEP_CUTOFF, XDEP_WARN, XDEP_SMB2FM;
185 vector <double> sigmaIntWgt, sigmaSumWgt;
196 double a1, a0now, a02now, bstepNow, a2max, b2now, enhanceBmax, enhanceBnow;
199 int id1Save, id2Save;
200 double pT2Save, x1Save, x2Save, sHatSave, tHatSave, uHatSave,
201 alpSsave, alpEMsave, pT2FacSave, pT2RenSave, xPDF1nowSave,
210 bool hasBaryonBeams, hasLowPow, globalRecoilFSR;
211 int diffractiveMode, nMaxGlobalRecoilFSR;
212 double eCM, sCM, pT0, pT20, pT2min, pTmax, pT2max, pT20R, pT20minR,
213 pT20maxR, pT20min0maxR, pT2maxmin, sigmaND, pT4dSigmaMax,
214 pT4dProbMax, dSigmaApprox, sigmaInt, sudExpPT[101],
215 zeroIntCorr, normOverlap, nAvg, kNow, normPi, bAvg, bDiv,
216 probLowB, radius2B, radius2C, fracA, fracB, fracC, fracAhigh,
217 fracBhigh, fracChigh, fracABChigh, expRev, cDiv, cMax;
220 bool bIsSet, bSetInFirst, isAtLowB, pickOtherSel;
221 int id1, id2, i1Sel, i2Sel, id1Sel, id2Sel;
222 double bNow, enhanceB, pT2, pT2shift, pT2Ren, pT2Fac, x1, x2, xT, xT2,
223 tau, y, sHat, tHat, uHat, alpS, alpEM, xPDF1now, xPDF2now,
224 dSigmaSum, x1Sel, x2Sel, sHatSel, tHatSel, uHatSel;
227 int nStep, iStepFrom, iStepTo;
228 double eCMsave, eStepSize, eStepSave, eStepFrom, eStepTo, pT0Save[5],
229 pT4dSigmaMaxSave[5], pT4dProbMaxSave[5], sigmaIntSave[5],
230 sudExpPTSave[5][101], zeroIntCorrSave[5], normOverlapSave[5],
231 kNowSave[5], bAvgSave[5], bDivSave[5], probLowBSave[5],
232 fracAhighSave[5], fracBhighSave[5], fracChighSave[5],
233 fracABChighSave[5], cDivSave[5], cMaxSave[5];
270 vector<int> scatteredA, scatteredB;
273 void upperEnvelope();
276 void jetCrossSection();
279 double sudakov(
double pT2sud,
double enhance = 1.);
282 double fastPT2(
double pT2beg);
286 double sigmaPT2scatter(
bool isFirst =
false);
289 void findScatteredPartons(
Event& event);
292 double sigmaPT2rescatter(
Event& event);
300 void overlapNext(
Event& event,
double pTscale);
308 #endif // Pythia8_MultipartonInteractions_H