
\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{Detailed Monte Carlo studies for the MAGIC telescope}
\author[1]{O. Blanch}
\affil[1]{IFAE, Barcelona, Spain}
\author[2]{J.C.  Gonzalez}
\affil[2]{Universidad Complutense Madrid, Spain}
\author[3]{H. Kornmayer}
\affil[3]{Max-Planck-Institut f\"ur Physik, M\"unchen, Germany}
\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 $17~\mathrm{m}$ diameter
Che\-ren\-kov telescope called MAGIC \cite{mc98}
will be finished. The aim of this
detector is the observation of $\gamma$-ray sources in the 
energy region above $\approx 10~\mathrm{GeV}$. 
The size of the telesope mirrors 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 will be started 
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 the lowest threshold 
is aimed. 
For a better understanding of the MAGIC telescope and its different 
systems (trigger, FADC) a detailed Monte Carlo (MC) study is 
neccessary. 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. 
Investigations are neccessary to invent methods which allows to 
reduce the effect of the light from stars. The methods can be
tested before the MAGIC telescope exists by using monte carlo
data. 


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 following 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 5.20. 
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. 
The trigger probality for hadronic showers with 
a big impact parameter $I$ is not negliable. 
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$  &  $\approx 5 \cdot 10^5$ &  $\approx 5 \cdot 10^5$ \\
  	$\Theta = 5^\circ$  &  $\approx 5 \cdot 10^5$ & $\approx 5 \cdot 10^5$  \\
  	$\Theta = 10^\circ$ &  $\approx 5 \cdot 10^5$ & $\approx 5 \cdot 10^5$  \\
  	$\Theta = 15^\circ$ &  $\approx 2 \cdot 10^6$    &  $\approx 5 \cdot 10^6$  \\
  	$\Theta = 20^\circ$ &  production   &  production  \\
  	$\Theta = 25^\circ$ &  production   &  production  \\
    \hline
  \end{tabular}
\end{center}
\caption {Number of generated showers}
\label{tab_showers}
\end{table}
%
%
%
For each simulated shower all
Cherenkov photons hitting the ground at observation level 
close to the telescope position are stored.

\subsection{atmospheric and mirror simulation}

The output of the air shower simualition is used 
as the input to the mirror simulation. 
First the absorption in the atmosphere is taken into
account. 
By knowing the height of production and the 
wavelength of each Cherenkov photen it is possible
to calculate the effect of Rayleigh and Mie scattering. 
The second step is the simulation of the mirror dish. 
We assume a reflectivity of the mirrors of around 90\%. 
Each Cherenkov photon hitting one mirror is tracked back
to the camera plane of the telescope. This procedure 
depends on the orientation of the telescope to the 
shower axis. 
All Cherenkov photons reaching the camera plane will be
keeped for the next simulation program.  

\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 distribution of figure \ref{fig_ampl}. 
By superimposing all photons of one pixel and by taking
the arrival time into account the response 
of the trigger and FADC system for that pixel is generated
(see also figure \ref{fig_starresp}). 
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. In that case a digital output
signal of a given length (We use in that study a gate length of 6
nsec.)
for that pixels. 
By checking next neighbour conditions (NN) at a given time
the first level trigger is simulated. 
If a given NN condition (Multiplicity, Topology, ...) 
is fullfilled, a first level trigger signal is generated and 
the 
content of the FADC system is written to disk. 
%
%
%
\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}
%
%
%

\subsection{starlight simulation}

Due to the big mirror surface the light from the stars around 
the position of an expected gamma ray source is contributing to 
the noise in the camera. We developed a program that allows us
to simulate the star light together with the generated showers. 
This program takes all stars in the field of view of the camera
around chosen sky region. The light of these stars is track up to 
the camera taking the frequency of the light into account.
After simulating the response of the photo cathode, we
get the number of emitted photo electrons per pixel and 
time.

These number is used to generate a noise signal for all the pixels. 
%
%
%
\begin{figure}[h]
 \vspace*{2.0mm} % just in case for shifting the figure slightly down
 \includegraphics[width=8.3cm]{signal.eps} % .eps for Latex,
                                            % pdfLatex allows .pdf, .jpg, .png and .tif
 \caption{The response of a pixel due to a star with magnitude
 $m=7$ in the field of view. On the left plot the response of the
 trigger system is plotted while on the right plot the content in the
 FADC system is shown.}
 \label{fig_starresp}
\end{figure}
%
%
%
In figure \ref{fig_starresp} the response of the trigger and the 
FADC system can be seen for one pixel with a star of 
magnitude $m = 7$.
These stars are typical, because there will 
be always one $7^m$ star in the trigger area of the camera.


\section{Results}



\subsection{Trigger studies}

The MC data produced are used to calculate some important
parameter of the MAGIC telescope on the level of the 
trigger system. 
The trigger system build up will consist of different 
trigger levels. The discriminator of each channel is called the 
zero-level-trigger. For a given signal each discriminator will 
produce a digital output signal of a given length. So the important
parameters of such an system are the threshold of each discriminator
and the length of the digital output. 

The first-level-trigger is looking in the digital output of the 
271 pixels of the trigger system for next neighbor (NN) conditions.  
The adjustable settings on the first-level-trigger 
are the mulitiplicity, the topology and the minimum required 
overlapping time. 

The second-level-trigger of the MAGIC telescope will be a 
pattern-recognition method. This part is still in the design 
phase. All results presented here are based on studies of the
first-level-trigger.
 
\subsubsection{Collection area}

The trigger collection area is defined as the integral 
\begin{equation} 
  A(E,\Theta)  = \int_{F}{ T(E,\Theta,F) dF}
\end{equation} 
where T is the trigger probablity. F is perpendicular to 
the shower axis. The results for different zenith angle $\Theta$ and
for different discriminator thresholds are shown in figure
\ref{fig_collarea}.
%
%
%
\begin{figure}[h]
 \vspace*{2.0mm} % just in case for shifting the figure slightly down
 \includegraphics[width=8.3cm]{collarea.eps} % .eps for Latex,
                                            % pdfLatex allows .pdf, .jpg, .png and .tif
 \caption{The trigger collection area for gamma showers as a function
 of energy $E$.}
 \label{fig_collarea}
\end{figure}
%
%
%
As bigger the zenith angle the smaller becomes the collection area 
for lower energies. As bigger the discriminator threshold is set, as
lower is the trigger collection area for low energies. 
 

\subsubsection{Threshold of MAGIC telescope}

The threshold of the MAGIC telesope is defined as the peak 
in the $dN/dE$ distribution. For all different trigger settings
this value is determined. The energy threshold could 
depend among other variables on the Background simulated conditions, 
the threshold of the trigger discriminator and the zenith angle. We 
check the influence of the three above-mentioned variables.

For both, gammas and protons, some different background conditions 
have been simulated (without any background light, diffuse light, 
and light from Crab Nebula field of view). The results pointed out 
that there is not any variation of the energy threshold inside our 
error, which is few GeV, in determining the maximum. It is 
worth to remember that this is based only in first level trigger. 
Most likely there will be some effects when one enters the second 
level trigger and the shower reconstruction.

Magic will do observations in a large range of zenith angles, 
therefore is worth to study the energy threshold as function of 
the zenith angle. In figure \ref{fig_enerthres}, it is shown for 0, 5 
and 10 degrees. Even though larger statistic is needed, the energy 
threshold increases slowly with the zenith angle.
\begin{figure}[hb]
 \vspace*{2.0mm} % just in case for shifting the figure slightly down
 \includegraphics[width=8.3cm]{enerthres.eps} % .eps for Latex,
                                            % pdfLatex allows .pdf, .jpg, .png and .tif
 \caption{On the left upper plot the Energy Threshold for diffrent zenith angles is plotted while on the left bottom plot the Energy Threshold is plotted for several values of the trigger discriminator threshold. On the right plot a characteristic fit for $dN/dE$ is shown (for showers at $10^\circ$ with discriminator at 4 mV and diffuse NSB of 0.09 photo electrons per ns and pixel)}
 \label{fig_enerthres}
\end{figure}

If one lowers the threshold of the trigger discriminator, then less 
photons in the camera plane are needed to trigger the Telescope. 
And it helps the low energy showers to fulfil the required trigger 
conditions. In figure  \ref{fig_enerthres} one can see that the threshold 
energy decreases  while lowering the discriminator. It is 29 GeV for 3 mV 
and 105 GeV  for 7 mV. Since one of the aims of the Telescope is lowering as 
much as possible the energy threshold, a low discriminator value is 
preferred. But for 3 mV the expected rate due to protons increases a 
lot (see section ~\ref{sec-rates}), while it keeps under control at 4 mV. 
Therefore, the threshold of the discriminator would be kept above 
4 mV, which yields a energy threshold of 45 GeV.

\subsubsection{Expected rates}\label{sec-rates}

Using the monte carlo data sample, it is possible to estimate 
the expected rates from 


\section{Conclusion}

\begin{acknowledgements}
The authors thanks all the members of the MAGIC collaboration
for their support in production of the big amount of simulated data. 
\end{acknowledgements}

%\appendix
%
%\section{Appendix section 1}
%
%Text in appendix.
%

\begin{thebibliography}{99}

\bibitem[(MAGIC Collaboration 1998)]{mc98}
MAGIC Collaboration, "The MAGIC Telescope, Design Study for
the Construction of a 17m Cherenkov Telescope for Gamma 
Astronomy Above 10 GeV", Preprint MPI-PhE?18-5, March 1998.

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