<chapter name="Phase Space Cuts"> 
 
<h2>Phase Space Cuts</h2> 
 
<code>PhaseSpace</code> is base class for all hard-process phase-space 
generators, either generic <ei>2 &rarr; 1</ei> or <ei>2 &rarr; 2</ei> ones, 
or specialized ones like for elastic and diffractive scattering. 
 
<p/> 
In it, it is possible to constrain the kinematics of most processes. 
(Exceptions are "soft physics", i.e. minimum bias, elastic and 
diffractive processes. The Coulomb singularity for elastic scatterings, 
if simulated, is <aloc href="TotalCrossSections">handled separately</aloc>.) 
These constraints apply in the rest frame of the hard subprocess, and 
topologies normally would be changed e.g. by subsequent showering 
activity. The cross section of a process is adjusted to only 
correspond to the allowed phase space. 
 
<p/> 
The more particles in the final state, the more cuts could be applied. 
Here we have tried to remain with the useful minimum, however. More 
generic possibilities could be handled by the 
<aloc href="UserHooks">user hooks</aloc> facility. 
 
<h3>Cuts in all processes</h3> 
 
<parm name="PhaseSpace:mHatMin" default="4." min="0."> 
The minimum invariant mass. 
</parm> 
 
<parm name="PhaseSpace:mHatMax" default="-1."> 
The maximum invariant mass. 
A value below <code>mHatMin</code> means there is no upper limit. 
</parm> 
 
<h3>Cuts in <ei>2 &rarr; 1</ei> processes</h3> 
 
When a resonance <code>id</code> is produced, the 
<code><aloc href="ParticleDataScheme">mMin(id)</aloc></code> and 
<code><aloc href="ParticleDataScheme">mMax(id)</aloc></code> 
methods restrict the allowed mass range 
of this resonance. Therefore the allowed range is chosen to be the 
overlap of this range and the <code>mHatMin</code> to 
<code>mHatMax</code> range above. Most resonances by default have no 
upper mass limit, so effects mainly concern the lower limit. 
Should there be no overlap between the two ranges then the process 
will be switched off. 
 
<h3>Cuts in <ei>2 &rarr; 2</ei> processes</h3> 
 
<parm name="PhaseSpace:pTHatMin" default="0." min="0."> 
The minimum invariant <ei>pT</ei>. 
</parm> 
 
<parm name="PhaseSpace:pTHatMax" default="-1."> 
The maximum invariant <ei>pT</ei>. 
A value below <code>pTHatMin</code> means there is no upper limit. 
</parm> 
 
<parm name="PhaseSpace:pTHatMinDiverge" default="1." min="0.5"> 
Extra <ei>pT</ei> cut to avoid the divergences of some processes 
in the limit <ei>pT &rarr; 0</ei>. Specifically, if either or both 
produced particles have a mass below <code>pTHatMinDiverge</code> 
then <ei>pT</ei> is limited from below by the larger of 
<code>pTHatMin</code> and <code>pTHatMinDiverge</code>. 
</parm> 
 
<flag name="PhaseSpace:useBreitWigners" default="on"> 
Allows masses to be selected according to Breit-Wigner shapes in 
<ei>2 &rarr; 2</ei> processes, whenever particles have been declared 
with a nonvanishing width above the threshold below. In those cases 
also the limits below will be used for the mass selection. For 
<ei>2 &rarr; 1</ei> processes the Breit-Wigner shape is part of the 
cross section itself, and therefore always included. 
</flag> 
 
<parm name="PhaseSpace:minWidthBreitWigners" default="0.01" min="1e-6"> 
The minimum width a resonance must have for the mass to be dynamically 
selected according to a Breit-Wigner shape, within the limits set below. 
Only applies when <code>useBreitWigners</code> is on; else the nominal 
mass value is always used. 
</parm> 
 
<p/> 
For a particle with a Breit-Wigner shape selected, according to the 
rules above and to the rules of the particle species itself, the 
<code><aloc href="ParticleDataScheme">mMin(id)</aloc></code> and 
<code><aloc href="ParticleDataScheme">mMax(id)</aloc></code> 
methods restrict the allowed mass range of the particle, just like for 
the <ei>2 &rarr; 1 </ei> processes. 
 
<h3>Cuts in <ei>2 &rarr; 3</ei> processes</h3> 
 
There are two main classes of <ei>2 &rarr; 3</ei> processes. One is the 
processes such as <ei>WW/ZZ</ei>-fusion Higgs production, i.e. 
<ei>q q &rarr; q q H</ei>, where there are no special singularities 
associated with two partons in the final state being collinear, 
or even for <ei>pT &rarr; 0</ei>. For this class, no further cuts 
have been introduced than those already available for <ei>2 &rarr; 2</ei> 
processes. Specifically, for now all three are restricted exactly the 
same way by <code>pTHatMin</code> and <code>pTHatMax</code>. As above, 
Breit-Wigner mass ranges can be restricted. 
 
<p/> 
The other <ei>2 &rarr; 3</ei> event class is QCD processes, such as 
<ei>g g &rarr; g g g</ei>. Here the soft and collinear singularities 
play a major role, and the phase space generation and cuts have 
been adapted to this. For this class, an alternative set of cuts 
is used, as outlined in the following. First of all the three 
outgoing partons are ordered in falling <ei>pT</ei>, i.e. 
<ei>pT_3 > pT_4 > pT_5</ei> (where the labeling 3, 4, 5 of the outgoing 
partons is random, i.e. unrelated to the order specified in the 
process name). The allowed ranges of <ei>pT_3</ei> and <ei>pT_5</ei> 
can be specified, but obviously <ei>pT_3max >= pT_5max</ei> and 
<ei>pT_3min >= pT_5min</ei>. The <ei>pT_4</ei> is not constrained 
explicitly, but is constructed from the vector sum of <ei>pT_3</ei> 
and <ei>pT_5</ei>, subject to the constraint that it has to lie 
between the two in magnitude. While the <ei>pT</ei> cuts take care 
of singularities collinear with the incoming beams, it is also 
necessary to handle final-state singularities, when two outgoing 
partons become collinear. This is done by requiring a minimal 
separation in <ei>R</ei>, where 
<ei>R^2 = (Delta eta)^2 + (Delta phi)^2</ei>. 
Finally, a note about efficiency. The QCD <ei>2 &rarr; 3</ei> phase space 
is not set up to explicitly include <ei>mHat</ei> as one of the basic 
variables. Such a cut is only done after a phase space point is already 
selected, which means that a narrow mass choice will slow down the 
program appreciably. Also narrow <ei>pT_3</ei> and <ei>pT_5</ei> bins 
are likely to give inefficient generation, if it gives rise to 
significant indirect restrictions on <ei>pT_4</ei>. 
 
<parm name="PhaseSpace:pTHat3Min" default="10." min="0."> 
The minimum invariant <ei>pT</ei> of the highest-<ei>pT</ei> parton in 
QCD <ei>2 &rarr; 3</ei> processes. 
</parm> 
 
<parm name="PhaseSpace:pTHat3Max" default="-1."> 
The maximum invariant <ei>pT</ei> of the highest-<ei>pT</ei> parton in 
QCD <ei>2 &rarr; 3</ei> processes 
A value below <code>pTHat3Min</code> means there is no upper limit. 
</parm> 
 
<parm name="PhaseSpace:pTHat5Min" default="10." min="0."> 
The minimum invariant <ei>pT</ei> of the lowest-<ei>pT</ei> parton in 
QCD <ei>2 &rarr; 3</ei> processes. 
</parm> 
 
<parm name="PhaseSpace:pTHat5Max" default="-1."> 
The maximum invariant <ei>pT</ei> of the lowest-<ei>pT</ei> parton in 
QCD <ei>2 &rarr; 3</ei> processes 
A value below <code>pTHat5Min</code> means there is no upper limit. 
</parm> 
 
<parm name="PhaseSpace:RsepMin" default="1."> 
The minimum separation <ei>R</ei> in <ei>(eta, phi)</ei> space between 
any two outgoing partons in QCD <ei>2 &rarr; 3</ei> processes. 
</parm> 
 
 
<h3>Cuts for a second hard process</h3> 
 
If you use the machinery that allows the generation of a specified 
<aloc href="ASecondHardProcess">second hard process</aloc> then, 
by default, the same phase space cuts will be used for it as listed 
above. Optionally, however, you may use a second set of cuts, as 
described here. In this context "first" and "second" is merely a 
technical distinction; you are welcome e.g. to pick <ei>pT</ei> ranges 
such that the second interaction always has a larger <ei>pT</ei> than 
the first. 
 
<flag name="PhaseSpace:sameForSecond" default="on"> 
By default use the same cuts for a second hard process as for the 
first. If <code>off</code> then instead use the mass and <ei>pT</ei> 
cuts below, where relevant. (The other cuts above still remain the same.) 
</flag> 
 
<parm name="PhaseSpace:mHatMinSecond" default="4." min="0."> 
The minimum invariant mass for a second interaction, if separate. 
</parm> 
 
<parm name="PhaseSpace:mHatMaxSecond" default="-1."> 
The maximum invariant mass for a second interaction, if separate. 
A value below <code>mHatMin</code> means there is no upper limit. 
</parm> 
 
<parm name="PhaseSpace:pTHatMinSecond" default="0." min="0."> 
The minimum invariant <ei>pT</ei> for a second interaction, if separate. 
</parm> 
 
<parm name="PhaseSpace:pTHatMaxSecond" default="-1."> 
The maximum invariant <ei>pT</ei> for a second interaction, if separate. 
A value below <code>pTHatMin</code> means there is no upper limit. 
</parm> 
 
<h3>Generation strategy and documentation</h3> 
 
During the initialization stage a simplified function is found, 
that is intended to be above the true cross-section behaviour 
over the whole of phase space. It is chosen to be easily integrable 
and invertible. That way a trial phase space point can be selected 
according this simple function, and then be accepted by the ratio of 
true to the simple function. For a good efficiency the ratio should be 
close to unity,  yet never above it. This constrains the absolute 
normalization of the simple function. The initial search may fail to 
find the phase space point where the true-to-simple ratio is maximal, 
however. This then can lead to subsequent maximum violations, where the 
ratio is above unity. Two alternative strategies are implemented to 
handle such situations, see below. 
 
<flag name="PhaseSpace:showSearch" default="off"> 
Possibility to print information on the search for phase-space 
coefficients that (in a multichannel approach) provides an analytical 
upper envelope of the differential cross section, and the 
corresponding upper estimate of the cross section. Of interest 
for crosschecks by expert users only. 
</flag> 
 
<flag name="PhaseSpace:showViolation" default="off"> 
Possibility to print information whenever the assumed maximum 
differential cross section of a process is violated, i.e. when 
the initial maximization procedure did not find the true maximum. 
Also, should negative cross sections occur, print whenever a more 
negative value is encountered. 
</flag> 
 
<flag name="PhaseSpace:increaseMaximum" default="off"> 
Strategy for handling cases where a larger cross section is 
obtained during the event generation than was assumed at initialization, 
i.e. when a violation occurs. 
<br/><b>off:</b>each event comes with a weight, which normally is unity 
(as a consequence of the acceptance/rejection step), and is found in 
<code><aloc href="EventInformation">Info::weight()</aloc></code>. 
For events which exceed the maximum instead the true-to-simple ratio 
is stored as event weight, which then is above unity. If the user so 
wishes this weight can then be carried along when event properties are 
histogrammed. Since normally such violations should be rare and not 
too much above unity one could expect most users to ignore such issues 
be default. Should maximum violations turn out to be frequent (visible 
in the <code><aloc href="EventStatistics">Pythia::statistics()</aloc></code> 
output) the option exists to use the information. 
<br/><b>on:</b>the maximum is increased whenever it is exceeded. Thus 
events generated after this point will be "correctly" distributed, 
while ones generated previously obviously then have had too high a 
relative weight. If violations occur early on and/or are small this 
strategy should do a good job of correcting to the desired phase-space 
distribution. This strategy may be more convenient for the normal user, 
who would not wish to worry about event weights. It does have the 
disadvantage that the raised maximum introduces an extra amount of 
"history memory" to the generation sequence, so that it becomes less 
easy to save-and-restore the <aloc href="RandomNumbers">random-number 
state</aloc> for debugging purposes. 
</flag> 
 
<h3>Reweighting of <ei>2 &rarr; 2</ei> processes</h3> 
 
Events normally come with unit weight, i.e. are distributed across 
the allowed phase space region according to the appropriate differential 
cross sections. Sometimes it may be convenient to have an uneven 
distribution of events. The classical example here is that many cross 
sections drop off with transverse momentum <ei>pT</ei>, such that few 
events are generated at large <ei>pT</ei> scales. If one wants to 
plot the <ei>pT</ei> cross section, and all that comes with it, the 
statistical error will then degrade with increasing <ei>pT</ei> 
where fewer events end up. 
 
<p/> 
One solution is to split the full <ei>pT</ei> range into several 
separate subranges, where the events of each subsample obtains a 
different overall normalization. Specifically, if you generate a 
comparable number of events in each <ei>pT</ei> bin, such that 
larger <ei>pT</ei> bins are oversampled, these bins come with a 
correspondingly reduced overall weight, that needs to be taken into 
account when the bins are combined. The other is to have a continuously 
increasing oversampling of events at larger <ei>pT</ei> scales, which 
is compensated by a continuously decreasing weight for the event. 
 
<p/> 
Both of these solutions are supported. Specifically, for 
<ei>2 &rarr; 2</ei> processes, the <ei>pTHat</ei> scale offers a 
convenient classification of the event. (Of course, two events 
starting out from the same <ei>pTHat</ei> scale will experience 
different parton shower evolutions, etc., and may therefore look 
quite different at the end.) The two cuts 
<code>PhaseSpace:pTHatMin</code> and <code>PhaseSpace:pTHatMax</code> 
therefore offers a way to slice a <ei>pT</ei> range into subranges, 
see e.g. <code>main08.cc</code>. Alternatively the 
<aloc href="UserHooks">User Hooks</aloc> machinery offers the 
possibility for you to define your own reweighting of phase space 
sampling, with a corresponding event weight, with 
<code>UserHooks::canBiasSelection</code> and related methods. 
 
<p/> 
As a simplified option, we here offer the possibility to bias the 
<ei>2 &rarr; 2</ei> sampling by a power of <ei>pTHat</ei>, then with 
events having a weight the inverse of this. This fast track will only 
work under a number of strict conditions, implemented to reduce the 
risk of abuse. (Whereas a <code>UserHooks</code> setup can be more 
flexible.) Specifically it will work if only high-<ei>pT</ei> 
<ei>2 &rarr; 2</ei> processes already implemented in PYTHIA are requested, 
notably the <code>HardQCD</code> ones. That is, you cannot mix with 
<ei>2 &rarr; 1</ei> or <ei>2 &rarr; 3</ei> processes, nor with external 
processes (notably Les Houches input) or <code>SoftQCD</code> ones, 
and  you cannot use the option to define a 
<aloc href="ASecondHardProcess">second hard process</aloc> in 
the same event. Furthermore you have to be careful about the choice 
of <code>PhaseSpace:pTHatMin</code>, since a <ei>pTHat = 0</ei> 
event would come with an infinite weight. 
 
<flag name="PhaseSpace:bias2Selection" default="off"> 
Possibility to switch on a biased phase space sampling, 
with compensatingly weighted events, for <ei>2 &rarr; 2</ei> processes. 
Can only be used under the specific conditions explained in 
the paragraph above; under other conditions the initialization 
will abort. 
</flag> 
 
<parm name="PhaseSpace:bias2SelectionPow" default="4." min="0." max="10."> 
If the above flag is on, then a <ei>2 &rarr; 2</ei> process at a scale 
<ei>pTHat</ei> will be oversampled in phase space by an amount 
<ei>(pTHat/pTRef)^pow</ei>, where you set the power <ei>pow</ei> 
here. Events are assigned a compensating 
<aloc href="EventInformation">weight</aloc> the inverse of this, 
i.e. <code>Info::weight()</code> will return <ei>(pTRef/pTHat)^pow</ei>. 
This weight should then be used in the histogramming of event properties. 
The final overall normalization also involves the 
<code>Info::weightSum()</code> value. 
</parm> 
 
<parm name="PhaseSpace:bias2SelectionRef" default="10." min="1."> 
The reference scale <ei>pTRef</ei> introduced above, such that events 
with this <ei>pTHat</ei> obtain unit weight in the reweighting procedure. 
The value of this parameter has no impact on the final result of the 
reweighting procedure, but is only there for convenience, i.e. to 
give "reasonably-sized" weights. 
</parm> 
 
</chapter> 
 
<!-- Copyright (C) 2014 Torbjorn Sjostrand --> 
