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

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 an 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 gammas and of hadrons is done with
the CORSIKA program, version 5.20. 
For the simulation of had\-ro\-nic 
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 $) at fixed azimuth angel $\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. 
The trigger probability for hadronic showers with 
a big impact parameter $I$ is not Englisch 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 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 a horizontal plane at 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. 
By knowing the height of production and the 
wavelength of each Cherenkov photon the effect of Rayleigh 
and Mie scattering is calculated.
Next the reflection at the mirrors is simulated.  
We assume a reflectivity of the mirrors of around 90\%. 
Each Cherenkov photon hitting one mirror is propagated 
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
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 of 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 generated
(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 
level. 
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 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 up to 
$10^m$ stars. 
These stars will contribute locally to the noise in the 
camera and have to be taken into account. 
We developed a program that allows us
to simulate the star light together with the generated showers. 
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 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 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 are based on studies of the
first-level-trigger. If not mentioned somewhere else, 
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{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 a plane perpendicular
 to the shower axis. 
The results for different zenith angle $\Theta$ and
for different discriminator thresholds are shown in figure
\ref{fig_collarea}.
At low energies ($ E < 100 ~\mathrm{GeV}$), the 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 trigger collection area for gamma showers as a function
 of energy $E$.}
 \label{fig_collarea}
\end{figure}
%
%
%
increasing diskriminator threshold. 
 

\subsubsection{Threshold of MAGIC telescope}

The threshold of the MAGIC telesope is defined as the peak 
in the $dN/dE$ distribution for triggered showers. 
For all different trigger settings
this value is determined. 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 influence of 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. 
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 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 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 from proton showers and background light. 

The numbers quoted in this section are calcuated for a zenith angle
$\Theta = 10^o$. Same studies have been done for $\Theta =0^o$ and 
for $\Theta = 15^o$ and we got similar results. 
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 would increase due to other hadron showers (He, Li, ...) which 
we have not simulated yet. About 25 \% larger rate is expected due mainly 
to He. 

However, to get a more reliable rate one must take into account 
a realistic background situation. We take for the diffuse part of the
night sky background a value of 0.09 photo electrons per ns
\citep{ml94} 
and use the star field around the Crab nebula.
Under this 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 from 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 for the other values.
\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}

These results show that the MAGIC telesope will use a disriminator
threshold of about 4 mV. This value corresponds to a threshold of
about 8 photo electrons. 

It has to be mentioned here, that all the results here are based on 
the first level trigger. There is a big potiential to optimize the 
settings here. 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. 


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


