StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
BeamParticle.h
1 // BeamParticle.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2020 Torbjorn Sjostrand.
3 // PYTHIA is licenced under the GNU GPL v2 or later, see COPYING for details.
4 // Please respect the MCnet Guidelines, see GUIDELINES for details.
5 
6 // Header file for information on incoming beams.
7 // ResolvedParton: an initiator or remnant in beam.
8 // BeamParticle: contains partons, parton densities, etc.
9 
10 #ifndef Pythia8_BeamParticle_H
11 #define Pythia8_BeamParticle_H
12 
13 #include "Pythia8/Basics.h"
14 #include "Pythia8/Event.h"
15 #include "Pythia8/FragmentationFlavZpT.h"
16 #include "Pythia8/Info.h"
17 #include "Pythia8/ParticleData.h"
18 #include "Pythia8/PartonDistributions.h"
19 #include "Pythia8/PhysicsBase.h"
20 #include "Pythia8/PythiaStdlib.h"
21 #include "Pythia8/Settings.h"
22 
23 namespace Pythia8 {
24 
25 //==========================================================================
26 
27 // This class holds info on a parton resolved inside the incoming beam,
28 // i.e. either an initiator (part of a hard or a multiparton interaction)
29 // or a remnant (part of the beam remnant treatment).
30 
31 // The companion code is -1 from onset and for g, is -2 for an unmatched
32 // sea quark, is >= 0 for a matched sea quark, with the number giving the
33 // companion position, and is -3 for a valence quark.
34 
35 // Rescattering partons properly do not belong here, but bookkeeping is
36 // simpler with them, so they are stored with companion code -10.
37 
38 class ResolvedParton {
39 
40 public:
41 
42  // Constructor.
43  ResolvedParton( int iPosIn = 0, int idIn = 0, double xIn = 0.,
44  int companionIn = -1) : iPosRes(iPosIn), idRes(idIn), xRes(xIn),
45  companionRes(companionIn), xqCompRes(0.), mRes(0.), factorRes(1.),
46  colRes(0), acolRes(0) { }
47 
48  // Set info on initiator or remnant parton.
49  void iPos( int iPosIn) {iPosRes = iPosIn;}
50  void id( int idIn) {idRes = idIn;}
51  void x( double xIn) {xRes = xIn;}
52  void update( int iPosIn, int idIn, double xIn) {iPosRes = iPosIn;
53  idRes = idIn; xRes = xIn;}
54  void companion( int companionIn) {companionRes = companionIn;}
55  void xqCompanion( double xqCompIn) {xqCompRes = xqCompIn;}
56  void p(Vec4 pIn) {pRes = pIn;}
57  void px(double pxIn) {pRes.px(pxIn);}
58  void py(double pyIn) {pRes.py(pyIn);}
59  void pz(double pzIn) {pRes.pz(pzIn);}
60  void e(double eIn) {pRes.e(eIn);}
61  void m(double mIn) {mRes = mIn;}
62  void col(int colIn) {colRes = colIn;}
63  void acol(int acolIn) {acolRes = acolIn;}
64  void cols(int colIn = 0,int acolIn = 0)
65  {colRes = colIn; acolRes = acolIn;}
66  void scalePT( double factorIn) {pRes.px(factorIn * pRes.px());
67  pRes.py(factorIn * pRes.py()); factorRes *= factorIn;}
68  void scaleX( double factorIn) {xRes *= factorIn;}
69 
70  // Get info on initiator or remnant parton.
71  int iPos() const {return iPosRes;}
72  int id() const {return idRes;}
73  double x() const {return xRes;}
74  int companion() const {return companionRes;}
75  bool isValence() const {return (companionRes == -3);}
76  bool isUnmatched() const {return (companionRes == -2);}
77  bool isCompanion() const {return (companionRes >= 0);}
78  bool isFromBeam() const {return (companionRes > -10);}
79  double xqCompanion() const {return xqCompRes;}
80  Vec4 p() const {return pRes;}
81  double px() const {return pRes.px();}
82  double py() const {return pRes.py();}
83  double pz() const {return pRes.pz();}
84  double e() const {return pRes.e();}
85  double m() const {return mRes;}
86  double pT() const {return pRes.pT();}
87  double mT2() const {return (mRes >= 0.)
88  ? mRes*mRes + pRes.pT2() : - mRes*mRes + pRes.pT2();}
89  double pPos() const {return pRes.e() + pRes.pz();}
90  double pNeg() const {return pRes.e() - pRes.pz();}
91  int col() const {return colRes;}
92  int acol() const {return acolRes;}
93  double pTfactor() const {return factorRes;}
94  bool hasCol() const {return (idRes == 21 || (idRes > 0 && idRes < 9)
95  || (-idRes > 1000 && -idRes < 10000 && (-idRes/10)%10 == 0));}
96  bool hasAcol() const {return (idRes == 21 || (-idRes > 0 && -idRes < 9)
97  || (idRes > 1000 && idRes < 10000 && (idRes/10)%10 == 0));}
98 
99 private:
100 
101  // Properties of a resolved parton.
102  int iPosRes, idRes;
103  double xRes;
104  // Companion code and distribution value, if any.
105  int companionRes;
106  double xqCompRes;
107  // Four-momentum and mass; for remnant kinematics construction.
108  Vec4 pRes;
109  double mRes, factorRes;
110  // Colour codes.
111  int colRes, acolRes;
112 
113 };
114 
115 //==========================================================================
116 
117 // The xfModPrepData struct saves information on the amount of x already used,
118 // to speed up PDF evaluation.
119 
120 typedef struct {
121  double xValTot;
122  double xValLeft;
123  double xLeft;
124  double xCompAdded;
125  double rescaleGS;
126 } xfModPrepData;
127 
128 //==========================================================================
129 
130 // This class holds info on a beam particle in the evolution of
131 // initial-state radiation and multiparton interactions.
132 
133 class BeamParticle : public PhysicsBase {
134 
135 public:
136 
137  // Constructor.
138  BeamParticle() : pdfBeamPtr(),
139  pdfHardBeamPtr(), pdfUnresBeamPtr(), pdfBeamPtrSave(),
140  pdfHardBeamPtrSave(), flavSelPtr(), allowJunction(), beamJunction(),
141  maxValQuark(), companionPower(), valencePowerMeson(), valencePowerUinP(),
142  valencePowerDinP(), valenceDiqEnhance(), pickQuarkNorm(), pickQuarkPower(),
143  diffPrimKTwidth(), diffLargeMassSuppress(), beamSat(), gluonPower(),
144  xGluonCutoff(), idBeam(), idBeamAbs(), idVMDBeam(), mBeam(), mVMDBeam(),
145  scaleVMDBeam(), isUnresolvedBeam(), isLeptonBeam(), isHadronBeam(),
146  isMesonBeam(), isBaryonBeam(), isGammaBeam(), nValKinds(), idVal(), nVal(),
147  idSave(), iSkipSave(), nValLeft(), xqgTot(), xqVal(), xqgSea(),
148  xqCompSum(), doISR(), doMPI(), doND(), isResolvedGamma(),
149  hasResGammaInBeam(), isResUnres(), hasVMDstateInBeam(), initGammaBeam(),
150  pTminISR(), pTminMPI(), pT2gm2qqbar(), iGamVal(), iPosVal(), gammaMode(),
151  xGm(), Q2gm(), kTgamma(), phiGamma(), cPowerCache(-100), xsCache(-1),
152  resCache(), resolved(), nInit(0), hasJunctionBeam(), junCol(), nJuncs(),
153  nAjuncs(), nDiffJuncs(), allowBeamJunctions(), Q2ValFracSav(-1.),
154  uValInt(), dValInt(), idVal1(), idVal2(), idVal3(), zRel(), pxRel(),
155  pyRel() { }
156 
157  // Initialize data on a beam particle and save pointers.
158  void init( int idIn, double pzIn, double eIn, double mIn,
159  PDFPtr pdfInPtr, PDFPtr pdfHardInPtr, bool isUnresolvedIn,
160  StringFlav* flavSelPtrIn);
161 
162  // Initialize only the two pdf pointers.
163  void initPDFPtr(PDFPtr pdfInPtr, PDFPtr pdfHardInPtr) {
164  pdfBeamPtr = pdfInPtr; pdfHardBeamPtr = pdfHardInPtr; }
165 
166  // Initialize additional PDF pointer for unresolved beam.
167  void initUnres(PDFPtr pdfUnresInPtr);
168 
169  // For mesons like pi0 valence content varies from event to event.
170  void newValenceContent();
171 
172  // Set new pZ and E, but keep the rest the same.
173  void newPzE( double pzIn, double eIn) {pBeam = Vec4( 0., 0., pzIn, eIn);}
174 
175  // Set new mass. Used with photons when virtuality is sampled.
176  void newM( double mIn) { mBeam = mIn; }
177 
178  // Member functions for output.
179  int id() const {return idBeam;}
180  int idVMD() const {return idVMDBeam;}
181  Vec4 p() const {return pBeam;}
182  double px() const {return pBeam.px();}
183  double py() const {return pBeam.py();}
184  double pz() const {return pBeam.pz();}
185  double e() const {return pBeam.e();}
186  double m() const {return mBeam;}
187  double mVMD() const {return mVMDBeam;}
188  double scaleVMD() const {return scaleVMDBeam;}
189  bool isLepton() const {return isLeptonBeam;}
190  bool isUnresolved() const {return isUnresolvedBeam;}
191  // As hadrons here we only count those we know how to handle remnants for.
192  bool isHadron() const {return isHadronBeam;}
193  bool isMeson() const {return isMesonBeam;}
194  bool isBaryon() const {return isBaryonBeam;}
195  bool isGamma() const {return isGammaBeam;}
196  bool hasResGamma() const {return hasResGammaInBeam;}
197  bool hasVMDstate() const {return hasVMDstateInBeam;}
198 
199  // Maximum x remaining after previous MPI and ISR, plus safety margin.
200  double xMax(int iSkip = -1);
201 
202  // Special hard-process parton distributions (can agree with standard ones).
203  double xfHard(int idIn, double x, double Q2)
204  {return pdfHardBeamPtr->xf(idIn, x, Q2);}
205 
206  // Overestimate for PDFs. Same as normal except photons inside leptons.
207  double xfMax(int idIn, double x, double Q2)
208  {return pdfHardBeamPtr->xfMax(idIn, x, Q2);}
209 
210  // Accurate and approximated photon flux and PDFs.
211  double xfFlux(int idIn, double x, double Q2)
212  {return pdfHardBeamPtr->xfFlux(idIn, x, Q2);}
213  double xfApprox(int idIn, double x, double Q2)
214  {return pdfHardBeamPtr->xfApprox(idIn, x, Q2);}
215  double xfGamma(int idIn, double x, double Q2)
216  {return pdfHardBeamPtr->xfGamma(idIn, x, Q2);}
217 
218  // Do not sample the x_gamma value to get correct cross section with
219  // possible second call.
220  double xfSame(int idIn, double x, double Q2)
221  {return pdfHardBeamPtr->xfSame(idIn, x, Q2);}
222 
223  // Standard parton distributions.
224  double xf(int idIn, double x, double Q2)
225  {return pdfBeamPtr->xf(idIn, x, Q2);}
226 
227  // Ditto, split into valence and sea parts (where gluon counts as sea).
228  double xfVal(int idIn, double x, double Q2)
229  {return pdfBeamPtr->xfVal(idIn, x, Q2);}
230  double xfSea(int idIn, double x, double Q2)
231  {return pdfBeamPtr->xfSea(idIn, x, Q2);}
232 
233  // Rescaled parton distributions, as needed for MPI and ISR.
234  // For ISR also allow split valence/sea, and only return relevant part.
235  double xfMPI(int idIn, double x, double Q2, xfModPrepData& xfData)
236  {return xfISR(-1, idIn, x, Q2, xfData);}
237  double xfMPI(int idIn, double x, double Q2)
238  {xfModPrepData xfData = xfModPrep(-1, Q2);
239  return xfISR(-1, idIn, x, Q2, xfData);}
240  double xfISR(int indexMPI, int idIn, double x, double Q2,
241  xfModPrepData& xfData) {return xfModified( indexMPI, idIn, x, Q2, xfData);}
242  double xfISR(int indexMPI, int idIn, double x, double Q2)
243  {xfModPrepData xfData= xfModPrep(indexMPI, Q2);
244  return xfModified( indexMPI, idIn, x, Q2, xfData);}
245 
246  // Check whether x and Q2 values fall inside the fit bounds (LHAPDF6 only).
247  bool insideBounds(double x, double Q2)
248  {return pdfBeamPtr->insideBounds(x,Q2);}
249 
250  // Access the running alpha_s of a PDF set (LHAPDF6 only).
251  double alphaS(double Q2) {return pdfBeamPtr->alphaS(Q2);}
252 
253  // Return quark masses used in the PDF fit (LHAPDF6 only).
254  double mQuarkPDF(int idIn) {return pdfBeamPtr->mQuarkPDF(idIn);}
255 
256  // Return number of members in PDF family (LHAPDF6 only).
257  int nMembers() {return pdfBeamPtr->nMembers();}
258 
259  // Calculate envelope of PDF predictions
260  void calcPDFEnvelope(int idNow, double xNow, double Q2Now, int valSea) {
261  pdfBeamPtr->calcPDFEnvelope(idNow,xNow,Q2Now,valSea);}
262  void calcPDFEnvelope(pair<int,int> idNows, pair<double,double> xNows,
263  double Q2Now, int valSea) {
264  pdfBeamPtr->calcPDFEnvelope(idNows,xNows,Q2Now,valSea);}
265  PDF::PDFEnvelope getPDFEnvelope() { return pdfBeamPtr->getPDFEnvelope(); }
266 
267  // Decide whether chosen quark is valence, sea or companion.
268  int pickValSeaComp();
269 
270  // Initialize kind of incoming beam particle.
271  void initBeamKind();
272 
273  // Overload index operator to access a resolved parton from the list.
274  ResolvedParton& operator[](int i) {return resolved[i];}
275  const ResolvedParton& operator[](int i) const {return resolved[i];}
276 
277  // Total number of partons extracted from beam, and initiators only.
278  int size() const {return resolved.size();}
279  int sizeInit() const {return nInit;}
280 
281  // Clear list of resolved partons.
282  void clear() {resolved.resize(0); nInit = 0;}
283 
284  // Reset variables related to photon beam.
285  void resetGamma() {iGamVal = -1; iPosVal = -1; pT2gm2qqbar = 0.;
286  isResolvedGamma = (gammaMode == 1) ? true : false;}
287 
288  // Reset variables related to photon beam inside a lepton.
289  void resetGammaInLepton() {xGm = 1.; kTgamma = 0.; phiGamma = 0.;}
290 
291  // Add a resolved parton to list.
292  int append( int iPos, int idIn, double x, int companion = -1)
293  {resolved.push_back( ResolvedParton( iPos, idIn, x, companion) );
294  return resolved.size() - 1;}
295 
296  // Remove the last particle from the beam. Reset companion code if needed.
297  void popBack() { int iComp = resolved.back().companion();
298  resolved.pop_back(); if ( iComp >= 0 ) { iSkipSave = iComp;
299  idSave = resolved[iComp].id(); pickValSeaComp(); } }
300 
301  // Print extracted parton list; for debug mainly.
302  void list() const;
303 
304  // How many different flavours, and how many quarks of given flavour.
305  int nValenceKinds() const {return nValKinds;}
306  int nValence(int idIn) const {for (int i = 0; i < nValKinds; ++i)
307  if (idIn == idVal[i]) return nVal[i];
308  return 0;}
309 
310  // Test whether a lepton is to be considered as unresolved.
311  bool isUnresolvedLepton();
312 
313  // Add extra remnant flavours to make valence and sea come out right.
314  bool remnantFlavours(Event& event, bool isDIS = false);
315 
316  // Correlate all initiators and remnants to make a colour singlet.
317  bool remnantColours(Event& event, vector<int>& colFrom,
318  vector<int>& colTo);
319 
320  // Pick unrescaled x of remnant parton (valence or sea).
321  double xRemnant(int i);
322 
323  // Tell whether a junction has been resolved, and its junction colours.
324  bool hasJunction() const {return hasJunctionBeam;}
325  int junctionCol(int i) const {return junCol[i];}
326  void junctionCol(int i, int col) {junCol[i] = col;}
327 
328  // For a diffractive system, decide whether to kick out gluon or quark.
329  bool pickGluon(double mDiff);
330 
331  // Pick a valence quark at random, and provide the remaining flavour.
332  int pickValence();
333  int pickRemnant() const {return idVal2;}
334 
335  // Share lightcone momentum between two remnants in a diffractive system.
336  // At the same time generate a relative pT for the two.
337  double zShare( double mDiff, double m1, double m2);
338  double pxShare() const {return pxRel;}
339  double pyShare() const {return pyRel;}
340 
341  // Add extra remnant flavours to make valence and sea come out right.
342  bool remnantFlavoursNew(Event& event);
343 
344  // Find the colour setup of the removed partons from the scatterings.
345  void findColSetup(Event& event);
346 
347  // Set initial colours.
348  void setInitialCol(Event & event);
349 
350  // Update colours.
351  void updateCol(vector<pair<int,int> > colourChanges);
352 
353  vector<pair <int,int> > getColUpdates() {return colUpdates;}
354 
355  // Set valence content for photon beams and position of first valence quark.
356  bool gammaInitiatorIsVal(int iResolved, int id, double x, double Q2);
357  bool gammaInitiatorIsVal(int iResolved, double Q2);
358  int getGammaValFlavour() { return abs(idVal[0]); }
359  int gammaValSeaComp(int iResolved);
360  void posVal(int iPosValIn) { iPosVal = iPosValIn; }
361  void gamVal(int iGamValIn) { iGamVal = iGamValIn; }
362  int gamVal() { return iGamVal; }
363 
364  // Set and get the state (resolved and/or unresolved) of photon beam.
365  void resolvedGamma(bool isResolved) { isResolvedGamma = isResolved; }
366  bool resolvedGamma() { return isResolvedGamma; }
367  void setGammaMode(int gammaModeIn);
368  int getGammaMode() { return gammaMode; }
369  bool isResolvedUnresolved() { return isResUnres; }
370  void initGammaInBeam() { initGammaBeam = true; }
371  bool gammaInBeam() { return initGammaBeam; }
372 
373  // Set state of VMD inside gamma.
374  void setVMDstate(bool isVMDIn, int idIn, double mIn, double scaleIn,
375  bool reassignState = false) {
376  hasVMDstateInBeam = isVMDIn;
377  idVMDBeam = idIn;
378  mVMDBeam = mIn;
379  scaleVMDBeam = scaleIn;
380  if (reassignState) {
381  idBeam = idVMDBeam;
382  mBeam = mVMDBeam;
383  pdfBeamPtr->setVMDscale(scaleVMDBeam);
384  }
385  }
386 
387  // Store the pT2 value of gamma->qqbar splitting.
388  void pT2gamma2qqbar(double pT2in) { pT2gm2qqbar = pT2in; }
389  double pT2gamma2qqbar() { return pT2gm2qqbar; }
390 
391  // Store the pT value for the latest MPI.
392  void pTMPI(double pTminMPIin) { pTminMPI = pTminMPIin; }
393 
394  // Check whether room for beam remnants.
395  bool roomFor1Remnant(double eCM);
396  bool roomFor1Remnant(int id1, double x1, double eCM);
397  bool roomFor2Remnants(int id1, double x1, double eCM);
398  bool roomForRemnants(BeamParticle beamOther);
399 
400  // Evaluate the remnant mass with initiator idIn.
401  double remnantMass(int idIn);
402 
403  // Functions to approximate pdfs for ISR.
404  double gammaPDFxDependence(int flavour, double x)
405  { return pdfBeamPtr->gammaPDFxDependence(flavour, x); }
406  double gammaPDFRefScale(int flavour)
407  { return pdfBeamPtr->gammaPDFRefScale(flavour); }
408  double xIntegratedPDFs(double Q2)
409  { return pdfBeamPtr->xfIntegratedTotal(Q2); }
410 
411  // Save the x_gamma value after latest PDF call or set it later if ND.
412  void xGammaPDF() { xGm = pdfHardBeamPtr->xGamma(); }
413  void xGamma(double xGmIn) { xGm = xGmIn; }
414  void Q2Gamma(double Q2GmIn) { Q2gm = Q2GmIn; }
415  void newGammaKTPhi(double kTIn, double phiIn)
416  { kTgamma = kTIn; phiGamma = phiIn; }
417 
418  // Get the kinematic limits for photons emitted by the beam.
419  double xGammaMin() { return pdfHardBeamPtr->getXmin(); }
420  double xGammaHadr() { return pdfHardBeamPtr->getXhadr(); }
421  double gammaFluxIntApprox() { return pdfHardBeamPtr->intFluxApprox(); }
422 
423  // Do photon flux use an approximation for sampling.
424  bool hasApproxGammaFlux() { return pdfHardBeamPtr->hasApproxGammaFlux(); }
425 
426  // Get the kinematics related photons form lepton beams.
427  double xGamma() const { return xGm; }
428  double Q2Gamma() const { return Q2gm; }
429  double gammaKTx() const { return kTgamma*cos(phiGamma); }
430  double gammaKTy() const { return kTgamma*sin(phiGamma); }
431  double gammaKT() const { return kTgamma; }
432  double gammaPhi() const { return phiGamma; }
433 
434  // Keep track of pomeron momentum fraction.
435  void xPom(double xpom = -1.0)
436  { if ( pdfBeamPtr ) pdfBeamPtr->xPom(xpom); }
437 
438  // Sample x and Q2 for emitted photons according to flux.
439  double sampleXgamma(double xMinIn)
440  { xGm = pdfHardBeamPtr->sampleXgamma(xMinIn); return xGm; }
441  double sampleQ2gamma(double Q2min)
442  { Q2gm = pdfHardBeamPtr->sampleQ2gamma(Q2min); return Q2gm;}
443 
444  // Prepare data on how much x has been used, for speedup of PDF evaluation.
445  xfModPrepData xfModPrep( int iSkip, double Q2);
446 
447 private:
448 
449  // Constants: could only be changed in the code itself.
450  static const double XMINUNRESOLVED, POMERONMASS, XMAXCOMPANION, TINYZREL;
451  static const int NMAX, NRANDOMTRIES;
452 
453  // Pointers to PDF sets.
454  PDFPtr pdfBeamPtr;
455  PDFPtr pdfHardBeamPtr;
456 
457  // Pointer to unresolved PDF and two others to save the resolved ptrs.
458  PDFPtr pdfUnresBeamPtr;
459  PDFPtr pdfBeamPtrSave;
460  PDFPtr pdfHardBeamPtrSave;
461 
462  // Pointer to class for flavour generation.
463  StringFlav* flavSelPtr;
464 
465  // Initialization data, normally only set once.
466  bool allowJunction, beamJunction;
467  int maxValQuark, companionPower;
468  double valencePowerMeson, valencePowerUinP, valencePowerDinP,
469  valenceDiqEnhance, pickQuarkNorm, pickQuarkPower,
470  diffPrimKTwidth, diffLargeMassSuppress, beamSat, gluonPower,
471  xGluonCutoff;
472 
473  // Basic properties of a beam particle.
474  int idBeam, idBeamAbs, idVMDBeam;
475  Vec4 pBeam;
476  double mBeam, mVMDBeam, scaleVMDBeam;
477 
478  // Beam kind. Valence flavour content for hadrons.
479  bool isUnresolvedBeam, isLeptonBeam, isHadronBeam, isMesonBeam,
480  isBaryonBeam, isGammaBeam;
481  int nValKinds, idVal[3], nVal[3];
482 
483  // Current parton density, by valence, sea and companion.
484  int idSave, iSkipSave, nValLeft[3];
485  double xqgTot, xqVal, xqgSea, xqCompSum;
486 
487  // Variables related to photon beams (also inside lepton).
488  bool doISR, doMPI, doND, isResolvedGamma, hasResGammaInBeam,
489  isResUnres, hasVMDstateInBeam, initGammaBeam;
490  double pTminISR, pTminMPI, pT2gm2qqbar;
491  int iGamVal, iPosVal, gammaMode;
492 
493  // Variables for photon from lepton.
494  double xGm, Q2gm, kTgamma, phiGamma;
495 
496  // Cache values for xCompFrac method.
497  int cPowerCache;
498  double xsCache, resCache;
499 
500  // The list of resolved partons.
501  vector<ResolvedParton> resolved;
502 
503  // Status after all initiators have been accounted for. Junction content.
504  int nInit;
505  bool hasJunctionBeam;
506  int junCol[3];
507 
508  // Variables for new colour reconnection;
509  pair <int,int> colSetup;
510  vector<int> acols, cols;
511  vector<bool> usedCol,usedAcol;
512  vector< pair<int,int> > colUpdates;
513  int nJuncs, nAjuncs, nDiffJuncs;
514  bool allowBeamJunctions;
515 
516  // Routine to calculate PDFs given previous interactions.
517  double xfModified( int iSkip, int idIn, double x, double Q2) {
518  xfModPrepData xfData = xfModPrep(iSkip, Q2);
519  return xfModified(iSkip, idIn, x, Q2, xfData);}
520  double xfModified( int iSkip, int idIn, double x, double Q2,
521  xfModPrepData& data);
522  // In case of resolved.size() === 0.
523  double xfModified0( int iSkip, int idIn, double x, double Q2);
524 
525  // Fraction of hadron momentum sitting in a valence quark distribution.
526  double xValFrac(int j, double Q2);
527  double Q2ValFracSav, uValInt, dValInt;
528 
529  // Fraction of hadron momentum sitting in a companion quark distribution.
530  double xCompFrac(double xs);
531 
532  // Value of companion quark PDF, also given the sea quark x.
533  double xCompDist(double xc, double xs);
534 
535  // Valence quark subdivision for diffractive systems.
536  int idVal1, idVal2, idVal3;
537  double zRel, pxRel, pyRel;
538 
539  // Update a single (anti-) colour of the event.
540  void updateSingleCol(int oldCol, int newCol);
541 
542  // Find a single (anti-) colour in the beam,
543  // if a beam remnant is set the new colour.
544  int findSingleCol(Event& event, bool isAcol, bool useHardScatters);
545 
546 };
547 
548 //==========================================================================
549 
550 } // end namespace Pythia8
551 
552 #endif // Pythia8_BeamParticle_H
Definition: AgUStep.h:26