
\documentclass{icrc}

\usepackage{times}
\usepackage{graphicx} % when using Latex and dvips
%                       % (the latter best with option -Pcmz, if available,
%                       % to invoke Type 1 cm fonts)
%\usepackage[pdftex]{graphicx} % when using pdfLatex (preferred)

\begin{document}

\title{Title}
\author[1]{O. Blanch}
\affil[1]{IFAE, Barcelona, Spain}
\author[2]{H. Kornmayer}
\affil[2]{Max-Planck-Institut f\"ur Physik, M\"unchen, Germany}
\author[3]{J.C. Gonzalez}
\affil[3]{Universidad Complutense Madrid, Spain}

\correspondence{H. Kornmayer (h.kornmayer@web.de)}

\firstpage{1}
\pubyear{2001}

% \titleheight{11cm} % uncomment and adjust in case your title block
                     % does not fit into the default and minimum 7.5 cm

\maketitle

\begin{abstract}
For the understanding of a large Cherenkov telescope a detailed 
simulation of air showers and of the detector response are
unavoidable. Such a simulation must take into account the development
of air showers in the atmosphere, the reflectivity of the mirrors, 
the response of photo detectors 
and the influence of both the light of night sky and the light of  
bright stars. 
A detailed study will be presented. 
\end{abstract}

\section{Introduction}

In this year the construction of the the $17~\mathrm{m}$ diameter
Che\-ren\-kov telescope called MAGIC will be finished. The aim of this
detector is the observation of $\gamma$-ray sources in the 
enery region above $\approx 10~\mathrm{TeV}$. 
The size of the telesope mirros will be around $250~\mathrm{m^2}$.
The air showers induced by cosmic ray particles (hadrons and gammas) 
will be detected with a "classical" camera consisting of 577
photomultiplier tubes (PMT). The analog signals of these PMTs will 
be recorded by a FADC system running with a frequency of 
$f = 333~\mathrm{MHz}$. 
The readout of the FADCs by a dedicated trigger system containing
different trigger levels. 

The goal of the trigger system is to reject the hadronic cosmic ray
background from the gamma rays, for which a lower threshold is aimed. 
For a better understanding of the MAGIC telescope and its different 
systems (trigger, FADC) a detailed Monte Carlo (MC) study is 
unavoidable. Such an study has to take into account the simulation
of air showers, the effect of absorption in the atmosphere, the 
behaviour of the PMTs and the response of the trigger and FADC
system. 
For a big telescope like MAGIC there is an additional source of 
noise, which is the light of the night sky. As a rude assumption
there will be around 50 stars with magnitude $m \le 9$ in the 
field of view of the camera. So one other game of this
study is to invent methods to become rid of the light from 
stars. 

Here we present the first results of such an investigation. 

\section{Generation of MC data samples} 

The simulation of the MAGIC telescope is seperated in a 
subsequent chain of smaller simulation parts. First the 
air showers are simulated with the 
CORSIKA program \citep{hk95}. 
In the next step we simulate the reflection of the 
Cherenkov photons on the mirror dish. 
Then the behaviour of the PMTs is simulated and the
response of the trigger and FADC system is generated. 
In the followin subsections you find a more precise 
description of all the programs. 

\subsection{Air shower simulation}

The simulation of gammas and of hadrons is done with
the CORSIKA program, version ????. 
For the simulation of hadronic 
showers we use the VENUS model. We simulate showers 
for different zenith angles 
($\Theta = 0^\circ, 5^\circ, 10^\circ, 15^\circ, 
20^\circ, 25^\circ $). 
Gammas where simulated like a point source
whereas the hadrons are simulated isotropic around
the given zenith angle. We found that hadronic showers
have also for big impact parameters $I$ a non-zero 
probability to trigger the telescope. Therefore we 
simulate hadrons with $I < 400~\mathrm{m}$ and gammas
with $I < 200~\mathrm{m}$. 
The number of generated showers can be found in table 
\ref{tab_showers}. 
%
%
%
\begin{table}[b]
\begin{center}
  \begin{tabular}{|c||r|r||}
    \hline
    zenith angle & gammas & protons \\
    \hline \hline
  	$\Theta = 0^\circ$  &     &  \\
  	$\Theta = 5^\circ$  &     &  \\
  	$\Theta = 10^\circ$ &     &  \\
  	$\Theta = 15^\circ$ &     &  $\approx 5 \cdot 10^6$  \\
  	$\Theta = 20^\circ$ &     &  \\
  	$\Theta = 25^\circ$ &     &  \\
    \hline
  \end{tabular}
\end{center}
\caption {Number of generated showers}
\label{tab_showers}
\end{table}
%
%
%
For each simulated shower all
Cherenkov photons hitting the groud at observation level 
close to the telesope position are stored.

\subsection{mirror simulation}

The output of the air shower simualition is used 
as the input to the mirror simulation. But before 
simulating the mirror themself, one has to take the
absorption in the atmosphere into account. For each 
Cherenkov photon the height of production and
the wavelength is known. Taking the Rayleigh and 
Mie scattering into account one is able to calculate
the effect of absorption in the atmosphere. 
The next step in the simulation is the reflection of 
the Cherenkov photons on the mirrors. Therefore one
has to define in that step the pointing of the 
telescope. Each photon hitting one of the mirrors will
be tracked to the camera plane. Here we take an 
reflectivity of around 90\% into account. 
All Cherenkov photons reaching the camera plane will be
stored.  

\subsection{camera simulation}

The camera simulates the behaviour of the PMTs and the
electronics of the trigger and FADC system. After the 
pixelisation we take the wavelength dependent quantum
efficiency (QE) for each PMT into account. 
In figure \ref{fig_qe} 
the QE of a typical MAGIC  PMT is shown. 
%
%
%
\begin{figure}[hb]
 \vspace*{2.0mm} % just in case for shifting the figure slightly down
 \includegraphics[width=8.3cm]{qe_123.eps} % .eps for Latex,
                                            % pdfLatex allows .pdf, .jpg, .png and .tif
 \caption{quantum efficency of the PMT for pixel 123}
 \label{fig_qe}
\end{figure}
%
%
%
For each photo electron (PE) leaving the photo cathod we
generate a "standard" response function that we add to 
the analog signal of that PMT - seperatly for the 
trigger and the FADC system. 
At the present these response function are gaussians with
a given width. 
The amplitude of the response function is randomized 
by using the function of figure \ref{fig_ampl}. 
By superimpose all photons of one pixel an by taking
the arrival time into account we get the response 
of the trigger and FADC system for that pixel (see
also figure \ref{fig_starlight}). 
This is done for all pixels in the camera. 

Then the simulation of the trigger electronic is applied. 
We look in the generated analog signal if the discriminator
threshold is achieved. If yes we will create a digital output
signal for that pixels. Then we decided if a first level trigger
occurs by looking for next neighbour (NN)conditions at a given
time. If a given NN condition (Multiplicity, Topology, ...) 
is fullfilled, a first level trigger is generated and the 
content of the FADC system is written to disk. An triggered
event is generated. 
%
%
%
\begin{figure}[t]
 \vspace*{2.0mm} % just in case for shifting the figure slightly down
 \includegraphics[width=8.3cm]{ampldist.eps} % .eps for Latex,
                                            % pdfLatex allows .pdf, .jpg, .png and .tif
 \caption{The distibution of amplitude of the standard response function.}
 \label{fig_ampl}
\end{figure}
%
%
%


\section{Results}

\subsection{Trigger studies}

\subsubsection{Collection area}

\subsubsection{Threshold of MAGIC telescope}

\subsubsection{Expected rates}

\section{Conclusion}

\begin{acknowledgements}
Acknow text.
\end{acknowledgements}

\appendix

\section{Appendix section 1}

Text in appendix.

\begin{thebibliography}{99}

\bibitem[Heck and Knapp(1995)]{hk95}
Heck, D. and Knapp J., CORSIKA Manual, 1995.

\bibitem[Abramovitz and Stegun(1964)]{as64}
Abramowitz, M. and Stegun, I. A., Handbook of Mathematical Functions,
U. S. Govt. Printing Office, Washington D. C., 1964.

\bibitem[Aref(1983)]{a83}
Aref, H., Integrable, chaotic, and turbulent vortex motion in
two-dimensional flows, Ann. Rev. Fluid Mech., 15, 345--389, 1983.

\end{thebibliography}

\end{document}
