%================================================================
% latex file with prefered layout for H1 paper drafts
% use: dvips -D600 file-name
%================================================================
%================================================================
% 
% Paper  ***   D mesons in DIS   ***
%        ***************************
%
%
%      C.Grab,  ETHZ
%  together with W.Erdmann and J.Gassner
%  based on thesis of J.Gassner
% Referees: Elsen and Behnke
%
%  History:
% v0.0 :  9.10.03  0th draft, based on the Amsterdam conf. contrib.
% v0.1 : 26.11.03  first draft, updated figures.
%                  based on discussions with referees 19.11.03
%                  sent to ref. on 26.11.
% v0.2 : 28.11.03  Updates, to be submitted to the HQ-PWG
% v0.3 : 23.12.03  Preparatory version for distribution to H1 in mid-Jan.
% v1.0 : 11.1.04   First distribution to H1
% v1.1 : 5.3.04    Updates of v1.0 for second round
% v1.2 : 23.4.04   Updates of v1.1 for after v11
% v1.3 : 4.5.04    Updates after discussions with EE + OB + WE + JG
% v1.3.1: 12.5.04  Mods on Introduction and chapter 3 (EE)
% v1.3.2: 14.5.04  Mods : merge EE-comments + OB comments
% v1.3.3: 17.5.04  iteration with Wolfram und Johannes
% v1.3.3e: 18.5.04 small changes from EE
% v1.3.4:  24.5.04 move eq.3  + small changes in Fig. by Johannes
% v1.4.1 : 25.5.04 Updates after tel.conference with EE + OB + WE + JG
% v1.4.2 : 26.5.04 Include comments of Wolfram
% v1.4.3 : 05.6.04 Mods after referee report for second circulation
% v1.4.4 : 05.6.04 Olaf's take
% v1.4.5 : 05.6.04 and Eckhard again
% V1.5   : 07.6.04 Christoph, incorporate Eckhard's comment
%          Jo, wolfram need to see this before it becomes 2.0
% v1.5.1: 9.6.04 Continued to incorporate all comments of the collaboration
% v1.5.2: 9.6.04 After discussions with EE, re-read, only minor corrections.
% v1.5.3: 10.6.04 caption style changed
% V2.0  : 11.6.04 v1.5.3 = declared v2.0 
% v2.1  : 7.7.04  Implemented Paul N. comments on style and English.
%                 included comments by Gayler, Guillermo and Katerina.
%                 and Wolframs rephrased paragraph 2.3
% v2.2  ... v2.5  : Wolfram, Olaf, Eckhard worked on the draft....
% 
% V2.5 :  4.8.04  Wolfram, Olaf, Eckhard worked on the draft....
%                 
% V2.6 :  3.8.04  EE rephrased in section 3.
% V2.7 :  5.8.04  CG added Olafs comments, and merged with EE rephrased vsn.2.6
%
% V3.0 :  11.8.04  CG implemented all comments from public-reading( 9.8.04)
%                  Moved all figs, tables to end of paper, according to Paul Newman.
%                  Checked author list according to Web-page.
%                  Proof-read by Wolfram.
% V3.1 :  12.8.04  CG implemented comments from Paul, and Eckhard
%
%
% 
\documentclass[12pt]{article}
\usepackage{epsfig}
\usepackage{amsmath}
\usepackage{hhline}
\usepackage{amssymb}
\usepackage{times}
\usepackage{cite}
\usepackage{color}
\usepackage{lineno}
\usepackage{rotating}
\renewcommand{\topfraction}{1.0}
\renewcommand{\bottomfraction}{1.0}
\renewcommand{\textfraction}{0.0}
\newlength{\dinwidth}
\newlength{\dinmargin}
\setlength{\dinwidth}{21.0cm}
\textheight23.5cm \textwidth16.0cm
\setlength{\dinmargin}{\dinwidth}
\setlength{\unitlength}{1mm}
\addtolength{\dinmargin}{-\textwidth}
\setlength{\dinmargin}{0.5\dinmargin}
\oddsidemargin -1.0in
\addtolength{\oddsidemargin}{\dinmargin}
\setlength{\evensidemargin}{\oddsidemargin}
\setlength{\marginparwidth}{0.9\dinmargin}
\marginparsep 8pt \marginparpush 5pt
\topmargin -42pt
\headheight 12pt
\headsep 30pt \footskip 24pt
\parskip 3mm plus 2mm minus 2mm
%===============================title page=============================
\begin{document}  
% The rest
\newcommand{\pom}{{I\!\!P}}
\newcommand{\reg}{{I\!\!R}}
\newcommand{\slowpi}{\pi_{\mathit{slow}}}
%\newcommand{\gevsq}{\mathrm{GeV}^2}
\newcommand{\fiidiii}{F_2^{D(3)}}
\newcommand{\fiidiiiarg}{\fiidiii\,(\beta,\,Q^2,\,x)}
\newcommand{\n}{1.19\pm 0.06 (stat.) \pm0.07 (syst.)}
\newcommand{\nz}{1.30\pm 0.08 (stat.)^{+0.08}_{-0.14} (syst.)}
\newcommand{\fiidiiiful}{F_2^{D(4)}\,(\beta,\,Q^2,\,x,\,t)}
\newcommand{\fiipom}{\tilde F_2^D}
\newcommand{\ALPHA}{1.10\pm0.03 (stat.) \pm0.04 (syst.)}
\newcommand{\ALPHAZ}{1.15\pm0.04 (stat.)^{+0.04}_{-0.07} (syst.)}
\newcommand{\fiipomarg}{\fiipom\,(\beta,\,Q^2)}
\newcommand{\pomflux}{f_{\pom / p}}
\newcommand{\nxpom}{1.19\pm 0.06 (stat.) \pm0.07 (syst.)}
\newcommand {\gapprox}
   {\raisebox{-0.7ex}{$\stackrel {\textstyle>}{\sim}$}}
\newcommand {\lapprox}
   {\raisebox{-0.7ex}{$\stackrel {\textstyle<}{\sim}$}}
\def\gsim{\,\lower.25ex\hbox{$\scriptstyle\sim$}\kern-1.30ex%
\raise 0.55ex\hbox{$\scriptstyle >$}\,}
\def\lsim{\,\lower.25ex\hbox{$\scriptstyle\sim$}\kern-1.30ex%
\raise 0.55ex\hbox{$\scriptstyle <$}\,}
\newcommand{\pomfluxarg}{f_{\pom / p}\,(x_\pom)}
\newcommand{\dsf}{\mbox{$F_2^{D(3)}$}}
\newcommand{\dsfva}{\mbox{$F_2^{D(3)}(\beta,Q^2,x_{I\!\!P})$}}
\newcommand{\dsfvb}{\mbox{$F_2^{D(3)}(\beta,Q^2,x)$}}
\newcommand{\dsfpom}{$F_2^{I\!\!P}$}
\newcommand{\gap}{\stackrel{>}{\sim}}
\newcommand{\lap}{\stackrel{<}{\sim}}
\newcommand{\fem}{$F_2^{em}$}
\newcommand{\tsnmp}{$\tilde{\sigma}_{NC}(e^{\mp})$}
\newcommand{\tsnm}{$\tilde{\sigma}_{NC}(e^-)$}
\newcommand{\tsnp}{$\tilde{\sigma}_{NC}(e^+)$}
\newcommand{\st}{$\star$}
\newcommand{\sst}{$\star \star$}
\newcommand{\ssst}{$\star \star \star$}
\newcommand{\sssst}{$\star \star \star \star$}
\newcommand{\tw}{\theta_W}
\newcommand{\sw}{\sin{\theta_W}}
\newcommand{\cw}{\cos{\theta_W}}
\newcommand{\sww}{\sin^2{\theta_W}}
\newcommand{\cww}{\cos^2{\theta_W}}
\newcommand{\trm}{m_{\perp}}
\newcommand{\trp}{p_{\perp}}
\newcommand{\trmm}{m_{\perp}^2}
\newcommand{\trpp}{p_{\perp}^2}
\newcommand{\alp}{\alpha_s}

\newcommand{\alps}{\alpha_s}
\newcommand{\sqrts}{$\sqrt{s}$}
\newcommand{\LO}{$O(\alpha_s^0)$}
\newcommand{\Oa}{$O(\alpha_s)$}
\newcommand{\Oaa}{$O(\alpha_s^2)$}
\newcommand{\PT}{p_{\perp}}
\newcommand{\JPSI}{J/\psi}
\newcommand{\sh}{\hat{s}}
%\newcommand{\th}{\hat{t}}
\newcommand{\uh}{\hat{u}}
\newcommand{\MP}{m_{J/\psi}}
%\newcommand{\PO}{\mbox{l}\!\mbox{P}}
\newcommand{\PO}{I\!\!P}
\newcommand{\xbj}{x}
\newcommand{\xpom}{x_{\PO}}
\newcommand{\ttbs}{\char'134}
\newcommand{\xpomlo}{3\times10^{-4}}  
\newcommand{\xpomup}{0.05}  
\newcommand{\dgr}{^\circ}
\newcommand{\pbarnt}{\,\mbox{{\rm pb$^{-1}$}}}
\newcommand{\gev}{\,\mbox{GeV}}
\newcommand{\WBoson}{\mbox{$W$}}
\newcommand{\fbarn}{\,\mbox{{\rm fb}}}
\newcommand{\fbarnt}{\,\mbox{{\rm fb$^{-1}$}}}
\newcommand{\unit}[1]{\ {\rm#1}} 
%
% Some useful tex commands
%
\newcommand{\ye}{$y$}
\newcommand{\qsq}{\ensuremath{Q^2} }
\newcommand{\gevsq}{\ensuremath{\mathrm{GeV}^2} }
\newcommand{\et}{\ensuremath{E_t^*} }
\newcommand{\rap}{\ensuremath{\eta^*} }
\newcommand{\gp}{\ensuremath{\gamma^*}p }
\newcommand{\dsiget}{\ensuremath{{\rm d}\sigma_{ep}/{\rm d}E_t^*} }
\newcommand{\dsigrap}{\ensuremath{{\rm d}\sigma_{ep}/{\rm d}\eta^*} }
% Journal macro
\def\Journal#1#2#3#4{{#1} {\bf #2} (#3) #4}
\def\NCA{\em Nuovo Cimento}
\def\NIM{\em Nucl. Instrum. Methods}
\def\NIMA{{\em Nucl. Instrum. Methods} {\bf A}}
\def\NPB{{\em Nucl. Phys.}   {\bf B}}
\def\PLB{{\em Phys. Lett.}   {\bf B}}
\def\PRL{\em Phys. Rev. Lett.}
\def\PRD{{\em Phys. Rev.}    {\bf D}}
\def\ZPC{{\em Z. Phys.}      {\bf C}}
\def\EJC{{\em Eur. Phys. J.} {\bf C}}
\def\CPC{\em Comp. Phys. Commun.}

%% Special abbrev. for the DDIS-paper 
%
\newcommand{\Dstar}{\particle{D^{*}}}
\newcommand{\Dstarplus}{\particle{D^{*+}}}
\newcommand{\Dsubs}{\particle{D_s}}
\newcommand{\Dsubsplus}{\particle{D^{+}_s}}
\newcommand{\Dzero}{\particle{D^{0}}}
\newcommand{\Dplus}{\particle{D}^+}
\newcommand{\BR}{{\cal B}}
%
\newcommand{\GeV}{\mathrm{GeV}}
\newcommand{\mev}{\mathrm{MeV}}
\newcommand{\dst}{$D^{*+}$}
\newcommand{\dc}{$D^+$}
\newcommand{\dn}{$D^0$}
\newcommand{\ds}{$D^+_s$}
\newcommand{\dstdec}{$D^{*+} \rightarrow D^0 \pi^+_s \rightarrow (K^- \pi^+) \pi^+_s$}
\newcommand{\dcdec}{$D^+ \rightarrow K^- \pi^+ \pi^+$}
\newcommand{\dndec}{$D^0 \rightarrow K^- \pi^+$}
\newcommand{\dsdec}{$D^+_s \rightarrow \phi \pi^+ \rightarrow (K^+ K^-) \pi^+$}
%
\newcommand{\particle}[1]{#1}
\newcommand{\cbar}{\particle{\bar{c}}}
\newcommand{\bbar}{\particle{\bar{b}}}
\newcommand{\ccbar}{c\cbar}
\newcommand{\bbbar}{b\bbar}
\newcommand{\pb}{\rm pb}
\newcommand{\icaption}[1]{\caption{\it #1}}

%

\pagestyle{empty}
\begin{titlepage}

\noindent
\begin{center}
%{\it {\large version of \today}} \\[.3em] 
\begin{small}
\begin{tabular}{llrr}
%Submitted to & \multicolumn{3}{r}{\footnotesize Electronic Access: {\it http://www-h1.desy.de/h1/www/publications/conf/conf\_list.html}} \\[.2em] \hline 
%Submitted to & \multicolumn{3}{r}{\footnotesize {\it www-h1.desy.de/h1/www/publications/conf/conf\_list.html}} \\[.2em] \hline 
Submitted to & & &
\epsfig{file=/h1/www/images/H1logo_bw_small.epsi
,width=2.cm} \\[.2em] \hline
\multicolumn{4}{l}{{\bf
                32nd International Conference 
                on High Energy Physics, ICHEP04},
                August~16,~2004,~Beijing} \\
                 & Abstract:        & {\bf 5-0166}    &\\
                 & Parallel Session & {\bf 5}   &\\ \hline
 & \multicolumn{3}{r}{\footnotesize {\it
    www-h1.desy.de/h1/www/publications/conf/conf\_list.html}} \\[.2em]
\end{tabular}
\end{small}
\end{center}
\vspace*{2cm}

\begin{center}
  \Large
{\bf Inclusive Production of {\boldmath $D^+, D^0,  D_s^+$} and {\boldmath $D^{*+}$} Mesons \\
in Deep Inelastic Scattering at HERA}


  \vspace*{1cm}
    {\Large H1 Collaboration} 
\end{center}

\begin{abstract}

\noindent
Inclusive production cross sections are measured in deep inelastic
scattering at HERA for 
meson states composed of a charm quark and a light antiquark or the 
charge conjugate.
%the charmed mesons $D=c\bar{q}$, where $q$ is any of the light quarks 
%$u, d$ and $s$.
The measurements cover the kinematic region of 
photon virtuality  $2 < Q^2 < 100 \ \gev^2$,
inelasticity $0.05 < y < 0.7$,
$D$ meson  transverse momenta $p_t(D) \ge 2.5 \ \gev$ 
and  pseudorapidity $|\eta(D)| \le 1.5$.
%
The identification of the  $D$-meson decays and the reduction of 
the combinatorial background profit from the reconstruction
of displaced secondary vertices by means of the H1 silicon
vertex detector.
%
The production of charmed mesons
containing the light quarks $u,d$ and $s$ is found to be compatible with a
description in which the hard scattering is followed by a factorisable 
and universal hadronisation process.

\end{abstract}

\end{titlepage}


\pagestyle{plain}



\newpage

\section{Introduction}
\noindent

The production of heavy quarks in deep inelastic 
positron-proton interactions  at HERA proceeds 
% at centre-of-mass-energies of $\sqrt{s}=319\;$GeV$
almost exclusively via photon-gluon fusion, where 
a photon coupling to the incoming positron interacts 
with a gluon in the proton to form a charm-anticharm pair 
(figure~\ref{fig:bgf}).
%
Measurements of differential charm production cross 
sections ~\cite{Aid:1996hj,Adloff:1998vb,Adloff:2001zj,
Breitweg:1999ad,Chekanov:2003rb}
are well reproduced by a description based on perturbative 
QCD (pQCD).
%
In this framework cross sections d$\sigma$ for $D$ mesons
(bound  $c\bar{q}$ states of charm quarks with light antiquarks) can be
computed\cite{Ellis:1988sb,Smith:1991pw,Laenen:1992zk,Frixione:1993dg,
Frixione:1994nb,Frixione:nn}\ by convoluting the parton 
level hard scattering cross section
d$\hat{\sigma}$ with a fragmentation function $D_D^{(c)}(z)$:

\begin{eqnarray}
%  {\rm d}\sigma(ep \to e' D X) & = & 
%   \int {\rm d}z \ \  D_D^{(c)}(z) 
%   \cdot {\rm d}\hat{\sigma}(ep \to e' c  X')(p/z)\ \ \ \ .  \label{eq:f1}
  {\rm d}\sigma(p) & = & 
   \int {\rm d}z \ \  D_D^{(c)}(z) 
   \cdot {\rm d}\hat{\sigma}(p/z)\ \ \ \ .  \label{eq:f1}
\end{eqnarray}
%
\noindent
The cross section d$\hat{\sigma}$ here describes the hard scattering
process $(ep \to e' c X')$ and the perturbative 
evolution from the $c$-quark production scale down to a scale of order 
of the heavy quark mass $m_c$\cite{Nason:1999zj}.
%(within the DGLAP formalism\cite{})
The non-perturbative part of the hadronisation, $D_D^{(c)}(z)$,
accounts for the transition of an on-shell quark $c$ of momentum $p/z$
into a hadron $D$  carrying a fraction $z$ of the quark momentum. 
%
%% -------------------


This factorisation ansatz can be shown to hold in the asymptotic limit
of large production scales~\cite{collins}.
It assumes that the non-perturbative component
$D_D^{(c)}(z)$ is independent both of the hard scattering process, e.g.
$ee-, ep-$ or $ pp-$scattering, and of
the scale at which the charm quark is produced.
% and of the type of charm meson $D$ produced.
These properties are collectively referred to as 
``universality''\cite{Frixione:nn,Mele:1990cw,Nason:1993xx,Nason:1999zj}.
It has been argued 
%by Nason {\it et al.}
\cite{Nason:1999zj,n-mellin}
that the assumptions of universality may not hold and that in fact
different production processes may be sensitive to different aspects of
fragmentation. 
%

Conventionally the 
shape of $D_D^{(c)}(z)$ is taken to be identical for all primary produced 
$D$-mesons, and its normalisation  accounts for the abundance of the
respective meson $D$.
%
A well-known parametrisation of this shape 
is the Peterson function\cite{Peterson:1982ak} with a suitably chosen
normalisation factor $n_D$

%%%CG
\begin{eqnarray}
   D_D^{(c)}(z) & = & \frac{n_D}{ z [ 1-1/z-\epsilon_{c}/(1-z)]^2}\ \ \  \ .   
   \label{eq:f3}
\end{eqnarray}

%
\noindent
The so-called ``Peterson parameter'' $\epsilon_{c}$ measures 
the hardness of the hadronisation. In practice, it is extracted from 
charm spectra measured predominantly at 
$e^+e^-$ colliders\cite{Nason:1999zj}.
%

\noindent
In this paper the universality ansatz is explored in 
deep inelastic $ep$-scattering at HERA.
%
For this purpose production cross sections are measured for the charmed meson state 
 $D^+, D^0,  D_s^+$ and $D^{*+}$,
containing the light quarks $u, d$ and $s$.
%
The final state requirements differ only in the light quark content
or the spin of the charmed meson.
%
For light quark fragmentation the occurrence of
different quark flavours
in the fragmentation process
can be described by isospin relations 
and probabilistic quark selection factors.
%
While corresponding charm quark fragmentation
results are available from
other scattering 
processes\cite{Nason:1999zj,Albrecht:1991ss,Akers:1994jc,Buskulic:1995gp}
it is interesting to verify whether the relations established for
light quarks can be extended 
to mesons containing heavy quarks produced in $ep$ scattering at HERA.

In this analysis the signals of $D$ mesons are enhanced with
respect to background processes by exploiting their lifetimes.
%
The displaced secondary decay vertices 
of the $D$-mesons are reconstructed from the daughter particle tracks,
which are measured with high precision in the H1 central silicon tracker.  
A common detection method can thus be applied to all four charmed meson states.
%
%
%_________________________________________________________________________________


\section{Experimental Aspects and Data Analysis}

%_________________________________________________________________________________



The data were collected in 1999 and 2000 with the H1 detector at HERA and
correspond  to an integrated luminosity of $47.8 \pm
0.7~\pb^{-1} $ of $e^+p$ interactions  at a
centre of mass energy $\sqrt{s} = 319~\GeV$.  
The analysis covers the kinematic region of photon virtuality 
$2 < Q^2 < 100 \ \gev^2$, inelasticity $0.05 < y < 0.7$
and  $D$ meson transverse momentum and 
pseudorapidity\footnote{In the 
following, the coordinate system used has its origin
at the nominal $e^+p$ interaction point and its
$z$-axis in the outgoing proton direction. Polar angles, $\theta$, 
are measured with respect to the $z$ direction. The pseudorapidity is
defined as $\eta = - \ln \tan(\theta /2)$.}
$p_t(D) \ge 2.5 \ \gev$ and
$|\eta(D)| \le 1.5$.
%
The charmed mesons are detected through their decay products 
in the decay channels\footnote{The
charge conjugate states are always implicitly
included.} \dcdec, \dndec, \dsdec\ and 
$D^{*+}(2010) \rightarrow D^0 \pi^+ \rightarrow (K^- \pi^+) \pi^+$.


\subsection{Detector and Simulation }


The H1 detector and its trigger capabilities are
described in detail elsewhere~\cite{Abt:1996hi}.
Charged particles are  measured by a set of central tracking devices
including two cylindrical jet drift chambers (CJC) \cite{Burger:eb,Abt:1994dn}, 
mounted concentrically around the
beam-line inside a homogeneous magnetic field of 1.15~T.
They provide particle charge and transverse momentum measurements in the polar angle range
$20^{\circ}<\theta<160^{\circ}$.
Further drift chambers provide accurate measurements of the $z$-coordinates.

These central tracking devices are complemented by the 
central silicon tracker (CST)~\cite{Pitzl:2000wz},
which consists of two cylindrical layers of 
silicon strip detectors with active lengths of $35.6$~cm
surrounding the beam pipe  
at radii of $57.5$~mm and $97 $~mm from the beam axis. 
%
The double-sided strip detectors 
measure $r$-$\phi$ and $z$ coordinates 
with resolutions of 12~$\mu$m and 25~$\mu$m, respectively.
Average hit efficiencies are 97 (92)\% for $r$-$\phi$ ($z$) strips.
In this analysis the measurements of the $z$-coordinates are not used for the
secondary vertex determination.
%
When extrapolated to the interaction region, the 
coordinate perpendicular to a track in the transverse
plane has a resolution of
$ 33\;\mu\mbox{m} \oplus 90 \;\mu\mbox{m} /p_t [\mbox{GeV}]$
for tracks with CST hits in both layers.
%
The first term represents the intrinsic resolution
and includes the uncertainty on the CST alignment.
The second term accounts for the contribution
from multiple scattering.


One double layer of cylindrical multi-wire proportional 
chambers (MWPC\cite{Muller:jk}) with pad readout
for triggering purposes is positioned between the CST and the CJC, and
another between the two jet chambers.
The backward region
of H1 is equipped with a lead/scintillating fibre
``Spaghetti'' Calorimeter (SpaCal)~\cite{Appuhn:1996na},
which is optimized for the detection of the scattered positron in the 
DIS kinematic range considered here. 
It consists of an electromagnetic and a more coarsely 
segmented hadronic section.
An eight-layer drift chamber (BDC~\cite{bdc}),
mounted in front of the SpaCal, is used to reject neutral particle background.
The $ep$ luminosity is determined by measuring the  QED
bremsstrahlung $(ep \to ep\gamma)$ event rate by tagging the
photon in a photon detector located at $z = -103$\ m.
% text taken from DESY 03-038  THE NC+CC analysis flagship paper

Corrections for detector effects are evaluated
using detailed Monte Carlo simulations. 
Charm and beauty electroproduction events are generated according to 
Leading Order (LO) QCD matrix elements with the
AROMA 2.2~\cite{Ingelman:1996mv} program and are combined with parton showering
in the JETSET\cite{Sjostrand:1993yb} program.  
The beauty cross section is enhanced by a factor 4.3 in accordance
with the measurement of ~\cite{h1-bxsec-dis}.
%
The hadronisation step proceeds according to the
Lund string model for light quarks and the Peterson model for heavy
quarks. The simulation is adjusted to reproduce the world average
results on the relative abundances of charmed 
mesons~ \cite{Gladilin:1999pj}.
%
The generated events are then processed by the H1 detector 
simulation program and are subjected to the same reconstruction 
and analysis chain as the real data.

%_________________________________________________________________________________


\subsection{Selection of DIS Events}

The analysis is based on events which contain a scattered positron
detected in the SpaCal backward calorimeter.
%
Scattered positrons are identified as clusters in the SpaCal 
with energies $E_{e^{\prime}}>8$ GeV, with cluster radii less than 
3.5~cm, consistent with
an electromagnetic energy deposition.
The cluster centres must be
spatially associated with a charged track candidate in the BDC
within the polar angular region $153^{\circ}<\theta<177.8^{\circ}$. 
%
The events are triggered by the identification of a
SpaCal cluster in coincidence with a central charged track signal
from the MWPC and central drift chamber triggers.

\noindent
At fixed $\sqrt{s}$
the kinematics of the scattering process are determined by 
two of the Lorentz invariant variables $Q^2$, $y$ and the 
Bjorken scaling variable $x$. 
These variables are reconstructed using the scattered 
positron according to 

\begin{equation}
Q^2  = 4 E_e E_{e^{\prime}} \cos ^2 \left( \frac{\theta_{e^{\prime}}}{2} \right)  ,
  {\rm \quad  } 
y = 1 - \frac{E_{e^{\prime}}}{E_e} \sin ^2
\left( \frac{\theta_{e^{\prime}}}{2} \right),  \;\; \quad
x = \frac{Q^2}{ys},
\label{eq:kine}
\end{equation}
with $E_e$ and $E_{e^{\prime}}$ denoting the energies of the incoming and scattered positron,
respectively, and $\theta_{e^{\prime}}$ the polar angle of the
scattered positron.

%_________________________________________________________________________________

\subsection{Decay Vertex Reconstruction}

The lifetimes  of between 0.4 and 1 ps of the $D$ mesons lead to a
spatial separation between their production vertex,
assumed to be the point of the primary $ep$ interaction,
and the decay vertex, referred to as the secondary vertex.
This separation is expressed here in terms of the radial decay length
$l$ and its error $\sigma_l$.
The decay length measures the distance between these two vertices in the 
$r$-$\phi$ plane, which is typically a few hundred $\mu$m.
The significance $S_l = l/\sigma_l$ is a 
powerful discriminator to identify long-lived hadrons\cite{Gassner:2002ji}.
%from background events, which originate predominantly
% from random tracks from the primary vertex.  

Tracks are first reconstructed in the CJC and are then extrapolated
into the CST, where  the closest hit from strips measuring 
$r$-$\phi$ in each layer is associated with each track 
if it lies within $5\sigma$ 
of the extrapolated CJC track. 
Then the tracks are refitted using the additional information of the CST hits.
Two or three such CST-improved tracks are used to form a $D$ meson
candidate by fitting them to a common secondary vertex in the
$r$-$\phi$ plane, while all other tracks in the event,
CST-improved or not, are used for the determination of the primary vertex.


For the primary vertex fit an iterative procedure is adopted.
The track with the 
largest contribution to the $\chi^2$
is removed and the fit is repeated until the 
$\chi^2$ contribution of each track assigned to the 
primary vertex is less than three.
The precisely known position and profile of the elliptical 
interaction region in the $r$-$\phi$ plane (``beam spot'')
enter the primary vertex fit as an additional measurement 
of the vertex coordinates with uncertainties given by the 
width of the interaction region.


The position of the beam spot is determined 
run-wise or for a large number of events inside a run
by averaging the reconstructed $ep$ interaction points.
The profile of the beam spot is assumed to
be Gaussian and stable throughout the data-taking period.
Its width is determined from a sample of events where the primary vertex
is accurately measured from high momentum central tracks, which 
are largely unaffected by multiple scattering. 
%
Widths of $145\ \mu$m and $25\ \mu$m are found for 
the horizontal and vertical directions, respectively.
%% -------------------
%
The uncertainty of the primary vertex determination varies from event
to event with an average $69\ \mu$m in the horizontal direction.
The uncertainty in the vertical direction is essentially given by the
$25\ \mu$m vertical width of the beam spot.% and not significantly improved by tracks

In the fit for the secondary vertex the momentum of
the $D$ meson candidate is constrained to be parallel (or
anti-parallel) to the vector connecting the primary and 
secondary vertices.
This provides a powerful constraint to reject random track combinations.
The primary vertex position and its error are used as external
measurements in the fit.
The uncertainty on the decay length is dominated by the resolution of
the secondary vertex reconstruction.
%

$D$ meson decay candidates are selected by applying requirements 
on the following variables:
the minimal transverse momentum $p_t$
of daughter tracks, 
a signed impact parameter\footnote{The
impact parameter $d$
is the distance of closest approach of a track to the primary vertex.
It is positive if the angle between the momentum vector
of the $D$ meson candidate and the vector pointing from the primary
vertex to the point of closest approach is less than $90^\circ$.}
$d$ of significance $S_d = d/\sigma_d$ for at least  two tracks, 
the secondary vertex fit probability  ${\cal P}_{\it VF}$,  
the error on the decay length measurement $\sigma_l$
and the vertex separation significance $S_l = l/\sigma_l$.
The detailed cuts, chosen to optimise the signal significance, 
are listed in table~\ref{tab:selection}.
At most one missing CST hit is allowed for each $D$
meson candidate. The CST geometry confines 
the $D$ mesons to lie in a polar angular range of 
typically $25^\circ < \theta < 155 ^\circ$.
%
%
%% --------------------------------------------------------------

%
To test the understanding of the CST,
its response to data has been compared with simulations for a sample
of ``tagged'' $\Dzero$  mesons (figure~\ref{fig:eff-sl}a). 
These $\Dzero$ mesons originate from 
a \dstdec\ decay chain and are selected by a cut about the nominal value
of $\Delta m = m(K \pi \pi_s) - m(K \pi)$  corresponding
to a window of three times the resolution.
In this channel a good signal purity can be achieved without a
lifetime cut, thus allowing a  determination of the efficiency
of the CST reconstruction.
Figure~\ref{fig:eff-sl}b shows the measured decay length significance
distribution  $S_l$ of tagged $D^0$ candidates, together with 
its fitted decomposition into a signal and a background  contribution.
The functional form of the signal
distribution is taken from  the simulation,
whereas the background shape is extracted from the 
%250-MeV$/c^2$-wide 
sideband regions on both sides of the nominal
\dn\ mass in the $m(K\pi)$ spectrum of the data, as indicated in 
figure~\ref{fig:eff-sl}a.
%
In the fit of the $S_l$ distribution 
only the normalisations of the signal and of the
background are left as free parameters.
The $\chi^2/{\it ndf} = 34/32$ indicates that the MC simulation 
describes the signal shape very well. 
Furthermore, the number of $\Dzero$ candidates extracted by means of the
$S_l$ fit is found to be fully consistent with
the number determined from the fit shown in 
figure~\ref{fig:eff-sl}a) 
to the invariant mass distribution $m(K\pi)$. 

To illustrate the purity that can be reached,
the invariant mass distributions for 
$\Dplus \to K^+ \pi^- \pi^+$ candidate events
are compared  before and 
after a stringent cut $S_l>8$ in figure~\ref{fig:phenix}.
The signal-to-background ratio improves by a factor 50 while
20\% of the signal is retained.
For the cross section measurements described below a less stringent
cut $S_l>5$ is chosen to increase the efficiency, albeit with a reduced purity.

%__________________________________________________________________________

\subsection{Signal Determination}

The reconstruction of $D$ mesons uses all CST-improved 
charged particle tracks.
% in the central H1 detector $(20^{\circ} < \theta < 160^{\circ})$.
No explicit particle identification is applied, and
each track is assumed to be either a kaon or a pion as appropriate.
The tracks of suitable charge are required to pass the 
transverse momentum criteria specified 
in table~\ref{tab:selection}.
They are then fitted to a common secondary vertex, which must also
fulfil the requirements listed in table~\ref{tab:selection}.
%
The number of signal events is then
determined for each $D$ meson individually
by fitting the invariant mass distributions of the candidate combinations with
a Gaussian to describe the signal and an appropriate background shape. 
The signal mass and width are left free in the fit.
%
The invariant mass distributions used to extract the 
final number of signal events after all the
vertexing cuts are shown in figure~\ref{fig:dall-cst}.
The specific choices for the fits are the following:

%% --------------------------------------------------------------


a)  \dcdec : the 3-particle invariant mass distribution $m(K \pi \pi)$
    is fitted using a Gaussian for the signal and a linear function describing
    the background shape (figure~\ref{fig:dall-cst}a). 
%    Wrong sign combinations are not relevant in this mode.
   
%% --------------------------------------------------------------

b) \dndec: the 2-particle invariant mass distribution 
   $m(K \pi)$~(figure~\ref{fig:dall-cst}b)
   is fitted using a Gaussian for the signal, an exponentially falling function
   to describe the combinatorial background and a contribution from 
   wrong-charge combinations. 
   The latter contribution arises since 
   with no particle identification applied, 
   each \dndec\ decay also enters the distribution as a 
   $\bar{D^0} \to K^+ \pi^-$ candidate.
   The contribution of this wrong-charge assignment
   is modelled by a broad Gaussian with
   the mean position, the width and the normalisation relative to the
   correct-charge Gaussian determined from the simulation
   and subsequently kept fixed in the fit.

%% --------------------------------------------------------------

c) \dsdec: because the $\Dsubs$ decays via the intermediate
  vector meson resonance  $\phi$, 
  it has a restricted 3-body phase space, allowing
  criteria to be applied to suppress the combinatorial background.
  In particular, the 2-particle combination
  $m(K^+ K^-)$ is required to lie within a $\pm 2 \sigma$ window
  ($\pm$11~MeV) around the nominal
  $\phi$ mass. 
  %(i.e.\ within 11 MeV/$c^2$ of 1020 MeV/$c^2$).  
  The distribution in the cosine of the angle
  $\theta^*$ (helicity angle), defined as the angle between the $K$-momentum 
  vector and the $\Dsubs$ flight direction, transformed into the 
  $\phi$ rest frame,
  follows  a  $\cos ^2 \theta^*$ shape.  
  A value of $| \cos \theta^* | > 0.4$ is required.  
  The 3-particle invariant mass distribution   $m(K K \pi)$,
  fitted using a Gaussian for the signal and an exponential background function,
  is  shown in figure~\ref{fig:dall-cst}c.

%% --------------------------------------------------------------

d) \dstdec : the $\Delta m$-tagging technique 
is applied \cite{Feldman:1977ir}.
% those $K^-\pi^+$ pairs with an invariant mass 
% consistent with the $D^0$ mass within $\pm 80$ MeV$/c^2$
% are combined with a third track - hypothetically assumed to be a pion
% (``$\pi^+_{slow}$'') - of charge opposite in sign to that of the
% kaon candidate.
 For all candidate combinations lying within a 3 sigma 
 window ($\pm$ 3.6 MeV)
 of the nominal value of $\Delta m = m(K \pi \pi_s) - m(K \pi)$, 
 the invariant mass distribution
 $m(K \pi)$  is fitted using a Gaussian for the signal and an
 exponential function describing the background shape. The 
 Figure \ref{fig:dall-cst}d shows this $m(K \pi)$ distribution after
 the cut on  $\Delta m$.
% The number of signal events extracted this way is found to be
% compatible with the other procedure, where
% the $\Delta m$ distribution is fitted, after a cut on the
% $m(K^-\pi^+)$ around the nominal $D^0$-mass.
% $\Dzero$ mesons from  this identified \dstdec chain are referred to as
% tagged $\Dzero$s.

%% --------------------------------------------------------------


The fitted $D$ meson mass values are all found to be compatible
within errors with the world average values\cite{PDG2000},
and the widths are in agreement with the expected detector resolutions.
For the $D$ meson differential distributions
the data
sample is divided into bins and the number of signal events is extracted
in each bin separately. 
The position and width of the Gaussian describing the signal
are fixed to the values
found in the inclusive sample.
If left free both positions and widths are found to be stable.
% and the remaining differences are included in the systematic errors.

%% --------------------------------------------------------------

\subsection{Acceptance and Efficiency Determination}
\label{simulation}
The Monte Carlo simulation of charm and beauty production
is used to determine the detector acceptance
and the efficiency of the reconstruction and selection cuts.
%
% v1.0 , and again in v1.3
The detector efficiencies are determined to be around $60\%$
for events within the combined geometric and kinematic
acceptances, which vary between $36\%$ and $62\%$
for the different mesons.
%
%the detector efficiencies
%are determined to be 58$\%$, 68$\%$, 57$\%$ and 60$\%$ for events within the 
%acceptances of 36$\%$, 44$\%$, 49$\%$ and 62$\%$ (including
%the geometrical and kinematical acceptance requirements).
%pure vertexing=lifetime efficiencies 
The lifetime tagging efficiencies are found to be 
19$\%$, 11$\%$, 21$\%$ and 39$\%$, 
for $\Dplus$, $\Dzero$, $\Dsubsplus$ and $\Dstarplus$, respectively.
%---------------
Migrations due to the limited detector resolution are small for the
chosen bin sizes in the differential distributions
and are corrected by means of Monte Carlo simulation. 

% ------------------------------------------------------------

\subsection{Cross Section Determination and Systematic Errors}

The visible cross section $\sigma_{\it vis}$ is defined 
for the  sum of the observed number of  $D$ mesons, $N_D$, for
both particle and antiparticle meson states according to the formula

\begin{equation}
\sigma_{vis}(ep \rightarrow e' D X) =
\frac{N_{D} + N_{\bar{D}}}
  { {\cal L} \cdot  \epsilon \cdot (1 + \delta_{rad}) }\qquad , 
\label{eq:sigman}
\end{equation}
where  $\cal{L}$ denotes the integrated luminosity and $\epsilon$ the total
efficiency including all acceptances and branching ratios, which 
are taken from \cite{PDG2000}.
The radiative corrections $\delta_{rad}$ correct the measured cross
sections to the Born level and are calculated using the
program HECTOR\cite{Arbuzov:1995id}.
They amount to $\delta_{rad} = 2.6 \%$ 
on average and vary between $-4\%$ and $+9\%$ over the kinematic range considered.

%% --------------------------------------------------------------
% here are the systematic errors.

The systematic errors on $\sigma_{\it vis}$,
summarised in table~\ref{tab:syserr},
are dominated by the uncertainty on the
CJC tracking efficiency (conservatively estimated
to $^{+5}_{-1}\% $ per track in this analysis).
A $10 \% $ uncertainty is assigned to the
lifetime cut efficiency to account for a 
possible inaccuracy in the description of the
resolution function in the simulation.
This number is estimated by variations of the
$S_l$-cut and covers the differences between
data and simulation~\cite{Gassner:2002ji}.
%
The CST efficiency uncertainty is $1\%$ per hit.

The systematic error on the signal extraction is determined 
by variation of the background shapes in the fits.
Backgrounds to the signals from other charm decays
are estimated from Monte Carlo simulations to be at most $3\%$
and are also included in the systematic errors.
%
The dependence of the simulated acceptances and efficiencies on parameter 
choices made for the simulation (charm mass, parton density distributions,
fragmentation parameters and QCD scales, cf. section~\ref{sec:th}) 
is found to be
less than $\pm 2\% $ in all cases and is included in the 
systematic error.

The uncertainty on the absolute SpaCal electromagnetic energy scale 
contributes a maximal change in $\sigma_{\it vis}$ of $^{+4}_{-9}\%$.
The error due to initial state radiation (ISR) corrections is
estimated to be $\pm 2.6\% $, the average size of the correction itself.
The results obtained when reconstructing the
kinematic variables using the scattered positron have been checked
with the $\Sigma$-method, which combines the hadronic final state and the
positron measurement\cite{Bassler:1994uq}
and are found to be in good agreement. 

The electron detection, the tracking and the vertexing errors 
are to a large extent common between the different mesons
and result in correlated systematic errors of about 15\%.
The $\Dsubs$ meson suffers from a particularly large ($24.7\%$)
uncertainty due to the poorly known branching fraction to $\phi \pi$.

\subsection{Theoretical predictions and uncertainties}
\label{sec:th}
%
The measured cross sections are compared with LO QCD 
predictions based on the AROMA 2.2~\cite{Ingelman:1996mv}
program, which incorporates the universality ansatz.
The predictions include the contributions from decays
of excited charmed hadrons.
%
For the nominal predictions the program is run 
using the GRV-98 proton structure function
parametrisation\cite{Gluck:1998xa},
a charm quark mass of $m_c=1.5$ GeV and 
Peterson fragmentation with $\epsilon_c = 0.078$.
The contributions of decays of beauty hadrons is 
simulated using a quark mass of $m_b=4.75$ GeV and
$\epsilon_b = 0.0069$.
It is scaled 
%by a factor 4.3
to reproduce the result of \cite{h1-bxsec-dis}.
The renormalisation and factorisation scales are both
set to $\mu = \sqrt{Q^2+ m_t^2(q) + m_t^2({\bar q})}$,
where $m_t(q) = \sqrt{p_t^2 + m_q^2}$ is the 
``transverse'' mass of the quark $q$.
%
The prediction uncertainties are estimated by simultanously
changing the renormalisation and factorisation scales
by a factor of two or 0.5,
varying $m_c$ between 1.4 GeV and 1.6 GeV, 
and  changing $\epsilon_c$ to $0.048$.
The contributions are added in quadrature. They are 
dominated by the quark mass and fragmentation parameter 
variations (for details see  \cite{Gassner:2002ji}).
%Order of uncertainty is $\sim$ 10\%

%
For the $\Dstar$ meson production cross section
the AROMA prediction is also compared 
with a next to leading order (NLO) calculation 
in the DGLAP scheme \cite{ref:DGLAP}
using the HVQDIS program \cite{Harris:1997zq}.
%
The GRV98-HO parton densities of the proton\cite{Gluck:1998xa} are used,
supplemented by a Peterson fragmentation 
parametrisation with $\epsilon_c = 0.035$ 
and $\epsilon_b = 0.0033$ as in \cite{Nason:1999zj,Nason:1998ug}.
%
The renormalisation and factorisation scales are both
set to $\mu = \sqrt{Q^2+ 4 m_q^2}$ 
with the same quark mass values
as are used for the AROMA simulation.
%and the quark masses are set to $m_c = 1.5$  GeV  and $m_b = 4.75$ GeV.
%
The uncertainties on the NLO prediction are estimated 
analogously to the LO case. They are dominated by 
variations of the renormalisation and factorisation 
scales and by
changing the mass $m_c$ between 1.3 GeV and 
1.7 GeV ~\cite{Frixione:nn}.
% see the ref. on page 1146, which states:
% HVQDIS favours a mass of 1.5 +- 0.2 
% also Frixione+Nason in hep-ph/0201281 use 1.3 to 1.7
%
% use $\epsilon_c$ to $0.045$ and ifferent PDF functions
% - CTEQ4F3  - CTEQ5F3  - GRV98 - 
% do not contribute significantly.
Added in quadrature, the total uncertainties 
are of approximately $15 \% $.
%
%% --------------------------------------------------------------

\section{Results}
%_________________________________________________________________________________

% 
%First, the inclusive production cross section measurements of the
%four $D$ mesons are presented, followed by 
%measurements of the differential cross sections.
%Based on the inclusive cross section values, fragmentation factors are extracted.
%They are then used to determine various ratios sensitive to different
%aspects of fragmentation. These ratios are compared with previous
%measurements.


\subsection{Differential Production Cross Sections}

Differential production cross sections are determined  for 
all four $D$ mesons  individually and are tabulated
in tables~\ref{tab:dplus}-\ref{tab:dstar}.
As an example the results for the \dc\ meson are 
shown  in figure~\ref{fig:dc-xsec} as a function 
of the kinematic variables $p_t(D^+)$, $\eta(D^+)$, $Q^2$ and $y$.
For all mesons the cross sections fall rapidly with $Q^2$ and $p_{t}(D)$,
as expected from the hard scattering.
%
The distributions are well reproduced by the LO AROMA simulation, which is
overlaid in figure~\ref{fig:dc-xsec}.
The estimated beauty contributions are shown separately as  dashed lines.
The shaded bands indicate the uncertainties on the predictions.
The differential distributions for the remaining $D^0, D_S$ and $D^*$ mesons 
are equally well described by the LO QCD simulation~\cite{Gassner:2002ji}.
%The cross sections are tabulated in tables~\ref{tab:dstar}-\ref{tab:dsubs}.
%The values are bin averaged, no bin-center correction has been applied. 

For a direct comparison of the differential cross sections extracted for the
four different $D$ mesons, the differential cross sections have been
scaled with the inverse fragmentation factors
derived further below (cf. table~\ref{tab:ffrag})
and are shown in figure~\ref{fig:all-xsec} 
as a function of $p_t(D)$,  $\eta(D)$ and $Q^2$.
Within the present experimental accuracy the normalised cross sections
are compatible with one another.

%_________________________________________________________________________________


\subsection{Inclusive Production Cross Sections}


The inclusive electroproduction cross sections are determined
in the visible  kinematic range
of  $2 \le Q^2 \le 100~\gev^2$,
\  $0.05 \le y \le 0.7$,
\ $p_t(D) \ge 2.5~\GeV$ and \ $|\eta(D)| \le 1.5$.
The measured values  for the four $D$ mesons
are summarised in table~\ref{tab:xsection}.
%

The $\Dstar$ meson results are consistent
with earlier measurements at
HERA\cite{Adloff:1998vb, Adloff:2001wr, Adloff:2001zj, 
Breitweg:1999ad, Chekanov:2003rb}
once the differences in kinematic regions are taken into account.
%
For the  $\Dstar$  meson
the visible production cross section has also
been calculated in the next to leading order (NLO) DGLAP
scheme\cite{ref:DGLAP} with the 
HVQDIS program \cite{Harris:1997zq}
(see section~\ref{sec:th}).
%
The NLO prediction yields a value of $\sigma_{\it vis} = 2.76\pm 0.41$~nb 
for the $\Dstar$,
which is in good agreement with the LO AROMA value of $2.61\pm 0.31$~nb.
%albeit with an appropriately different set of fragmentation 
%parameters\cite{Nason:1999zj}.
%
%%%Note: the NLO value is HVQDIS (c + 2.15*b); not 4.3 * b which is for LO).
%
% -- old comparison paragraph:
%In order to compare the measurements with previous results\footnote{All
%earlier results  have been obtained at $\sqrt{s}=300\,$GeV.
%A correction for the $\sqrt{s}$ of this analysis raises the referred cross sections
% by typically 5\%.}, $\sigma(ep \to e \Dstar X)$ has also been 
%determined in the kinematic range of
%the earlier H1 publication \cite{Adloff:1998vb}, where a 
%lower $p_t(\Dstar)$ cut of $1.5$~GeV$/c$ was used.  The present analysis
%yields in that range a value of 
%$\sigma_{\it vis} = 5.28$~nb,  
%which agrees within errors with the published H1 value
%of  $(5.75 \pm 0.35 \pm 0.79)$~nb and also with the 
%QCD predictions of  5.53~nb at LO and of 5.77~nb at NLO.
%%
%The present result is also consistent within one standard deviation
%with the H1 measurement~\cite{Adloff:2001wr}.
%%%%  published =$4.17 \pm 0.9$~nb ; present ana = $3.82\pm 0.23$~nb; LO=3.86~nb).
%When extrapolated into the significantly different kinematical region
%of ref.\cite{Adloff:2001zj} ($1 < Q^2 < 100 \ \gev^2$ and 
%$p_t(D^*)\ > 1.5 \gev /c $) the cross section is
%lower than the value found in \cite{Adloff:2001zj}.
%The difference amounts to about 3 $\sigma$ of the statistical errors
%of the two independent event samples when no uncertainty is
%attributed to the extrapolation procedure.
%However, the large systematic errors of the track reconstruction
%is to a large extent uncorrelated between the two different data
%taking periods.
%The difference in the observed visible cross sections can thus be
%accomodated within the total error.
% Note for explanation:
% Zeus values are in agreement with LO and NLO
% Note, that the ZEUS experiment founds that their $D^*$
% cross section measurement $8.31 \pm0.31 $ nb
% is well described by the NLO prediction of 8.44 nb,
% in a very similar kinematical region.
%  ZEUS D* EPJ C12(00)1 &
%  $ pt = [\ 1.5,\,15.\ ]$ & $ Q^2 = [\ 1,\,600\ ]$ 
%     $y [.02,.7]$ 
%  ZEUS result = $8.31  \pm0.31 ^{+0.30}_{-0.50} $ nb
%  HVQDIS NLO prediction   = 8.44 nb
%%%%%%%%%  -- end comparison with previous pubs


%% --------------------------------------------------------------------
\subsection{Fragmentation Factors and Ratios}

%
In the absence of decays of excited intermediate charm states,
the relative abundance of the various charmed hadrons 
is given by the primary production rate, which is 
directly proportional to $n_D$, the normalisation of the fragmentation
functions (equation~\ref{eq:f3}). 
However, the experimentally determined fragmentation factors 
$f^{}(c\rightarrow D)$ 
include all possible decay chains
that result in that particular  $D$ meson,
in addition to the direct production.
%
Thus, the measured 
pseudoscalar  $D^+$, $D^0$ and $D_s$ mesons
contain a large fraction of mesons produced in $D^*_{(s)}$
decays.

The fragmentation factors $f^{}(c\rightarrow D)$ are deduced from a 
comparison of the measured cross sections $\sigma_{vis}$
with the LO expectation $\sigma_{vis}^{MC}$
after correcting for the beauty contribution
to which an uncertainty of 50\% is attributed.
Explicitly, the following relationship is used:

\begin{eqnarray}
 \displaystyle f^{}(c\rightarrow D) = 
 \frac{\displaystyle \sigma_{\it vis}(ep \rightarrow e'DX) - 
  \sigma^{\it MC}_{\it vis} (ep \rightarrow e' b\bar{b}X' \rightarrow e'DX)}
%
{  \displaystyle \sigma^{\it MC}_{\it vis} (ep \rightarrow c\bar{c} \rightarrow e'DX)} 
        \cdot \displaystyle f_{\rm wa}(c \rightarrow D).
\end{eqnarray}
The resulting values for $f(c\rightarrow D)$ are listed in table~\ref{tab:ffrag}.
For comparison, the world average values 
$f_{\rm wa}(c\rightarrow D)$ are also shown. 
The measurements $f(c\rightarrow D)$ agree well within errors with
the world average values $f_{\rm wa}(c\rightarrow D)$. 

Constraints can be explicitly imposed on the measurements to improve the experimental accuracy.
The constraint %(equation~\ref{eq:constraintsone}) 
\begin{eqnarray}
1       & =  & f(c \to D^+)  + f(c \to {D^0}) + f(c \to D_s)  
  + f(c \to \Lambda_c, \Xi_c, \Omega_c)  \label{eq:constraintsone} 
\end{eqnarray}
introduces contributions of fragmentation to charmed baryons,
which are not determined in this analysis.
World average values~\cite{PDG2000} are taken instead,
yielding a 
%the contributions from $\Lambda_c, \Xi_c$ and $\Omega_c$ baryons sum up to a
total of $f(c \to \Lambda_c, \Xi_c, \Omega_c) = 8.64 \pm 2.50\% $.

The constraint% (equation~\ref{eq:constraintstwo})
\begin{eqnarray}
f(c \to D^+)  & =  & f(c \to {D^0}) - 2 \cdot f(c \to D^{*+}) \cdot \BR(D^{*+} \to D^0 \pi) 
\label{eq:constraintstwo}
\end{eqnarray}
is derived by assuming isospin symmetry independently
in both the vector and  pseudoscalar sectors 
($n_{D^{*+}} = n_{D^{*0}}$\ and $n_{D^{+}} = n_{D^{0}}$).
The branching fraction $\BR(D^{*+} \to D^0 \pi)$ is taken as 
$67.6 \pm 0.5~\%$~\cite{PDG2000}.
The $D^{*0}$ mesons, which are not explicitly reconstructed in this analysis,
are assumed to decay entirely into final states containing a $D^0$ meson~\cite{PDG2000}.

The results of a fit for the fragmentation factors using
the constraints of equation~\ref{eq:constraintsone}   
and equation~\ref{eq:constraintstwo} 
are listed separately in table~\ref{tab:ffrag} as
$f_{\rm constraint}(c \to D)$.
The fit takes the correlations of the uncertainties
between the different mesons into account.
In comparison with the unconstrained results the errors are reduced and the value
$f(c\to D^0)$ moves closer to the world average, 
whereas the other factors do not change significantly.

%_________________________________________________________________________________

Ratios of fragmentation factors
are useful to characterise distinct aspects of fragmentation,
such as the proportions of light quark flavours $u,d$ and $s$
created in the fragmentation process
and the formation of different angular momentum states.
Such quantities  have been measured in light quark fragmentation and
charm fragmentation in $e^+e^-$ 
annihilation~\cite{Nason:1999zj,Albrecht:1991ss,Akers:1994jc,Buskulic:1995gp}.
It is important to verify their applicability for deep inelastic
scattering.

Various ratios are extracted from the $D$ meson fragmentation
factors obtained without the constraints of 
equations~\ref{eq:constraintsone} and ~\ref{eq:constraintstwo}.
The common experimental 
uncertainties largely cancel in this procedure. 
Expressed both in terms of 
the normalisation factors for primary $D$ mesons produced, $n_D$,
and in terms of the  experimentally accessible fragmentation factors 
$ f(c \rightarrow D)$, the ratios considered are: 
%For clarity, the numbers for primary produced vector mesons 
%($D^{*+},D^{*0},D^{*+}_s $) and for primary produced pseudoscalar mesons
%($ D^+, D^0,  D^+_{s} $ ) are spelled out explicitly

\setlength{\jot}{1.5mm}
\begin{eqnarray}
P_V^{d}  = & \frac{n_{D^{*+}}} {n_{D^{*+}}+n_{D^+}}
  & = \frac{f(c \rightarrow D^{*+})}
{f(c\rightarrow D^+) +f(c\rightarrow D^{*+})\cdot {\it \BR}(D^{*+}\rightarrow D^0\pi^+)};
\label{eq:pvd} \\
%
P_V^{u+d}  = &  \frac{2 \cdot n_{D^{*+}}}{n_{D^{*+}}+n_{D^+}+n_{D^{*0}}+n_{D^0}}
  & = \qquad \qquad \frac{2\cdot f(c \rightarrow D^{*+})}{f(c\rightarrow D^+) +f(c\rightarrow D^0)};
\label{eq:pvud}\\
%
R_{u/d}  = & \frac{n_{D^{*0}}+n_{D^0}} {n_{D^{*+}}+n_{D^+}}
  & = \frac{ f(c\rightarrow D^0) -f(c\rightarrow D^{*+})\cdot {\it \BR}(D^{*+}\rightarrow D^0\pi^+)}
           { f(c\rightarrow D^+) +f(c\rightarrow D^{*+})\cdot {\it \BR}(D^{*+}\rightarrow D^0\pi^+)};
\label{eq:rud}\\
%
\gamma_s  = &  \frac{2 \cdot (n_{D^{*+}_{s}}+n_{D^+_{s}})}{n_{D^{*+}}+n_{D^+}+n_{D^{*0}}+n_{D^0}}
  & = \qquad \qquad \frac{ 2\cdot f(c \rightarrow D_s^+)}{ f(c\rightarrow D^+) +f(c\rightarrow D^0)}.
\label{eq:gammas}
\end{eqnarray}


%-------------------------------------


\noindent
The fragmentation characteristics derived according to equations~\ref{eq:pvd}-\ref{eq:gammas}
are summarised in table~\ref{tab:fratios}.
The ratio $P_{V}$ measures the fraction of vector mesons produced in the fragmentation chain.
This ratio has been evaluated separately for the $c\bar{d}$-quark combination
(equation~\ref{eq:pvd}) 
and the sum of $c\bar{u}$ and $c\bar{d}$ quark combinations (equation~\ref{eq:pvud}).
Isospin invariance $ f(c\rightarrow D^{*+}) = f(c\rightarrow D^{*0}) $
has been assumed for $P_V^{u+d}$
and the result agrees well with values
measured at LEP~\cite{ff:aleph,ff:delphi}.
The $P_V^d$ result is larger than the LEP value by around 1.5 sigma.

The ratio $R_{u/d}$ of probabilities for a charm quark to hadronise together
with a $u$ or $d$-quark
agrees well with a value of unity, as is also the case
at LEP~\cite{ff:aleph}.
The suppression of $s$-quarks with respect to $u$ and $d$ quarks
is measured by the factor $\gamma_{s}$.
The value of $\gamma_{s}$ extracted in this analysis suggests a
suppression of almost a factor 3.
This observation agrees well with the suppression factor measured in
the fragmentation of primary light quarks and with measurements of charm
fragmentation  in $e^+e^-$~\cite{ff:ado}.


%_________________________________________________________________________________

\section{Conclusions}

Production cross sections of the charmed mesons
$\Dplus$, $\Dzero$, $\Dsubs$ and $D^{*+}$ 
are measured in deep inelastic
$ep$ collisions at HERA. 
The measurements rely on the precise reconstruction of the
$D$ meson production and decay vertices using the
central silicon tracker of the H1 detector. 
%
The differential production cross sections of all
four $D$ mesons measured in the same kinematic region
show a very similar dependence on 
the transverse momentum $p_t(D)$ and the pseudorapidity $\eta(D)$ of the 
charmed hadron, as well as on the photon virtuality $Q^2$.

Based on the measured cross sections, the 
fragmentation factors $ f(c\rightarrow D)$ are extracted. 
They are found to agree with the world average values, which are
dominated by measurements made in $e^+e^-$ collisions. 
Based on ratios of these $ f(c\rightarrow D)$ the fragmentation-sensitive
parameters  $P_V$, $R_{u/d}$ and $\gamma_{s}$ are determined. 
They are also in agreement with the world average values.

The measurements of the cross sections and of the
fragmentation-sensitive ratios thus
support the validity of the  commonly made assumptions 
that the charm quark production and the fragmentation processes 
factorise and that the non-perturbative component 
of the hadronisation $D_D^{(c)}(z)$
is well described by a universal fragmentation ansatz,
independent of the hard scattering process and
of the charm production scale.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Acknowledgements}

We are grateful to the HERA machine group whose outstanding
efforts have made this experiment possible. 
We thank
the engineers and technicians for their work in constructing and
maintaining the H1 detector, our funding agencies for 
financial support, the
DESY technical staff for continual assistance
and the DESY directorate for support and for the
hospitality which they extend to the non DESY 
members of the collaboration.

\clearpage 
\newpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{thebibliography}{99}

% \bibitem{dstargp}
\bibitem{Aid:1996hj}
S.~Aid {\it et al.}  [H1 Collaboration],
%``Photoproduction of $D~{*\pm}$ Mesons in $ep$ Collisions at HERA,''
Nucl.\ Phys.\ B {\bf 472} (1996) 32
[arXiv:hep-ex/9604005].
%%CITATION = HEP-EX 9604005;%%

%\cite{Adloff:1998vb}
% h1-gluon
\bibitem{Adloff:1998vb}
C.~Adloff {\it et al.}  [H1 Collaboration],
 %``Measurement of D* meson cross sections at HERA and determination of the
%gluon density in the proton using NLO QCD,''
Nucl.\ Phys.\ B {\bf 545} (1999) 21
[arXiv:hep-ex/9812023].
%%CITATION = HEP-EX 9812023;%%

%\cite{Adloff:2001zj}
% h1-f2c
\bibitem{Adloff:2001zj}
C.~Adloff {\it et al.}  [H1 Collaboration],
%``Measurement of D*+- meson production and F2(c) in deep inelastic  scattering
%at HERA,''
Phys.\ Lett.\ B {\bf 528} (2002) 199
[arXiv:hep-ex/0108039].
%%CITATION = HEP-EX 0108039;%%

% \bibitem{zeus-f2c}
%\cite{Breitweg:1999ad}
\bibitem{Breitweg:1999ad}
J.~Breitweg {\it et al.}  [ZEUS Collaboration],
 %``Measurement of D*+- production and the charm contribution to F2 in  deep
%inelastic scattering at HERA,''
Eur.\ Phys.\ J.\ C {\bf 12} (2000) 35
[arXiv:hep-ex/9908012].
%%CITATION = HEP-EX 9908012;%%

%\cite{Chekanov:2003rb}
\bibitem{Chekanov:2003rb}
S.~Chekanov {\it et al.}  [ZEUS Collaboration],
%``Measurement of D*+- production in deep inelastic e+- p scattering at HERA,''
Phys.\ Rev.\ D {\bf 69} (2004) 012004
[arXiv:hep-ex/0308068].
%%CITATION = HEP-EX 0308068;%%

%\cite{Ellis:1988sb}
\bibitem{Ellis:1988sb}
R.~K.~Ellis and P.~Nason,
%``QCD Radiative Corrections To The Photoproduction Of Heavy Quarks,''
Nucl.\ Phys.\ B {\bf 312} (1989) 551.
%%CITATION = NUPHA,B312,551;%%

%\cite{Smith:1991pw}
\bibitem{Smith:1991pw}
J.~Smith and W.~L.~van Neerven,
%``QCD corrections to heavy flavor photoproduction and electroproduction,''
Nucl.\ Phys.\ B {\bf 374} (1992) 36.
%%CITATION = NUPHA,B374,36;%%

%\cite{Laenen:1992zk}
\bibitem{Laenen:1992zk}
E.~Laenen, S.~Riemersma, J.~Smith and W.~L.~van Neerven,
 %``Complete O (alpha-s) corrections to heavy flavor structure functions in
%electroproduction,''
Nucl.\ Phys.\ B {\bf 392} (1993) 162;
%%CITATION = NUPHA,B392,162;%% 
\\
and  {\it ibid} \ B {\bf 392} (1993) 229.
%%CITATION = NUPHA,B392,229;%%

%\cite{Frixione:1993dg}
\bibitem{Frixione:1993dg}
S.~Frixione, M.~L.~Mangano, P.~Nason and G.~Ridolfi,
%``Heavy quark correlations in photon - hadron collisions,''
Nucl.\ Phys.\ B {\bf 412} (1994) 225
[arXiv:hep-ph/9306337].
%%CITATION = HEP-PH 9306337;%%

%\cite{Frixione:1994nb}
\bibitem{Frixione:1994nb}
S.~Frixione, M.~L.~Mangano, P.~Nason and G.~Ridolfi,
%``Charm and bottom production: Theoretical results versus experimental data,''
Nucl.\ Phys.\ B {\bf 431} (1994) 453.
%%CITATION = NUPHA,B431,453;%%

% Durham workshop
%\bibitem{Frixione:nn} 
\bibitem{Frixione:nn}
S.~Frixione {\it et al.},
%``Heavy Flavor Production And Fragmentation,''
J.\ Phys.\ G {\bf 27} (2001) 1111.
%%CITATION = JPHGB,G27,1111;%%

%\cite{Nason:1999zj}
\bibitem{Nason:1999zj}
P.~Nason and C.~Oleari,
 %``A phenomenological study of heavy-quark fragmentation functions in  e+ e-
%annihilation,''
Nucl.\ Phys.\ B {\bf 565} (2000) 245
[arXiv:hep-ph/9903541].
%%CITATION = HEP-PH 9903541;%%

%\cite{collins}
\bibitem{collins}
J.~C.~Collins, 
Phys.\ Rev.\ D {\bf 58} (1998) 094002
[arXiv:hep-ph/9806259].
%%CITATION = HEP-PH 9806259;%

%\cite{Mele:1990cw}
\bibitem{Mele:1990cw}
B.~Mele and P.~Nason,
%``The Fragmentation Function For Heavy Quarks In QCD,''
Nucl.\ Phys.\ B {\bf 361} (1991) 626.
%%CITATION = NUPHA,B361,626;%%

%\cite{Nason:1993xx}
\bibitem{Nason:1993xx}
P.~Nason and B.~R.~Webber,
 %``Scaling violation in e+ e- fragmentation functions: QCD evolution,
%hadronization and heavy quark mass effects,''
Nucl.\ Phys.\ B {\bf 421} (1994) 473 and
erratum  {\it ibid} \ B {\bf 480} (1996) 755.
%%CITATION = NUPHA,B421,473;%%


\bibitem{n-mellin} 
P. Nason {\it et al.}, in LHC workshop on Standard Model Physics,
``Bottom production'',
arXiv:hep-ph/0003142.
%%CITATION = HEP-PH 0003142;%%

%\cite{Peterson:1982ak}
\bibitem{Peterson:1982ak}
C.~Peterson, D.~Schlatter, I.~Schmitt and P.~M.~Zerwas,
%``Scaling Violations In Inclusive E+ E- Annihilation Spectra,''
Phys.\ Rev.\ D {\bf 27} (1983) 105.
%%CITATION = PHRVA,D27,105;%%

%\cite{Marchesini:1991ch}
%\bibitem{Marchesini:1991ch}
%G.~Marchesini, B.~R.~Webber, G.~Abbiendi, I.~G.~Knowles, M.~H.~Seymour and L.~Stanco,
 %``HERWIG: A Monte Carlo event generator for simulating hadron emission
%reactions with interfering gluons. Version 5.1 - April 1991,''
%Comput.\ Phys.\ Commun.\  {\bf 67} (1992) 465.
%CITATION = CPHCB,67,465;%%

%%%%  original frag. measurments for epsilon-peterson:
%\cite{Albrecht:1991ss}
\bibitem{Albrecht:1991ss}
H.~Albrecht {\it et al.}  [ARGUS Collaboration],
 %``Inclusive production of D0, D+ and D*+ (2010) mesons in B decays
 %and nonresonant e+ e- annihilation at 10.6-GeV,''
Z.\ Phys.\ C {\bf 52} (1991) 353.
%%CITATION = ZEPYA,C52,353;%%

%\cite{Akers:1994jc}
\bibitem{Akers:1994jc}
R.~Akers {\it et al.}  [OPAL Collaboration],
%``A Measurement of the production of D*+- mesons on the Z0
%resonance,''
Z.\ Phys.\ C {\bf 67} (1995) 27.
%%CITATION = ZEPYA,C67,27;%%

%\cite{Buskulic:1995gp}
\bibitem{Buskulic:1995gp}
D.~Buskulic {\it et al.}  [ALEPH Collaboration],
 %``Measurement of the effective $b$-quark fragmentation function at the
 %Z resonance,''
Phys.\ Lett.\ B {\bf 357} (1995) 699.
%%CITATION = PHLTA,B357,699;%%

%-------------------------------------------------------
% Experimental

%\cite{Abt:1996hi}
\bibitem{Abt:1996hi}
I.~Abt {\it et al.}  [H1 Collaboration],
%``The H1 detector at HERA,''
Nucl.\ Instrum.\ Meth.\ A {\bf 386} (1997) 310
and {\it ibid} 348.
%%CITATION = NUIMA,A386,310;%%
%%CITATION = NUIMA,A386,348;%%

%\cite{Burger:eb}
\bibitem{Burger:eb}
J.~B\"urger {\it et al.},
%``The Central Jet Chamber Of The H1 Experiment,''
Nucl.\ Instrum.\ Meth.\ A {\bf 279} (1989) 217.
%%CITATION = NUIMA,A279,217;%%

%\cite{Abt:1994dn}
\bibitem{Abt:1994dn}
I.~Abt {\it et al.}  [H1 Collaboration],
%``Inclusive charged particle cross-sections in photoproduction at HERA,''
Phys.\ Lett.\ B {\bf 328} (1994) 176.
%%CITATION = PHLTA,B328,176;%%

%\cite{Pitzl:2000wz}
\bibitem{Pitzl:2000wz}
D.~Pitzl {\it et al.},
%``The H1 silicon vertex detector,''
Nucl.\ Instrum.\ Meth.\ A {\bf 454} (2000) 334
[arXiv:hep-ex/0002044].
%%CITATION = HEP-EX 0002044;%%

\bibitem{Muller:jk}
K.~M\"uller {\it et al.},
 %``Construction And Performance Of A Thin Cylindrical Multiwire Proportional
%Chamber With Cathode Pad Readout For The H1 Experiment,''
Nucl.\ Instrum.\ Meth.\ A {\bf 312} (1992) 457.
%%CITATION = NUIMA,A312,457;%%

\bibitem{Appuhn:1996na}
R.~D.~Appuhn {\it et al.}  [H1 SPACAL Group Collaboration],
%``The H1 lead/scintillating-fibre calorimeter,''
Nucl.\ Instrum.\ Meth.\ A {\bf 386} (1997) 397.
%%CITATION = NUIMA,A386,397;%%

\bibitem{bdc} 
H1 Collaboration, Technical proposal for the upgrade of the backward region
of the H1 detector, 
Hamburg DESY - PRC 93-02.



\bibitem{Ingelman:1996mv}
G.~Ingelman, J.~Rathsman and G.~A.~Schuler,
 %``AROMA 2.2 - A Monte Carlo Generator for Heavy Flavour Events in $ep$
%Collisions,''
Comput.\ Phys.\ Commun.\  {\bf 101} (1997) 135
[arXiv:hep-ph/9605285].
%%CITATION = HEP-PH 9605285;%%

%\cite{Sjostrand:1993yb}
\bibitem{Sjostrand:1993yb}
T.~Sj\"ostrand,
%``High-energy physics event generation with PYTHIA 5.7 and JETSET 7.4,''
Comput.\ Phys.\ Commun.\  {\bf 82} (1994) 74.
%%CITATION = CPHCB,82,74;%%

\bibitem{h1-bxsec-dis}
% DIS
T.~Sloan  [H1 Collaboration],
``Heavy flavor production at HERA,''
36th Rencontres de Moriond,  France, Mar 2001, 
arXiv:hep-ex/0105064; \\
%%CITATION = HEP-EX 0105064;%%
%
%\cite{Sefkow:2001gw}
%\bibitem{Sefkow:2001gw}
F.~Sefkow  [H1 Collaboration],
``Heavy quark production in deep-inelastic scattering,''
  Int. EPS Conf. on High Energy Physics, July 2001, Budapest, Hungary,
arXiv:hep-ex/0110036.
%%CITATION = HEP-EX 0110036;%%

%\cite{Gladilin:1999pj}
\bibitem{Gladilin:1999pj}
L.~Gladilin,
%``Charm hadron production fractions,''
arXiv:hep-ex/9912064.
%%CITATION = HEP-EX 9912064;%%

% inclusive F2
%\bibitem{Adloff:1997mf}
%C.~Adloff {\it et al.}  [H1 Collaboration],
% %``A measurement of the proton structure function F2(x,Q**2) at low x and  low
%%Q**2 at HERA,''
%Nucl.\ Phys.\ B {\bf 497} (1997) 3
%[arXiv:hep-ex/9703012].
%%CITATION = HEP-EX 9703012;%%

%\cite{Gassner:2002ji}
\bibitem{Gassner:2002ji}
J.~Gassner,
 %``A measurement of D-meson production at HERA by decay vertex
%identification,''
Dissertation, DISS-ETH-14774, Z\"urich, 2002, unpublished, 
also available at
http://www-h1.desy.de/publications/theses\_list.html.


%\cite{Feldman:1977ir}
\bibitem{Feldman:1977ir}
G.~J.~Feldman {\it et al.},
%``Observation Of The Decay D*+ $\to$ D0 Pi+,''
Phys.\ Rev.\ Lett.\  {\bf 38} (1977) 1313.
%%CITATION = PRLTA,38,1313;%%

\bibitem{PDG2000}
%\cite{Groom:in}
%  \bibitem{Groom:in}
D.~E.~Groom {\it et al.}  [Particle Data Group Collaboration],
%``Review Of Particle Physics,''
Eur.\ Phys.\ J.\ C {\bf 15} (2000) 1.
%%CITATION = EPHJA,C15,1;%%


%\cite{Arbuzov:1995id}
\bibitem{Arbuzov:1995id}
A.~Arbuzov {\it et al.},
%  , D.~Y.~Bardin, J.~Bluemlein, L.~Kalinovskaya and T.~Riemann,
%``HECTOR 1.00 - A program for the calculation of QED, QCD and electroweak
% corrections to ep and lN deep inelastic neutral and charged current
%scattering,''
Comput.\ Phys.\ Commun.\  {\bf 94}, 128 (1996)
[arXiv:hep-ph/9511434].
%%CITATION = HEP-PH 9511434;%%


\bibitem{Bassler:1994uq}
U.~Bassler and G.~Bernardi,
 %``On the kinematic reconstruction of deep inelastic scattering at HERA: The
%Sigma method,''
Nucl.\ Instrum.\ Meth.\ A {\bf 361} (1995) 197
[arXiv:hep-ex/9412004].
%%CITATION = HEP-EX 9412004;%%


\bibitem{Gluck:1998xa}
M.~Gl\"uck, E.~Reya and A.~Vogt,
%``Dynamical parton distributions revisited,''
Eur.\ Phys.\ J.\ C {\bf 5} (1998) 461
[arXiv:hep-ph/9806404].
%%CITATION = HEP-PH 9806404;%%


%\cite{Gribov:ri}
%\bibitem{Gribov:ri}
\bibitem{ref:DGLAP}
V.~N.~Gribov and L.~N.~Lipatov,
%``Deep Inelastic E P Scattering In Perturbation Theory,''
Yad.\ Fiz.\  {\bf 15}, 781 (1972)
[Sov.\ J.\ Nucl.\ Phys.\  {\bf 15}, 438 (1972)]; \\
%%CITATION = YAFIA,15,781;%%
%
%
%\cite{Gribov:rt}
%\bibitem{Gribov:rt}
V.~N.~Gribov and L.~N.~Lipatov,
%``E+ E- Pair Annihilation And Deep Inelastic E P Scattering In Perturbation
%Theory,''
Yad.\ Fiz.\  {\bf 15}, 1218 (1972)
[Sov.\ J.\ Nucl.\ Phys.\  {\bf 15}, 675 (1972)]; \\
%%CITATION = YAFIA,15,1218;%%
%
%
%\cite{Lipatov:qm}
%\bibitem{Lipatov:qm}
L.~N.~Lipatov,
%``The Parton Model And Perturbation Theory,''
Sov.\ J.\ Nucl.\ Phys.\  {\bf 20}, 94 (1975),
[Yad.\ Fiz.\  {\bf 20}, 181 (1974)]; \\
%%CITATION = SJNCA,20,94;%%
%
%
%\cite{Altarelli:1977zs}
%\bibitem{Altarelli:1977zs}
G.~Altarelli and G.~Parisi,
%``Asymptotic Freedom In Parton Language,''
Nucl.\ Phys.\ B {\bf 126}, 298 (1977) ; \\
%%CITATION = NUPHA,B126,298;%%
%
%
%\cite{Dokshitzer:sg}
%\bibitem{Dokshitzer:sg}
Y.~L.~Dokshitzer,
%``Calculation Of The Structure Functions For Deep Inelastic Scattering And E+
% E- Annihilation By Perturbation Theory In Quantum Chromodynamics. (In
%Russian),''
%
Zh.\ Eksp.\ Teor.\ Fiz.\  {\bf 73}, 1216 (1977),
[Sov.\ Phys.\ JETP {\bf 46}, 641 (1977)].
%%CITATION = SPHJA,46,641;%%

\bibitem{Harris:1997zq}
B.~W.~Harris and J.~Smith,
%``Charm quark and D*+- cross sections in deeply inelastic scattering at
%HERA,''
Phys.\ Rev.\ D {\bf 57} (1998) 2806
[arXiv:hep-ph/9706334].
%%CITATION = HEP-PH 9706334;%%


\bibitem{Nason:1998ug}
P.~Nason and C.~Oleari,
 %``A fixed-order calculation of the heavy quark fragmentation function in  e+
%e- collisions,''
Phys.\ Lett.\ B {\bf 447} (1999) 327
[arXiv:hep-ph/9811206].
%%CITATION = HEP-PH 9811206;%%
% preprint CERN-TH/98-339 (1998). 

%  {h1f2-dif}
%\cite{Adloff:2001wr}
\bibitem{Adloff:2001wr}
C.~Adloff {\it et al.}  [H1 Collaboration],
%``D*+- meson production in deep-inelastic diffractive interactions at  HERA,''
Phys.\ Lett.\ B {\bf 520} (2001) 191
[arXiv:hep-ex/0108047].
%%CITATION = HEP-EX 0108047;%%
%---------


%\bibitem{PDG2002}
%%  \bibitem{Hagiwara:fs}
%K.~Hagiwara {\it et al.}  [Particle Data Group Collaboration],
%%``Review Of Particle Physics,''
%Phys.\ Rev.\ D {\bf 66} (2002) 010001.
%%CITATION = PHRVA,D66,010001;%%

% ALEPH: R_u/d, P_V
\bibitem{ff:aleph}
%\cite{Barate:1999bg}
%\bibitem{Barate:1999bg}
R.~Barate {\it et al.}  [ALEPH Collaboration],
%``Study of charm production in Z decays,''
Eur.\ Phys.\ J.\ C {\bf 16} (2000) 597
[arXiv:hep-ex/9909032].
%%CITATION = HEP-EX 9909032;%%

%

% DELPHI: R_u/d & P_V
\bibitem{ff:delphi}
%\cite{Abreu:1999vw}
%\bibitem{Abreu:1999vw}
P.~Abreu {\it et al.}  [DELPHI Collaboration],
 %``Measurements of the Z partial decay width into c anti-c and  multiplicity of
%charm quarks per b decay,''
Eur.\ Phys.\ J.\ C {\bf 12} (2000) 225.
%%CITATION = EPHJA,C12,225;%%

% ADO: gamma_s
\bibitem{ff:ado}
G.\,Altarelli {\it et al.},
{\it Workshop on Physics at LEP2},
CERN Report CERN-96-01-V-2 (1996) p.112.

\end{thebibliography}


\clearpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Figures
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%
\begin{figure}[hbt]
\begin{center}
    \epsfig{file=eps/bgf-had.eps,width=9cm}
\icaption{Diagram for the production of $c$-quarks in $ep$ collisions 
 via the photon-gluon fusion process. 
The hadronisation into a charmed meson $D$ is described by the fragmentation function
$D_D^{(c)}(z)$ (cf. equation~\ref{eq:f3}). }
  \label{fig:bgf}
\end{center}
\end{figure}

\vspace{2cm}

%% --------------------------------------------------------------


% Decay length significance for tagged D0  and

\begin{figure}[htb]
  \begin{center}
    \epsfig{file=eps/dstar_Sl_sig_decomp.eps,width=16cm}
\icaption{ %\large 
 a) Invariant
 mass distribution $m(K\pi)$  
and  b) signed decay length significance distribution $S_l$
measured for tagged $\Dzero$
 mesons in data (solid points).
 Superimposed is the fitted decomposition into signal
($S$, hatched) and background ($B$, shaded) contributions (see text).
 The background in b) is determined from the $m(K\pi)$ sideband
regions $(sb)$ as indicated in a). }
  \label{fig:eff-sl}
  \end{center}
\end{figure}

%% -------------------

% %% Phenix plot for D+

\begin{figure}[hhh]
  \begin{center}
    \epsfig{file=eps/dc_phoenix5.eps,width=16. cm}
\icaption{ %\large
 Invariant mass distributions $m(K \pi \pi)$ for
 $D^+ \rightarrow K^- \pi^+ \pi^+$ decay candidates
(a) before and (b) after a cut on the decay length significance $S_l> 8$.}
%where $l$ is the radial separation distance between the meson production and its decay vertex, 
%and $\sigma_l$ the error of $l$.
%When vertexing information measured with the CST is exploited, 
%the background contribution is suppressed by $\cal O$(300) and the signal to background ratio
%is improved by a factor $\cal O$(50) while retaining $\cal O$(20 $\%)$ of
%the signal.}
  \label{fig:phenix}
  \end{center}
\end{figure}


%% --------------------------------------------------------------

% %% all four signals from CST

\begin{figure}[tb] 
  \begin{center}
    \epsfig{file=eps/dmeson_signals.eps}
%    \epsfig{file=eps/dstar_vfit2dc_signal3.eps,width=7.8cm}
  \end{center}
  \icaption{ %\large
  Invariant mass distributions for the four $D$ meson candidate decays
    that are used to determine the number of signal events:
a) $\Dplus \to K^- \pi^+ \pi^+$, 
b) $\Dzero \to K^- \pi^+$, 
c) $\Dsubsplus \to \phi \pi^+ \to K^+ K^- \pi^+$  and
d) $\Dstarplus \to \Dzero \pi^+_s \to K^- \pi^+ \pi^+_s$ 
  ( the invariant mass $m(K \pi)$ is shown after the $\Delta m$ cut).
The curves show the fits in which the signals are described by a
Gaussian and the backgrounds are parametrised as discussed in the text.
}
  \label{fig:dall-cst}
\end{figure} 

%% --------------------------------------------------------------

% %% Dplus DIFFERENTIAL 

\begin{figure}[tb] 
  \begin{center}
    \epsfig{file=eps/dc_differential.eps,width=16cm}
  \end{center}
  \icaption{ %\large 
   Differential production cross section for \dc \ 
   as a function of %the $\Dplus$ variables 
   a) the \dc \ transverse momentum $p_t(D^+)$, 
   b) the pseudorapidity $\eta(D^+)$, 
   c) the photon virtuality $Q^2$, and d) 
   the inelasticity $y$.
   The symbols denote the values averaged over the bins and 
   are plotted at the bin centres.
   The error bars show the statistical (inner bars) and the  
   total (outer bars) errors, respectively.
   The solid lines show the LO AROMA predictions including scaled 
   beauty contributions, shown separately as dashed lines.
   The shaded bands indicate the uncertainties on the predictions
   (see text).}
  \label{fig:dc-xsec}
\end{figure} 


%_________________________________________________________________________________
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% ALL DIFFERENTIAL 

\begin{figure}[htb] 
  \begin{center}
    \epsfig{file=eps/all_xsections.eps}
  \end{center}
  \icaption{ %\large 
  Visible differential production cross sections 
  for all four $D$ mesons,
  divided by  
  their respective measured fragmentation factors,
   are shown  as a function of 
  a) the $D$ meson transverse momentum $p_t(D)$, 
  b) the pseudorapidity $\eta(D)$,  and c) photon virtuality $Q^2$.  
  The error bars
  indicate the quadratic sum of the statistical errors and the 
  systematic errors which are not common to the different
  $D$ mesons.
  An overall common systematic error of $15\%$
  is not shown.
  The cross sections are displayed on the horizontal axis
  at the position that corresponds to the average differential cross section,
  obtained using the AROMA simulation.
  }
  \label{fig:all-xsec}
\end{figure} 


\clearpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Tables
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{table}[htb]
\renewcommand{\arraystretch}{1.1}
\begin{center}
 \begin{tabular}{|c|c|c|c|c|}
  \hline
  {\bf Selection criteria} & \dc & \dn & \ds & \dst \\
  \hline
  min $p_t(K)\ [ \mev ]\ $     & 500 & 800 & 400 & 250 \\
  min $p_t(\pi)\ \ [ \mev ]\ $ & 400 & 800 & 400 & 250 \\
  min $p_t(\pi_s)\ [ \mev ]\ $ &   - &   - &   - & 140 \\
%  min $|\cos(\theta^*)|\ $      &   - &   - & 0.4 &   - \\
  \hline
   min impact par. sig. $ S_d $ & 2.5 & 2 &   1 &  -1 \\
%  $\max(p_t)\ >$             & \multicolumn{4}{c|}{$800\,MeV/c$}  \\
%  $\theta_{\it track}\ $          & \multicolumn{4}{c|}{$[\ 20^\circ,\,160^\circ\,]$} \\
  min decay length sig. $ S_l $       &   5 &   3 &   2 &   1 \\
  \hline
  max decay length error $ \sigma_l $              & \multicolumn{4}{c|}{300~$\mu$m} \\
  min fit probability ${\cal P}_{\it VF} $          & \multicolumn{4}{c|}{ 0.05} \\
  \hline
 \end{tabular}
\end{center}
\icaption{  %\large
  Selection criteria for each of the four $D$ mesons.
  Listed are the minimal transverse momenta of the daughter tracks
  (cuts on the slow pion $\pi_s$ are only applicable for the $D^*$ meson) 
  and the requirements on the vertexing parameters (see text). }
\label{tab:selection}
\end{table}
%
% --------------------------------------------------------------------------

\begin{table}[htb]
 \renewcommand{\arraystretch}{1.4}
 \centering
 \begin{tabular}{|c|c|c|c|c|}
  \hline
  {\bf Source of uncertainty} & \dc & \dn & \ds & \dst \\
%\hline
\hline
%Acceptance & \multicolumn{4}{c|}{$< 2.0$}\\
%\hline
CJC efficiency  & $^{+15.0}_{\ -3.0}$  & $^{+10.0}_{\ -2.0}$  & $^{+15.0}_{\ -3.0}$  & $^{+15.0}_{\ -3.0}$  \\
\hline
%CJC resolution ($\pm10\%$) & $^{+3.0}_{-1.5}$  &  $^{+0.6}_{-0.7}$  &$^{+1.8}_{-3.7}$  & $^{+2.4}_{-0.5}$  \\
%\hline
CST efficiency  & $\pm 5.6$  &  $\pm 3.6$  & $\pm 5.4$  & $\pm 3.6$  \\
\hline
%CST resolution ($\pm20\%$)  & $^{+2.0}_{-1.0}$ & $^{+0.4}_{-0.1}$  & $^{+0.1}_{-3.6}$  & $^{+1.5}_{-0.2}$ \\
%\hline
Lifetime tag & \multicolumn{4}{c|}{$\pm 10.0$}  \\
\hline
%SpaCal calibration ($\pm4\%$) & $^{+3.6}_{-7.3}$  & $^{+3.4}_{-8.1}$  & $^{+4.5}_{-7.8}$  & $^{+4.5}_{-9.0}$  \\
%\hline
Signal extraction & $^{+1.7}_{-0.4}$  & $^{\ +4.9}_{-13.4}$  & $^{\ +1.4}_{-12.1}$  & $^{+3.7}_{-3.2}$  \\
\hline
Branching fraction & $\pm6.7$ & $\pm2.3$ & $\pm24.7$ \ & $\pm2.3$ \\
\hline
%ISR correction & \multicolumn{4}{c|}{$\pm2.6$} \\
%\hline
%trigger efficiency  & \multicolumn{4}{c|}{$\pm1.0$} \\
%\hline
%others  & \multicolumn{4}{c|}{$< 2$} \\
%\hline
\hline
Total systematic error & $^{+21.2}_{-16.0}$ & $^{+16.5}_{-19.9}$ & $^{+32.0}_{-31.8}$ & $^{+20.0}_{-15.2}$ \\

\hline
 \end{tabular}
\icaption{ %\large
  Percentage systematic errors on the inclusive cross sections
  for the different $D$ mesons. Only the dominant
  contributions and the total error are shown. }
\label{tab:syserr}
\end{table}
%
% --------------------------------------------------------------------------

%
%
\begin{table}[htb]
 \renewcommand{\arraystretch}{1.2}
\begin{center}
 \begin{tabular}{|c|c|c|c|c|}
  \hline
  {\bf Cross section [nb]} & \dc & \dn & \ds & \dst \\
%  \hline 
  \hline 
$\sigma_{\it vis}(ep \rightarrow eDX)$   &
  $2.16$      & $6.53$     & $1.67$ & $2.90$   \\
Stat.\ error          &
$\pm 0.19$ & $\pm 0.49$ & $\pm 0.41$ & $\pm 0.20$  \\
Syst.\ error           &
$^{+0.46}_{-0.35}$ & $^{+1.06}_{-1.30}$ & $^{+0.54}_{-0.54}$ & $^{+0.58}_{-0.44}$ \\
  \hline  
AROMA LO prediction $ \sigma_{\it vis}$ & $2.45$ & $5.54$ & $1.15$ & $2.61$   \\
   Prediction uncertainty          &
$\pm 0.30$ & $\pm 0.69$ &  $\pm 0.30$&  $\pm 0.31 $  \\
  \hline
  Estimated beauty contribution & $10\%$ & $9\%$ & $17\%$ &  $7\%$ \\
  \hline
\end{tabular}
\end{center}
   \icaption{ %\large
  Inclusive charmed meson electroproduction cross sections for the four 
  meson states in the visible kinematic range, defined by 
  $2\, \le \,Q^2 \le 100\, \GeV^2,\
\ 0.05 \le y  \le  0.7, \ p_t(D) \ge 2.5\,\GeV$ and $|\eta(D)|  \le  1.5. $   
  Also given are the predictions for $D$ meson production (including
  the beauty contribution) based on a LO Monte Carlo simulation. }
\label{tab:xsection}
\end{table}


% --------------------------------------------------------------------------
%
\begin{table}[tbh]
 %\large
\renewcommand{\arraystretch}{1.35}
\begin{center}
%\hspace*{-1.cm}
 \begin{tabular}{|c|c|c|c|c|}
  \hline
  {\bf Fragmentation factors} & \dc & \dn & \ds & \dst \\
  \hline 
  $ f(c \to D)$         & $0.202$ &  $0.658$  & $0.156$ & $0.263$ \\
 Stat.\ error            &  $\pm 0.020$ &  $\pm 0.054$ &  $\pm 0.043$ &  $\pm 0.019 $ \\
 Syst.\ error            & $^{+0.045}_{-0.033}$ & $^{+0.117}_{-0.142}$ & $^{+0.036}_{-0.035}$ & $^{+0.056}_{-0.042}$\\
 Theo.\ error            & $^{+0.029}_{-0.021}$ & $^{+0.086}_{-0.048}$ & $^{+0.050}_{-0.046}$ & $^{+0.031}_{-0.022}$ \\
\hline
$f_{\rm constraint}(c \to D)$ & $0.203$ &  $0.560$  & $0.151$ & $0.263$  \\
 Total error                & $\pm 0.026$ &  $\pm 0.046$ &  $\pm 0.055$ &  $\pm 0.032 $ \\
\hline
 $f_{\rm wa}(c \to D)$ & $0.232 \pm 0.018$ & $0.549 \pm 0.026$ & $0.101  \pm 0.027$  & $0.235  \pm 0.010$  \\
  \hline
 \end{tabular}
\end{center}
   \icaption{ % \large
  Fragmentation factors deduced from the measured cross sections.
  The small $b$~contributions are subtracted. 
  Also listed is the result of the
  constrained fit $f_{\rm constraint}(c \to D)$, its error (see text), and
  the world average numbers, given as $f_{\rm wa}(c \to D)$. 
  The theoretical errors include the branching ratio uncertainty
  and the model dependences of the acceptance determination.
  }
\label{tab:ffrag}
\end{table}


% --------------------------------------------------------------------------
%
\begin{table}[tbh]
\renewcommand{\arraystretch}{1.1}
\begin{center}
 \begin{tabular}{|c|cccc|ccr|}
   \hline
  {\bf Ratio} & \multicolumn{4}{c|}{{\bf this measurement}} 
                   & \multicolumn{3}{c|}{{\bf $e^+e^-$ experiments}} \\
%  \hline 
     & value   & stat.error & syst.error & theo.error & value & error & ref. \\
\hline

$P_V^d$     & $0.693$ & $\pm$  $0.045$ & $\pm$  $0.004$ & $\pm$ $0.009$ 
            & $0.595$ & $\pm$  $0.045$ & \cite{ff:aleph} \\

$P_V^{u+d}$ & $0.613$ & $\pm$  $0.061$ & $\pm$  $0.033$ & $\pm$ $0.008$
            & $0.620$ & $\pm$  $0.014$ & \cite{ff:delphi}\\

$R_{u/d}$   & $1.26$  & $\pm$  $0.20$  & $\pm$  $0.11$  & $\pm$ $0.04$ 
            & $1.02$  & $\pm$  $0.12$  & \cite{ff:aleph}  \\

$\gamma_s$  & $0.36$  & $\pm$  $0.10$  & $\pm$  $0.01$  & $\pm$ $0.08$ 
            & $0.31$  & $\pm$  $0.07$  & \cite{ff:ado}   \\
\hline
 \end{tabular}
\end{center}
   \icaption{Fragmentation characteristics derived according to 
   equations~\ref{eq:pvd}-\ref{eq:gammas} from the ratios
   of the fragmentation factors of table~\ref{tab:ffrag}. 
   Values measured by $e^+e^-$  experiments are also quoted.
   The theoretical errors include the branching ratio uncertainty
   and the model dependences of the acceptance determination.
}
\label{tab:fratios}
\end{table}

\clearpage

% \section*{}

%=======================================================================================
%
% tables with bin wise x-sections:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% D+ decay channel:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% tables with bin wise x-sections:
%
\begin{center}
\begin{table}[h]
% \vspace*{\textheight}
 \vspace*{1cm}
 \hspace*{1.5cm}
 \renewcommand{\arraystretch}{1.6}
   \scriptsize
%
%  bins related to D-meson kinematics
   \begin{tabular}[t]{|@{\quad $[$\ }c@{\ $]$\quad }|c|c|c|c|c|c|}
    \hline
    \multicolumn{1}{|c|}{\small $p_t(D^+)$} & \small ${\rm d}\sigma_{vis}/{\rm d}p_t$ &
    \multicolumn{5}{c|}{errors \ $[\unit{nb/GeV}\ ]$} \\
    \cline{3-7}
    \multicolumn{1}{|c|}{$[\unit{GeV}\:]$} & $[\unit{nb/GeV}\ ]$ &
    statistical & \multicolumn{2}{c|}{experimental} & \multicolumn{2}{c|}{theoretical} \\
    \hline
    2.5, \,\ 3.0  & \small 1.95\; & $\pm0.32\; $ & $+0.41\;$ & $-0.34\; $ & $+0.13\;$ & $-0.14\;$ \\
    3.0, \,\ 3.5  & \small 1.05\; & $\pm0.18\; $ & $+0.22\;$ & $-0.17\; $ & $+0.07\;$ & $-0.08\;$ \\
    3.5, \,\ 4.0  & \small 0.556 & $\pm0.128 $ & $+0.121$ & $-0.090$ & $+0.039$ & $-0.039$ \\
    4.0, \,\ 5.0  & \small 0.353 & $\pm0.054$ & $+0.104$ & $-0.054$ & $+0.026$ & $-0.024$ \\
    5.0, \,\ 6.0  & \small 0.063 & $\pm0.023$ & $+0.072$ & $-0.010$ & $+0.004$ & $-0.005$ \\
    6.0,    10.0  & \small 0.025 & $\pm0.005$ & $+0.005$ & $-0.004$ & $+0.002$ & $-0.002$ \\
    \hline
%
    \multicolumn{7}{c}{}\\
    \hline
    \multicolumn{1}{|c|}{\small $\eta(D^+)$} & \small ${\rm d}\sigma_{vis}/{\rm d}\eta$ &
    \multicolumn{5}{c|}{errors \ $[\unit{nb}\ ]$} \\
    \cline{3-7}
    \multicolumn{1}{|c|}{} & $[\unit{nb}\ ]$ &
    statistical & \multicolumn{2}{c|}{experimental} & \multicolumn{2}{c|}{theoretical} \\
    \hline
     -1.50,  -1.00  & \small 0.84 & $\pm0.16$ & $+0.25$ & $-0.12$ & $+0.06$ & $-0.08$ \\
     -1.00,  -0.50  & \small 0.97 & $\pm0.15$ & $+0.20$ & $-0.14$ & $+0.07$ & $-0.07$ \\
     -0.50, \ 0.00  & \small 0.66 & $\pm0.12$ & $+0.14$ & $-0.10$ & $+0.05$ & $-0.04$ \\
    \ 0.00, \ 0.50  & \small 0.83 & $\pm0.13$ & $+0.18$ & $-0.13$ & $+0.06$ & $-0.06$ \\
    \ 0.50, \ 1.00  & \small 0.76 & $\pm0.15$ & $+0.36$ & $-0.22$ & $+0.06$ & $-0.05$ \\
    \ 1.00, \ 1.50  & \small 0.28 & $\pm0.13$ & $+0.15$ & $-0.09$ & $+0.02$ & $-0.03$ \\
    \hline
%
    \multicolumn{7}{c}{\parbox[l][8mm][c]{11cm}{}} \\
    \hline
    \multicolumn{1}{|c|}{\small $Q^2$} & \small ${\rm d}\sigma_{vis}/{\rm d}Q^2$ &
    \multicolumn{5}{c|}{errors \ $[\unit{nb/GeV}^2\ ]$} \\
    \cline{3-7}
    \multicolumn{1}{|c|}{$[\unit{GeV}^2\,]$} & $[\unit{nb/GeV}^2\ ]$ &
    statistical & \multicolumn{2}{c|}{experimental} & \multicolumn{2}{c|}{theoretical} \\
%
    \hline
    \,\ 2, \ \ \ 4  & \small 0.200\; & $\pm0.038\; $ & $+0.047\; $ & $-0.033\; $ & $+0.014\; $ & $-0.015\;$ \\
    \,\ 4, \ \ \ 7  & \small 0.155\; & $\pm0.025\; $ & $+0.034\; $ & $-0.025\; $ & $+0.011\;$ & $-0.011\; $ \\
    \,\ 7,  \,\ 12  & \small 0.095\; & $\pm0.015\; $ & $+0.021\; $ & $-0.014\; $ & $+0.008\;$ & $-0.007\; $ \\
       12,  \,\ 22  & \small 0.0373 & $\pm0.0072$ & $+0.0105$ & $-0.0060$ & $+0.0025$ & $-0.0027$ \\
       22,  \,\ 35  & \small 0.0153 & $\pm0.0036$ & $+0.0033$ & $-0.0026$ & $+0.0010$ & $-0.0012$ \\
       35,     100  & \small 0.0042 & $\pm0.0009$ & $+0.0009$ & $-0.0007$ & $+0.0003$ & $-0.0003$ \\
    \hline
%
   \end{tabular}

%    \caption[Single differential \dc\ production cross section results]
    \icaption{\label{tab.dc.xsec.bins} 
 The bin-averaged  single differential \dc\ production cross section
 measurements $\sigma_{vis}(ep\rightarrow eD^+X)$
with statistical, experimental systematic and 
theoretical errors.
The latter include the uncertainties of the
branching ratio and the model dependence of the acceptance
determination.}
%
\label{tab:dplus}
\end{table}
\end{center}
\clearpage
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% D0 decay channel:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% tables with bin wise x-sections:
%
\begin{center}
\begin{table}[th]
% \vspace*{\textheight}
 \vspace*{1cm}
 \hspace*{1.5cm}
 \renewcommand{\arraystretch}{1.6}
   \scriptsize
%
%  bins related to D-meson kinematics
   \begin{tabular}[t]{|@{\quad $[$\ }c@{\ $]$\quad }|c|c|c|c|c|c|}
%CG    \multicolumn{7}{c}{\parbox[l][8mm][c]{11cm}{\normalsize
%CG                              $\sigma_{vis}_{vis}(ep\rightarrow eD^0X)$: single differential results}} \\
    \hline
    \multicolumn{1}{|c|}{\small $p_t(D^0)$} & \small ${\rm d}\sigma_{vis}/{\rm d}p_t$ &
    \multicolumn{5}{c|}{errors \ $[\unit{nb/GeV}\ ]$} \\
    \cline{3-7}
    \multicolumn{1}{|c|}{$[\unit{GeV}\,]$} & $[\unit{nb/GeV}\ ]$ &
    statistical & \multicolumn{2}{c|}{experimental} & \multicolumn{2}{c|}{theoretical} \\
    \hline
    2.5, \,\ 3.0  & \small 5.29\; & $\pm0.72\;$ & $+1.11\;$ & $-0.89\;$ & $+0.13\;$ & $-0.18\;$ \\
    3.0, \,\ 3.5  & \small 3.04\; & $\pm0.41\;$ & $+0.50\;$ & $-0.78\;$ & $+0.13\;$ & $-0.08\;$ \\
    3.5, \,\ 4.0  & \small 2.29\; & $\pm0.34\;$ & $+0.81\;$ & $-0.62\;$ & $+0.09\;$ & $-0.06\;$ \\
    4.0, \,\ 5.0  & \small 1.13\; & $\pm0.15\;$ & $+0.19\;$ & $-0.21\;$ & $+0.03\;$ & $-0.04\;$ \\
    5.0, \,\ 6.0  & \small 0.516 & $\pm0.120$ & $+0.139$ & $-0.129$ & $+0.018$ & $-0.015$ \\
    6.0,    10.0  & \small 0.056 & $\pm0.018$ & $+0.016$ & $-0.021$ & $+0.002$ & $-0.003$ \\
    \hline
%
    \multicolumn{7}{c}{}\\
    \hline
    \multicolumn{1}{|c|}{\small $\eta(D^0)$} & \small ${\rm d}\sigma_{vis}/{\rm d}\eta$ &
    \multicolumn{5}{c|}{errors \ $[\unit{nb}\ ]$} \\
    \cline{3-7}
    \multicolumn{1}{|c|}{} & $[\unit{nb}\ ]$ &
    statistical & \multicolumn{2}{c|}{experimental} & \multicolumn{2}{c|}{theoretical} \\
    \hline
     -1.50,  -1.00  & \small 1.85 & $\pm0.38$ & $+0.34$ & $-0.46$ & $+0.09$ & $-0.05$ \\
     -1.00,  -0.50  & \small 1.74 & $\pm0.30$ & $+0.28$ & $-0.28$ & $+0.04$ & $-0.07$ \\
     -0.50, \ 0.00  & \small 2.43 & $\pm0.34$ & $+0.42$ & $-0.36$ & $+0.06$ & $-0.11$ \\
    \ 0.00, \ 0.50  & \small 2.88 & $\pm0.39$ & $+0.53$ & $-0.87$ & $+0.10$ & $-0.07$ \\
    \ 0.50, \ 1.00  & \small 2.67 & $\pm0.37$ & $+0.52$ & $-0.87$ & $+0.10$ & $-0.07$ \\
    \ 1.00, \ 1.50  & \small 1.91 & $\pm0.41$ & $+0.70$ & $-0.77$ & $+0.07$ & $-0.08$ \\
    \hline
%
    \multicolumn{7}{c}{\parbox[l][8mm][c]{11cm}{}} \\
    \hline
    \multicolumn{1}{|c|}{\small $Q^2$} & \small ${\rm d}\sigma_{vis}/{\rm d}Q^2$ &
    \multicolumn{5}{c|}{errors \ $[\unit{nb/GeV}^2\ ]$} \\
    \cline{3-7}
    \multicolumn{1}{|c|}{$[\unit{GeV}^2\,]$} & $[\unit{nb/GeV}^2\ ]$ &
    statistical & \multicolumn{2}{c|}{experimental} & \multicolumn{2}{c|}{theoretical} \\
%
    \hline
    \,\ 2, \ \ \ 4  & \small 0.662\; & $\pm0.099\;$ & $+0.113\;$ & $-0.161\;$ & $+0.024\;$ & $-0.019\;$ \\
    \,\ 4, \ \ \ 7  & \small 0.386\; & $\pm0.058\;$ & $+0.079\;$ & $-0.088\;$ & $+0.020\;$ & $-0.010\;$ \\
    \,\ 7,  \,\ 12  & \small 0.267\; & $\pm0.043\;$ & $+0.066\;$ & $-0.057\;$ & $+0.008\;$ & $-0.007\;$ \\
       12,  \,\ 22  & \small 0.102\; & $\pm0.018\;$ & $+0.021\;$ & $-0.023\;$ & $+0.003\;$ & $-0.003\;$ \\
       22,  \,\ 35  & \small 0.0474 & $\pm0.0113$ & $+0.0096$ & $-0.0107$ & $+0.0013$ & $-0.0013$ \\
       35,     100  & \small 0.0186 & $\pm0.0027$ & $+0.0032$ & $-0.0038$ & $+0.0005$ & $-0.0007$ \\
    \hline
%
   \end{tabular}

%    \caption[Single differential \dn\ production cross section results]
    \icaption{\label{tab.dn.xsec.bins} 
The bin-averaged single differential \dn\ production cross section
measurements $\sigma_{vis}(ep\rightarrow eD^0X)$
with statistical, experimental systematic and 
theoretical errors.
The latter include the uncertainties of the
branching ratio and the model dependence of the acceptance
determination.}
\label{tab:dzero}
\end{table}
\end{center}
\clearpage
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Ds decay channel:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% table with bin wise x-sections:
%
\begin{center}
\begin{table}[th]
% \vspace*{\textheight}
 \vspace*{1cm}
 \hspace*{1.5cm}
 \renewcommand{\arraystretch}{1.6}
   \scriptsize
%
%  bins related to D-meson kinematics
   \begin{tabular}[t]{|@{\quad $[$\ }c@{\ $]$\quad }|c|c|c|c|c|c|}
    \hline
    \multicolumn{1}{|c|}{\small $p_t(D_s^+)$} & \small ${\rm d}\sigma_{vis}/{\rm d}p_t$ &
    \multicolumn{5}{c|}{errors \ $[\unit{nb/GeV}\ ]$} \\
    \cline{3-7}
    \multicolumn{1}{|c|}{$[\unit{GeV}\,]$} & $[\unit{nb/GeV}\ ]$ &
    statistical & \multicolumn{2}{c|}{experimental} & \multicolumn{2}{c|}{theoretical} \\
    \hline
    2.5, \,\ 3.5  & \small 1.09\; & $\pm0.33\;$ & $+0.22\;$ & $-0.27\;$ & $+0.27\;$ & $-0.27\;$ \\
    3.5, \,\ 4.0  & \small 0.44\; & $\pm0.20\;$ & $+0.16\;$ & $-0.09\;$ & $+0.11\;$ & $-0.11\;$ \\
    4.0,    10.0  & \small 0.071 & $\pm0.021$ & $+0.016$ & $-0.012$ & $+0.018$ & $-0.018$ \\
    \hline
%
    \multicolumn{7}{c}{}\\
    \hline
    \multicolumn{1}{|c|}{\small $\eta(D_s^+)$} & \small ${\rm d}\sigma_{vis}/{\rm d}\eta$ &
    \multicolumn{5}{c|}{errors \ $[\unit{nb}\ ]$} \\
    \cline{3-7}
    \multicolumn{1}{|c|}{} & $[\unit{nb}\ ]$ &
    statistical & \multicolumn{2}{c|}{experimental} & \multicolumn{2}{c|}{theoretical} \\
    \hline
     -1.50,  -0.50  & \small 0.59 & $\pm0.19$ & $+0.12$ & $-0.10$ & $+0.15$ & $-0.15$ \\
     -0.50, \ 0.75  & \small 0.50 & $\pm0.17$ & $+0.10$ & $-0.12$ & $+0.12$ & $-0.12$ \\
    \ 0.75, \ 1.50  & \small 0.81 & $\pm0.25$ & $+0.43$ & $-0.29$ & $+0.20$ & $-0.21$ \\
    \hline
%
    \multicolumn{7}{c}{\parbox[l][8mm][c]{11cm}{}} \\
    \hline
    \multicolumn{1}{|c|}{\small $Q^2$} & \small ${\rm d}\sigma_{vis}/{\rm d}Q^2$ &
    \multicolumn{5}{c|}{errors \ $[\unit{nb/GeV}^2\ ]$} \\
    \cline{3-7}
    \multicolumn{1}{|c|}{$[\unit{GeV}^2\,]$} & $[\unit{nb/GeV}^2\ ]$ &
    statistical & \multicolumn{2}{c|}{experimental} & \multicolumn{2}{c|}{theoretical} \\
    \hline
    \,\ 2, \ \ \ 6  & \small 0.172\; & $\pm0.044\;$ & $+0.048\;$ & $-0.038\;$ & $+0.043\;$ & $-0.043\;$ \\
    \,\ 6,  \,\ 16  & \small 0.053\; & $\pm0.017\;$ & $+0.012\;$ & $-0.012\;$ & $+0.013\;$ & $-0.013\;$ \\
       16,     100  & \small 0.0065 & $\pm0.0028$ & $+0.0014$ & $-0.0013$ & $+0.0016$ & $-0.0016$ \\
    \hline
%
   \end{tabular}

%    \caption[Single differential \ds\ production cross section results]
    \icaption{\label{tab.ds.xsec.bins} 
The bin-averaged single differential \ds\ production cross section
measurements $\sigma_{vis}(ep\rightarrow eD_s^+X)$ 
with statistical, experimental systematic and 
theoretical errors.
The latter include the uncertainties of the
branching ratio and the model dependence of the acceptance
determination.}
%
\label{tab:dsubs}
\end{table}
\end{center}
\clearpage
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% D* decay channel:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\begin{center}
\begin{table}[ht]
% \vspace*{\textheight}
 \hspace*{1.5cm}
 \renewcommand{\arraystretch}{1.6}
   \scriptsize
%
%  bins related to D-meson kinematics
   \begin{tabular}[t]{|@{\quad $[$\ }c@{\ $]$\quad }|c|c|c|c|c|c|}
    \hline
    \multicolumn{1}{|c|}{\small $p_t(D^{*+})$} & \small ${\rm d}\sigma_{vis}/{\rm d}p_t$ &
    \multicolumn{5}{c|}{errors \ $[\unit{nb/GeV}\ ]$} \\
    \cline{3-7}
    \multicolumn{1}{|c|}{$[\unit{GeV}\,]$} & $[\unit{nb/GeV}\ ]$ &
    statistical & \multicolumn{2}{c|}{experimental} & \multicolumn{2}{c|}{theoretical} \\
    \hline
    2.5, \,\ 3.0  & \small 2.31\; & $\pm0.28\;$ & $+0.50\;$ & $-0.40\;$ & $+0.07\;$ & $-0.06\;$ \\
    3.0, \,\ 3.5  & \small 1.15\; & $\pm0.16\;$ & $+0.23\;$ & $-0.19\;$ & $+0.03\;$ & $-0.04\;$ \\
    3.5, \,\ 4.0  & \small 1.03\; & $\pm0.13\;$ & $+0.21\;$ & $-0.16\;$ & $+0.03\;$ & $-0.03\;$ \\
    4.0, \,\ 5.0  & \small 0.344 & $\pm0.055$ & $+0.085$ & $-0.055$ & $+0.011$ & $-0.009$ \\
    5.0, \,\ 6.0  & \small 0.224 & $\pm0.041$ & $+0.048$ & $-0.037$ & $+0.006$ & $-0.009$ \\
    6.0,    10.0  & \small 0.027 & $\pm0.007$ & $+0.015$ & $-0.004$ & $+0.001$ & $-0.001$ \\
    \hline
%
    \multicolumn{7}{c}{}\\
    \hline
    \multicolumn{1}{|c|}{\small $\eta(D^{*+})$} & \small ${\rm d}\sigma_{vis}/{\rm d}\eta$ &
    \multicolumn{5}{c|}{errors \ $[\unit{nb}\ ]$} \\
    \cline{3-7}
    \multicolumn{1}{|c|}{} & $[\unit{nb}\ ]$ &
    statistical & \multicolumn{2}{c|}{experimental} & \multicolumn{2}{c|}{theoretical} \\
    \hline
     -1.50,  -1.00  & \small 0.62 & $\pm0.13$ & $+0.14$ & $-0.09$ & $+0.02$ & $-0.02$ \\
     -1.00,  -0.50  & \small 1.10 & $\pm0.13$ & $+0.23$ & $-0.14$ & $+0.03$ & $-0.03$ \\
     -0.50, \ 0.00  & \small 1.20 & $\pm0.14$ & $+0.24$ & $-0.15$ & $+0.03$ & $-0.03$ \\
    \ 0.00, \ 0.50  & \small 1.15 & $\pm0.16$ & $+0.22$ & $-0.20$ & $+0.03$ & $-0.04$ \\
    \ 0.50, \ 1.00  & \small 0.99 & $\pm0.15$ & $+0.23$ & $-0.31$ & $+0.03$ & $-0.02$ \\
    \ 1.00, \ 1.50  & \small 0.65 & $\pm0.16$ & $+0.32$ & $-0.25$ & $+0.03$ & $-0.02$ \\
    \hline
%
    \multicolumn{7}{c}{\parbox[l][8mm][c]{11cm}{}} \\
    \hline
    \multicolumn{1}{|c|}{\small $Q^2$} & \small ${\rm d}\sigma_{vis}/{\rm d}Q^2$ &
    \multicolumn{5}{c|}{errors \ $[\unit{nb/GeV}^2\ ]$} \\
    \cline{3-7}
    \multicolumn{1}{|c|}{$[\unit{GeV}^2\,]$} & $[\unit{nb/GeV}^2\ ]$ &
    statistical & \multicolumn{2}{c|}{experimental} & \multicolumn{2}{c|}{theoretical} \\
%
    \hline
    \,\ 2, \ \ \ 4  & \small 0.359\; & $\pm0.043\;$ & $+0.079\;$ & $-0.062\;$ & $+0.014\;$ & $-0.009\;$ \\
    \,\ 4, \ \ \ 7  & \small 0.193\; & $\pm0.027\;$ & $+0.045\;$ & $-0.036\;$ & $+0.005\;$ & $-0.006\;$ \\
    \,\ 7,  \,\ 12  & \small 0.107\; & $\pm0.014\;$ & $+0.021\;$ & $-0.015\;$ & $+0.003\;$ & $-0.004\;$ \\
       12,  \,\ 22  & \small 0.0486 & $\pm0.0068$ & $+0.0109$ & $-0.0084$ & $+0.0014$ & $-0.0013$ \\
       22,  \,\ 35  & \small 0.0180 & $\pm0.0038$ & $+0.0036$ & $-0.0026$ & $+0.0005$ & $-0.0007$ \\
       35,     100  & \small 0.0064 & $\pm0.0010$ & $+0.0013$ & $-0.0009$ & $+0.0002$ & $-0.0002$ \\
    \hline
   \end{tabular}

%    \caption[Single differential \dst\ production cross section results (CST)]
    \icaption{\label{tab.dstar.cst.xsec.bins} 
The bin-averaged  single differential \dst\ production cross section
measurements $\sigma_{vis}(ep\rightarrow eD^{*+}X)$ 
with statistical, experimental systematic and 
theoretical errors.
The latter include the uncertainties of the
branching ratio and the model dependence of the acceptance
determination.
The \dst\ tagged \dn\ signals used for the measurement
fulfill life time tagging requirements. }
\label{tab:dstar}
\end{table}
\end{center}
\clearpage
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

