%================================================================
% LaTeX file with preferred layout for the contributed papers to
% the ICHEP Conference 98 in Vancouver
% process with:  latex hep98.tex
%                dvips -D600 hep98
%================================================================
\documentclass[12pt]{article}
\usepackage{epsfig}
\usepackage{amsmath}
% \usepackage{lineno}
\usepackage{hhline}
\usepackage{amssymb}
\usepackage{times}

\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=============================

% Some useful tex commands
%
\newcommand{\GeV}{\rm GeV}
\newcommand{\TeV}{\rm TeV}
\newcommand{\pb}{\rm pb}
\newcommand{\cm}{\rm cm}
\newcommand{\hdick}{\noalign{\hrule height1.4pt}}

\newcommand{\xgobs}{$x_{\gamma}^{obs}\,$}
\newcommand{\xgobsm}{x_{\gamma}^{obs}}
\newcommand{\bbb}{b\bar{b}}
\newcommand{\ccb}{c\bar{c}}
\newcommand{\ra}{\rightarrow}

\begin{document}

\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
                XXII International Symposium on Lepton-Photon Interactions at High Energy},
                June~30,~2005,~Uppsala} \\
                 & Abstract:        & {\bf 405}    &\\
                 & Sessions: & {\bf Flavor physics} and {\bf QCD and hadron structure}   &\\ \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 
      Measurement of Charm and Beauty Photoproduction \\ 
      at HERA \\
      Using Inclusive Lifetime Tagging
}

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

% \linenumbers

\begin{abstract}

\noindent
A measurement of 
the charm and beauty photoproduction cross sections at the $ep$ collider
HERA is presented.
The data were collected in the years 1999 and 2000 and 
correspond to an integrated luminosity of 57.7pb$^{-1}$.
Events are selected 
with two or more jets with large transverse momenta,
$p_t^{jet_{1(2)}}>11(8)$ GeV, 
in the central rapidity range, $-0.88<\eta^{jet}<1.3$.
The lifetime signature of $c$ and $b$-flavoured hadrons
is exploited to determine the fractions of events
in the sample containing charm or beauty.
Differential cross sections as a function of the jet transverse
momentum, the rapidity and  \xgobs
are measured in the photoproduction region
\mbox{$Q^2<1$ GeV$^2$}, with inelasticity $0.15<y<0.8$.
The results are compared with calculations in next-to-leading 
order perturbative QCD and Monte Carlo models as implemented 
in PYTHIA and CASCADE.

\end{abstract}

\end{titlepage}

% \linenumbers

\pagestyle{plain}
%
\section{Introduction}
%

A measurement of differential charm and beauty dijet photoproduction cross sections 
in $ep$ collisions at HERA is presented here.
The analysis covers the photoproduction region,  
where the virtuality of the photon emitted from the incoming positron 
is small, $Q^2\sim 0$. 
In this process, the production of heavy quarks is expected to be 
dominated by photon-gluon fusion, $\gamma g \rightarrow c\bar{c}$
or $\gamma g \rightarrow b\bar{b}$, 
where the photon interacts with a gluon from the proton to produce 
heavy quarks in the final state. 
The measurements are compared to  
calculations in perturbative QCD (pQCD) at next-to-leading order (NLO)
in which the mass of the heavy quarks provides a hard scale.

%
For the measurement presented here,
a similar analysis technique is used
as in a recent H1 measurement in deep inelastic scattering (DIS)
at $Q^2>110$ GeV$^2$~\cite{Aktas:2004az}. 
The charm and beauty cross sections are determined using a fit 
to the lifetime signature of charged particles in jets.
This inclusive method yields measurements of differential cross sections 
that extend to larger values of transverse momenta 
than in previous HERA analyses in which leptons from 
beauty quark decays were used to measure  
beauty cross sections~\cite{Adloff:1999nr,Breitweg:2000nz,
Chekanov:2003,Chekanov:2004,Aktas:2005zc,Aktas:2005bt}.

%
Events with two jets in the final state are selected
to measure the photoproduction dijet charm or beauty cross section
$$
\sigma(e^+p \rightarrow e^+ (c\bar{c}~{\rm or}~b\bar{b}) X \rightarrow e^+ + jj + X').
$$
%
The cross sections are measured 
differentially as functions of the
transverse momentum and pseudo-rapidity of the leading jet
and of \xgobs,
defined as the 
fraction of the $(E-p_z$) of the hadronic system
that is carried by the two highest $p_T$ jets:
%.
$$
\xgobsm = \frac{ (E-p_z)_{jet_1} +(E-p_z)_{jet_2}}{(E-p_z)_h}.
$$  
In LO QCD, \xgobs is the fraction of the photon's energy 
that enters the hard interaction.
%The measurements are compared to predictions of pQCD.

%
\section{Detector Description}
\label{sec:det}

The H1 detector is described in detail in~\cite{Abt:1997xv}.
Charged particles emerging from the interaction region
are measured by the central tracking detector (CTD) in the pseudo-rapidity
range $-1.74 < \eta < 1.74$\footnote{The pseudo-rapidity 
$\eta$ of an object with polar angle $\theta$ is given by
$\eta = -\ln \; \tan (\theta/2)$, where $\theta$ is
measured with respect to the $z$-axis given by the proton beam direction.}.
The CTD consists of two large
cylindrical central jet drift chambers (CJCs), two $z$-chambers and two multi-wire 
proportional chambers arranged concentrically around the beam-line 
within a solenoidal magnetic field of 1.15 T. 
The CTD provides triggering
information  based on track segments in the $r$-$\phi$ plane 
from the CJC and the $z$-position of the vertex from the 
multi-wire proportional chambers.

The CJC tracks are linked with hits in the Central
Silicon Tracking detector (CST)~\cite{cst}, which consists of two cylindrical
layers of silicon strip sensors, 
surrounding the beam pipe  
at radii of $R=57.5$ mm and $R=97 $ mm from the beam axis. 
%
%With an effective length of 358 mm the CST covers 
%a large part of the $ep$ interaction region
%and has a polar angle acceptance of $30^0 <\theta< 150^0$
%for the outer layer.
%
These double-sided sensors, with readout strip pitches 
of 50 $\mu$m and 88 $\mu$m, provide
resolutions of 12 $\mu$m in $r$-$\phi$ and 25 $\mu$m in $z$.
Average hit efficiencies are 97 (92)\% in 
$r$-$\phi$ ($z$).
%
For the measurement of the impact parameter,
tracks are used with two hits in the CST $r$-$\phi$-layers.
For these tracks the measurement of 
the transverse distance of closest approach 
has a resolution of 
$\sigma_{DCA} \approx 33\;\mu\mbox{m} 
\oplus 90 \;\mu\mbox{m} /p_T [\mbox{GeV}]$.
%
% See plot for this resolution vs pt
% in ~obehnke/hd/bphan/paw/dcapres.ps
% (from bbbar mc with 
% cutting on 50 cm cjc tracklength and requiring two cst hits
%
The first term represents the intrinsic resolution
and includes the uncertainty of the CST alignment,
the second gives the contribution
from multiple scattering in the beam pipe.
%

The energies of final state particles are determined using
CTD track information and measurements of the energy deposited
in the liquid argon (LAr) calorimeter, which surrounds the 
tracking chambers and covers the range $-1.5 < \eta < 3.4$. 
The backward region ($-4.0 < \eta < -1.4$) is covered by
a lead--scintillating fibre calorimeter (SPACAL~\cite{Nicholls:1996di}) with 
electromagnetic and hadronic sections.  
The calorimeters are surrounded by the iron return yoke of the solenoidal 
magnet.

\section{Data Selection and Monte Carlo Samples}
\label{sec:sel}

The data used in this analysis were recorded
in 1999 and 2000 and correspond
to an integrated luminosity of $57.7\,$pb$^{-1}$.
%
The events were triggered by a combination of signals from
the calorimeter, the central drift 
chambers and the  multi-wire proportional chambers. 
%
Photoproduction events are selected by requiring that there be no 
high energy electromagnetic cluster anywhere in the calorimeter.
This restricts the range of negative four-momentum
transfer squared to $Q^2<1$ GeV$^2$.  
Background from remaining DIS events in which the scattered
electron simulates a jet, is removed by requiring that the 
transverse jet size $R$ $>0.02$
and $m^{jet}/p_t^{jet} > 0.1$ where $m^{jet}$ is the reconstructed mass, 
calculated from the jet daughter particles, and 
$p_t^{jet}$ the transverse momentum of the jet.
The inelasticity $y$ is calculated using the Jacquet-Blondel method~\cite{JB}, 
and the measurement is made in the range \mbox{0.15 $<y<$ 0.8}.
%
Jets are reconstructed using the inclusive $k_t$ algorithm~\cite{kt} 
with radius $R=1$ in the \mbox{$\eta$-$\phi$} plane.
% 
The $p_T$-recombination scheme is applied giving massless jets.
% 
The selection requires that there be at least two jets in the central rapidity
range $-0.88 < \eta < 1.3 $ with 
transverse energy \mbox{$p_t^{jet_{1(2)}}>11(8)$ GeV}.


%
Monte Carlo event samples for the processes 
$ep\ra e\bbb X$, $ep\ra e\ccb X$ and light quark production
are generated using the PYTHIA program~\cite{PYTHIA}
which is based on leading order QCD and uses parton showers 
to simulate higher order effects.  
%
PYTHIA simulates direct and resolved photon processes and 
also includes excitation processes, in
which one heavy quark ($c$ or $b$) originates from the
resolved photon or the proton. 
%
PYTHIA is run in an inclusive mode and generates all the above 
processes using massless matrix elements.
%
The CTEQ5L~\cite{cteq5l} parton densities are used
% hep-ph/9903282
for the proton and those of
GRVG-LO~\cite{grvg} 
% M.~Gluck, E.~Reya and A.~Vogt, Phys. Rev. D46, 1973 (1992)
for the photon. 
For the fragmentation of charm and beauty quarks, 
the Peterson function~\cite{peterson} is used.
%
%The detector resolutions of the Monte Carlo simulations
%are tuned to accurately describe those of the data.
%The measured cross sections are compared with predictions from 
%PYTHIA and also from the Monte Carlo generator 
%program CASCADE~\cite{Jung:2000hk}
%which implements the CCFM~\cite{ccfm} evolution equation
%using off-shell matrix elements convoluted 
%with $k_t$-unintegrated parton distributions in the proton.


\section{NLO QCD Calculation}
\label{sec:nlo}

Calculations in perturbative QCD are performed to next-to-leading
order using the program FMNR
by Frixione {\it et al.}\,~\cite{Frixione:1994dv}
which implements the cross section calculation
in a fixed order massive scheme, i.e.\, charm and beauty quarks are generated
exclusively in the hard process via boson--gluon fusion diagrams,
assuming the proton and photon to contain only light quarks.
%
The calculations are performed in the DIS scheme using values
of 1.5 (4.75) GeV for the $c$ ($b$)-quark mass, respectively.
The renormalisation scales are set to the transverse masses
$m_t=\sqrt{m_q^2 + p_{t,q\bar{q}}^2}$,
where $p_{t,q\bar{q}}^2$ is the average of the squared transverse momenta of the
quark and anti-quark.
For beauty, the factorisation scale $\mu_f$ is set to $m_t$ while for charm
$\mu_f=\sqrt{4(m_c^2 + p_{t,c\bar{c}}^2)}$.
The CTEQ5D parton distribution functions~\cite{cteq5l} are used for the 
distribution of partons in the proton. 
For the resolved photon processes, which contribute less than 10\% to 
the total cross sections, the GRV-G HO distributions~\cite{grvg}
are used.
%

FMNR provides parton level event distributions, i.e.\,two or three outgoing partons,
the heavy quark antiquark pair and possibly a gluon. Parton level 
jets are reconstructed using the
inclusive $k_t$ jet-algorithm in the $p_t$
recombination scheme.
%
To allow comparisons with the data, 
corrections to the hadron level are determined using
the PYTHIA Monte Carlo event generator.
At the hadron level, jets are constructed
using the inclusive $k_t$ algorithm~\cite{kt}
using all generated stable particles including
neutrinos.
%
The parton to hadron level corrections are found to be
less than $5\%$ in all bins except
for the region $0.7<$\xgobs$<0.85$ $(0.85<$\xgobs$<1)$ where the correction
is $\sim 40\%$ $(\sim 15\%)$.


The theoretical uncertainties of the NLO calculation
have been estimated by variations of the renormalisation and 
factorisation scale parameters up and down by a factor of 
two (in the same direction, i.e.\,$\mu_R=\mu_f$)
and the $c$ ($b$) mass between 1.3 and 1.7 (4.5 and 5) GeV. 
These variations, added linearly, lead to a
change in the cross section predictions of 30--35\% for charm and 
20--30\% for beauty.
%
The cross section variation when using
other proton structure functions such as MRSG or MRST1 \cite{mrs}
is less than 8\% in all regions of the measurement.
The latter uncertainty is added to the scale uncertainties in quadrature.

\section{Lifetime Tag Observables}
\label{sec:impactparm}

%The fraction of beauty events in the sample is determined 
%using the lifetime information of the tracks in the jets.
The analysis is based on CTD tracks which are linked to hits in 
both $r$-$\phi$ layers
of the CST in order to improve the precision of the track parameters.
In this paper, CST-improved CTD tracks are referred to as ``CST tracks''.
CST tracks are required to have a minimum transverse momentum 
of 500 MeV and a polar angle $30^\circ<\Theta_{track}<150^\circ$.
CST tracks are associated to one of the two highest $p_t$ jets if 
they lie within a cone of 1 in \mbox{$\eta$-$\phi$} space centred about 
the jet axis. For the final sample, only those events are selected in which
at least one associated CST track is found.

The transverse momentum $p_t^{jet_1}$ and the pseudo-rapidity $\eta^{jet_1}$ 
distribution of the leading jet, i.e. that with highest $p_t$, are 
shown in figure~\ref{fig:ctrl:ptjet}a and b. 
Figure~\ref{fig:ctrl:ptjet}c shows \xgobs reconstructed from both jets.
The data are compared
to the Monte Carlo simulation PYTHIA (see section~\ref{sec:sel}) which gives 
a good description of the data.
The transverse momentum and polar angle distributions of CST tracks 
are compared to the Monte Carlo simulation in figure~\ref{fig:ctrl:pttrk}a and b. 
%In figure~\ref{fig:ctrl:pttrk}c the number of
%CST hits for the selected CST tracks is shown.
The number of CST tracks in the two leading jets
is shown in figure~\ref{fig:ctrl:pttrk}c. The
simulation also gives a reasonable description of these distributions. 

The primary event vertex is reconstructed from all tracks (with or
without CST hits) taking into account the position and spread 
of the beam interaction region.
The transverse extensions of the beam interaction region are
measured to be $145~{\rm \mu m}$ in $x$ and $25~{\rm \mu m}$
in $y$ for the data-taking period considered here.  The mean position of the
beam is measured as the average over many events; the
resulting error on the mean position is small in comparison to the size of
the beam-spot, with a typical uncertainty of $\sim 5~{\rm \mu m}$.

In this analysis, the signed track impact parameter
with respect to the event vertex is used to separate the different quark
flavours. The signed impact parameter is defined as
positive if the angle between the jet axis and the line between the
vertex and distance of closest approach of the track to the vertex 
is less than $90^\circ$, and is defined as negative otherwise. 
The impact parameter distribution (figure~\ref{fig:dca}a) is 
seen to be asymmetric; the number of positive values exceeds the number of 
negative values, indicating the presence
of long lived particles. The simulation gives a reasonable
description of the data. The component of the simulation that arises
from light quarks is almost symmetric at small distance of closest 
approach (DCA). The $c$ component has
a moderate asymmetry and the $b$ component shows a marked
asymmetry with an exponential fall-off to positive values of DCA.
The asymmetry seen at $|{\rm DCA}|>0.1~{\rm cm}$ is mainly due to long
lived strange particles such as $K_S^0$. 
In order to reduce the effects of the strange
component, a cut of $|{\rm DCA}|<0.1~{\rm cm}$ is imposed.
The significance~\cite{Buskulic:1993ka}, defined as the ratio of
the DCA to its error, is shown in
figure~\ref{fig:dca}b for all CST tracks with $|{\rm DCA}|<0.1~{\rm cm}$.
Apart from the tails the simulation provides a good description of the
data. 

The separation of charm and beauty events is further enhanced by
using different significance distributions for events with different track 
multiplicities.
The first significance $S_1$ is defined for events with
exactly one CST track associated to a jet
and is simply the significance of this track.  
The second significance $S_2$
is defined for events with two or more CST tracks associated to one of the two
jets and is the significance of the track with the second highest absolute
significance.  Events in which the tracks with the first and second
highest absolute significance in a jet have different signs are removed from
the $S_2$ distribution.  This latter condition removes around $50\%$ of
events from the $S_2$ distribution, predominantly from the light quark event sample.
%
The $S_1$ and $S_2$ distributions are shown in figure~\ref{fig:s1s2}.
%The distribution of $S_2$ gives a better separation power of light to
%heavy quarks, since  for heavy quarks
%$\ge 2$ tracks are usually produced with high significance,
%whereas for light quarks the chances of two tracks being produced at
%large significance due to resolution effects are small. By
%requiring the two most significant tracks to have the same sign
%further suppresses the background contribution.  Events with one
%CST track are retained to improve the statistical precision of the
%measurements.

In order to reduce the uncertainty due to the DCA 
resolution and the light quark normalisation, the negative 
bins in the $S_1$ and $S_2$
distributions are subtracted from the positive. The subtracted
distributions are shown in figure~\ref{fig:negsub}. 
The resulting distributions are dominated by $c$
quark events\footnote{Events that contain $c$ hadrons resulting from the decay of 
$b$ hadrons are included in the definition of $b$ quark
events.}, with an increasing $b$ fraction towards increasing
significance. The contribution from light quarks is
seen to be small.

\section{Determination of the Charm and Beauty Components}
\label{sec:fit}
The $b$, $c$ and light quark fractions in the data are extracted by
simultaneously fitting the subtracted $S_1$ and $S_2$ distributions 
$N^{data}_{i}$ and the total number of events $N^{data}_{tot}$ 
with the Monte Carlo
$b$, $c$ and light quark distributions used as templates 
in each interval of the measurement. 
The Monte Carlo $b$, $c$ and light quark
distributions are allowed to be modified by the scale factors $P_b$,
$P_c$ and $P_l$, respectively, such that the $\chi^2$ given by
\begin{eqnarray}
\label{chi2formula}
\chi^2 &=&\sum_{i}
\frac{(N_i^{\rm data}-
       P_b N^{\rm MC}_{bi}-P_c N^{\rm MC}_{ci}-P_l N^{\rm MC}_{li})^2}
     {\sigma^2 (N_i^{\rm data})
     +(P_b\sigma(N^{\rm MC}_{bi}))^2
     +(P_c\sigma(N^{\rm MC}_{ci}))^2
     +(P_l\sigma(N^{\rm MC}_{li}))^2} \\
     & + & 
\frac {(N^{\rm data}_{\rm tot}-
       P_b N^{\rm MC}_{ {\rm  tot} b}
      -P_c N^{\rm MC}_{{\rm  tot} c} 
      -P_l N^{\rm MC}_{{\rm  tot} l})^2 }
     {\sigma^2 (N^{\rm data}_{\rm tot})
     +(P_b\sigma(N^{\rm MC}_{{\rm  tot} b}))^2
     +(P_c\sigma(N^{\rm MC}_{{\rm  tot} c}))^2
     +(P_l\sigma(N^{\rm MC}_{{\rm  tot} l}))^2}
\nonumber
\end{eqnarray}
is minimized, where $i$ runs over all bins of $S_1$ and $S_2$ 
with significances $< 13$.
% CHECK GIVE REASON

The results of the fit to the complete data sample are shown in
figure~\ref{fig:negsub}.
% stability
The fit gives acceptable $\chi^2$ values for the total event sample
and for all bins of the measurement. 
Consistent results are also found when
different significance distributions are fitted, 
for example fitting the unsubtracted
$S_1$ or $S_2$ distributions (either simultaneously or alone), 
and when the fit is repeated after the DCA cut is varied.
Consistent results in all bins 
are also obtained when the multi-impact parameter probability
observable as described below (section~\ref{sec:jetprob}) is used.


%% no systematic errors chapter, summary here
%%for lepton photon

The total systematic error on the charm (beauty) cross section is 
estimated to be 14\% (21\%). The dominant contributions are the 
uncertainties in the description of the track resolutions and the 
track efficiencies, leading to errors on the cross section of up 
to $\sim$ 10\% each.
%The uncertainty due to the trigger thresholds amounts to 5\%.
Model dependent uncertainties, such as the 
uncertainties on the various $D$ and $B$ meson lifetimes,
decay branching fractions and mean charge multiplicites
are estimated to contribute 4\%  and 7\% 
to the total systematic uncertainties for the charm and beauty
cross section measurements, respectively.


%\section{Systematic Errors}
%\label{systematics}
%The following sources of systematic uncertainty, 
%as listed in table~\ref{tab:sys},
%are considered by variation of the corresponding quantities in the Monte Carlo
%simulation:
%\begin{itemize}
%\item A track efficiency uncertainty of $\pm 3.6\%$.
%\item An uncertainty in the impact parameter
%  resolution of the tracks is estimated by
%  introducing an additional Gaussian smearing of 200~$\mu{\rm m}$ to
%  $5\%$ of the tracks and 25~$\mu{\rm m}$ to the rest.
%\item A $2\%$ uncertainty on the hadronic energy scale leading
%  to an uncertainty of the $c$ ($b$)-cross section of 6\% (2\%).
%\item A $25\%$ uncertainty on the composition of direct and resolved 
%  processes in the MC simulation.
%\item The trigger efficiency is studied by comparison 
%  of the simulation with the data using events with the 
%  same cuts on the jets at moderate 
%  $Q^2>2$ GeV$^2$, in which the scattered electron triggers the
%  events independently of the conditions required for the triggers
%  under study. The uncertainty is determined to be 5\% on average.
%  increasing to 10\% in the smallest bin of transverse momentum.
%\item The uncertainty of the jet axis reconstruction 
%  is estimated by introducing an
%  additional Gaussian smearing of 2$^\circ$.
%\item The uncertainty of the asymmetry of the light quark impact parameter
%  distribution is
%  estimated by repeating the fits with the light quark $S_1$ and $S_2$
%  distributions (figure~\ref{fig:negsub}) set to zero.
%\item The uncertainties arising from the various $D$ and $B$ meson lifetimes,
%  decay branching fractions and mean charge multiplicites are
%  estimated by varying the input values of the Monte Carlo
%  simulation  by the errors on the
%  world average measurements, or by adjusting the simulation to the world
%  average value depending on which variation is larger. For the
%  branching fractions of quarks to mesons and the lifetimes of the
%  mesons the central values and errors on the world averages are taken
%  from\cite{Hagiwara:fs}.  For the mean charged track multiplicities the
%  values and uncertainties for $c$ and $b$ quarks are taken from
%  MarkIII~\cite{Coffman:1991ud} and LEP/SLD~\cite{lepjetmulti}
%  measurements, respectively.

%%%%% missing items
%\item An uncertainty on the description of the heavy quark final state
%  in the Monte Carlo is estimated by repeating the analysis 
%  with the CASCADE Monte Carlo yielding variations of CHECK \% and CHECK \%.

%% \item An uncertainty on the fragmentation function of the heavy quarks
%%   used in the Monte Carlo is estimated by repeating the fits with the
%%   Monte Carlo templates generated using the Peterson fragmentation
%%   function\cite{peterson}.

%\item The luminosity is known to an accuracy of 1.5\%.  
%\end{itemize}

%The dominant contributions are the uncertainties in the description
%of the track resolutions and the track efficiencies, 
%leading to errors on the cross section of $\sim$ 10\% each.
%The uncertainty due to the trigger thresholds amounts to 5\%.
%Model dependent uncertainties, such as the 
%uncertainties on the various $D$ and $B$ meson lifetimes,
%decay branching fractions and mean charge multiplicites
%are estimated to contribute 4\%  and 7\% 
%to the total systematic uncertainties for the charm and beauty
%cross section measurements, respectively.
%The total systematic errors on the charm and beauty cross sections are 
%calculated by adding the individual uncertainties 
%listed in table~\ref{tab:sys} in quadrature, assuming symmetric errors.
%For charm (beauty) a total systematic uncertainty of  14\% (21\%) is obtained.

%increasing to 16\% (23\%) at the smallest values of transverse momentum.


\section{Measurement Using a Multi-Impact Parameter \\ Probability}
\label{sec:jetprob}

The results are cross checked using an alternative method to separate the
quark flavours also based on the use of the 
significance distributions of the selected tracks $S_i$.
The method was employed by the ALEPH collaboration~\cite{Buskulic:1993ka}. 

The quantity
$$
P(S_i)=\frac{1}{\sqrt{2\pi}} \int_{\chi^2}^{\infty} e^{-t^2}dt,
$$
where $\chi_i^2=S_i^2$,
can be interpreted as
the probability that a track originates at the primary vertex.
The probability for tracks with negative significance is set to unity.
A multi impact parameter (MIP) probability $P_{MIP}$ 
is then constructed by combining the 
probabilities of the $N$ CST tracks within each jet:
$$
P_{MIP}=\Pi \sum_{j=0}^{N-1} (- \ln \Pi)^j / j!,
$$
where $j$ runs over all CST tracks and
$$
\Pi=\prod_{i=1}^N P(S_i)
$$
The distribution of the negative logarithm $-\log(P_{MIP})$ 
for both jets is shown in figure~\ref{fig:jetprob}.
The contributions from events containing $b$, $c$ and
$uds$ quarks are determined by a fit~\cite{Barlow:dm,rootfracfitter}
to the $-\log(P_{MIP})$ distribution, 
using the Monte Carlo expectations
for the shapes of each of these quark flavours.
The fractions of $c$ and $b$-events obtained from a fit to the MIP probability,
when converted into a cross section, are found to agree with the
result obtained by the method described above (section~\ref{sec:fit}).

\section{Results}
\label{sec:results}

The fit results are converted to measurements of the
charm and beauty cross section by determining the scale factors $P_c$ and
$P_b$ from the fit according to equation~\ref{chi2formula} for the
samples in each bin.
In each bin of the measurement the differential cross section is obtained by 
multiplying the bin-averaged cross section predicted by the Monte Carlo simulation 
by the scale factor and dividing by the bin size.
The total dijet charm photoproduction cross section in the range
$Q^2<1$ GeV$^2$, $0.15<y<0.8$, 
$p_t^{jet_{1,2}}>11(8)$ GeV and \mbox{ $-0.88<\eta^{jet_{1,2}}<1.3$}
is measured to be 
$$
\sigma(ep\rightarrow ec\bar{c}X \rightarrow ejjX) = 
694 \pm 69 (stat.) \pm 96 (sys.) {\rm pb}.
$$
For beauty, the measurement yields a cross section for the same kinematic range
$$
\sigma(ep\rightarrow eb\bar{b}X \rightarrow ejjX) = 
145 \pm 18 (stat.) \pm 30 (sys.) {\rm pb}.
$$

%%
%% total cross sections for Pythia, CASCADE, FMNR
%%

Figures~\ref{fig:xsec:cpt}--\ref{fig:xsec:bxgamma} show the measured
differential cross sections as functions of $p_t^{jet_1}$, $\eta^{jet_1}$ 
and \xgobs, respectively.
The data are compared with predictions from the NLO QCD calculation FMNR 
as well as from the Monte Carlo programs PYTHIA and CASCADE~\cite{Jung:2000hk}.
The latter implements the CCFM~\cite{ccfm} evolution equation
using off-shell matrix elements convoluted 
with $k_t$-unintegrated parton distributions in the proton.

While the charm data are reasonably well described in both normalization 
and shape,
the beauty data are found to be somewhat higher than the prediction from 
the NLO QCD calculation.
The main difference between the beauty data and the NLO calculation appears
to originate in the region of positive values of rapidity, 
as can be seen in figure~\ref{fig:xsec:beta}, and small 
values of \xgobs, where the prediction lies significantly below the data.
In these regions the contribution to the cross section 
from events with resolved photons is particularly large.
The prediction from PYTHIA for this contribution is 
indicated in the figures ~\ref{fig:xsec:cpt}--\ref{fig:xsec:beta}
by the dashed-dotted line. 

PYTHIA and CASCADE give a good description of the shapes of the 
data distributions.
However, the beauty data are generally higher in normalisation 
than the PYTHIA (CASCADE) prediction by a factor $\sim 1.8$ ($\sim 1.6$), 
respectively.


\section{Conclusions}
\label{sec:conclusions}

A measurement of differential charm and beauty dijet photoproduction 
cross sections
at HERA has been presented. The measurement makes use of the
precise tracking information available from the H1 vertex detector.
The heavy quark cross sections are determined by making use of the 
lifetime distributions of charm and beauty hadrons.

The cross sections are measured as functions of the transverse momentum
of the leading jet $d\sigma/dp_t^{jet_1}$, the rapidity of 
the jet $\eta^{jet_1}$ and \xgobs.
While the charm cross sections are reasonably well described in both
normalization and shape, the beauty cross sections
are found to be higher than a calculation in perturbative 
QCD to next-to-leading order.
The Monte Carlo generators PYTHIA and CASCADE describe the shape 
of the charm and beauty data.
However, for beauty PYTHIA (CASCADE) fall below in normalization by a 
factor $\sim 1.8$ ($\sim 1.6$). 

\begin{thebibliography}{99}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibitem{Aktas:2004az} A.~Aktas {\it et al.} [H1 Collaboration],
%``Measurement of F_2^ccbar and F_2^bbbar at High Q^2 using the H1 Vertex Detector at HERA,''
to appear in Eur.\ Phys.\ J.\ C., [hep-ex/0411046].
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\cite{Adloff:1999nr}
\bibitem{Adloff:1999nr}
C.~Adloff {\it et al.}  [H1 Collaboration],
%``Measurement of open beauty production at HERA,''
Phys.\ Lett.\ B {\bf 467} (1999) 156
[Erratum-ibid.\ B {\bf 518} (2001) 331] [hep-ex/9909029].
%%CITATION = HEP-EX 9909029;%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\cite{Breitweg:2000nz}
\bibitem{Breitweg:2000nz}
J.~Breitweg {\it et al.}  [ZEUS Collaboration],
%``Measurement of open beauty production in photoproduction at HERA,''
Eur.\ Phys.\ J.\ C {\bf 18} (2001) 625
[hep-ex/0011081].
%%CITATION = HEP-EX 0011081;%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibitem{Chekanov:2003}
S.~Chekanov {\it et al.}  [ZEUS Collaboration],
%''Beauty photoproduction measured using decays into muons in dijet events
%in ep collisions at $\sqrt(s)$=318 GeV''
DESY-03-212, submitted to Physical Review D 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ZEUS prel. 2002 partially supserseded by Chekanov:2003
\bibitem{Chekanov:2004}
S. Chekanov {\it et al.} [ZEUS Collaboration], 
% Measurement of beauty production in deep inelastic scattering at HERA
DESY-04-070 (May 2004), submitted to Physics Letters B
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibitem{Aktas:2005zc} A.~Aktas {\it et al.} [H1 Collaboration],
%``Measurement of beauty production at HERA using events with muons and jets,''
hep-ex/0502010.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\cite{unknown:2005bt}
\bibitem{Aktas:2005bt} A.~Aktas {\it et al.} [H1 Collaboration],
%``Measurement of charm and beauty photoproduction at HERA using D* mu
%correlations,''
hep-ex/0503038. 
%%CITATION = HEP-EX 0503038;%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibitem{Abt:1997xv}
I.~Abt {\it et al.}  [H1 Collaboration],
%``The Tracking, calorimeter and muon detectors of the H1 experiment at HERA ,''
Nucl.\ Instrum.\ Meth.\ A {\bf 386} (1997) 310 and 348.
%CITATION = NUIMA,A386,348;%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibitem{cst}
% CST paper
D.~Pitzl {\it et al.},
%``The H1 silicon vertex detector,''
Nucl.\ Instrum.\ Meth.\ A {\bf 454}, 334 (2000)
[hep-ex/0002044].
%%CITATION = HEP-EX 0002044;%%
%preprint ETHZ-IPP-PR-2000-01, hep-ex/0002044, 2000.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibitem{Nicholls:1996di}
T.~Nicholls {\it et al.}  [H1 SPACAL Group Collaboration],
%``Performance of an electromagnetic lead / scintillating 
%fiber calorimeter for the H1 detector,''
Nucl.\ Instrum.\ Meth.\ A {\bf 374} (1996) 149.
%%CITATION = NUIMA,A374,149;%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibitem{JB}
% Jacquet, Blondel
F.~Jacquet, A.~Blondel,
in: Proc.\ {\em Study of an ep Facility for Europe} (Ed.\ U. Amaldi),
DESY 79/48, p 391 (1979).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibitem{kt}
% incl kt
S.~Catani, Yu.~Dokshitzer, M.H.Seymour and B.R.~Webber,
Nucl.\ Phys.\  B 406 (1993) 187.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\cite{Sjostrand:1993yb}
\bibitem{PYTHIA}
%\bibitem{Sjostrand:1993yb}
T.~Sjostrand,
%``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{cteq5l} 
L.~Lai {\it et al.} [hep-ph/9903282].
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibitem{grvg}
M.~Gl\"uck, E.~Reya and A.~Vogt, Phys. Rev.D45, 3986(1992); Phys. Rev. D46, 1973 (1992).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibitem{peterson}
% Peterson
C.~Peterson, D.~Schlatter, I.~Schmitt, and P.M.~Zerwas, 
Phys.\,Rev.\ D 27 (1983) 105.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\cite{Frixione:1994dv}
\bibitem{Frixione:1994dv}
S.~Frixione, M.~L.~Mangano, P.~Nason and G.~Ridolfi,
%``Total cross sections for heavy flavor production at HERA,''
Phys.\ Lett.\ B {\bf 348} (1995) 633 [hep-ph/9412348].
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibitem{mrs}
A.D.~Martin, R.G.~Roberts and W.J.~Stirling, Phys.Lett. B354, 155 (1995);
A.D.~Martin, R.G.~Roberts, W.J.~Stirling and R.S.~Thorne, Eur. Phys. J. C4 (1998) 463.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\bibitem{jetset}
%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;%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\cite{Buskulic:1993ka}
\bibitem{Buskulic:1993ka}
D.~Buskulic {\it et al.}  [ALEPH Collaboration],
 %``A Precise measurement of Gamma (Z $\to$ b anti-b) / Gamma (Z $\to$
%hadrons),''
Phys.\ Lett.\ B {\bf 313} (1993) 535.
%%CITATION = PHLTA,B313,535;%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\cite{Hagiwara:fs}
\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;%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\cite{Coffman:1991ud}
\bibitem{Coffman:1991ud}
D.~Coffman {\it et al.}  [MARK-III Collaboration],
``Measurement of the inclusive decay properties of charmed mesons,''
Phys.\ Lett.\ B {\bf 263} (1991) 135.
%CITATION = PHLTA,B263,135;%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibitem{lepjetmulti}
D.~Abbaneo {\it et al.}  [LEP/SLD Heavy Flavour Working Group],
 LEPHF 2001-01, available from 
\begin{verb}
http://lepewwg.web.cern.ch/LEPEWWG/heavy/
\end{verb}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\cite{Barlow:dm}
\bibitem{Barlow:dm}
R.~J.~Barlow and C.~Beeston,
%``Fitting Using Finite Monte Carlo Samples,''
Comput.\ Phys.\ Commun.\  {\bf 77} (1993) 219.
%%CITATION = CPHCB,77,219;%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibitem{rootfracfitter}
http://root.cern.ch/root/html/TFractionFitter.h
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CASCADE
%\cite{Jung:2000hk}
\bibitem{Jung:2000hk}
H.~Jung and G.~P.~Salam,
%``Hadronic final state predictions from CCFM: 
%The hadron-level Monte  Carlo generator CASCADE,''
Eur.\ Phys.\ J.\ C {\bf 19} (2001) 351
[hep-ph/0012143];\\
%%CITATION = HEP-PH 0012143;%%
%\cite{Jung:2001hx}
%\bibitem{Jung:2001hx}
H.~Jung,
%``The CCFM Monte Carlo generator CASCADE,''
Comput.\ Phys.\ Commun.\  {\bf 143} (2002) 100
[hep-ph/0109102].
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% CCFM
%\cite{CCFM}
\bibitem{ccfm}
M.~Ciafaloni,
%``Coherence Effects In Initial Jets At Small Q**2 / S,''
Nucl.\ Phys.\ B {\bf 296} (1988) 49;   \\
%%CITATION = NUPHA,B296,49;%%
S.~Catani, F.~Fiorani and G.~Marchesini,\\
%``QCD Coherence In Initial State Radiation,''
Phys.\ Lett.\ B {\bf 234} (1990) 339,
%%CITATION = PHLTA,B234,339;%%
%\cite{Catani:1989sg}
%S.~Catani, F.~Fiorani and G.~Marchesini,
%``Small X Behavior Of Initial State Radiation In Perturbative QCD,''
Nucl.\ Phys.\ B {\bf 336} (1990) 18;\\
%%CITATION = NUPHA,B336,18;%%
G.~Marchesini,
%``QCD coherence in the structure function and associated distributions at small x,''
Nucl.\ Phys.\ B {\bf 445} (1995) 49.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%K.~Abe {\it et al.} {\sf check hier noch mehr}
%\bibitem{jetset}
%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;%



\clearpage
\end{thebibliography}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{table}[p]
%  \begin{center}
%    \begin{tabular}{|l|l||c|c|}
%      \hline
%       systematic & uncertainty & error & error\\
%      & & Beauty /$\%$ & Charm /$\%$ \\
%      \hline \hline
%        Track resolution&$\oplus 25 \mu m \; \oplus 200 \mu m$ &$-10 $ &$+7$ \\
%        CST track efficiency & $-3.6 \%$  &$ +11 $ & $-1$\\
%        Strangeness cut & $|dca|<1.5 mm$ & $ +2 $ & $-1$\\
%        s asymmetry &$100 \%$  &$  +6$  & $+3$\\
%        Direct $\Leftrightarrow$ Resolved & Resolved $-25\%$  &$ +9$  &$+7$ \\
%      \hline
%        Fragmentation & Lund / Peterson &$  4$  & $3$\\
%        B hadron multiplicities &  &$  2$ & $0.4$\\
%        D hadron multiplicities &  &$  5$ & $1.5$\\
%        Fragmentation fraction &PDG  &$  3$ & $1$\\
%        Lifetimes &PDG  &$0.5$ & $0.2$ \\
%      \hline
%        E (Jet) & $2\%$ &$ 2 $ &$6$ \\
%        Jet axis & $2^{\circ}$ gaussian smearing &$ 2 $ &$3$ \\
%        Trigger &  &$ 5$ & $5$\\
%        Lumi &  &$ 1.5$ & $1.5$\\
%      \hline \hline
%       {\bf total} &  &$ \pm 21$ & $ \pm 14$\\
%      \hline
%    \end{tabular}
%  \end{center}
%\caption{Table of systematic uncertainties.
%The total systematic error is calculated by adding the 
%individual uncertainties in quadrature, assuming symmetric
%uncertainties (see section~\ref{systematics}).}
%\label{tab:sys}
%\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[p]
\unitlength1cm
\begin{picture}(8,21)
\put(2.5,14.){\epsfig{file=H1prelim-04-173.fig1a.eps,width=10cm}}
\put(2.5,7. ){\epsfig{file=H1prelim-04-173.fig1b.eps,width=10cm}}
\put(2.5,0. ){\epsfig{file=H1prelim-04-173.fig1c.eps,width=10cm}}
\put(4.5,20.2){\large a)}
\put(11.5,13.2){\large b)}
\put(11.5,6.2){\large c)}
\end{picture}
\caption{Distributions of the two leading jets in the final sample.
  a) $p_t^{jet_1}$, b) $\eta^{jet_1}$, c) \xgobs.
  The data (points) are compared with the PYTHIA simulation after applying
  the scale factors obtained from the fit to the subtracted significance 
  distributions.}
\label{fig:ctrl:ptjet} 
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[htb]
\unitlength1cm
\begin{picture}(8,21)
\put(2.5,14.){\epsfig{file=H1prelim-04-173.fig2a.eps,width=10cm}}
\put(2.5,7. ){\epsfig{file=H1prelim-04-173.fig2b.eps,width=10cm}}
\put(2.5,0. ){\epsfig{file=H1prelim-04-173.fig2c.eps,width=10cm}}
\put(4.5,20.2){\large a)}
\put(4.5,13.2){\large b)}
\put(4.5,6.2){\large c)}
\end{picture}
\caption{Distributions of the CST tracks passing the track selection
  requirements. a) $p_t$, b) $\theta$, c) number of CST tracks.
  The data (points) are compared with the PYTHIA simulation after applying
  the scale factors obtained from the fit to the subtracted significance 
  distributions.}
  \label{fig:ctrl:pttrk} 
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[htb]
\unitlength1cm
\begin{picture}(8,21)
\put(.5,10.){\epsfig{file=H1prelim-04-173.fig3a.eps,width=14cm}}
\put(.5,0. ){\epsfig{file=H1prelim-04-173.fig3b.eps,width=14cm}}
\put(13.2,18.8){\large a)}
\put(13.2,8.8){\large b)}
\end{picture}
\caption{a) Distribution of the signed impact parameter of the selected
  CST tracks. 
  b) Signed significance distribution after selection of tracks
  with impact parameter $|DCA| < 0.1$ cm. 
  The data (points) are compared with the PYTHIA simulation after applying
  the scale factors obtained from the fit to the subtracted significance 
  distributions.}
  \label{fig:dca} 
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[htb]
\unitlength1cm
\begin{picture}(8,21)
\put(.5,10.){\epsfig{file=H1prelim-04-173.fig4a.eps,width=14cm}}
\put(.5,0.){\epsfig{file=H1prelim-04-173.fig4b.eps,width=14cm}}
\put(13.2,18.8){\large a)}
\put(13.2,8.8){\large b)}
\end{picture}
    \caption{Significance distributions using the 
    $b$, $c$ and $uds$-fractions from the fit to the subtracted significance 
    distributions of the data. a) $S_1$
    of CST tracks in jets with exactly one CST track, b)
    $S_2$ of CST tracks with the second
    highest significance in jets with
    two or more CST tracks.}
  \label{fig:s1s2} 
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[htb]
\unitlength1cm
\begin{picture}(8,21)
\put(.5,10.){\epsfig{file=H1prelim-04-173.fig5a.eps,width=14cm}}
\put(.5,0.){\epsfig{file=H1prelim-04-173.fig5b.eps,width=14cm}}
\put(4.2,18.8){\large a)}
\put(4.2,8.8){\large b)}
\end{picture}
    \caption{a) Distribution $S_1$ of the subtracted signed significance for
    the 1-track sample. b) Distribution $S_2$ of the subtracted signed 
    significance for the 2- or more track sample.
    The data (points) are well described by the PYTHIA simulation 
    (solid line).
    The decomposition of the simulation into $b$ (shaded
    histogram), $c$ (dotted line), $uds$ (triangles) is taken
    from the fit as described in section~\ref{sec:fit}.}
  \label{fig:negsub} 
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[htb]
\unitlength1cm
\begin{picture}(8,10)
\put(.5,0.){\epsfig{file=H1prelim-04-173.fig6.eps,width=14cm}}
\end{picture}
    \caption{Distribution of the negative logarithm of the multi impact
    parameter
    probability. The decomposition of the simulation into $b$ (shaded
    histogram), $c$ (dotted line), $uds$ (dashed line) is taken
    from the fit as described in section~\ref{sec:jetprob}.}
  \label{fig:jetprob} 
\end{figure}

\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[htb]
\unitlength1cm
\begin{picture}(8,10)
\put(.5,0.){\epsfig{file=H1prelim-04-173.fig7.eps,width=14cm}}
\end{picture}
    \caption{Differential charm cross section 
    $d\sigma/dp_t^{jet_1} (ep\rightarrow ec\bar{c}X \rightarrow ejj X)$
    as a function of the transverse momentum $p_t^{jet_1}$ 
    of the leading jet. The inner error bars indicate the statistical
    uncertainty and the outer error bars show the statistical and systematic
    error added in quadrature.
    Also shown is the prediction from CASCADE (dotted line) and PYTHIA (dashed line). 
    The contribution in PYTHIA from processes in which the photon is resolved is shown separately 
    (dashed-dotted line).
    The solid line indicates the prediction from a NLO QCD calculation
    and the shaded band describes the scale uncertainty of the calculation.}
\label{fig:xsec:cpt} 
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[htb]
\unitlength1cm
\begin{picture}(8,10)
\put(.5,0.){\epsfig{file=H1prelim-04-173.fig8.eps,width=14cm}}
\end{picture}
    \caption{Differential beauty cross section 
    $d\sigma/dp_t^{jet_1} (ep\rightarrow eb\bar{b}X \rightarrow ejj X)$
    as a function of the transverse momentum $p_t^{jet_1}$ 
    of the leading jet. The inner error bars indicate the statistical
    uncertainty and the outer error bars show the statistical and systematic
    error added in quadrature.
    Also shown is the prediction from CASCADE (dotted line) and PYTHIA (dashed line). 
    The contribution in PYTHIA from processes in which the photon is resolved is shown separately 
    (dashed-dotted line).
    The solid line indicates the prediction from a NLO QCD calculation
    and the shaded band describes the scale uncertainty of the calculation.}
\label{fig:xsec:bpt} 
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[htb]
\unitlength1cm
\begin{picture}(8,10)
\put(.5,0.){\epsfig{file=H1prelim-04-173.fig9.eps,width=14cm}}
\end{picture}
    \caption{Differential charm cross section 
    $d\sigma/d\eta^{jet_1} (ep\rightarrow ec\bar{c}X \rightarrow ejj X)$
    as a function of the rapidity $\eta^{jet_1}$ 
    of the leading jet. The inner error bars indicate the statistical
    uncertainty and the outer error bars show the statistical and systematic
    error added in quadrature. 
    Also shown is the prediction from CASCADE (dotted line) and PYTHIA (dashed line). 
    The contribution in PYTHIA from processes in which the photon is resolved is shown separately 
    (dashed-dotted line).
    The solid line indicates the prediction from a NLO QCD calculation
    and the shaded band describes the scale uncertainty of the calculation.}
  \label{fig:xsec:ceta} 
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[htb]
\unitlength1cm
\begin{picture}(8,10)
\put(.5,0.){\epsfig{file=H1prelim-04-173.fig10.eps,width=14cm}}
\end{picture}
    \caption{Differential beauty cross section 
    $d\sigma/d\eta^{jet_1} (ep\rightarrow eb\bar{b}X \rightarrow ejj X)$
    as a function of the rapidity $\eta^{jet_1}$ 
    of the leading jet. The inner error bars indicate the statistical
    uncertainty and the outer error bars show the statistical and systematic
    error added in quadrature. 
    Also shown is the prediction from CASCADE (dotted line) and PYTHIA (dashed line). 
    The contribution in PYTHIA from processes in which the photon is resolved is shown separately 
    (dashed-dotted line).
    The solid line indicates the prediction from a NLO QCD calculation
    and the shaded band describes the scale uncertainty of the calculation.}
  \label{fig:xsec:beta} 
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[htb]
\unitlength1cm
\begin{picture}(8,10)
\put(0.5,0.){\epsfig{file=H1prelim-04-173.fig11.eps,width=14cm}}
\end{picture}
    \caption{Differential charm cross section 
    $d\sigma/d\xgobsm (ep\rightarrow ec\bar{c}X \rightarrow ejj X)$
    as a function of \xgobs . The inner error bars indicate the statistical
    uncertainty and the outer error bars show the statistical and systematic
    error added in quadrature.     
    Also shown is the prediction from CASCADE (dotted line) and PYTHIA (dashed line). 
    The prediction from a NLO QCD calculation is shown before (dashed-dotted
    line) and after (solid line) hadronisation corrections,
    and the shaded band describes the scale uncertainty of the calculation.}
  \label{fig:xsec:cxgamma} 
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[htb]
\unitlength1cm
\begin{picture}(8,10)
\put(0.5,0.){\epsfig{file=H1prelim-04-173.fig12.eps,width=14cm}}
\end{picture}
    \caption{Differential beauty cross section 
    $d\sigma/d\xgobsm (ep\rightarrow eb\bar{b}X \rightarrow ejj X)$
    as a function of \xgobs . The inner error bars indicate the statistical
    uncertainty and the outer error bars show the statistical and systematic
    error added in quadrature.     
    Also shown is the prediction from CASCADE (dotted line) and PYTHIA (dashed line). 
    The prediction from a NLO QCD calculation is shown before (dashed-dotted
    line) and after (solid line) hadronisation corrections,
    and the shaded band describes the scale uncertainty of the calculation.}
  \label{fig:xsec:bxgamma} 
\end{figure}


\end{document}

