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" 41 m3Fix(), m4Fix(), sHatMin(), sigmaT(), sigmaU(), sigmaTval(), sigmaUval(),
42 sigmaTsum(), sigmaUsum(), pickOther(), pickedU(), particleDataPtr(),
46 bool init(
int inState,
int processLevel,
Info* infoPtr,
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);
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<SigmaProcessPtr> sigmaT, sigmaU;
85 vector<double> sigmaTval, sigmaUval;
86 double sigmaTsum, sigmaUsum;
87 bool pickOther, pickedU;
106 doPartonVertex(), doVarEcm(), setAntiSame(), setAntiSameNow(),
107 pTmaxMatch(), alphaSorder(), alphaEMorder(), alphaSnfmax(), bProfile(),
108 processLevel(), bSelScale(), rescatterMode(), nQuarkIn(), nSample(),
109 enhanceScreening(), pT0paramMode(), alphaSvalue(), Kfactor(), pT0Ref(),
110 ecmRef(), ecmPow(), pTmin(), coreRadius(), coreFraction(), expPow(),
111 ySepResc(), deltaYResc(), sigmaPomP(), mPomP(), pPomP(), sigmaPomPom(),
112 mMaxPertDiff(), mMinPertDiff(), a1(),
113 a0now(), a02now(), bstepNow(), a2max(), b2now(), enhanceBmax(),
114 enhanceBnow(), id1Save(), id2Save(), pT2Save(), x1Save(), x2Save(),
115 sHatSave(), tHatSave(), uHatSave(), alpSsave(), alpEMsave(), pT2FacSave(),
116 pT2RenSave(), xPDF1nowSave(), xPDF2nowSave(), scaleLimitPTsave(),
117 dSigmaDtSelSave(), vsc1(), vsc2(), hasPomeronBeams(), hasLowPow(),
118 globalRecoilFSR(), iDiffSys(), nMaxGlobalRecoilFSR(), bSelHard(), eCM(),
119 sCM(), pT0(), pT20(), pT2min(), pTmax(), pT2max(), pT20R(), pT20minR(),
120 pT20maxR(), pT20min0maxR(), pT2maxmin(), sigmaND(), pT4dSigmaMax(),
121 pT4dProbMax(), dSigmaApprox(), sigmaInt(), sudExpPT(), zeroIntCorr(),
122 normOverlap(), nAvg(), kNow(), normPi(), bAvg(), bDiv(), probLowB(),
123 radius2B(), radius2C(), fracA(), fracB(), fracC(), fracAhigh(),
124 fracBhigh(), fracChigh(), fracABChigh(), expRev(), cDiv(), cMax(),
125 enhanceBavg(), bIsSet(false), bSetInFirst(), isAtLowB(), pickOtherSel(),
126 id1(), id2(), i1Sel(), i2Sel(), id1Sel(), id2Sel(), iPDFA(), nPDFA(1),
127 bNow(), enhanceB(), pT2(), pT2shift(), pT2Ren(), pT2Fac(), x1(),
128 x2(), xT(), xT2(), tau(), y(), sHat(), tHat(), uHat(), alpS(), alpEM(),
129 xPDF1now(), xPDF2now(), dSigmaSum(), x1Sel(), x2Sel(), sHatSel(),
130 tHatSel(), uHatSel(), iPDFAsave(), nStep(), iStepFrom(), iStepTo(),
131 eCMsave(), eStepMin(), eStepMax(), eStepSize(), eStepMix(), eStepFrom(),
132 eStepTo(), beamOffset(), mGmGmMin(), mGmGmMax(), hasGamma(),
133 isGammaGamma(), isGammaHadron(), isHadronGamma(), partonVertexPtr(),
134 sigma2Sel(), dSigmaDtSel() {}
137 bool init(
bool doMPIinit,
int iDiffSysIn,
139 PartonVertexPtr partonVertexPtrIn,
bool hasGammaIn =
false);
143 idAList = idAListIn; nPDFA = idAList.size();
144 mpis = vector<MPIInterpolationInfo>(nPDFA);}
148 sigma2gg.updateBeamIDs(); sigma2qg.updateBeamIDs();
149 sigma2qqbarSame.updateBeamIDs(); sigma2qq.updateBeamIDs();
150 setAntiSameNow = setAntiSame && particleDataPtr->hasAnti(infoPtr->idA())
151 && particleDataPtr->hasAnti(infoPtr->idB());}
160 void setupFirstSys(
Event& process);
164 bool limitPTmax(
Event& event);
165 double scaleLimitPT()
const {
return scaleLimitPTsave;}
168 void prepare(
Event& event,
double pTscale = 1000.,
bool rehashB =
false) {
169 if (!bSetInFirst) overlapNext(event, pTscale, rehashB); }
172 double pTnext(
double pTbegAll,
double pTendAll,
Event& event);
175 bool scatter(
Event& event);
178 void setEmpty() {pT2Ren = alpS = alpEM = x1 = x2 = pT2Fac
179 = xPDF1now = xPDF2now = 0.; bIsSet =
false;}
182 double Q2Ren()
const {
return pT2Ren;}
183 double alphaSH()
const {
return alpS;}
184 double alphaEMH()
const {
return alpEM;}
185 double x1H()
const {
return x1;}
186 double x2H()
const {
return x2;}
187 double Q2Fac()
const {
return pT2Fac;}
188 double pdf1()
const {
return (id1 == 21 ? 4./9. : 1.) * xPDF1now;}
189 double pdf2()
const {
return (id2 == 21 ? 4./9. : 1.) * xPDF2now;}
190 double bMPI()
const {
return (bIsSet) ? bNow : 0.;}
191 double enhanceMPI()
const {
return (bIsSet) ? enhanceB / zeroIntCorr : 1.;}
192 double enhanceMPIavg()
const {
return enhanceBavg;}
197 int getVSC2()
const {
return vsc2;}
202 void setBeamOffset(
int offsetIn) {beamOffset = offsetIn;}
206 void accumulate() {
int iBeg = (infoPtr->isNonDiffractive()) ? 0 : 1;
207 for (
int i = iBeg; i < infoPtr->nMPI(); ++i)
208 ++nGen[ infoPtr->codeMPI(i) ];}
209 void statistics(
bool resetStat =
false);
210 void resetStatistics() {
for ( map<int, int>::iterator iter = nGen.begin();
211 iter != nGen.end(); ++iter) iter->second = 0; }
216 static const bool SHIFTFACSCALE, PREPICKRESCATTER;
217 static const double SIGMAFUDGE, RPT20, PT0STEP, SIGMASTEP, PT0MIN,
218 EXPPOWMIN, PROBATLOWB, BSTEP, BMAX, EXPMAX,
219 KCONVERGE, CONVERT2MB, ROOTMIN, ECMDEV, WTACCWARN,
223 bool allowRescatter, allowDoubleRes, canVetoMPI, doPartonVertex, doVarEcm,
224 setAntiSame, setAntiSameNow, allowIDAswitch;
225 int pTmaxMatch, alphaSorder, alphaEMorder, alphaSnfmax, bProfile,
226 processLevel, bSelScale, rescatterMode, nQuarkIn, nSample,
227 enhanceScreening, pT0paramMode, reuseInit;
228 double alphaSvalue, Kfactor, pT0Ref, ecmRef, ecmPow, pTmin, coreRadius,
229 coreFraction, expPow, ySepResc, deltaYResc, sigmaPomP, mPomP, pPomP,
230 sigmaPomPom, mMaxPertDiff, mMinPertDiff;
235 static const int XDEP_BBIN;
236 static const double XDEP_A0, XDEP_A1, XDEP_BSTEP, XDEP_BSTEPINC,
237 XDEP_CUTOFF, XDEP_WARN, XDEP_SMB2FM;
241 vector <double> sigmaIntWgt, sigmaSumWgt;
252 double a1, a0now, a02now, bstepNow, a2max, b2now, enhanceBmax, enhanceBnow;
255 int id1Save, id2Save;
256 double pT2Save, x1Save, x2Save, sHatSave, tHatSave, uHatSave,
257 alpSsave, alpEMsave, pT2FacSave, pT2RenSave, xPDF1nowSave,
258 xPDF2nowSave, scaleLimitPTsave;
259 SigmaProcessPtr dSigmaDtSelSave;
267 static const int NSUDPTS = 50;
268 friend class MPIInterpolationInfo;
269 bool hasPomeronBeams, hasLowPow, globalRecoilFSR;
270 int iDiffSys, nMaxGlobalRecoilFSR, bSelHard;
271 double eCM, sCM, pT0, pT20, pT2min, pTmax, pT2max, pT20R, pT20minR,
272 pT20maxR, pT20min0maxR, pT2maxmin, sigmaND, pT4dSigmaMax,
273 pT4dProbMax, dSigmaApprox, sigmaInt, sudExpPT[NSUDPTS + 1],
274 zeroIntCorr, normOverlap, nAvg, kNow, normPi, bAvg, bDiv,
275 probLowB, radius2B, radius2C, fracA, fracB, fracC, fracAhigh,
276 fracBhigh, fracChigh, fracABChigh, expRev, cDiv, cMax,
280 bool bIsSet, bSetInFirst, isAtLowB, pickOtherSel;
281 int id1, id2, i1Sel, i2Sel, id1Sel, id2Sel, iPDFA, nPDFA;
283 double bNow, enhanceB, pT2, pT2shift, pT2Ren, pT2Fac, x1, x2, xT, xT2,
284 tau, y, sHat, tHat, uHat, alpS, alpEM, xPDF1now, xPDF2now,
285 dSigmaSum, x1Sel, x2Sel, sHatSel, tHatSel, uHatSel;
288 int iPDFAsave, nStep, iStepFrom, iStepTo;
289 double eCMsave, eStepMin, eStepMax, eStepSize, eStepMix, eStepFrom, eStepTo;
292 struct MPIInterpolationInfo {
294 double eStepMinSave, eStepMaxSave, eStepSizeSave;
295 vector<double> pT0Save, pT4dSigmaMaxSave, pT4dProbMaxSave,
296 sigmaIntSave, zeroIntCorrSave, normOverlapSave, kNowSave,
297 bAvgSave, bDivSave, probLowBSave,
298 fracAhighSave, fracBhighSave, fracChighSave,
299 fracABChighSave, cDivSave, cMaxSave;
300 vector<array<double, MultipartonInteractions::NSUDPTS + 1> > sudExpPTSave;
302 void init(
int nStepIn);
305 vector<MPIInterpolationInfo> mpis;
309 double mGmGmMin, mGmGmMax;
310 bool hasGamma, isGammaGamma, isGammaHadron, isHadronGamma;
313 PartonVertexPtr partonVertexPtr;
318 SigmaProcessPtr dSigmaDtSel;
328 vector<int> scatteredA, scatteredB;
331 void upperEnvelope();
334 void jetCrossSection();
342 double sudakov(
double pT2sud,
double enhance = 1.);
345 double fastPT2(
double pT2beg);
349 double sigmaPT2scatter(
bool isFirst =
false,
bool doSymmetrize =
false);
352 void findScatteredPartons(
Event& event);
355 double sigmaPT2rescatter(
Event& event);
363 void overlapNext(
Event& event,
double pTscale,
bool rehashB);
void prepare(Event &event, double pTscale=1000., bool rehashB=false)
Prepare system for evolution.
Definition: MultipartonInteractions.h:168
SigmaProcessPtr sigmaSel()
Return one subprocess, picked according to relative cross sections.
Definition: MultipartonInteractions.cc:243
Definition: StandardModel.h:23
Definition: PhysicsBase.h:27
double sigma(int id1, int id2, double x1, double x2, double sHat, double tHat, double uHat, double alpS, double alpEM, bool restore=false, bool pickOtherIn=false)
Calculate cross section summed over possibilities.
Definition: MultipartonInteractions.cc:182
The Event class holds all info on the generated event.
Definition: Event.h:408
Definition: BeamParticle.h:133
bool init(int inState, int processLevel, Info *infoPtr, BeamParticle *beamAPtr, BeamParticle *beamBPtr)
Initialize list of processes.
Definition: MultipartonInteractions.cc:37
Definition: MultipartonInteractions.h:35
MultipartonInteractions()
Constructor.
Definition: MultipartonInteractions.h:105
void accumulate()
Definition: MultipartonInteractions.h:206
Definition: StandardModel.h:106
int nProc() const
Return code or name of a specified process, for statistics table.
Definition: MultipartonInteractions.h:67
void updateBeamIDs()
Switch to new beam particle identities.
Definition: MultipartonInteractions.h:50
void initSwitchID(const vector< int > &idAListIn)
Special setup to allow switching between beam PDFs for MPI handling.
Definition: MultipartonInteractions.h:142
bool pickedOther()
Return whether the other, rare processes were selected.
Definition: MultipartonInteractions.h:60
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
void setEmpty()
Set "empty" values to avoid query of undefined quantities.
Definition: MultipartonInteractions.h:178
Definition: MultipartonInteractions.h:100
int getBeamOffset() const
Definition: MultipartonInteractions.h:201
int getVSC1() const
Definition: MultipartonInteractions.h:196
double Q2Ren() const
Get some information on current interaction.
Definition: MultipartonInteractions.h:182
This class holds a map of all ParticleDataEntries.
Definition: ParticleData.h:422
void setBeamID(int iPDFAin)
Switch to new beam particle identities, and possibly PDFs.
Definition: MultipartonInteractions.h:147
SigmaMultiparton()
Constructor.
Definition: MultipartonInteractions.h:40