\newpage \topheading{Z production at N$^3$LO and N$^4$LL} \label{n3losec} Based on \href{https://arxiv.org/abs/2207.07056}{arXiv:2207.07056} (Neumann, Campbell '22). This page describes how to obtain Z-boson predictions at the level of up to N$^4$LL+N$^3$LO and at a fixed order of up to N$^3$LO. The highest order predictions are then are at the level of $\alpha_s^3$ up to missing N$^3$LO PDFs, which both affect the logarithmic accuracy and the fixed-order accuracy. \textbf{Warning}: Please note that predictions at the level of $\alpha_s^3$ are computationally very expensive due to the Z+jet NNLO matching corrections calculated with a small (5 GeV) cutoff. Our production plots typically run on 128 NERSC Perlmutter nodes for 12 hours, about 100k CPU hours. If you do not have these resources and are mostly interested in the region of small $q_T$ (less than about 40 GeV), the matching to fixed order can be performed at the level of $\alpha_s^2$. This changes results by about 10\% above 40 GeV (missing $\alpha_s^3$/Z+jet NNLO corrections at large $q_T$), but typically just at the level of 2\% below 30 GeV, depending on cuts. For $Z$ production one can start with the input file \texttt{Bin/input\_Z.ini} that has a set of default cuts for $Z$ production, i.e.~a mass window of the lepton pair around $m_Z$ (\texttt{m34min} and \texttt{m34max} are set), and lepton minimum transverse momenta (\texttt{ptleptmin} and \texttt{ptlept2min}, both the same, i.e.~symmetric cuts). After choosing a set of PDFs (\texttt{lhapdf\%lhapdfset}), beamfunctions grids should be pre-generated by running MCFM with \texttt{resummation\%makegrid=.true.}. \midheading{N$^4$LL + matching at $\alpha_s^2$ fixed-order (NLO~$Z$+jet)} The fully matched result consists of the purely resummed part, the fixed-order Z+jet calculation and the fixed-order expansion of the resummation to remove overlap. At N$^3$LL$^\prime$+NNLO these three parts can be computed together automatically with \texttt{general\%part=resNNLOp}, or with \texttt{general\%part=resNNLO} at N$^3$LL+NNLO (\texttt{general\%part=resNLO} at NNLL+NLO). At the level of N$^4$LL+N$^3$LO the matching is with NNLO Z+jet predictions and, due to the computational requirements, these three parts are kept separate and have to be assembled manually. \bottomheading{Purely resummed N$^4$LL} The purely resummed N$^4$LL part can be obtained by running with \texttt{part\ =\ resonlyN3LO}. Similarly the N$^3$LL resummation is obtained with \texttt{part\ =\ resonlyNNLO} and N$^3$LL$^\prime$ with \texttt{part\ =\ resonlyNNLOp} (see overview of configuration options). Scale variation of hard, low and rapidity scale can be enabled with \texttt{scales\%doscalevar\ =\ .true.}. The resummation part will be cut off at large transverse momenta through a transition function defined in the plotting routine. We recommend to use the default transition function with a parameter $(q_T^2/Q^2)=0.4$ or $0.6$. The default plotting routine generates histograms with both choices that allows for estimating a matching uncertainty. Since the resummation becomes also invalid and numerically unstable for $q_T>m_Z$, we select the resummation integration range between $0$ and $80$ GeV with \texttt{resummation\%res\_range=0\ 80}. \bottomheading{Fixed-order expansion of the resummed result} The fixed-order expansion of the resummed result (removing overlap with fixed-order Z+jet at NLO) (in the following called resexp) can be obtained by running \texttt{part\ =\ resexpNNLO}. We recommend a lower cutoff of 1 GeV, setting \texttt{resexp\_range\ =\ 1.0\ 80.0} in the \texttt{resummation} section. This part makes use of the transition function to ensure that this part is turned off at large $q_T$. Therefore the range is also limited to 80 GeV. \bottomheading{Fixed-order Z+jet at NLO} The fixed-order $\alpha_s^2$ corrections (in the following called resabove) can be obtained by running \texttt{part\ =\ resaboveNNLO}. We recommend a cutoff of 1 GeV, setting \texttt{fo\_cutoff\ =\ 1.0} in the \texttt{resummation} section. This cutoff disables matching corrections below 1 GeV and must agree with the lower value of \texttt{resexp\_range}. \bottomheading{Combination and scale uncertainties} After running all three parts separately, the generated histograms can be added manually in a plotting program. The matching corrections consist of fixed-order result + fixed-order expansion of the resummed result. At $\alpha_s^2$ a manual combination should agree with an automatic combination through \texttt{part\ =\ resNNLO}, for example. To obtain uncertainties from scale variation the following procedure should be followed. The scales in the matching corrections must match, i.e.~resexp\_scalevar\_01 should be added to resabove\_scalevar\_01, and resexp\_scalevar\_02 should be added to resexp\_scalevar\_02. Note that the scale variation histograms only give the difference to the central value. So the minimum of the scale varied matching corrections consist of: \begin{verbatim} min(resabove + resabove_scalevar_01 + resexp + resexp_scalevar_01, resabove + resabove_scalevar_02 + resexp + resexp_scalevar_02) \end{verbatim} Similarly the maximum can be taken, both giving an envelope of uncertainties. Note that in the resummation and its fixed-order expansion we have not decoupled the scale in the PDFs from other scales. Therefore when combining resexp with resabove, only the simultaneous variation of factorization scale and renormalization scale upwards and downwards can be used for the scale variation, corresponding to "\_01" and "\_02". Finally the scalevar\_maximum and scalevar\_minimum histograms of the purely resummed result should be considered as an additional envelope. For this part the envelope of all scale variations is taken. The variation of the rapidity scale plays an important role and can be enabled by setting \texttt{scalevar\_rapidity\ =\ .true.} in the \texttt{{[}resummation{]}} section. It gives two important additional variations to the 2, 6, or 8-point variation of hard and resummation scale in the resummed part. \midheading{Adding $\alpha_s^3$ matching corrections (Z+jet NNLO coefficient)} To obtain the matching corrections at $\alpha_s^3$ we compute just the $\alpha_s^3$ \emph{coefficient} and add it to the previously obtained lower order results. \bottomheading{Fixed-order Z+jet NNLO coefficient} To obtain the fixed-order $\alpha_s^3$ corrections please run with \texttt{part\ =\ resaboveN3LO}. We recommend a matching cutoff of 5 GeV, setting \texttt{fo\_cutoff\ =\ 5.0} in the \texttt{resummation} section and consequently a jettiness cutoff of \texttt{taucut=0.08} in the \texttt{nnlo} section. It is possible to run with a larger \texttt{fo\_cutoff} keeping the same \texttt{taucut} value, but either a smaller \texttt{fo\_cutoff} or a larger \texttt{taucut} value will require a new validation of results. \bottomheading{Fixed-order Z+jet NNLO coefficient} To obtain the fixed-order $\alpha_s^3$ corrections please run the $Z$+jet process (\texttt{nproc=41}) with \texttt{part=nnlocoeff} in the \texttt{{[}general{]}} section with a fixed $q_T$ cutoff, i.e.~by setting \texttt{pt34min\ =\ 5.0} in the \texttt{{[}masscuts{]}} section. The Z+jet calculation is based on jettiness slicing, which requires a jettiness cutoff. For a $q_T$ cutoff of 5 GeV (for resummation this is the matching-corrections cutoff) we recommend a jettiness cutoff of \texttt{taucut=0.08} in the \texttt{{[}nnlo{]}} section. It is possible to run with a larger $q_T$ cutoff, keeping the same \texttt{taucut} value, but either a smaller $q_T$ cutoff or a larger \texttt{taucut} value will require a new validation of results. See \href{https://arxiv.org/abs/2207.07056}{arXiv:2207.07056} for technical details. \bottomheading{$\alpha_s^3$ fixed-order expansion coefficient of the resummed result} The $\alpha_s^3$ fixed-order expansion coefficient of the resummed result (removing overlap with fixed-order Z+jet at NNLO) can be obtained by running \texttt{part\ =\ resexpN3LO}. \textbf{\emph{NOTE}} that this only returns the N$^3$LO expansion \textbf{\emph{coefficient}}, to match with the fixed-order \texttt{nnlocoeff} part. Similarly, to match with the fixed-order part, we recommend a cutoff of 5 GeV, setting \texttt{resexp\_range\ =\ 5.0\ 80.0} in the \texttt{resummation} section. \bottomheading{Combination} Similary to the lower order, the matching corrections $\alpha_s^3$ coefficient can be added to lower order $\alpha_s^2$ results. \midheading{Fixed order N$^3$LO} To compute fixed-order N$^3$LO cross-sections with $q_T$ subtractions one needs to calculate the fixed-order Z+jet NNLO coefficient with a $q_T$ cutoff, as outlined above. The below-cut contribution can be obtained via \texttt{part=n3locoeff} in the \texttt{{[}general{]}} section for $Z$ production, i.e.~\texttt{nproc=31}, where the \texttt{qtcut} value in the \texttt{{[}nnlo{]}} section has to match the \texttt{pt34min} value chosen for the Z+jet NNLO calculation. We recommend to calculate the fixed-order NNLO coefficient first, as it is instructional to understand the procedure at N$^3$LO. This proceeds by combining NLO Z+jet result with a \texttt{pt34min} value with the \texttt{part=nnloVVcoeff} part (below-cut at NNLO), where \texttt{qtcut} has to be set to match the \texttt{pt34min} value. The result of this manual procedure must agree with the automatic calculation, i.e.~calculating Z with \texttt{part=nnlo} or \texttt{part=nnlocoeff}. Please pay particular attention to the difference of calculating the NNLO ($\alpha_s^2$) and N$^3$LO ($\alpha_s^3$) coefficients and the full result.