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(),
108 alphaEMorder(), alphaSnfmax(), bProfile(), processLevel(), bSelScale(),
109 rescatterMode(), nQuarkIn(), nSample(), enhanceScreening(), pT0paramMode(),
110 alphaSvalue(), Kfactor(), pT0Ref(), ecmRef(), ecmPow(), pTmin(),
111 coreRadius(), coreFraction(), expPow(), ySepResc(), deltaYResc(),
112 sigmaPomP(), mPomP(), pPomP(), 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 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;
266 bool hasPomeronBeams, hasLowPow, globalRecoilFSR;
267 int iDiffSys, nMaxGlobalRecoilFSR, bSelHard;
268 double eCM, sCM, pT0, pT20, pT2min, pTmax, pT2max, pT20R, pT20minR,
269 pT20maxR, pT20min0maxR, pT2maxmin, sigmaND, pT4dSigmaMax,
270 pT4dProbMax, dSigmaApprox, sigmaInt, sudExpPT[101],
271 zeroIntCorr, normOverlap, nAvg, kNow, normPi, bAvg, bDiv,
272 probLowB, radius2B, radius2C, fracA, fracB, fracC, fracAhigh,
273 fracBhigh, fracChigh, fracABChigh, expRev, cDiv, cMax,
277 bool bIsSet, bSetInFirst, isAtLowB, pickOtherSel;
278 int id1, id2, i1Sel, i2Sel, id1Sel, id2Sel, iPDFA, nPDFA;
280 double bNow, enhanceB, pT2, pT2shift, pT2Ren, pT2Fac, x1, x2, xT, xT2,
281 tau, y, sHat, tHat, uHat, alpS, alpEM, xPDF1now, xPDF2now,
282 dSigmaSum, x1Sel, x2Sel, sHatSel, tHatSel, uHatSel;
285 int iPDFAsave, nStep, iStepFrom, iStepTo;
286 double eCMsave, eStepMin, eStepMax, eStepSize, eStepMix, eStepFrom, eStepTo;
289 struct MPIInterpolationInfo {
291 double eStepMinSave, eStepMaxSave, eStepSizeSave;
292 vector<double> pT0Save, pT4dSigmaMaxSave, pT4dProbMaxSave,
293 sigmaIntSave, zeroIntCorrSave, normOverlapSave, kNowSave,
294 bAvgSave, bDivSave, probLowBSave,
295 fracAhighSave, fracBhighSave, fracChighSave,
296 fracABChighSave, cDivSave, cMaxSave;
297 vector<array<double, 101> > sudExpPTSave;
299 void init(
int nStepIn);
302 vector<MPIInterpolationInfo> mpis;
306 double mGmGmMin, mGmGmMax;
307 bool hasGamma, isGammaGamma, isGammaHadron, isHadronGamma;
310 PartonVertexPtr partonVertexPtr;
315 SigmaProcessPtr dSigmaDtSel;
325 vector<int> scatteredA, scatteredB;
328 void upperEnvelope();
331 void jetCrossSection();
338 double sudakov(
double pT2sud,
double enhance = 1.);
341 double fastPT2(
double pT2beg);
345 double sigmaPT2scatter(
bool isFirst =
false,
bool doSymmetrize =
false);
348 void findScatteredPartons(
Event& event);
351 double sigmaPT2rescatter(
Event& event);
359 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:453
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