Index: trunk/MagicSoft/Simulation/Detector/ReflectorII/doc/Tdas0211.tex
===================================================================
--- trunk/MagicSoft/Simulation/Detector/ReflectorII/doc/Tdas0211.tex	(revision 1672)
+++ trunk/MagicSoft/Simulation/Detector/ReflectorII/doc/Tdas0211.tex	(revision 1722)
@@ -33,4 +33,5 @@
 
 \usepackage{magic-tdas}
+\usepackage{amssymb}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -46,6 +47,6 @@
 \author{A.Moralejo\\ 
 	\texttt{<moralejo@pd.infn.it>}} 
-\date{December 6, 2002\\}
-\TDAScode{MAGIC-TDAS 02-11\\ 021206/AMoralejo}
+\date{January 20, 2003\\}
+\TDAScode{MAGIC-TDAS 02-11\\ 030120/AMoralejo}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -61,6 +62,17 @@
 been included here for clarity. Two important bugs regarding the
 ray-tracing routine have been corrected in this new version.
+\par
+NOTE: In December 2002, a first release of Reflector 0.6 was made,
+together with a first version of the present TDAS note. Immediately
+after that (too short a time to justify a new version number), some
+other changes were implemented in the program to improve the
+atmospheric absorption routines, and the dependence of mirror
+reflectivity with wavelength was introduced. This document is the
+manual of the final 0.6 version of the reflector, including
+explanations of these last modifications.
+
 \end{abstract}
 
+\newpage
 %% contents %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \thetableofcontents
@@ -161,5 +173,5 @@
 see the resulting spot in fig. \ref{spot_inf_f1697}. A completely
 independent ray-tracing program was used to verify that this is the
-spot that our 17 m tesellated paraboloid should produce.
+spot that a f/1 16.97 m $\varnothing$ tesellated paraboloid should produce.
 %
 \begin{figure}[h]
@@ -182,6 +194,6 @@
 possible mirror misalignments and surface irregularities (by the way,
 a feature which somehow optimistically was not included in the
-simulations shown in the proposal). In this way we can check just the
-ray tracing.
+simulations shown in the MAGIC proposal). In this way we can check
+just the ray tracing.
 %
 \begin{figure}[h!]
@@ -242,6 +254,8 @@
 intended, and looks more like an error, but anyway we checked that this
 was not the reason for the problems in the ray tracing: a test
-magic.def file was created with all parameters calculated as for a f =
-1697 cm paraboloid, and no significant difference could be seen. That
+magic.def file was created with {\it all} the mirror parameters
+(positions, orientations and radii of curvature)
+calculated as for a f = 1697 cm paraboloid, and no significant
+difference could be seen. That 
 is: i) the individual mirror orientations are the dominant factor, and
 the overall dish in the old reflector behaved indeed like a f = 1697
@@ -288,5 +302,5 @@
 determine the particle's trajectory as long as one knows that they
 refer to a downgoing versor, in which case one gets the third
-direction cosine as $w = -\sqrt{u^2+v^2}$, with a minus sign. However,
+direction cosine as $w = -\sqrt{1-u^2-v^2}$, with a minus sign. However,
 in {\it ph2cph.c} we found exactly the opposite (lines 116 to 118 in
 v.05):
@@ -341,5 +355,5 @@
 The general transformation between both is a simple rotation,
 since for the sake of simplicity we assume in the simulation that the
-origins always coincide. In Reflector v.05 or older the rotation
+origins always coincide. As we have said, in Reflector v.05 or older the rotation
 matrix was wrong: it had been written assuming that ($\Phi$, $\Theta$)
 indicated the direction towards which the telescope pointed. Actually,
@@ -383,6 +397,6 @@
 The bug was certainly present in versions 0.4 and 0.5, but may be even
 older. Nevertheless, there is no doubt that the reflector program used
-for the simulation shown in the MAGIC design report (which must have been
-an early version of the present one) was working fine. Extensive proof
+for the simulation shown in the MAGIC design report was working
+fine. Extensive proof 
 of this is provided in an appendix of the design report. A plausible
 explanation could be that, up to some date, the data being read in by
@@ -395,7 +409,7 @@
 file shows no record of any change in this respect, but given that we
 have always used a slightly modified Corsika, it would not be
-surprising if the Cherenkov output was modified at some point. There
-is no documentation on this, so if anyone has any relevant information,
-please make it public.
+surprising if the Cherenkov output was modified at some point in the
+MAGIC version of Corsika (MMCS). There is no documentation on this, so
+if anyone has any relevant information, please make it public.
 %
 \paragraph {Influence of the bug on image analysis\\}
@@ -413,5 +427,43 @@
 dramatic effect than the defocusing which the bug was producing.
 %
+\subsection {Performance of ray-tracing in the new version}
+In figure \ref{coma} we show the images of a point-like source at 10
+km from the telescope, produced with the Reflector version 0.6,
+and using the new version of the magic.def file (see see next
+section). No noise has been introduced in the reflection, the observed
+spots are just the result of optical aberrations. The light source has
+been put at slightly different viewing angles
+from the telescope. The results are comparable to those in the design
+report, actually these are a bit better, the difference probably being
+that the focal lengths of the mirror tiles in the older magic.def file
+were discretized in only eight values, while now they change rather
+continuously. Some images of a point source at infinity (a star) can be
+seen in fig. \ref{coma_star}. We can see that for any incidence angle,
+the area within which 50$\%$ of the light is concentrated is smaller
+than that of a small pixel.
+\par
+In figure \ref{refl06images} the images of three gamma events ($\theta
+= 10^\circ$, E = 16, 46, 232 GeV), the same of fig. \ref{evcompare}
+are shown. They have been produced with Reflector 0.6 assuming perfect
+spherical mirrors (left) and realistic ones (right). The images look
+reasonable, much sharper than with the older versions, even when the
+mirror imperfections are taken into account.
+%
+\begin{figure}[h!]
+  \begin{center}
+    \epsfig{file=eps/timing.eps,width=\textwidth}
+    \caption{Test of reflector isochrony. The arrival time
+distributions of photons in the camera are shown for (buggy) Reflector
+0.5 and for Reflector 0.6. The sketch in the center shows the test for
+the case in which the light beam is paralel to the telescope axis
+(left plot). On the right, the same test has been made with light
+arriving 1 degree off axis.
+ \label{timing}}
+  \end{center} 
+\vspace*{-1cm}
+\end{figure}
+%
 \subsection {Second bug: photon timing}
+%
 After a first release of Reflector 0.6 had been made public, another
 important bug was found. We tried to check whether the simulated
@@ -438,41 +490,34 @@
 from scratch!).
 %
-\begin{figure}[h]
+\subsection{The new magic.def file}
+A new magic.def file (see sect. \ref{neededfiles}) has been created
+and included in the Reflector 0.6 package. Now the number of
+individual mirror tiles is 956, matching 
+the number and distribution of the final MAGIC design. The mirror
+centers and orientations are those corresponding to a paraboloid of
+1697 cm focal (hence the camera plane is placed at 1700 cm from the
+dish). The focal lengths have been calculated by R. Mirzoyan taking
+into account the so called ``shortening effect'' (see design report).
+A new axisdev.dat file (se again \ref{neededfiles}) with data for the
+956 mirrors is also included.
+%
+\subsection{The new reflectivity.dat file}
+Up to version 0.5 of the program, the reflectivity of the mirrors
+(which the program reads in from the file reflectivity.dat) was
+considered to be equal to $90\%$ for all wavelengths. Following
+measurements performed in Padua of a mirror sample, the reflectivity
+has been found to be between 80 and 90$\%$ in the range from 280 to 650 nm,
+with a dependence on wavelength which is shown in figure \ref{reflec}.
+%
+\begin{figure}[h!]
   \begin{center}
-    \epsfig{file=eps/timing.eps,width=\textwidth}
-    \caption{Test of reflector isochrony. The arrival time
-distributions of photons in the camera are shown for (buggy) Reflector
-0.5 and for Reflector 0.6. The sketch in the center shows the test for
-the case in which the light beam is paralel to the telescope axis
-(left plot). On the right, the same test has been made with light
-arriving 1 degree off axis.
- \label{timing}}
+    \epsfig{file=eps/reflec.eps,width=0.7\textwidth,height=0.4\textwidth}
+    \caption{Reflectivity of the MAGIC telescope mirrors as a
+function of the wavelength of the incident light. The dip around 350
+nm is due to destructive interference of the light reflected on the
+aluminum plate with that reflected on the protective coating of the
+mirror. \label{reflec}}
   \end{center} 
-\vspace*{-1cm}
-\end{figure}
-
-\subsection {Performance of the new version}
-In figure \ref{coma} we show the images of a point-like source at 10
-km from the telescope, produced with the Reflector version 0.6,
-and using the new version of the magic.def file (see see next
-section). No noise has been introduced in the reflection, the observed
-spots are just the result of optical aberrations. The light source has
-been put at slightly different viewing angles
-from the telescope. The results are comparable to those in the design
-report, actually these are a bit better, the difference probably being
-that the focal lengths of the mirror tiles in the older magic.def file
-were discretized in only eight values, while now they change rather
-continuously. Some images of a point source at infinity (a star) can be
-seen in fig. \ref{coma_star}. We can see that for any incidence angle,
-the area within which 50$\%$ of the light is concentrated is smaller
-than that of a small pixel.
-\par
-In figure \ref{refl06images} the images of three gamma events ($\theta
-= 10^\circ$, E = 16, 46, 232 GeV), the same of fig. \ref{evcompare}
-are shown. They have been produced with Reflector 0.6 assuming perfect
-spherical mirrors (left) and realistic ones (right). The images look
-reasonable, much sharper than with the older versions, even when the
-mirror imperfections are taken into account.
-\par
+\end{figure}
 %
 \begin{figure}[p]
@@ -515,16 +560,4 @@
 \end{figure}
 %
-\subsection{The new magic.def file}
-A new magic.def file (see sect. \ref{neededfiles}) has been created
-and included in the Reflector 0.6 package. Now the number of
-individual mirror tiles is 956, matching 
-the number and distribution of the final MAGIC design. The mirror
-centers and orientations are those corresponding to a paraboloid of
-1697 cm focal (hence the camera plane is placed at 1700 cm from the
-dish). The focal lengths have been calculated by R. Mirzoyan taking
-into account the so called ``shortening effect'' (see design report).
-A new axisdev.dat file (se again \ref{neededfiles}) with data for the
-956 mirrors is also included.
-%
 \subsection{The {\itshape cermaker} program}
 A test program to produce cer files (input for the reflector)
@@ -539,4 +572,52 @@
 file is called {\it cer000001}, and can be read by the reflector program.
 %
+\subsection{Changes in the atmospheric absorption routines}
+%
+In the present version of the program, the simulation of atmospheric
+absorption has undergone major changes with respect to the original
+implementation by J.C. Gonz\'alez and Aitor Ibarra. Three options are
+available in the simulation: ATM\_NOATMOSPHERE, ATM\_90PERCENT and
+ATM\_CORSIKA (see section \ref{commands}). In the 
+first two, 100$\%$ and 90$\%$ of the emitted light respectively
+reaches the telescope mirror, regardless of the emission height. The
+changes in the present version affect only the third option, which is
+the recommended one for running reflector in the standard MAGIC MC
+production. In this case, a detailed estimate of the atmospheric 
+transmission is done. 
+\par
+Three contributions to the atmospheric opacity
+are considered: Rayleigh scattering, Mie scattering by aerosols, and
+absorption by ozone. Details on how the effect of these three
+components is calculated are given in appendix A. In reflector
+versions older than 0.6,
+due to a bug, the contribution of Mie scattering and Ozone absorption
+was slightly overestimated because the vertical height of the emission
+point above sea level was interpreted as height above the
+telescope. The difference is small, since the density of the aerosols
+responsible for Mie scattering decreases very fast with height and
+therefore the absorption is hardly increased by going up 2.2 km in the
+region were most of the Cherenkov light is produced. In the case of
+ozone, its contribution is only important in the very low end of the
+Cherenkov light spectrum, and so the effect of the bug in the total
+amount of light reaching the telescope is negligible. Another change
+is that now the observation level is read in from the cer file, instead
+of being a fixed parameter in the routines. In this way the reflector
+program has become more flexible, and can now be used to process cer
+files produced for a detector at a different observation level.
+\par
+Another problem in the old implementation of absorption was that the
+variation of the optical depth of the atmosphere with the zenith angle
+$\theta$ was assumed to be the same for Mie scattering, ozone
+absorption and Rayleigh scattering: the so called {\it air
+mass} (see appendix A for details) was therefore calculated only once,
+using the overall density profile of air molecules (which does not
+match that of aerosols or ozone), and used to account for the
+variation of all three effects with $\theta$, while rigorously
+speaking it is only valid for Rayleigh scattering. Now, the simulation
+of Mie scattering and ozone absorption has been moved from {\it
+attenu.f} to {\it atm.c} and is done in a more accurate way which
+takes into account the vertical profile of aerosols and ozone (see
+appendix A for details).
+%
 \subsection{Other changes in Reflector 0.6}
 
@@ -557,7 +638,11 @@
 section \ref{opt}).
 
-\item New output format (see sect. \ref{out}): added a Run header,
-which is like that of Corsika, plus a couple of variables concerning
-the reflector parameters: the wobble mode and the atmospheric model
+\item New output format (see sect. \ref{out}): we have removed a null
+byte that was written immediately after the ascii label containing the
+reflector program version number at the begining of the file. This
+byte was there for historical reasons and had no function
+whatsoever. Then we have added a Run header, which is like that of
+Corsika, plus a couple of variables concerning the reflector
+parameters: the wobble mode and the atmospheric model 
 used for the simulation. The event header has also been changed to
 include all the information present in the Corsika event
@@ -634,7 +719,8 @@
 \end{itemize}
 
-All these files are usually in the {\bf
-MagicProgs/Simulation/Detector/Data/} directory and {\it in principle} you
-should {\bf not} make any change in them to run the program.
+All these files (included in the reflector package) are usually kept
+in the {\bf MagicProgs/Simulation/Detector/Data/} directory and {\it
+in principle} you should {\bf not} make any change in them to run the
+program.
 
 %------------------------------------------------------------
@@ -676,19 +762,22 @@
 	Wobble-observation mode (see TDAS 01-05 by W. Wittek).
 
-\item[ct\_file ../Data/magic.def]
+\item[ct\_file /path/magic.def]
 
 	The ct\_file statement defines where the program can find the 
-	telescope characteristics. The path in the example above is
-	correct to run reflector in
-	MagicProgs/Simu\-la\-tion/De\-tector/Reflector\_0.6/ directory. 
-	If you want to run it in a different directory you have to modify the 
-	path accordingly. 
+	telescope characteristics. Usually, the magic.def file is kept in
+	MagicProgs/Simulation/Detector/Data
 
 \item[atm\_model ATM\_CORSIKA]
-	The atm\_model statement says to the program what kind of
+
+	The atm\_model statement tells the program what kind of
 	atmospheric absorption model to use. Possible choices are: 
-	ATM\_CORSIKA, ATM\_ISO\-THERMAL, ATM\_90\-PER\-CENT and
-	ATM\_NO\-ATMO\-SPHE\-RE.
-	
+	ATM\_NOATMOSPHERE,\\ ATM\_90PERCENT and ATM\_CORSIKA,
+	corresponding respectively to no absorption, a 10$\%$
+	absorption and a model using the US Standard atmosphere (see
+        Corsika manual, appendix C) for the Rayleigh scattering and a
+	model by L. Elterman \cite{elterman64,elterman65} for the Mie
+	scattering and ozone absorption (see appendix A). The third
+	model should be chosen for the standard MC MAGIC production.
+
 \item[cer\_files] 
 
@@ -755,5 +844,5 @@
 	File containing mirror reflectivity as a function of
 	wavelength (see section \ref{neededfiles}). If this option is
-	not supplied, the program will look for
+	not supplied, the program will look for \\
 	``../Data/reflectivity.dat'' as previous versions of
 	Reflector did.
@@ -796,53 +885,50 @@
 %------------------------------------------------------------
 
-\newpage
 \section{Output file \label{out}} 
-The output file begins with two ascii lines:\\
+The reflector output file begins with two ascii lines, the first of
+which informs us of the program version with which it has been
+produced (NOTE: in the following, the dollar symbol \verb"$" stands
+for a carriage return):\\
 \\
-\verb"reflector 0.6" \\
-\verb"START---RUN" \\ 
-After the \verb"START---RUN" flag there is a carriage return, and then
-the run header which is basically the one from Corsika with two added
-variables, {\it wobble\_mode} and {\it atmospheric\_model}. Check the
-Corsika manual for the meaning and units of the rest of them. All of the
-variables 4-byte real numbers except the first, which is a 4 character
-string containing the run header ascii label from Corsika:
+\verb"reflector 0.6$START---RUN$" \\ 
+\\
+Then there is run header which is basically the one from Corsika with
+two added variables, {\it wobble\_mode} and {\it
+atmospheric\_model}. Check the Corsika manual for the meaning and
+units of the rest of them. All of the variables are 4-byte real numbers
+except the first, which is a 4 character string containing the run
+header ascii label from Corsika:
 \vspace*{0.5cm}
 \\
 %
-\begin{tabular}{ll}
-\parbox{5cm}{Variable} & Description \\
+\begin{tabular}{lll}
+\multicolumn{2}{c}{Variable} & Description \\
 \hline 
-& \\
-ASCII Label & 'RUNH' \\
-RunNumber & \\
-date & \\
-Corsika\_version & \\
-NumObsLev & \\
-HeightLev[10] & \\
-SlopeSpec & \\
-ELowLim & \\
-EUppLim & \\
-EGS4\_flag & \\
-NKG\_flag & \\
-Ecutoffh & \\
-Ecutoffe & \\
-Ecutoffg & \\
-C[50] & \\
-wobble\_mode & Wobble mode with which the reflector was run (TDAS
+&& \\
+1 & ASCII Label & 'RUNH' \\
+2 & RunNumber & \\
+3 & date & \\
+4 & Corsika\_version & \\
+5 & NumObsLev & \\
+6 to 15 & HeightLev[10] & \\
+16 & SlopeSpec & \\
+17 & ELowLim & \\
+18 & EUppLim & \\
+19 & EGS4\_flag & \\
+20 & NKG\_flag & \\
+21 & Ecutoffh & \\
+22 & Ecutoffm & \\
+23 & Ecutoffe & \\
+24 & Ecutoffg & \\
+25 to 74 & C[50] & \\
+75 & wobble\_mode & Wobble mode with which the reflector was run (TDAS
 01-05) \\
-atmospheric\_model & Atmospheric model used for the absorption
+76 & atmospheric\_model & Atmospheric model used for the absorption
 simulation \\
-& 0 = no atmosphere;  1 = atm\_90percent;  \\
-& 2 = atm\_isothermal;  3 = atm\_corsika. \\
-dummy1[18] & not used \\
-CKA[40] & \\
-CETA[5] & \\
-CSTRBA[11] & \\
-dummy2[104] & not used \\
-AATM[5] & \\
-BATM[5] & \\
-CATM[5] & \\
-NFL[4] & \\
+&& 0 = no atmosphere;  1 = atm\_90percent;  \\
+&& 2 = atm\_corsika. \\
+77 to 94 & dummy1[18] & not used \\
+95 to 134 & CKA[40] & \\
+135 to 139 & CETA[5] & \\
 &\\
 \hline 
@@ -851,6 +937,26 @@
 \newpage
 
-Then there comes a ``\verb"START-EVENT"'' flag, followed by a carriage
-return and then the binary event header. Each variable is a 4-byte
+\begin{tabular}{lll}
+\multicolumn{2}{c}{Variable} & \parbox{11cm}{Description} \\
+\hline 
+&& \\
+140 to 140 & CSTRBA[11] & \\
+151 to 254 & dummy2[104] & not used \\
+255 to 259 & AATM[5] & \\
+260 to 264 & BATM[5] & \\
+265 to 269 & CATM[5] & \\
+270 to 273 & NFL[4] & \\
+&\\
+\hline 
+\end{tabular}
+\vspace*{0.5cm}
+\\
+%
+Then there comes a carriage return followed by the ascii flag which
+indicates the start of an event, and again a carriage return:\\
+\\
+\verb"$START-EVENT$"\\
+\\
+and then the binary event header. Each variable is a 4-byte
 float number except for the first one which is the event header label
 from Corsika (a string of 4 characters). Some of of the variables from
@@ -858,51 +964,38 @@
 \vspace*{0.5cm}
 \\
-\begin{tabular}{ll}
-\parbox{5cm}{Variable} & Description \\
+\begin{tabular}{lll}
+\multicolumn{2}{c}{Variable} & Description \\
 \hline
-& \\ 
-ASCII label     & 'EVTH' \\
-EvtNumber       & Event Number \\
-PrimaryID 	& Primary particle identification code \\
-Etotal 		& Primary particle total energy (GeV) \\
-Thick0 		& CORSIKA's starting altitude in g/cm2 \\
-FirstTarget 	& CORSIKA's number of first target if fixed \\
-zFirstInt 	& Height of first interaction in cm \\
-p[3] 		& Primary particle momentum in x,y,-z directions (GeV) \\
-Theta 		& Primary particle zenith angle (rad) \\
-Phi 		& Primary particle azimuth angle (rad) \\	
-
-NumRndSeq 	& Number of different CORSIKA random sequences (max. 10) \\
-RndData[10][3] 	& RndData[i][0]: integer seed of sequence i \\
-		& RndData[i][1]: number of offset random calls (mod $10^6$) of sequence i. \\ 
-		& RndData[i][2]: number of offset random calls ($/10^6$) of sequence i. \\ 
-
-RunNumber 	& Run number \\
-DateRun 	& Date of run yymmdd \\
-Corsika\_version & Version of {\it CORSIKA} \\
-
-NumObsLev 	& Number of observation levels (should be always 1 for
+&& \\ 
+1 & ASCII label     & 'EVTH' \\
+2 & EvtNumber       & Event Number \\
+3 & PrimaryID 	& Primary particle identification code \\
+4 & Etotal 		& Primary particle total energy (GeV) \\
+5 & Thick0 		& CORSIKA's starting altitude in g/cm2 \\
+6 & FirstTarget 	& CORSIKA's number of first target if fixed \\
+7 & zFirstInt 	& Height of first interaction in cm \\
+8 to 10 & p[3] 		& Primary particle momentum in x,y,-z directions (GeV) \\
+11 & Theta 		& Primary particle zenith angle (rad) \\
+12 & Phi 		& Primary particle azimuth angle (rad) \\	
+
+13 & NumRndSeq 	& Number of different CORSIKA random sequences (max. 10) \\
+14 to 43 & RndData[10][3] 	& RndData[i][0]: integer seed of sequence i \\
+&		& RndData[i][1]: number of offset random calls (mod $10^6$) of sequence i. \\ 
+&		& RndData[i][2]: number of offset random calls ($/10^6$) of sequence i. \\ 
+
+44 & RunNumber 	& Run number \\
+45 & DateRun 	& Date of run yymmdd \\
+46 & Corsika\_version & Version of {\it CORSIKA} \\
+
+47 & NumObsLev 	& Number of observation levels (should be always 1 for
 us) \\
-HeightLev[10]	& Height of observation levels in cm \\
-
-SlopeSpec 	& Energy spectrum slope \\
-ELowLim 	& Energy lower limit (GeV) \\
-EUppLim 	& Energy upper limit (GeV) \\
-Ecutoffh        & \\
-Ecutoffm        & \\
-Ecutoffe        & \\
-Ecutoffg        & \\
-NFLAIN		& \\
-NFLDIF		& \\
-NFLPI0		& \\
-NFLPIF		& \\
-NFLCHE		& \\
-NFRAGM		& \\
-Bx		& \\
-By		& \\
-EGS4yn		& \\
-NKGyn		& \\
-GHEISHAyn	& \\
-VENUSyn		& \\
+48 to 57 & HeightLev[10]	& Height of observation levels in cm \\
+
+58 & SlopeSpec 	& Energy spectrum slope \\
+59 & ELowLim 	& Energy lower limit (GeV) \\
+60 & EUppLim 	& Energy upper limit (GeV) \\
+61 & Ecutoffh        & \\
+62 & Ecutoffm        & \\
+63 & Ecutoffe        & \\
 & \\
 \hline 
@@ -912,58 +1005,53 @@
 %
 
-\begin{tabular}{ll}
-
-\parbox{5cm}{Variable} & Description \\
+\begin{tabular}{lll}
+
+\multicolumn{2}{c}{Variable} & \parbox{11cm}{Description} \\
 \hline 
-& \\
-CERENKOVyn	& \\
-NEUTRINOyn	& \\
-HORIZONTyn	& \\
-COMPUTER	& \\
-
-ThetaMin 	& Minimum Theta of primaries (deg) \\
-ThetaMax 	& Maximum Theta of primaries (deg) \\
-PhiMin 		& Minimum Phi of primaries (deg) \\
-PhiMax 		& Maximum Phi of primaries (deg) \\
-CBunchSize	& \\
-CDetInX		& \\
-CDetInY		& \\
-CSpacInX	& \\
-CSpacInY	& \\
-CLenInX		& \\
-CLenInY		& \\
-COutput		& \\
-AngleNorthX	& \\
-MuonInfo	& \\
-StepLength	& \\
-CWaveLower 	& Wavelength lower limit (nm) \\
-CWaveUpper 	& Wavelength upper limit (nm) \\
-Multipl		& \\
-CorePos[2][20] 	& Core positions of randomized shower \\
-SIBYLL[2]	& \\
-QGSJET[2]	& \\
-DPMJET[2]	& \\
-VENUS\_cross	& \\
-mu\_mult\_scat	& \\
-NKG\_range	& \\
-EFRCTHN[2]	& \\
-WMAX[2]		& \\
-rthin\_rmax	& \\
-viewcone\_angles[2] & Inner and outer angles of Corsika's VIEWCONE
-option. \\
-telescopePhi	& Telescope azimuth (rad). Measured from South, counter-clockwise \\
-telescopeTheta 	& Telescope zenith angle (rad) \\
-TimeFirst 	& Arrival time on camera of first photon (ns) \\
-TimeLast 	& Arrival time on camera of last photon (ns) \\
-
-& 6 next variables: CORSIKA longitudinal particle fit parameters \\
-& \hspace{0.5cm} (see CORSIKA manual for precise meaning and units)\\
-longi\_Nmax        & Numer of charged particles at maximum \\
-longi\_t0          & Atmospheric depth of shower starting point (N=0) \\
-longi\_tmax        & Atmospheric depth of shower maximum (g/cm$^2$) \\
-longi\_a           & \\
-longi\_b           & For {\bf longi\_a}, {\bf longi\_b}, {\bf longi\_c}, see CORSIKA manual  \\
-longi\_c           &  \\
-longi\_chi2        & $\chi^2/dof$ of the fit\\
+&& \\
+64 & Ecutoffg        & \\
+65 & NFLAIN		& \\
+66 & NFLDIF		& \\
+67 & NFLPI0		& \\
+68 & NFLPIF		& \\
+69 & NFLCHE		& \\
+70 & NFRAGM		& \\
+71 & Bx		& \\
+72 & By		& \\
+73 & EGS4yn	& \\
+74 & NKGyn		& \\
+75 & GHEISHAyn	& \\
+76 & VENUSyn		& \\
+77 & CERENKOVyn	& \\
+78 & NEUTRINOyn	& \\
+79 & HORIZONTyn	& \\
+80 & COMPUTER	& \\
+81 & ThetaMin 	& Minimum Theta of primaries (deg) \\
+82 & ThetaMax 	& Maximum Theta of primaries (deg) \\
+83 & PhiMin 	& Minimum Phi of primaries (deg) \\
+84 & PhiMax 	& Maximum Phi of primaries (deg) \\
+85 & CBunchSize	& \\
+86 & CDetInX	& \\
+87 & CDetInY	& \\
+88 & CSpacInX	& \\
+89 & CSpacInY	& \\
+90 & CLenInX	& \\
+91 & CLenInY	& \\
+92 & COutput	& \\
+93 & AngleNorthX& \\
+94 & MuonInfo	& \\
+95 & StepLength	& \\
+96 & CWaveLower & Wavelength lower limit (nm) \\
+97 & CWaveUpper & Wavelength upper limit (nm) \\
+98 & Multipl	& \\
+99 to 138 & CorePos[2][20] & Core positions of randomized shower \\
+139 to 140 & SIBYLL[2]	& \\
+141 to 142 & QGSJET[2]	& \\
+143 to 144 & DPMJET[2]	& \\
+145 & VENUS\_cross	& \\
+146 & mu\_mult\_scat	& \\
+147 & NKG\_range	& \\
+148 to 149 & EFRCTHN[2]	& \\
+150 to 151 & WMAX[2]	& \\
 & \\
 \hline 
@@ -972,27 +1060,46 @@
 \newpage
 
-\begin{tabular}{ll}
-\parbox{5cm}{Variable} & Description \\
+\begin{tabular}{lll}
+\multicolumn{2}{c}{Variable} & \parbox{11cm}{Description} \\
 \hline 
-& \\
-CORSIKAPhs      & Original photons written by {\it CORSIKA} \\ 
-AtmAbsPhs       & Photons absorbed by the atmosphere  \\
-MirrAbsPhs      & Photons absorbed by the mirror      \\ 
-OutOfMirrPhs    & Photons outside the mirror          \\ 
-BlackSpotPhs    & Photons lost in the "black spot"    \\ 
-OutOfChamPhs    & Photons outside the camera         \\ 
-CPhotons        & Photons reaching the camera        \\ 
-
-elec\_cph\_fraction & Fraction of C-photons produced by electrons \\
-muon\_cph\_fraction & Fraction of C-photons produced by muons \\
-other\_cph\_fraction & Fraction of C-photons produced by electrons \\
+&& \\
+152 & rthin\_rmax	& \\
+153 to 154 & viewcone\_angles[2] & Inner and outer angles of Corsika's VIEWCONE
+option. \\
+155 & telescopePhi	& Telescope azimuth (rad). Measured from South, counter-clockwise \\
+156 & telescopeTheta 	& Telescope zenith angle (rad) \\
+157 & TimeFirst 	& Arrival time on camera of first photon (ns) \\
+158 & TimeLast 		& Arrival time on camera of last photon (ns) \\
+
+&& 6 next variables: CORSIKA longitudinal particle fit parameters \\
+&& \hspace{0.5cm} (see CORSIKA manual for precise meaning and units)\\
+159 & longi\_Nmax        & Numer of charged particles at maximum \\
+160 & longi\_t0          & Atmospheric depth of shower starting point (N=0) \\
+161 & longi\_tmax        & Atmospheric depth of shower maximum (g/cm$^2$) \\
+162 & longi\_a           & \\
+163 & longi\_b           & For {\bf longi\_a}, {\bf longi\_b}, {\bf longi\_c}, see CORSIKA manual  \\
+164 & longi\_c           &  \\
+165 & longi\_chi2        & $\chi^2/dof$ of the fit\\
+166 & CORSIKAPhs      & Original photons written by {\it CORSIKA} \\ 
+167 & AtmAbsPhs       & Photons absorbed by the atmosphere  \\
+168 & MirrAbsPhs      & Photons absorbed by the mirror      \\ 
+169 & OutOfMirrPhs    & Photons outside the mirror          \\ 
+170 & BlackSpotPhs    & Photons lost in the "black spot"    \\ 
+171 & OutOfChamPhs    & Photons outside the camera         \\ 
+172 & CPhotons        & Photons reaching the camera        \\ 
+
+173 & elec\_cph\_fraction & Fraction of C-photons produced by electrons \\
+174 & muon\_cph\_fraction & Fraction of C-photons produced by muons \\
+175 & other\_cph\_fraction & Fraction of C-photons produced by electrons \\
+176 to 182 & dummy[7] & not used \\
 & \\
 \hline 
 \end{tabular}
-
-\vspace*{1cm}
-The event header is followed by 8-word blocks, one for each photon
-that reaches the camera. A photon block contains the following
-variables:
+%
+\vspace*{0.5cm}
+\\
+The event header is followed by 8-word blocks, one for each Cherenkov
+photon that reaches the camera. A photon block contains the following
+variables (as 4-byte float numbers):
 \vspace*{0.5cm}
 \\
@@ -1006,9 +1113,12 @@
 	& n is the index from 1 to ICERML (see Corsika manual) for the case in which each Corsika \\
 	& shower is used more than once (normally, in MMCS will be just 1). \\
-	& \\
 x, y	& Impact point in camera coordinates (cm) \\
 u, v 	& Director cosines of down-going versor indicating the photon direction \\
-t	& Arrival time on camera (ns) \\
-h	& Production height (cm) \\
+t	& Arrival time on camera (ns), measured from the time of first
+interaction of the primary \\
+h	& Production height (cm), measured above sea level on the
+vertical of the telescope location \\
+	& (it is not the {\it true} height which would be measured on
+the vertical of the emitting particle!)  \\ 
 phi 	& Incidence angle with respect to camera plane (rad) \\
 & \\
@@ -1017,17 +1127,343 @@
 \vspace*{0.5cm}
 \\
-After the last event photon block there is a blank line, an \verb$END---EVENT$
-flag, another blank line and then the following event. After the last
-event in a run it appears the flag ``\verb$END-----RUN$'', while after all
-the processed runs, a ``\verb$END----FILE$'' flag is written. Finally,
-after this flag an ``ascii tail'' has been added to the file: it
-consists of the ascii files {\it magic.def}, {\it axisdev.dat} and {\it
-reflectivity.dat} one after the other separated by blank lines. In
-this way all the relevant parameters used to produce the output are
+After the last photon block of an event there is a carriage return
+followed by the ascii flag indicating the event end, and then two more
+carriage returns before the ascii flag of the beginning of the next
+event, and so on:\\
+\\
+\verb"$END---EVENT$$START-EVENT$Event_header....$END---EVENT$$END-----RUN$$START---RUN$..."\\
+\\
+The flag ``\verb$END-----RUN$'' appears after the last event in a run
+(that is, the last event processed of each of the input cer
+files). After the last processed run, an end of file flag is
+written:\\
+\\
+\verb"...$END---EVENT$$END-----RUN$$END----FILE$"\\
+\\
+Finally, after this flag an ``ascii tail'' has been attached to the file:
+it consists of the ascii files {\it magic.def}, {\it axisdev.dat} and
+{\it reflectivity.dat} one after the other, separated by carriage returns:
+\\
+\\ 
+\verb"$magic.def$axisdev.dat$reflectivity.dat"\\
+\\
+In this way all the relevant parameters used to produce the output are
 kept together with the reflected events.
-
 %------------------------------------------------------------
-
-\section{Appendix A}
+\newpage
+\renewcommand{\thesubsection}{A.\arabic{subsection}}
+\section*{Appendix A : atmospheric absorption}
+\addcontentsline{toc}{section}{Appendix A : atmospheric absorption}
+%
+The simulation of the absorption of Cherenkov light in the atmosphere
+has been included in the {\it Reflector} program because this feature
+was not yet available in the first versions of CORSIKA used within the
+MAGIC collaboration. In the latest CORSIKA versions, the atmospheric
+absorption has been included as an option, but it is not
+compatible with the simulation of a curved atmosphere \cite{cor02},
+and hence we have kept this step as a part of our reflector
+simulation. This appendix describes how the atmospheric absorption is
+implemented in the program when the option ATM\_CORSIKA (see section
+\ref{commands}) is chosen.
+\par
+The geometry of the problem is sketched in figure
+\ref{fig:atmoscheme}. A Cherenkov photon is emitted in point A and
+travels towards the telescope placed at B. At any moment, the height
+$h$ of the photon above sea level is related to the distance $L$
+between the photon and the telescope through
+%
+\begin{equation}
+(R+h)^2 = (R+h_1)^2 + L^2 + 2 L \; (R+h_1) \; \cos \theta
+\label{eq:height}
+\end{equation}
+%
+, where $R$ is the Earth radius, $h_1$ the height (a.s.l.) of the
+observation level and $\theta$ is the zenith angle of the photon
+trajectory measured at the telescope site. The Cherenkov output of
+CORSIKA contains for each photon the height $h_C$ of the emission
+point A, measured along the vertical of the observer. The {\it true
+vertical height} $h_2$ of the emission point can be obtained by
+replacing $L$ by $(h_C-h_1)/\cos \theta$ in equation
+(\ref{eq:height}).
+%
+\begin{figure}[ht]
+\begin{center}
+\mbox{ \epsfig{file=eps/atmoscheme.eps,width=0.8\textwidth} }
+\end{center}
+\caption[]
+{Calculation of the true vertical height $h_2$ of the emission point
+of a Cherenkov photon (point A), and the optical path traversed down to the
+telescope (point B).}
+\label{fig:atmoscheme}
+\end{figure}
+%
+\par
+The optical path $I(\theta, h_1, h_2)$ traversed by the photon can be
+calculated integrating the air density along the trajectory
+$\overline{\text{AB}}$. For the case $h/R \ll 1$, we can drop in
+(\ref{eq:height}) the terms in $(h/R)^2$ and smaller, and then solve
+for L. Deriving now with respect to $h$, we have:
+%
+\begin{equation}
+\frac{dL}{dh} \simeq \sqrt{\frac{R}{2\;(h-h_1)+R\;\cos^2 \theta}}
+\qquad \text{for} \qquad \frac{h}{R} \ll  1
+\label{eq:dldh}
+\end{equation}
+%
+\subsection{Rayleigh scattering}
+Rayleigh scattering is the scattering of light by particles smaller
+than its wavelength. These are in our case the air molecules. The
+transmission coefficient due to Rayleigh scattering is a strong
+function of the wavelength $\lambda$:
+%
+\begin{equation}
+T_{\text{Rayl}} (\lambda) = \exp \Biggl[ - \frac{I(\theta, h_1, h_2)}{x_R} \; \Biggl(\frac{400 \;
+\text{nm}}{\lambda}\Biggl)^4 \; \Biggl] 
+\label{eq:rayleigh}
+\end{equation}
+%
+Here $I(\theta, h_1, h_2)$ is the optical path (in g/cm$^2$) traversed
+between points A and B, and $x_R = 2970$ g/cm$^2$ is the mean free path of
+the Rayleigh scattering at $\lambda = 400$ nm. 
+\par
+A convenient way of expressing the optical path is the following:
+%
+\begin{equation}
+I\;(\theta, h_1, h_2) = (x_1 - x_2) \cdot \mathcal{AM}\;(\theta, h_1, h_2) 
+\end{equation}
+Here $x_{i=1,2}$ is the mass overburden of the atmosphere above a
+height $h_i$ (in the 
+vertical direction) and $\mathcal{AM}$ is the so called {\it air
+mass}\footnote{If we set $h_2 = \infty$, we have the usual definition
+of {\it air mass} in optical astronomy.}, defined as
+%
+\begin{equation}
+\mathcal{AM} \equiv \frac{I\;(\theta,h_1,h_2)}{I\;(0^\circ,h_1,h_2)}
+\label{eq:airmass}
+\end{equation}
+%
+, which is a function mainly of the zenith angle $\theta$ (see
+fig. \ref{fig:airmass}). In our simulation, for the calculation of the
+mass overburden $x_i$ we have used the U.S. standard atmosphere
+parametrized by J. Linsley \cite{cor02}, the same we used in Corsika
+for the shower development simulation. It consists of five layers: in
+the lower four the density decreases exponentially with height, and in
+the upper one the mass overburden cecreases linearly until it vanishes
+at $h = 112.8$ km.
+%
+\begin{figure}[ht]
+\begin{center}
+\mbox{ \epsfig{file=eps/airmass.eps,width=0.8\textwidth} }
+\end{center}
+\caption[]
+{Dependence with zenith angle of the air mass as defined in the
+text. The air mass has been calculated for an exponential atmosphere
+with scale height $H = 7.4$ km, for the observation level of MAGIC
+(2.2 km a.s.l.), and for light coming from $h_2 = 10$ and at 100 km a.s.l. As
+we can see the dependence with the emission height $h_2$ is very small.}
+\label{fig:airmass}
+\end{figure}
+%
+\par
+For the estimate of $\mathcal{AM}$, a simpler atmospheric model has
+been used, in which the vertical density profile is described by a
+single exponential: $\rho = \rho_0 \; e^{-h/H}$  with scale height $H
+= 7.4$ km. This simplifies the calculations, and is accurate enough
+for our purposes. Using (\ref{eq:dldh}) the optical path $I(\theta,
+h_1, h_2)$ can then be obtained approximately as:
+%
+\begin{equation}
+I(\theta, h_1, h_2) = \int_A^B \rho\;(h)\; \frac{dL}{dh} \; dh \simeq
+\sqrt{\frac{R}{2}} \;
+\int_{h_1}^{h_2} \frac{\rho_0
+\;e^{-h/H}}{\sqrt{h-h_1+\frac{1}{2}\;R\;\cos^2 \theta}} \; dh 
+\label{eq:optpath}
+\end{equation}
+%
+and finally:
+% 
+\begin{equation}
+\mathcal{AM} \simeq e^{-\frac{R \sin^2 \theta}{2H}}
+\cdot 
+\frac{
+\text{erfc}\;(\sqrt{\frac{R \cos^2 \theta}{2H}})
+\;-\;
+\text{erfc}\;(\sqrt{\frac{2 (h_2 - h_1) + R \cos^2 \theta}{2H}})
+}
+{
+\text{erfc}\;(\sqrt{\frac{R}{2H}})
+\;-\;
+\text{erfc}\;(\sqrt{\frac{2(h_2 - h_1) + R}{2 H}})
+}
+\label{eq:airmass2}
+\end{equation}
+%
+where we have used the complementary error function $\text{erfc}\;(x)
+= \frac{2}{\sqrt{\pi}}\int_x^\infty e^{-t^2} dt$. From 
+(\ref{eq:airmass2}), $\mathcal{AM}$ can be readily evaluated for any
+value of $\theta$, $h_1$ and $h_2$. In fig. \ref{fig:rayleigh} the
+resulting Rayleigh transmission coefficient $T_{\text{Rayl}}$ finally
+obtained from (\ref{eq:rayleigh}) is plotted versus the zenith angle
+for three wavelengths.
+%
+\begin{figure}[ht]
+\begin{center}
+\mbox{ \epsfig{file=eps/rayleigh.eps,width=\textwidth} }
+\end{center}
+\caption[]
+{Rayleigh transmission coefficient as a function of zenith angle for three
+different wavelengths. The solid, dashed and dotted lines correspond
+respectively to light coming from 5, 10 and 20 km distance from the
+telescope.}
+\label{fig:rayleigh}
+\end{figure}
+%
+\subsection{Mie scattering}
+Cherenkov light also suffers Mie scattering through interaction with
+small dust particles suspended in the air (aerosols), whose size is
+comparable to the wavelength of the light. In our simulation of the
+attenuation due to aerosols we have used the model proposed by
+Elterman \cite{elterman64,elterman65}, which considers an aerosol
+number density $N_p$ which (roughly) decreases exponentially up to 10
+km a.s.l. with scale height $H \simeq 1.2$ km, followed by a more
+tenuous layer between 10 and 30 km (see fig. \ref{fig:aerosol}a). In
+this model, the aerosol size distribution is considered to be
+unchanged with altitude.
+%
+\begin{figure}[ht]
+\begin{center}
+\mbox{ \epsfig{file=eps/aerosol.eps,width=0.9\textwidth} }
+\end{center}
+\caption[]
+{Aerosol model by Elterman: in (a), number density of
+aerosols as a function of height above sea level; in (b), aerosol
+attenuation coefficient at sea level as a function of wavelength.}
+\label{fig:aerosol}
+\end{figure}
+%
+\par
+Measured values of the aerosol attenuation coefficients at sea level
+$\beta_p(0)$ for different wavelengths \cite{elterman65} are shown in
+figure \ref{fig:aerosol}b. To obtain the attenuation coefficient at a
+given height $h$, we simply do $\beta_p(h, \lambda) = \beta_p(0,
+\lambda) \cdot N_p(h)/N_p(0)$. In the Elterman model the aerosol
+transmission coefficient for the trajectory from A to B depicted in
+figure \ref{fig:atmoscheme} would then be: 
+%
+\begin{equation}
+T_{\text{Mie}}(\lambda) = e^{-\tau_{mie}} \quad \text{, with}\quad
+\tau_{mie}(h_1, h_2, \theta, \lambda) = \frac{\beta_p(0, \lambda)}{N_p(0)} \;
+\int_{h_1}^{h_2} 
+\; N_p(h) \;\; \frac{dL}{dh}\; dh
+\label{eq:aerosoltau}
+\end{equation}
+%
+Here $\tau_{mie}$ is the aerosol optical depth of the path from A to
+B. Given that the aerosol density distribution is not a simple
+exponential, we have to do the integral in (\ref{eq:aerosoltau})
+numerically. The integral depends on $h_2$ and on $\theta$, through
+$dL/dh$ (it also 
+depends on $h_1$, but this is the observation level and therefore
+fixed). In this case we use the exact expression for $\;dL/dh\;$ which can be
+obtained from (\ref{eq:height}). At the beginning of each simulation
+run we calculate and store the results of the integral for values of
+$\theta$ between 0 and 90$^\circ$ (in steps of $1^\circ$), and of
+$h_2$ from $h_1$ up to 30 km (in steps of 100 m). To do the integral a
+linear interpolation has been used to obtain the value of $N_p$ for
+any height. During the simulation of each Cherenkov photon, we get the
+corresponding precalculated value of the integral and deduce
+$T_{\text{Mie}}$ from expression (\ref{eq:aerosoltau}).
+%
+\begin{figure}[ht]
+\begin{center}
+\mbox{ \epsfig{file=eps/mie.eps,width=\textwidth} }
+\end{center}
+\caption[]
+{Aerosol transmission coefficient for three different wavelengths as a
+function of the distance between the photon emission point and the
+telescope. Plots for four different zenith angles between 0 and 80
+degrees are shown.}
+\label{fig:mie}
+\end{figure}
+%
+\par
+Since in this model the aerosols are concentrated mainly at very low
+altitude, the transmission coefficient is more or less constant above
+a certain height (which depends on $\theta$), as can be seen in
+fig. \ref{fig:mie}. For instance, for vertically incident 300 nm light
+emitted higher than 4 km above the telescope, the Mie transmission is
+about 0.95.
+%
+\subsection{Absorption by Ozone}
+%
+The absorption of Cherenkov light by Ozone has been implemented
+following also the Elterman standard atmosphere \cite{elterman65}. The
+coefficient for ozone absorption is given by
+%
+\begin{equation}
+\beta_3(h,\lambda) = A_v(\lambda) \cdot D_3(h)
+\end{equation}
+%
+, where $A_v(\lambda)$ is the Vigroux \cite{vigroux53} ozone
+absorption coefficient (cm$^{-1}$) and $D_3(h)$ is the ozone
+concentration (cm km$^{-1}$) according to Elterman. The transmission
+coefficient of Ozone in the path $\overline{\text{AB}}$ is then:
+%
+\begin{equation}
+T_{\text{Ozone}}(\lambda) = e^{-\tau_{oz}} \quad \text{, with}\quad
+\tau_{oz}(h_1, h_2, \theta, \lambda) = A_v(\lambda) \; \int_{h_1}^{h_2} 
+\; D_3(h) \;\; \frac{dL}{dh}\; dh
+\label{eq:ozonetau}
+\end{equation}
+%
+\begin{figure}[ht]
+\begin{center}
+\mbox{ \epsfig{file=eps/ozone.eps,width=\textwidth} }
+\end{center}
+\caption[]
+{Ozone concentration vertical profile (a) and Vigroux coefficients for
+Ozone absorption (b). The Vigroux coefficients for $\lambda =$ 380 and
+400 nm are zero.}
+\label{fig:ozone}
+\end{figure}
+%
+\par
+Once again, like in the case of Mie scattering, the optical depth
+$\tau_{oz}$ is the product of a factor which depends on $\lambda$ and
+an integral which depends on $h_1$, $h_2$ and $\theta$. We proceed in
+the same way as before, precalculating the values of the integral in
+steps of $\Delta\theta = 1^\circ$ and $\Delta h = 100$ m, up to a
+height of 50 km a.s.l. (where the ozone concentration becomes
+negligible), and then reading the appropriate values for every
+simulated photon.
+\par
+Finally, the overall atmospheric transmission coefficient is
+calculated as
+%
+\begin{equation}
+T_{total} = T_{Ray} \cdot T_{Mie} \cdot T_{Ozone}
+\end{equation}
+%
+In figure \ref{fig:absorplot} the atmospheric transmission as a
+function of the distance to the telescope for $\theta = 0^\circ$ is
+shown. Ozone absorption turns out to be dominant below 320 nm, while
+Rayleigh scattering is the main cause of the loss of photons at longer
+wavelengths.
+%
+\begin{figure}[ht]
+\begin{center}
+\mbox{ \epsfig{file=eps/absorplot.eps,width=\textwidth} }
+\end{center}
+\caption[]
+{Total transmission coefficient for vertically incident light as a
+function of the distance between the emission point and the
+telescope. The contributions of absorption by ozone and of Rayleigh
+and Mie scattering are also shown for comparison.}
+\label{fig:absorplot}
+\end{figure}
+%
+\newpage
+\section*{Appendix B : files in the reflector package}
+\addcontentsline{toc}{section}{Appendix B : files in the reflector package}
 
 The list of all Reflector files follows.
@@ -1060,20 +1496,28 @@
 MagicProgs/Simulation/Detector/Reflector_0.6/version.h
 
-MagicProgs/Simulation/Detector/Reflector_0.6/doc/Tdas0211.ps.gz
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/Tdas0211.ps
 MagicProgs/Simulation/Detector/Reflector_0.6/doc/Tdas0211.tex
 MagicProgs/Simulation/Detector/Reflector_0.6/doc/magic-tdas.sty
 MagicProgs/Simulation/Detector/Reflector_0.6/doc/magiclogo.eps
-MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/colimation.eps.gz
-MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/coma.eps.gz
-MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/coma_star.eps.gz
-MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/coorsystems.eps.gz
-MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/evcompare.eps.gz
-MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/parabola.eps.gz
-MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/refl06images.eps.gz
-MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/spot10kmf1694.eps.gz
-MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/spot10kmf1700.eps.gz
-MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/spot_inf_f1697.eps.gz
-MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/telecoor.eps.gz
-MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/timing.eps.gz
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/absorplot.eps
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/aerosol.eps
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/airmass.eps
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/atmoscheme.eps
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/colimation.eps
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/coma.eps
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/coma_star.eps
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/coorsystems.eps
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/evcompare.eps
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/mie.eps
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/ozone.eps
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/parabola.eps
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/rayleigh.eps
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/refl06images.eps
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/reflec.eps
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/spot10kmf1694.eps
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/spot10kmf1700.eps
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/spot_inf_f1697.eps
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/telecoor.eps
+MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/timing.eps
 
 MagicProgs/Simulation/Detector/Reflector_0.6/tester/Makefile
@@ -1096,4 +1540,22 @@
 %%>>>> Or the following if you include here by hand your 
 %%>>>> bibliographic entries
+
+\begin{thebibliography}{00}
+
+\bibitem{elterman64}
+L. Elterman, Applied Optics Vol. 3, No. 6 (1964) 745.
+
+\bibitem{elterman65}
+L. Elterman, R.B. Toolin, S.L. Valley (editor), Handbook of
+geophysics and space environments, McGraw-Hill, N.Y. (1965).
+
+\bibitem{cor02}D. Heck and J. Knapp, EAS Simulation with CORSIKA: A User's
+Manual, 2002.
+
+\bibitem{vigroux53}
+E. Vigroux, Contributions \`a l'étude expérimentale de l'absorption
+de l'ozone, Annales de Physique, v. 8 (1953) 709.
+
+\end{thebibliography}
 
 \end{document}
