
\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{O.Blanch blanch@ifae.es), H. Kornmayer (h.kornmayer@web.de)}
\affil[ ]{ }
\affil[ ]{\large (for the MAGIC Collaboration)}



\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 understanding the performance of the MAGIC telescope a detailed 
simulation of air showers and of the detector response are
indispensable. Such a simulation must take into account the development
of the 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 is presented. 
\end{abstract}

\section{Introduction}

The $17~\mathrm{m}$ diameter
Che\-ren\-kov telescope called MAGIC 
is presently in the construction stage \cite{mc98}. 
The aim of this
detector is the observation of $\gamma$-ray sources in the 
energy region above $\approx 30~\mathrm{GeV}$ in its first phase. 
The air showers induced by cosmic ray particles (hadrons and gammas) 
will be detected with a "classical" camera consisting of 576
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 primary goal of the trigger system is the selction of showers. 
For a better understanding of the MAGIC telescope and its different 
systems (trigger, FADC) a detailed Monte Carlo (MC) study is 
neccessary. Such a study has to take into account the simulation
of the air showers, the effect of absorption in the atmosphere, the 
behaviour of the PMTs and the response of the trigger and FADC
system.
 
An important issue for a big telescope like MAGIC 
is the light of the night sky. 
There will be around 50 stars with magnitude $m \le 9$ in the 
field of view of the camera. 
Methods have to be developed which allow to 
reduce the biases introduced by the presence of stars. 
The methods can be tested by using Monte Carlo data. 


Here we present the first results of such an investigation. 

\section{Generation of MC data samples} 

The simulation is done in several steps: 
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 
the various steps are described in more details. 

\subsection{Air shower simulation}

The simulation of gamma and of hadron showers in the 
atmosphere is done with
the CORSIKA program, version 5.20. 
As the had\-ro\-nic interaction model  
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 $) at fixed azimuthal angle $\Phi$. 
Gammas are assumed to originate from point sources 
in the direction ($\Theta$,$\Phi$)
whereas the hadrons are simulated isotropically
around the given ($\Theta$,$\Phi$) direction in a
region of the solid angle corresponding to the FOV 
of the camera. 
The trigger probability for hadronic showers with 
a large impact parameter $I$ is not negligible. 
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 1 \cdot 10^6$ \\
  	$\Theta = 5^\circ$  &  $\approx 5 \cdot 10^5$ & $\approx 1 \cdot 10^6$  \\
  	$\Theta = 10^\circ$ &  $\approx 5 \cdot 10^5$ & $\approx 1 \cdot 10^6$  \\
  	$\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 a horizontal plane at the 
observation level 
close to the telescope position are stored.

\subsection{Atmospheric and mirror simulation}

The output of the air shower simulation is used 
as the input to this step. 
First the absorption in the atmosphere is taken into
account. 
Using the height of production and the 
wavelength of each Cherenkov photon the effects of Rayleigh 
and Mie scattering are calculated.
Next the reflection at the mirrors is simulated.  
We assume a reflectivity of the mirrors of around 85\%. 
Each Cherenkov photon hitting a mirror is propagated 
to the camera plane of the telescope. This procedure 
depends on the orientation of the telescope relative 
to the shower axis. 
All Cherenkov photons reaching the camera plane will be
kept for the next simulation step. 

\subsection{Camera simulation}

The simulation comprises the behaviour of the PMTs and the
electronics of the trigger and FADC system. 
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 cathode we
use a "standard" response function to generate  
the analog signal of that PMT - separatly for the 
trigger and the FADC system. 
At present these response functions are gaussians with
a given width in time. 
The amplitude of the response function is chosen randomly
according to the distribution shown in figure \ref{fig_ampl}
(\cite{ml97}).
 
By superimposing all photons of one pixel and by taking
the arrival times into account the response 
of the trigger and FADC system for that pixel is computed
(see also figure \ref{fig_starresp}). 
This is done for all pixels in the camera. 

The simulation of the trigger electronic starts by checking 
whether the generated analog signal exceeds the discriminator 
threshold. 
In that case a digital output
signal of a given length (6 nsec.)
for that pixels is generated. 
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 the amplitude of the standard response
 function to single photo electrons.}
 \label{fig_ampl}
\end{figure}
%
%
%

\subsection{Starlight simulation}

Due to the big mirror area MAGIC will be sensitive to stars up to a
magnitude of 10. 
These stars will contribute locally to the noise in the 
camera and have to be taken into account. 
A program that allows to simulate the star light together 
with the generated showers has been developed. 
This program considers all stars in the field of view of the camera
around a chosen direction. The light of these stars is traced up to 
the camera taking the wavelength 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 are 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 analog signal that goes into
 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 a pixel with a star of 
magnitude $m = 7$.
These stars are typical, because there will 
be on average one $7^m$ star in the trigger area of the camera.


\section{Results}



\subsection{Trigger studies}

The trigger system will consist of different 
trigger levels. 
The discriminator of each channel is called the 
zero-level-trigger. 
If a given signal exceeds the discriminator threshold 
a digital output signal of a given length is produced. 
So the important parameters of such a system are the 
threshold of each discriminator and the length of the 
digital output. 

The first-level-trigger checks in the digital output of the 
271 pixels of the trigger system for next neighbor (NN) 
conditions.  
The adjustable settings of 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 based 
on a pattern-recognition method. 
This part is still in the design phase. 
All results presented here refer to the
first-level-trigger. If not stated explicitly otherwise, 
the MC data are produced with "standard"
values (discriminator threshold = 4 mV, gate length = 6 nsec, 
multiplicity = 4, topology of NN = {\sl closed package}). 


 
\subsubsection{Effective trigger collection area}



The effective 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 a plane perpendicular
 to the telescope axis. 
The results for different zenith angles $\Theta$ and
for different discriminator thresholds are shown in figure
\ref{fig_collarea}.
At low energies ($ E < 100 ~\mathrm{GeV}$), the effective trigger collection 
area decreases with increasing zenith angle , and it decreases with 
%
%
%
\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 effective trigger collection area for gamma showers as a function
 of energy $E$.}
 \label{fig_collarea}
\end{figure}
%
%
%
increasing discriminator threshold. 
 

\subsubsection{Energy threshold}

The threshold of the MAGIC telescope is defined as the peak 
in the $dN/dE$ distribution for triggered showers. 
This value is determined 
for all different trigger settings. 
The energy threshold could 
depend among other variables on the background conditions, 
the threshold of the trigger discriminator and the zenith angle. We 
check the dependence on these three 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). 
No significant variation of the energy threshold is observed. 
It should be stressed that this is based only on first level 
triggers. 
Most likely some effects will be seen after the second 
level trigger and the shower reconstruction.

MAGIC will do observations in a large range of zenith angles, 
therefore it is worth studying the energy threshold as function of 
the zenith angle (see figure \ref{fig_enerthres}). 
Even though larger statistic is needed, the energy 
threshold increases slowly with the zenith angle, as expected.
\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 when lowering the discriminator threshold. 
It is 29 GeV for 3 mV and 105 GeV  for 7 mV. 
Since we are aiming for a low energy threshold, 
a low discriminator value is  preferred. 
However, for 3 mV the expected rate due to protons together with night 
sky background light increases a 
lot (see section ~\ref{sec-rates}), while it is kept
under control at 4 mV. 
Therefore, the threshold of the discriminator should be kept 
around 4 mV, which yields an 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 for proton showers  taking into account the 
background light. 

The numbers quoted in this section are calcuated for a zenith angle
of $10^\circ$. 
The results for $0^o$ and $15^o$ were found to be similar. 
We estimated the rate for the first level trigger
with the "standard" trigger conditions.  
The first level trigger rate due to proton showers without any
background is $143 \pm 11~\mathrm{Hz}$. 
This rate will increase by $\approx 25$\% if heavier nuclei (He,
Li,...) are included. 
 

However, to get a more reliable rate one must take into account 
a realistic background situation. 
From the total mirror area, the integration time, the FOV of a pixel
and the QE of the PMTs one obtains a value of 0.09 photo electrons per
ns and pixel \citep{ml94} due to the diffuse night sky background. 
Added to this are the contributions from the star field around the
Crab nebula. 
Under these more realistic conditions the first level trigger
background rate (protons and light of night sky) is $396 \pm 88$ Hz. 

The dependence of the first level trigger rate on the discriminator 
threshold is shown in figure \ref{fig_rates}.  
The trigger rate decreases 
with increasing discriminator threshold as expected. 
The rate for the discriminator threshold of 3 mV is more than 100 
times larger than that for higher thresholds.
\begin{figure}[hb]
 \vspace*{2.0mm} % just in case for shifting the figure slightly down
 \includegraphics[width=8.3cm]{rates.eps} % .eps for Latex,
                                            % pdfLatex allows .pdf, .jpg, .png and .tif
 \caption{Estimated trigger rates as a function of trigger discriminator for $10^\circ$ zenith angle with 0.09 photo electrons of diffuse NSB and the Crab Nebula star field.}
 \label{fig_rates}
\end{figure}

Some improvement in the trigger rate reduction is needed to lower the 
discriminator that the MAGIC telescope will use, below 4 mV. This value 
corresponds to a threshold of about 8 photo electrons. 

It has to be stressed, that these results are based on 
the first level trigger. There is a big potential in optimizing the 
settings. I.e. the background rate can be reduced by
increasing the discriminator threshold for a few dedicated pixels,
that have a star in their field of view. Studies in this direction are
ongoing and will be presented on the conference. 

\section{Conclusion}

We presented the actual status of Monte Carlo simulation for the MAGIC
telescope. The first level trigger rate for the background is for a
discriminator threshold of 4~mV well below the maximal trigger rate
(1000 Hz) that the MAGIC daq system will be able to handle. 
For these standard settings the energy threshold is around 45 GeV. 
There is a potential in optimizing the trigger system and studies in
this direction are ongoing. Also the development of the
second-level-trigger is in progress. This should allow to lower the
threshold and achieve the aim of 30 GeV for the energy threshold. 
The MAGIC collaboration is presently simulating air showers with 
higher zenith angles. 
The newest results will be presented on
the conference. 


\begin{acknowledgements}
The authors thanks all the "simulators" of the MAGIC collaboration
for their support in the production of the big amount of Monte Carlo
data. The support of MAGIC by the BMBF (Germany) and the CYCIT (Spain) 
is acknowledged. 


\end{acknowledgements}

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

\begin{thebibliography}{99}

\bibitem[(MAGIC 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[Mirzoyan and Lorenz(1997)]{ml97}
Mirzoyan R. and E. Lorenz, Proc. 25th ICRC, Durban, 7, p.356, 1997

\bibitem[Mirzoyan and Lorenz(1994)]{ml94}
Mirzoyan R. and E. Lorenz, Measurement of the night sky light background 
at La Palma, Max-Planck-Institut report MPI-PhE/94-35

\end{thebibliography}

\end{document}

