## Diffraction

Diffraction is not well understood, and several alternative approaches have been proposed, both for the cross section of diffractive events and for the particle production in these. For the latter we here follow a fairly conventional Pomeron-based one, in the Ingelman-Schlein spirit [Ing85], but integrated to make full use of the standard PYTHIA machinery for multiparton interactions, parton showers and hadronization [Nav10,Cor10a]. This is the approach pioneered in the PomPyt program by Ingelman and collaborators [Ing97].

For ease of use (and of modelling), the Pomeron-specific parts of the generation of inclusive ("soft") diffractive events are subdivided into three sets of parameters that are rather independent of each other:
(i) the total, elastic and diffractive cross sections are parametrized as functions of the CM energy, or can be set by the user to the desired values, see the Total Cross Sections page;
(ii) once it has been decided to have a diffractive process, a Pomeron flux parametrization is used to pick the mass of the diffractive system(s) and the t of the exchanged Pomeron, also here see the Total Cross Sections page;
(iii) a diffractive system of a given mass is classified either as low-mass unresolved, which gives a simple low-pT string topology, or as high-mass resolved, for which the full machinery of multiparton interactions and parton showers are applied, making use of Pomeron PDFs.
The parameters related to multiparton interactions, parton showers and hadronization are kept the same as for normal nondiffractive events, with only a few exceptions. This may be questioned, especially for the multiparton interactions, but we do not believe that there are currently enough good diffractive data that would allow detailed separate tunes.

The above subdivision may not represent the way "physics comes about". For instance, the total diffractive cross section can be viewed as a convolution of a Pomeron flux with a Pomeron-proton total cross section. Since neither of the two is known from first principles there will be a significant amount of ambiguity in the flux factor. The picture is further complicated by the fact that the possibility of simultaneous further multiparton interactions ("cut Pomerons") will screen the rate of diffractive systems. In the end, our set of parameters refers to the effective description that emerges out of these effects, rather than to the underlying "bare" parameters.

In the event record the diffractive system in the case of an excited proton is denoted `p_diffr`, code 9902210, whereas a central diffractive system is denoted `rho_diffr`, code 9900110. Apart from representing the correct charge and baryon numbers, no deeper meaning should be attributed to the names.

PYTHIA also includes a possibility to select hard diffraction. This machinery relies on the same sets of parameters as described above, for the Pomeron flux and PDFs. The main difference between the hard and the soft diffractive frameworks is that the user can select any PYTHIA hard process in the former case, e.g. diffractive Z's or W's, whereas only QCD processes are generated in the latter. These QCD processes are generated inclusively, which means that mostly they occur in the low-pT region, even if a tail stretches to higher pT scales, thus overlapping with hard diffraction. Both hard and soft diffractive processes also include the normal PYTHIA machinery, such as MPIs and showers, but for the former the MPI framework can additionally be used to determine whether a hard process survives as a diffractive event or not. The different diffractive types - low mass soft, high mass soft and hard diffraction - are described in more detail below.

### Separation of soft diffraction into low and high masses

Preferably one would want to have a perturbative picture of the dynamics of Pomeron-proton collisions, like multiparton interactions provide for proton-proton ones. However, while PYTHIA by default will only allow collisions with a CM energy above 10 GeV, the mass spectrum of diffractive systems will stretch to down to the order of 1.2 GeV. It would not be feasible to attempt a perturbative description there. Therefore we do offer a simpler low-mass description, with only longitudinally stretched strings, with a gradual switch-over to the perturbative picture for higher masses. The probability for the latter picture is parametrized as
P_pert = P_max ( 1 - exp( (m_diffr - m_min) / m_width ) )
which vanishes for the diffractive system mass m_diffr < m_min, and is 1 - 1/e = 0.632 for m_diffr = m_min + m_width, assuming P_max = 1.

`parm` Diffraction:mMinPert (`default = 10.`; `minimum = 5.`)
The abovementioned threshold mass m_min for phasing in a perturbative treatment. If you put this parameter to be bigger than the CM energy then there will be no perturbative description at all, but only the older low-pt description.

`parm` Diffraction:mWidthPert (`default = 10.`; `minimum = 1.`)
The abovementioned threshold width m_width.

`parm` Diffraction:probMaxPert (`default = 1.`; `minimum = 0.`; `maximum = 1.`)
The abovementioned maximum probability P_max.. Would normally be assumed to be unity, but a somewhat lower value could be used to represent a small nonperturbative component also at high diffractive masses.

### Low-mass soft diffraction

When an incoming hadron beam is diffractively excited, it is modeled as if either a valence quark or a gluon is kicked out from the hadron. In the former case this produces a simple string to the leftover remnant, in the latter it gives a hairpin arrangement where a string is stretched from one quark in the remnant, via the gluon, back to the rest of the remnant. The latter ought to dominate at higher mass of the diffractive system. Therefore an approximate behaviour like
P_q / P_g = N / m^p
is assumed.

`parm` Diffraction:pickQuarkNorm (`default = 5.0`; `minimum = 0.`)
The abovementioned normalization N for the relative quark rate in diffractive systems.

`parm` Diffraction:pickQuarkPower (`default = 1.0`)
The abovementioned mass-dependence power p for the relative quark rate in diffractive systems.

When a gluon is kicked out from the hadron, the longitudinal momentum sharing between the the two remnant partons is determined by the same parameters as above. It is plausible that the primordial kT may be lower than in perturbative processes, however:

`parm` Diffraction:primKTwidth (`default = 0.5`; `minimum = 0.`)
The width of Gaussian distributions in p_x and p_y separately that is assigned as a primordial kT to the two beam remnants when a gluon is kicked out of a diffractive system.

`parm` Diffraction:largeMassSuppress (`default = 4.`; `minimum = 0.`)
The choice of longitudinal and transverse structure of a diffractive beam remnant for a kicked-out gluon implies a remnant mass m_rem distribution (i.e. quark plus diquark invariant mass for a baryon beam) that knows no bounds. A suppression like (1 - m_rem^2 / m_diff^2)^p is therefore introduced, where p is the `diffLargeMassSuppress` parameter.

### High-mass soft diffraction

The perturbative description need to use parton densities of the Pomeron. The options are described in the page on PDF Selection. The standard perturbative multiparton interactions framework then provides cross sections for parton-parton interactions. In order to turn these cross section into probabilities one also needs an ansatz for the Pomeron-proton total cross section. In the literature one often finds low numbers for this, of the order of 2 mb. These, if taken at face value, would give way too much activity per event. There are ways to tame this, e.g. by a larger pT0 than in the normal pp framework. Actually, there are many reasons to use a completely different set of parameters for MPI in diffraction than in pp collisions, especially with respect to the impact-parameter picture, see below. A lower number in some frameworks could alternatively be regarded as a consequence of screening, with a larger "bare" number.

For now, however, an attempt at the most general solution would carry too far, and instead we patch up the problem by using a larger Pomeron-proton total cross section, such that average activity makes more sense. This should be viewed as the main tunable parameter in the description of high-mass diffraction. It is to be fitted to diffractive event-shape data such as the average charged multiplicity. It would be very closely tied to the choice of Pomeron PDF; we remind that some of these add up to less than unit momentum sum in the Pomeron, a choice that also affect the value one ends up with. Furthermore, like with hadronic cross sections, it is quite plausible that the Pomeron-proton cross section increases with energy, so we have allowed for a power-like dependence on the diffractive mass.

`parm` Diffraction:sigmaRefPomP (`default = 10.`; `minimum = 2.`; `maximum = 40.`)
The assumed Pomeron-proton effective cross section, as used for multiparton interactions in diffractive systems. If this cross section is made to depend on the mass of the diffractive system then the above value refers to the cross section at the reference scale, and
sigma_PomP(m) = sigma_PomP(m_ref) * (m / m_ref)^p
where m is the mass of the diffractive system, m_ref is the reference mass scale `Diffraction:mRefPomP` below and p is the mass-dependence power `Diffraction:mPowPomP`. Note that a larger cross section value gives less MPI activity per event. There is no point in making the cross section too big, however, since then pT0 will be adjusted downwards to ensure that the integrated perturbative cross section stays above this assumed total cross section. (The requirement of at least one perturbative interaction per event.)

`parm` Diffraction:mRefPomP (`default = 100.0`; `minimum = 1.`)
The mRef reference mass scale introduced above.

`parm` Diffraction:mPowPomP (`default = 0.0`; `minimum = 0.0`; `maximum = 0.5`)
The p mass rescaling pace introduced above.

Also note that, even for a fixed CM energy of events, the diffractive subsystem will range from the abovementioned threshold mass m_min to the full CM energy, with a variation of parameters such as pT0 along this mass range. Therefore multiparton interactions are initialized for a few different diffractive masses, currently five, and all relevant parameters are interpolated between them to obtain the behaviour at a specific diffractive mass. Further, A B → X B and A B → A X are initialized separately, to allow for different beams or PDF's on the two sides. These two aspects mean that initialization of MPI is appreciably slower when perturbative high-mass diffraction is allowed.

Diffraction tends to be peripheral, i.e. occur at intermediate impact parameter for the two protons. That aspect is implicit in the selection of diffractive cross section. For the simulation of the Pomeron-proton subcollision it is the impact-parameter distribution of that particular subsystem that should rather be modeled. That is, it also involves the transverse coordinate space of a Pomeron wavefunction. The outcome of the convolution therefore could be a different shape than for nondiffractive events. For simplicity we allow the same kind of options as for nondiffractive events, except that the `bProfile = 4` option for now is not implemented.

`mode` Diffraction:bProfile (`default = 1`; `minimum = 0`; `maximum = 3`)
Choice of impact parameter profile for the incoming hadron beams.
`option` 0 : no impact parameter dependence at all.
`option` 1 : a simple Gaussian matter distribution; no free parameters.
`option` 2 : a double Gaussian matter distribution, with the two free parameters coreRadius and coreFraction.
`option` 3 : an overlap function, i.e. the convolution of the matter distributions of the two incoming hadrons, of the form exp(- b^expPow), where expPow is a free parameter.

`parm` Diffraction:coreRadius (`default = 0.4`; `minimum = 0.1`; `maximum = 1.`)
When assuming a double Gaussian matter profile, bProfile = 2, the inner core is assumed to have a radius that is a factor coreRadius smaller than the rest.

`parm` Diffraction:coreFraction (`default = 0.5`; `minimum = 0.`; `maximum = 1.`)
When assuming a double Gaussian matter profile, bProfile = 2, the inner core is assumed to have a fraction coreFraction of the matter content of the hadron.

`parm` Diffraction:expPow (`default = 1.`; `minimum = 0.4`; `maximum = 10.`)
When bProfile = 3 it gives the power of the assumed overlap shape exp(- b^expPow). Default corresponds to a simple exponential drop, which is not too dissimilar from the overlap obtained with the standard double Gaussian parameters. For expPow = 2 we reduce to the simple Gaussian, bProfile = 1, and for expPow → infinity to no impact parameter dependence at all, bProfile = 0. For small expPow the program becomes slow and unstable, so the min limit must be respected.

### Hard diffraction

When PYTHIA is requested to generate a hard process, by default it is assumed that the full perturbative cross section is associated with nondiffractive topologies. With the options in this section, PYTHIA includes a possibility for creating a perturbative process diffractively, however. This framework is denoted hard diffraction to distiguish it from soft diffraction, but recall that the latter contains a tail of high-pT processes that could alternatively be obtained as hard diffraction. The idea behind hard diffraction is similar to soft diffraction, as they are both based on the Pomeron model. The proton is thus modelled as having a Pomeron component, described by the Pomeron fluxes switch `SigmaDiffractive:PomFlux`, see here, and the partonic content of the Pomeron is described by the Pomeron PDFs, see here. From these components we can evaluate the probability for the chosen hard process to have been coming from a diffractively excited system, based on the ratio of the Pomeron flux convoluted with Pomeron PDF to the inclusive proton PDF.

If the hard process is likely to have been created inside a diffractively excited system, then we also evaluate the momentum fraction carried by the Pomeron, x_Pomeron, and the momentum transfer, t, in the process. This information can also be extracted in the main programs, see eg. example `main61.cc`.

Further, we distiguish between two alternative scenarios for the classification of hard diffraction. The first is based solely on the Pomeron flux and PDF, as described above. In the second an additional requirement is imposed, wherein the MPI machinery is not allowed to generate any extra MPIs at all, since presumably these would destroy the rapidity gap and thereby the diffractive nature. We refer to the former as MPI-unchecked and the latter as MPI-checked hard diffraction. The MPI-checked option is likely to be the more realistic one, but the MPI-unchecked one offers a convenient baseline for the study of MPI effects, which still are poorly understood.

Recently, a scenario for hard diffraction with gamma beams has been introduced. Thus hard diffraction can be evaluated for both gamma + gamma and gamma + p processes within the usual photoproduction framework. A Pomeron can be taken from a gamma beam only if the photon is resolved. Currently this photon is then assumed always to be in a virtual rho state, thus leaving behind a physical rho beam remnant. If the Pomeron is taken from the proton, in the gamma + parton framework, the photon is allowed to interact with the Pomeron with both its resolved and unresolved components. If the Pomeron is taken from the resolved gamma, the proton Pomeron flux is used but rescaled by a factor of sigma_tot^gamma+p/sigma_tot^pp, as a very first approximation to this unmeasured distribution. Otherwise all options are available as for hard diffraction in pp processes, and all limitations and cautions apply as for the photoproduction framework.

For the selected hard processes, the user can choose whether to generate the inclusive sample of both diffractive and nondiffractive topologies or diffractive only, and in each case with the diffractive ones distinguished either MPI-unchecked or MPI-checked.

`flag` Diffraction:doHard (`default = off`)
Allows for the possibility to include hard diffraction tests in a run.

`mode` Diffraction:hardDiffSide (`default = 0`; `minimum = 0`; `maximum = 2`)
Side which diffraction is evaluated for. Especially useful for diffraction in ep, where experiments only look for gaps on the proton side.
`option` 0 : Check for diffraction on boths sides A and B.
`option` 1 : Check for diffraction on side A only.
`option` 2 : Check for diffraction on side B only.

There is also the possibility to select only a specific subset of events in hard diffraction.

`mode` Diffraction:sampleType (`default = 2`; `minimum = 1`; `maximum = 4`)
Type of process the user wants to generate. Depends strongly on how an event is classified as diffractive.
`option` 1 : Generate an inclusive sample of both diffractive and nondiffractive hard processes, MPI-unchecked.
`option` 2 : Generate an inclusive sample of both diffractive and nondiffractive hard processes, MPI-checked.
`option` 3 : Generate an exclusive diffractive sample, MPI-unchecked.
`option` 4 : Generate an exclusive diffractive sample, MPI-checked.

The Pomeron PDFs have not been scaled to unit momentum sum by the H1 Collaboration, but instead they let the PDF normalization float after the flux had been normalized to unity at x_Pom=0.03. This means that the H1 Pomeron has a momentum sum that is about a half. It could be brought to unit momentum sum by picking the parameter `PDF:PomRescale` to be around 2. In order not to change the convolution of the flux and the PDFs, the flux then needs to be rescaled by the inverse. This introduces a new rescaling parameter:

`parm` Diffraction:PomFluxRescale (`default = 1.0`; `minimum = 0.2`; `maximum = 2.0`)
Rescale the Pomeron flux by this uniform factor. It should be `1 / PDF:PomRescale` to preserve the convolution of Pomeron flux and PDFs, but for greater flxibility the two can be set separately.

When using the MBR flux, the model requires a renormalization of the Pomeron flux. This suppresses the flux with approximately a factor of ten, thus making it incompatible with the MPI suppression of the hard diffraction framework. We have thus implemented an option to renormalize the flux. If you wish to use the renormalized flux of the MBR model, you must generate the MPI-unchecked samples, otherwise diffractive events will be suppressed twice.

`flag` Diffraction:useMBRrenormalization (`default = off`)
Use the renormalized MBR flux.

The transverse matter profile of the Pomeron, relative to that of the proton, is not known. Generally a Pomeron is supposed to be a smaller object in a localized part of the proton, but one should keep an open mind. Therefore below you find three extreme scenarios, which can be compared to gauge the impact of this uncertainty.

`mode` Diffraction:bSelHard (`default = 1`; `minimum = 1`; `maximum = 3`)
Selection of impact parameter b and the related enhancement factor for the Pomeron-proton subsystem when the MPI check is carried out. This affects the underlying-event activity in hard diffractive events.
`option` 1 : Use the same b as already assigned for the proton-proton collision. This implicitly assumes that a Pomeron is as big as a proton and centered in the same place. Since small b values already have been suppressed, few events should have high enhancement factors.
`option` 2 : Use the square root of the b as already assigned for the proton-proton collision, thereby making the enhancement factor fluctuate less between events. If the Pomeron is very tiny then what matters is where it strikes the other proton, not the details of its shape. Thus the variation with b is of one proton, not two, and so the square root of the normal variation, loosely speaking. Tecnhically this is difficult to implement, but the current simple recipe provides the main effect of reducing the variation, bringing all b values closer to the average.
`option` 3 : Pick a completely new b. This allows a broad spread from central to peripheral values, and thereby also a more varying MPI activity inside the diffractive system than the other two options. This offers an extreme picture, even if not the most likely one.