
\subsection{Monte Carlo generators \label{MC}}

To measure the luminosity, event generators, rather than analytical calculations, are 
mandatory to provide theoretical results of real experimental interest.
The software tools used in early measurements of 
the luminosity at flavour factories (and sometimes 
still used in recent experimental publications) include generators such as BHAGENF
 \cite{Drago:1997px}, 
BabaYaga v3.5 \cite{CarloniCalame:2003yt} and BKQED \cite{Berends:1983rk,Berends:1981fb}. 
These MC programs, however, are based either on a fixed
NLO calculation (such as BHAGENF and BKQED) or include corrections to all orders in 
perturbation theory, but in the LL approximation only (like BabaYaga v3.5). 
Therefore the precision of these codes can be estimated to lie in the range 
0.5$\div$1\%, depending on the adopted experimental cuts. 

The increasing precision reached on the experimental side during the last years 
led to the development of new dedicated theoretical tools, such as BabaYaga@NLO and
MCGPJ, and the adoption of already well-tested codes, like BHWIDE, the latter
extensively used at the high-energy LEP/SLC colliders for the simulation of the large-angle 
Bhabha process. As already emphasised in Section \ref{NLO-HO}, 
all these three codes include NLO corrections in combination with 
multiple photon contributions and have, therefore, a precision tag of 
$\sim 0.1$\%. As described in the following, the experiments typically use more than 
one generator, to keep the luminosity theoretical error under control through the
comparison of independent predictions.

A list of the MC tools used in the luminosity measurement at meson factories is given 
in Table~\ref{tabmc:1}, which summarises the main ingredients of their formulation for radiative 
corrections and the estimate of their theoretical accuracy.

\begin{table}[t]
\caption{MC generators used for luminosity monitoring at meson factories.}
\label{tabmc:1}
%%$$
\begin{center}
\begin{tabular}{lll}
%
%\hline\noalign{\smallskip}
 \hline
 Generator & Theory & Accuracy
 \\ %[1mm]
% \noalign{\smallskip}\hline\noalign{\smallskip}
%    \hline
    \hline
BabaYaga  v3.5 &{\small Parton Shower}& $\sim 0.5\div 1\%$ \\ %[1mm]
    \hline
BabaYaga@NLO & $O (\alpha)+{\rm\small PS}$&$\sim  0.1\%$ \\ %[1mm]
     \hline
BHAGENF & $O (\alpha)$ & $\sim 1\%$ \\ %[1mm]
    \hline        
BHWIDE &$O (\alpha)\, {\rm\small YFS}$&$\sim 0.5\% {\tiny({\rm LEP1}})$ \\ %[1mm]
\hline 
BKQED & $O (\alpha)$& $\sim 1\% $\\ %[1mm] 
\hline
MCGPJ &$O (\alpha)+\mbox{\rm\small SF}$& $< 0.2\%$ \\ 
 \hline
 \end{tabular}
 \end{center}
\end{table}

The basic theoretical and phenomenological features of the different generators are summarised in the following.

\begin{enumerate}

\item BabaYaga v3.5  -- It is a MC generator developed by the Pavia group at the start of the 
DA$\mathrm{\Phi}$NE 
operation using a QED PS approach for the treatment of LL QED 
corrections to luminosity processes and later improved  to account for the interference of radiation emitted by different charged legs in the generation of the momenta 
of the final-state particles. 
The main drawback of  BabaYaga v3.5 is the absence of $O (\alpha)$ non-logarithmic
contributions, resulting in a theoretical precision of $\sim 0.5$\% for large-angle Bhabha scattering and
of about 1\% for $\gamma\gamma$ and $\mu^+ \mu^-$ final states. It is used by the CLEO-c 
collaboration for the study of all the three luminosity processes.

\item BabaYaga@NLO -- It is the presently released version of BabaYaga, based on the 
matching of exact $O (\alpha)$ corrections with QED PS, as described in 
Section \ref{NLO-HO}. The accuracy of the current version is estimated to be at the 0.1\% level for large-angle Bhabha scattering, two-photon and $\mu^+ \mu^-$~\footnote{At present, 
finite mass effects in the virtual corrections to $e^+ e^- \to \mu^+\mu^-$, which should 
be included for precision simulations at the $\mathrm{\phi}$ factories, are not included 
in BabaYaga@NLO.} production. It is presently used by the KLOE and BaBar collaborations, 
and under consideration by the BES-III experiment.
Like  BabaYaga v3.5, BabaYaga@NLO is available at the 
web page of the Pavia phenomenology group\\
%  \texttt{www.pv.infn.it/$\tilde{}$hepcomplex/babayaga.html}.
 \texttt{www.pv.infn.it/\~\,$\!$hepcomplex/babayaga.html} .
%production in the massless approximation. 

\item BHAGENF/BKQED -- BKQED is the event generator developed by Berends and Kleiss and based
on the classical exact NLO calculations of \cite{Berends:1983rk,Berends:1981fb} for all QED processes. It was 
intensively used at LEP to perform tests of QED through the analysis of
the $e^+ e^- \to \gamma\gamma$ process and is adopted by the BaBar collaboration for
the simulation of the same reaction. BHAGENF is a code 
realised by Drago and  Venanzoni at the beginning of the DA$\mathrm{\Phi}$NE operation to simulate Bhabha
events, adapting the calculations of \cite{Berends:1983rk} to include the contribution of the 
$\mathrm{\phi}$ resonance. 
Both generators lack the effect of HO corrections and, as such, have a precision accuracy of
about 1\%. The BHAGENF code is available at the web address\\
 \texttt{www.lnf.infn.it/\~\,$\!$graziano/bhagenf/bhabha.html}.

\item BHWIDE -- It is a MC code realised in Krakow-Knox\-wille 
 at the time of the LEP/SLC operation and described in~\cite{Jadach:1995nk}. 
In this generator
exact $O (\alpha)$ corrections are matched with the resummation of 
the infrared virtual and real photon contributions through the YFS exclusive exponentiation approach.
%soft and collinear 
%logarithms through the YFS exponentiation approach. 
According to the authors the precision is 
estimated to be about 0.5\% for c.m. energies around the $Z$ resonance. This accuracy estimate was derived through detailed comparisons of the BHWIDE predictions with those of other LEP tools in the presence 
of the full set of NLO corrections, including purely weak corrections. However, since the latter are phenomenologically unimportant at $e^+e^-$
accelerators of moderately high energies and since the QED theoretical ingredients of BHWIDE are very similar to the formulation of both BabaYaga@NLO and MCGPJ, one can argue that the accuracy of 
BHWIDE for physics at flavour factories is at the level of 0.1\%. It is adopted 
by the KLOE, BaBar and BES collaborations.
The code is available at \\
\texttt{placzek.home.cern.ch/placzek/bhwide/}.

\item MCGPJ -- It is the generator developed by the Dubna-Novosibirsk collaboration and 
used at the VEPP-2M collider. This program includes exact $O (\alpha)$ corrections supplemented
with HO LL contributions related to the emission of collinear photon jets
and taken into account through analytical QED collinear SF, as described 
in Section \ref{NLO-HO}. The theoretical 
precision is estimated to be better than 0.2\%. The generator is available at the web address \\
\texttt{cmd.inp.nsk.su/\~\,$\!$sibid/} .

\end{enumerate}

It is worth noticing that the theoretical uncertainty of the most accurate generators based on the matching of exact NLO with LL resummation starts at the level of 
$O (\alpha^2)$ NNL contributions, as
far as photonic corrections are concerned. Other sources of error affecting their physical precision are discussed in detail in Section \ref{TH}.

