## POWHEG Matching

POWHEG [Nas04] in its character is very much like a parton shower, with a Sudakov factor arising from the ordering of emissions. Both POWHEG-BOX [Ali10] and PYTHIA are based on a combined evolution of ISR and FSR in pT-related "hardness" variables, and thus are kindred spirits. The hardness definitions differ, however. Frequently we will therefore need to distinguish between POWHEG-hardness and PYTHIA-hardness in the following.

### Naive POWHEG Matching (Not Recommended)

The simplest merging solution would be if there was no difference between POWHEG-hardness and PYTHIA-hardness. Then, the PYTHIA shower could simply be continued at the LHA `scale` hardness where POWHEG leaves off. This behaviour (which would only be correct if the hardness definitions were really identical) is obtained if you set
`TimeShower:pTmaxMatch = 1`
`SpaceShower:pTmaxMatch = 1`
`Vincia:pTmaxMatch = 1`
Note 1: the last line is only needed if you intend to use the VINCIA shower model.
Note 2: if you have loaded the POWHEG hooks (see below), you should also use the setting `POWHEG:veto = 0` to deactivate the POWHEG hooks.

The reason we do not recommend these settings (naive POWHEG matching) for serious studies is of course that POWHEG-hardness and PYTHIA-hardness are not identical, and hence mismatches are bound to happen: some phase-space regions may be doublecounted, while others may not be counted at all. Depending on the process and the choice of hardness, such mismatches might be small, but there are no guarantees.

### POWHEG Matching with Vetoed Showers (Recommended)

A (hopefully) more accurate merging scheme is coded up in the `include/Pythia8Plugins/PowHegHooks.h` file, with a realistic user example in the `examples/main31` files. Here we would like to discuss the (POWHEG-specific) input settings for `main31.cc`, see `main31.cmnd`, and attempt to give some recommendations on how to use the main program to perform a matching of POWHEG-BOX with PYTHIA 8.

POWHEG-BOX inputs contain Born-like events (with no resolved emission) and Real-type events (containing an additional parton). The mismatch between POWHEG-hardness and PYTHIA-hardness can be minimised if the PYTHIA shower knows
a) The POWHEG-hardness criterion (through which the separation of Born- and Real-like events is defined), and
b) The POWHEG-hardness value (which separates Born- and Real-like events).
If these definitions are known, then PYTHIA can fill missing phase space regions through vetoed showering: let the shower sweep over the full phase space, using its PYTHIA-hardness ordering, and use the POWHEG-hardness to veto those emissions that POWHEG should already have covered. This is only possible since the POWHEG-hardness criterion and the shower ordering criterion are very similar. In the more general case a truncated showering would be needed [Nas04].

For vetoed showering, it is necessary to define the POWHEG-hardness criterion. In the presence of multiple partons, the definition quickly becomes complicated, and allows for different choices. Similar decisions have already been made in the implementation of POWHEG, one example being the choice in defining which "hardness value" is transferred as POWHEG-hardness, e.g. by deciding if the "singular regions" of the FKS or the CS approach are used. If the POWHEG-hardness definition were to be changed, or extended to more objects, the `PowhegHooks.h` code would need to be modified accordingly.

The merging code is designed to be very flexible, and allows access to many possible choices. However, this flexibility means that many parameters can be changed, potentially leading to confusion. Thus, recommendations might prove helpful. All mistakes and inaccuracies rest with the author.

We recommend the usage of vetoed showers. This means using
`TimeShower:pTmaxMatch = 2`
`SpaceShower:pTmaxMatch = 2`
`Vincia:pTmaxMatch = 2`
`POWHEG:veto = 1`
The three first statements mean that PYTHIA's showers will sweep over the full phase space, while the last statement will tell the POWHEG hooks to apply a veto on shower emissions for which the POWHEG-hardness separation between radiator and emission is above the POWHEG-hardness value of the current input event.

To obtain an estimate of the systematic uncertainty of the POWHEG matching procedure, we recommend varying the hardness value that is associated with the branching that is generated by POWHEG, against which emissions in the vetoed shower are tested. The scale at which POWHEG generated the emission is transferred by POWHEG-BOX in the `SCALUP` member of Les Houches Events. This is taken as the value that will define the POWHEG-hardness criterion for the vetoed shower if `POWHEG:pThard = 0`. However, as promoted in [Ole12], the POWHEG-hardness scale can also be recalculated, either as the lowest possible scale at which POWHEG could have produced the same emission, `POWHEG:pThard = 1`, or as the lowest scale at which POWHEG could have produced the same event, `POWHEG:pThard = 2`. As a rule, higher values of `POWHEG:pThard` suppresses the probability of further emissions. Currently, we recommend using
`POWHEG:pThard = 1`
as the central setting, and using `POWHEG:pThard = 0,2` to estimate the POWHEG matching uncertainties associated with this choice.

A comparison with the naive POWHEG matching settings above may also be informative, to assess how much phase space is under- or double-counted, i.e., to gauge the effect of the hardness mismatch, but would probably be overkill in the context of uncertainty estimates.

To define the POWHEG-hardness criterion (see also the full list of settings below), use
`POWHEG:pTdef = 1`
Alternatively, the PYTHIA hardness can be used instead, with `POWHEG:pTdef = 2`. Again, this may be overkill in the context of uncertainty estimates.

Both POWHEG-BOX and PYTHIA 8 generate emissions through a parton-shower step, meaning that both programs have a clear definition of a radiator that emits particles, which is very similar (if not identical). To fix the ambiguity if the radiator or the emitted particle should be called "the emission", use
`POWHEG:emitted = 0`
More complicated choices can be used by experts. For instance, use `POWHEG:emitted = 2` to check the POWHEG-hardness of both radiator and emitted.

To exhaustively fix the criterion by which to veto parton shower emissions, it is important to decide which partons/parton pairs are used to calculate the POWHEG hardness of a PYTHIA 8 emission. The minimal and recommended choice is
`POWHEG:pTemt = 0`
This means that only the POWHEG hardness with respect to the radiating leg is checked, and recoil effects are neglected. This prescription should be very similar to how a hardness value is assigned to a Real-type event in the POWHEG-BOX, since in the (implementation of FKS in the) POWHEG-BOX, initial state splittings only have singular regions with the radiating initial state parton, and final state splittings only have singular regions with respect to the radiating final state line. Other choices of `POWHEG:pTemt` are available. A warning is that the impact of changes can be huge, particularly for inputs with many jets. Other choices therefore should only be made by experts, and a high degree of caution is advised.

For many POWHEG processes, the Sudakov effects from electroweak emissions (here we are concerned mainly with photon emissions, but this could apply also to W/Z emissions) are not included. This effect can be investigated using `POWHEG:QEDveto = 0,1,` or `2`. For the default value of `POWHEG:pTemt = 0`, only `POWHEG:QEDveto = 2` has any effect. For this choice, a hard photon and subsequent QCD radiation is retained. In many cases, particularly when the Born contributions are small, the choice has little effect.

You need to decide how many emissions the vetoed shower should check after an allowed emission has been constructed. If the hardness definitions in POWHEG-BOX and PYTHIA 8 where identical, all checking could be stopped after the first allowed PS emission. To be prudent, we recommend setting
`POWHEG:vetoCount = 3`
which will then check up to three allowed emissions. Higher values of `POWHEG:vetoCount` have not lead to visible differences for the processes which have been tested.

For many POWHEG processes, the Sudakov effects from electroweak emissions (here we are concerned mainly with photon emissions, but this could apply also to W/Z emissions) are not included. This effect can be investigated using `POWHEG:QEDveto = 0,1,` or `2`. For the default value of `POWHEG:pTemt = 0`, only `POWHEG:QEDveto = 2` has any effect. For this choice, a hard photon and subsequent QCD radiation is retained. In many cases, particularly when the Born contributions are small, the choice has little effect.

In cases in which there can be an interplay between the fixed-order calculation and ISR branchings which are not modelled by the shower, such as g → t tbar, a damped shower may improve the modelling [Cor10]. In the simple shower and in Vincia, damped showers are steered by the `SpaceShower:pTdampMatch` (for ISR only) and `Vincia:pTdampMatch` (for both ISR and FSR) modes, respectively. Their default settings
`SpaceShower:pTdampMatch = 3`
`Vincia:pTdampMatch = 3`
turn on damped showers in cases where heavy coloured particles are present in the final state, but switch them off otherwise. The undamped shower can be recovered for all processes by setting this mode to `0`.

### Full Settings List for PYTHIA's POWHEG Hooks

Note that the modes have generally been defined with several default values below corresponding to the "off" state, and thus do not agree with the recommended values described above.

`mode` POWHEG:nFinal (`default = -1`; `minimum = -1`)
Number of outgoing particles of POWHEG Born level process, i.e. not counting additional POWHEG radiation. The negative default value is interpreted as the instruction to ignore final state particle count conditions, as is e.g. necessary when the POWHEG-BOX code includes a variable number of additional emission (on top of the Born process) into the input events. Note that for this negative default value, only `POWHEG:pThard = 0` is allowed.

`mode` POWHEG:veto (`default = 0`; `minimum = 0`; `maximum = 1`)
Master switch to perform vetoing or not.
`option` 0 : No vetoing is performed (the user hooks is not loaded).
`option` 1 : Showers are started at the kinematical limit. Emissions are vetoed if pTemt > pThard. See also `POWHEG:vetoCount` below.

`mode` POWHEG:pThard (`default = 1`; `minimum = 0`; `maximum = 2`)
Selection of the pThard scale. For events where there is no radiation, pThard is always set to be the `SCALUP` value of the LHA/LHEF standard.
`option` 0 : Set pThard equal to `SCALUP`.
`option` 1 : The pT of the POWHEG emission is tested against all other incoming and outgoing partons, with the minimal value chosen.
`option` 2 : The pT of all final-state partons is tested against all other incoming and outgoing partons, with the minimal value chosen.

`mode` POWHEG:pTdef (`default = 1`; `minimum = 0`; `maximum = 2`)
Use of pT definitions.
`option` 0 : The POWHEG ISR pT definition for both ISR and FSR.
`option` 1 : The POWHEG ISR pT and FSR d_ij definitions.
`option` 2 : The PYTHIA definitions. (Note that this does not make sense for `POWHEG:pThard = 0`.)

`mode` POWHEG:emitted (`default = 0`; `minimum = 0`; `maximum = 3`)
Selection of emitted parton for FSR.
`option` 0 : The PYTHIA definition of emitted.
`option` 1 : The PYTHIA definition of radiator.
`option` 2 : A random selection of emitted or radiator.
`option` 3 : Both emitted and radiator are tried.

`mode` POWHEG:pTemt (`default = 0`; `minimum = 0`; `maximum = 2`)
Selection of the pTemt scale.
`option` 0 : It is the pT of the emitted parton with respect to the radiating parton.
`option` 1 : The pT of the emission is checked against all incoming and outgoing partons, and then pTemt is set to the minimum of these values.
`option` 2 : The pT of all final-state partons is tested against all other incoming and outgoing partons, with the minimal value chosen.
Warning: the choice here can give significant variations in the final distributions, notably in the tail to large pT values.

`mode` POWHEG:QEDveto (`default = 0`; `minimum = 0`; `maximum = 2`)
Treatment of non-QCD radiation.
`option` 0 : Colorless partons are not included in pT calculated from the shower for pTemt>0 .
`option` 1 : Colorless partons ARE included for pTemt>0 .
`option` 2 : Colorless partons ARE included for pTemt>0 . Additionally, if a colorless parton is emitted with pT > pThard in Born-level events, then the entire event is accepted. This is relevant for all values of pTemt .

`mode` POWHEG:MPIveto (`default = 0`; `minimum = 0`; `maximum = 1`)
MPI vetoing.
`option` 0 : No MPI vetoing is done.
`option` 1 : When there is no radiation, MPIs with a scale above pT_1 are vetoed, else MPIs with a scale above sum_i pT_i / 2 = (pT_1 + pT_2 + pT_3) / 2 are vetoed. This option is intended specifically for POWHEG simulations of 2 → 2 + 2 → 3 QCD processes.

`mode` POWHEG:vetoCount (`default = 3`; `minimum = 0`)
After this many accepted emissions in a row, no more emissions are checked. Value 0 means that no emissions are checked. Using a very large value (e.g. 100000) will mean that all emissions are checked.