1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
2 | %%% magic-tdas.tex -- template to write MAGIC-TDAS documents
|
---|
3 | %%%-----------------------------------------------------------------
|
---|
4 | %%% Kopyleft (K) 2000 J C Gonzalez
|
---|
5 | %%% Max-Planck-Institut fuer Physik,
|
---|
6 | %%% Foehringer Ring 6, 80805 Muenchen, Germany
|
---|
7 | %%% E-mail: gonzalez@mppmu.mpg.de
|
---|
8 | %%%-----------------------------------------------------------------
|
---|
9 | %%% This program is free software; you can redistribute, copy,
|
---|
10 | %%% modify, use it and its documentation for any purpose,
|
---|
11 | %%% provided that the above copyright notice appear in all
|
---|
12 | %%% copies and that both that copyright notice and this
|
---|
13 | %%% permission notice appear in supporting documentation.
|
---|
14 | %%%
|
---|
15 | %%% This piece of code is distributed in the hope that it will
|
---|
16 | %%% be useful, but WITHOUT ANY WARRANTY; without even the
|
---|
17 | %%% implied warranty of FITNESS FOR A PARTICULAR PURPOSE.
|
---|
18 | %%%
|
---|
19 | %%% Although you can actually do whatever you want with this
|
---|
20 | %%% file (following the copyright notice above), your are
|
---|
21 | %%% strongly encouraged NOT to edit directly this file.
|
---|
22 | %%% Instead, make a copy and edit the copy for your purposes.
|
---|
23 | %%%
|
---|
24 | %%% Modifying thie original file means that you actually have
|
---|
25 | %%% the (very basic) knowledge needed to make things by your
|
---|
26 | %%% own, and therefore... you will not get _any_ additional
|
---|
27 | %%% support :-)
|
---|
28 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
29 | %%% Last update: Time-stamp: <Thu Mar 2 09:31:41 CET 2000>
|
---|
30 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
31 | %
|
---|
32 | \documentclass[12pt]{article}
|
---|
33 |
|
---|
34 | \usepackage{magic-tdas}
|
---|
35 |
|
---|
36 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
37 | %% BEGIN DOCUMENT
|
---|
38 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
39 | \begin{document}
|
---|
40 |
|
---|
41 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
42 | %% Please, for the formatting just include here the standard
|
---|
43 | %% elements: title, author, date, plus TDAScode
|
---|
44 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
45 | \title{ The Reflector simulation program v.0.6 }
|
---|
46 | \author{A.Moralejo\\
|
---|
47 | \texttt{<moralejo@pd.infn.it>}}
|
---|
48 | \date{November 14, 2002\\}
|
---|
49 | \TDAScode{MAGIC-TDAS 02-11\\ 021114/AMoralejo}
|
---|
50 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
51 |
|
---|
52 | %% title %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
53 | \maketitle
|
---|
54 |
|
---|
55 | %% abstract %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
56 | \begin{abstract}
|
---|
57 | In this document we provide a brief description of Reflector program
|
---|
58 | (version 0.6) and a guide to install and run it. Some of the
|
---|
59 | information contained in this document is also present in MAGIC-TDAS
|
---|
60 | 02-05 dealing with the previous version of the program, but it has also
|
---|
61 | been included here for clarity. Two important bugs regarding the
|
---|
62 | ray-tracing routine have been corrected in this new version.
|
---|
63 | \end{abstract}
|
---|
64 |
|
---|
65 | %% contents %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
66 | \thetableofcontents
|
---|
67 |
|
---|
68 | \newpage
|
---|
69 |
|
---|
70 | %% body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
71 |
|
---|
72 | %------------------------------------------------------------
|
---|
73 | \section{Introduction}
|
---|
74 |
|
---|
75 | The Reflector program was originally written by Jose Carlos Gonz\'alez
|
---|
76 | and then improved by Harald Kornmayer. The Reflector program reads in
|
---|
77 | MMCS output files (cerxxxxxx files from corsika) and writes an output
|
---|
78 | file with the information about all the photons which reach the
|
---|
79 | telescope focal plane (taking into account atmospheric and mirror
|
---|
80 | absorption) and which are within the camera radius defined in the file
|
---|
81 | {\bf magic.def}. In September 2001 D. Bastieri and C. Bigongiari
|
---|
82 | released a new version (v.0.4) to adapt the program to a format change
|
---|
83 | in the MMCS output. In June 2002 the version 0.5 was released, with
|
---|
84 | small changes in the ouput file format and some bug fixing (see TDAS
|
---|
85 | 02-05).
|
---|
86 | \par
|
---|
87 | The aim of releasing the present version 0.6 was in principle only to
|
---|
88 | add some missing information in the output. However, the ray-tracing
|
---|
89 | routine was checked in detail and some inconsistencies were
|
---|
90 | found. As a result of this, an important bug was detected which
|
---|
91 | produced a systematic blurring of all the images. Later another bug
|
---|
92 | was found in the calculation of the photon arrival time on the
|
---|
93 | camera.These bugs, fixed in this version, are discussed in detail in
|
---|
94 | section \ref{notes}.
|
---|
95 |
|
---|
96 | %------------------------------------------------------------
|
---|
97 | \section{Description of simulation \label{descrip}}
|
---|
98 |
|
---|
99 | The main steps of the simulation are:
|
---|
100 |
|
---|
101 | \begin{enumerate}
|
---|
102 |
|
---|
103 | \item Atmospheric absorption.
|
---|
104 |
|
---|
105 | \item Checking if the photon hits the dish.
|
---|
106 |
|
---|
107 | \item Aluminum absorption.
|
---|
108 |
|
---|
109 | \item Determination of the mirror hitted.
|
---|
110 |
|
---|
111 | \item Mirror reflection.
|
---|
112 |
|
---|
113 | \item Checking if the photon is inside the camera borders.
|
---|
114 |
|
---|
115 | \item Calculation of photon arrival time on camera.
|
---|
116 |
|
---|
117 | \end{enumerate}
|
---|
118 |
|
---|
119 | The reflection of each mirror element is simulated in a realistic way
|
---|
120 | by introducing a gaussian spread of the reflected photons positions on
|
---|
121 | the camera plane. The sigma of this PSF is defined via the
|
---|
122 | {\bf point\_spread} parameter in the telescope description file {\bf
|
---|
123 | magic.def}, and has a value of 0.5 cm, which corresponds approximately
|
---|
124 | to the quality of the MAGIC mirrors produced up to date. Also the
|
---|
125 | possible misalignment of mirror elements is simulated (see section
|
---|
126 | \ref{neededfiles}).
|
---|
127 |
|
---|
128 | \section{Notes on version 0.6 \label{notes}}
|
---|
129 |
|
---|
130 | \subsection {First bug fixed in the ray tracing}
|
---|
131 |
|
---|
132 | The previous versions of the reflector were extensively checked and a
|
---|
133 | strange behaviour was found in them. It is a well known fact (see for
|
---|
134 | instance the discussions in the MAGIC design report) that, to focus a
|
---|
135 | telescope on an object placed at a finite distance, one has to shift
|
---|
136 | the camera plane {\it away} from the mirror dish, with respect to the
|
---|
137 | position in which an object at infinity (a star) would be
|
---|
138 | focused (see fig. \ref{colimation}). For instance, with a paraboloid
|
---|
139 | of focal distance f = 1697 cm, an object placed 10 km above the
|
---|
140 | telescope would be focused on a plane at $\simeq 1700$ cm from the
|
---|
141 | dish (a distance measured along the telescope axis).
|
---|
142 | %
|
---|
143 | \begin{figure}[h!]
|
---|
144 | \begin{center}
|
---|
145 | \epsfig{file=eps/colimation.eps,width=0.7\textwidth}
|
---|
146 | \caption{To focus an object at a finite distance h, the camera plane
|
---|
147 | must be moved away from the mirror a distance d, given by the formula
|
---|
148 | on the right. For MAGIC, the shift is of around 3 cm for a source
|
---|
149 | located 10 km above the telescope.\label{colimation}}
|
---|
150 | \end{center}
|
---|
151 | \end{figure}
|
---|
152 | %
|
---|
153 | \par
|
---|
154 | With reflector program up to version 0.5, and using the mirror
|
---|
155 | parameters in the standard magic.def file, we found out just the
|
---|
156 | opposite behaviour. We wrote a program to produce files with the same
|
---|
157 | structure as the Corsika Cherenkov output, but containing photons from
|
---|
158 | a point source. If we set the source at infinity, we found the best
|
---|
159 | spot placing the camera at a distance of 1697 cm (this can be changed in
|
---|
160 | the magic.def file via the {\it focal\_distance} parameter). We can
|
---|
161 | see the resulting spot in fig. \ref{spot_inf_f1697}. A completely
|
---|
162 | independent ray-tracing program was used to verify that this is the
|
---|
163 | spot that our 17 m tesellated paraboloid should produce.
|
---|
164 | %
|
---|
165 | \begin{figure}[h]
|
---|
166 | \begin{center}
|
---|
167 | \epsfig{file=eps/spot_inf_f1697.eps,width=0.85\textwidth}
|
---|
168 | \caption{Image of a point like source placed at infinity with
|
---|
169 | Reflector 0.5 (units of x and y are cm). Camera plane placed at 1697 cm
|
---|
170 | from the mirror. The circle on the left indicates (small) pixel
|
---|
171 | size. On the right side, projections on x and y of the
|
---|
172 | spot. \label{spot_inf_f1697}}
|
---|
173 | \end{center}
|
---|
174 | \end{figure}
|
---|
175 | %
|
---|
176 | If we now
|
---|
177 | place the source 10 km above the telescope, the best spot is achieved
|
---|
178 | at 1694 cm from the dish, instead of the expected 1700 cm
|
---|
179 | (figs. \ref{spot10kmf1700} and \ref{spot10kmf1694}). It must be
|
---|
180 | noted that for these and the following checks we removed all the
|
---|
181 | gaussian smearing which the program introduces to simulate the
|
---|
182 | possible mirror misalignments and surface irregularities (by the way,
|
---|
183 | a feature which somehow optimistically was not included in the
|
---|
184 | simulations shown in the proposal). In this way we can check just the
|
---|
185 | ray tracing.
|
---|
186 | %
|
---|
187 | \begin{figure}[h!]
|
---|
188 | \begin{center}
|
---|
189 | \epsfig{file=eps/spot10kmf1700.eps,width=0.85\textwidth}
|
---|
190 | \caption{Image of a point like source placed 10 km above the
|
---|
191 | telescope with Reflector 0.5 (units of x and y are cm). Camera plane
|
---|
192 | placed at f = 1700 cm from the mirror. The fact that the spot is so large
|
---|
193 | indicates a problem in the simulation, since with this camera position
|
---|
194 | the telescope should be focused at 10 km (see
|
---|
195 | fig. \ref{spot_inf_f1697}) and hence produce a spot similar to the one
|
---|
196 | shown in fig. \ref{spot_inf_f1697}. The hole in the middle of the spot
|
---|
197 | corresponds to the hole in the mirror dish, and indicates by itself a
|
---|
198 | focusing problem.
|
---|
199 | \label{spot10kmf1700}}
|
---|
200 | \end{center}
|
---|
201 | \end{figure}
|
---|
202 | %
|
---|
203 | \begin{figure}[h!]
|
---|
204 | \begin{center}
|
---|
205 | \epsfig{file=eps/spot10kmf1694.eps,width=0.85\textwidth}
|
---|
206 | \caption{Image of a point like source placed 10 km above the
|
---|
207 | telescope with Reflector 0.5 (units of x and y are cm). Camera plane
|
---|
208 | placed at f = 1694 cm from the mirror. Now the spot is small, but the
|
---|
209 | camera plane is not at the expected position (see text).
|
---|
210 | \label{spot10kmf1694}}
|
---|
211 | \end{center}
|
---|
212 | \end{figure}
|
---|
213 | %
|
---|
214 | \par
|
---|
215 | In order to rule out a possible mistake in the generation of the
|
---|
216 | ``false'' Cherenkov files, we repeated the check using real Corsika
|
---|
217 | files, and directly looking at shower images ($\Theta = 10^\circ$
|
---|
218 | incident gammas with a Crab-like spectrum). We must bear in mind that
|
---|
219 | the shower maximum for gammas of 100 GeV lies around 10 km above the MAGIC
|
---|
220 | level. From the result we can clearly see that the images are best
|
---|
221 | focused at 1694 cm (fig. \ref{evcompare}), therefore confirming the
|
---|
222 | existence of a real problem in the reflector simulation.
|
---|
223 | %
|
---|
224 | \begin{figure}[p]
|
---|
225 | \begin{center}
|
---|
226 | \epsfig{file=eps/evcompare.eps,width=0.85\textwidth}
|
---|
227 | \caption{Gamma shower images obtained with Reflector 0.5 placing
|
---|
228 | the camera at 1700 cm (left) and 1694 cm (right) from the mirror
|
---|
229 | dish. Primary gammas at $\theta = 10^\circ$, E = 16, 46 and 232 GeV.
|
---|
230 | \label{evcompare}}
|
---|
231 | \end{center}
|
---|
232 | \end{figure}
|
---|
233 | %
|
---|
234 | \paragraph {Check of the mirror parameters in the magic.def file\\}
|
---|
235 | In the standard magic.def file we have been using up to now, the
|
---|
236 | spherical mirrors centers were found to be distributed on the surface
|
---|
237 | of a f = 1700 cm paraboloid. Their curvature radii, though discretized
|
---|
238 | in 8 ``zones'' as explained in the design report, corresponded in
|
---|
239 | average to the local mean curvature radius of the same parabolic
|
---|
240 | surface. However, their orientations were those corresponding to a f =
|
---|
241 | 1697 cm paraboloid. Personally I do not think this is something
|
---|
242 | intended, and looks more like an error, but anyway we checked that this
|
---|
243 | was not the reason for the problems in the ray tracing: a test
|
---|
244 | magic.def file was created with all parameters calculated as for a f =
|
---|
245 | 1697 cm paraboloid, and no significant difference could be seen. That
|
---|
246 | is: i) the individual mirror orientations are the dominant factor, and
|
---|
247 | the overall dish in the old reflector behaved indeed like a f = 1697
|
---|
248 | cm parabolic
|
---|
249 | mirror, and ii) the bug must be somewhere else. Even though the error
|
---|
250 | was not there, a new magic.def file has been produced containing the
|
---|
251 | parameters for the 956 mirrors of the final MAGIC design (instead of
|
---|
252 | the 920 mirrors foreseen in the beginning).
|
---|
253 | %
|
---|
254 | \paragraph {Solution of the problem\\}
|
---|
255 | Finally, a check of the routines in {\it ph2cph.c} revealed that the
|
---|
256 | reflector program was actually misinterpreting the information read
|
---|
257 | from the Cherenkov file written by Corsika. In figure \ref{coorsystems}
|
---|
258 | we can see the definition of Corsika's coordinate system (see also the
|
---|
259 | Corsika manual). In it, the x axis points north and the z axis points
|
---|
260 | up. The zenith angle $\Theta$ of a particle trajectory is measured
|
---|
261 | between the particle momentum and the negative z-axis, and the
|
---|
262 | azimuthal angle $\Phi$ between the positive x-axis and the x-y
|
---|
263 | component of the particle momentum, counterclockwise (0 -
|
---|
264 | 2$\pi$). When the direction cosines of a particle's trajectory are
|
---|
265 | given, they refer also to its momentum vector (a downgoing
|
---|
266 | vector)\footnote{In Corsika the third component of the momentum is
|
---|
267 | measured along the negative z-axis and this is probably the origin of
|
---|
268 | the confusion which resulted in the bug}. The same is true for the
|
---|
269 | Cherenkov photons.
|
---|
270 | %
|
---|
271 | \begin{figure}[h]
|
---|
272 | \begin{center}
|
---|
273 | \epsfig{file=eps/coorsystems.eps,width=\textwidth}
|
---|
274 | \caption{Coordinate systems of Corsika and MAGIC.\label{coorsystems}}
|
---|
275 | \end{center}
|
---|
276 | \end{figure}
|
---|
277 | %
|
---|
278 | \begin{figure}[h!]
|
---|
279 | \begin{center}
|
---|
280 | \epsfig{file=eps/parabola.eps,width=0.6\textwidth}
|
---|
281 | \caption{Misunderstanding of photon direction cosines from Corsika
|
---|
282 | by Reflector v 0.5 and older versions.\label{parabola}}
|
---|
283 | \end{center}
|
---|
284 | \end{figure}
|
---|
285 | %
|
---|
286 | Unfortunately, in the output of Corsika, only the direction cosines
|
---|
287 | (u, v) with respect to the x and y axis are given. These completely
|
---|
288 | determine the particle's trajectory as long as one knows that they
|
---|
289 | refer to a downgoing versor, in which case one gets the third
|
---|
290 | direction cosine as $w = -\sqrt{u^2+v^2}$, with a minus sign. However,
|
---|
291 | in {\it ph2cph.c} we found exactly the opposite (lines 116 to 118 in
|
---|
292 | v.05):
|
---|
293 |
|
---|
294 | \begin{verbatim}
|
---|
295 | r[0] = ph->u;
|
---|
296 | r[1] = ph->v;
|
---|
297 | r[2] = (float) sqrt(1.0 - r[0]*r[0] - r[1]*r[1]);
|
---|
298 | \end{verbatim}
|
---|
299 |
|
---|
300 | This means that the program was interpreting u and v as the direction
|
---|
301 | cosines of the {\it upgoing} versor towards which one should ``look''
|
---|
302 | to see the incoming photon. The situation is depicted in figure
|
---|
303 | \ref{parabola}. The two vectors at the bottom left of the plot are the
|
---|
304 | two possible interpretations of the direction cosines u and v. These
|
---|
305 | vectors have the same u and v, and differ only in the sign of their
|
---|
306 | third components w. As the figure illustrates, the reflector
|
---|
307 | simulation, by taking the wrong (positive) sign of w, was transforming
|
---|
308 | the light coming from a point source 10 km away, into a convergent
|
---|
309 | light beam which was then focused at a distance (1694 cm),
|
---|
310 | shorter than the focal length of the paraboloid, and produced a
|
---|
311 | blurred image at the theoretically optimal distance (1700 cm). Of
|
---|
312 | course a paralel beam of light was focused at the right distance (1697
|
---|
313 | cm) since in that case u = v = 0, and both the upgoing and downgoing
|
---|
314 | versors have the same direction.
|
---|
315 | \par
|
---|
316 | The example in figure \ref{parabola} shows the case in which the
|
---|
317 | telescope is pointing at zenith. It is easy to see that if the
|
---|
318 | telescope was pointing in an arbitrary direction a few degrees away
|
---|
319 | from zenith, the fact of taking the wrong sign in the third direction
|
---|
320 | cosine would spoil the reflection completely, to the point that the
|
---|
321 | spot would lie outside the camera limits. However, this is not what we
|
---|
322 | observed: when using the older reflector versions for different zenith
|
---|
323 | angles the images were still contained in the camera. The explanation
|
---|
324 | is that the transformation between Corsika's coordinates system and
|
---|
325 | the telescope system was also wrong, since the angles $\Phi$ and
|
---|
326 | $\Theta$ which indicate the telescope orientation (see fixed\_target
|
---|
327 | option in section \ref{commands}) follow the same convention taken
|
---|
328 | from Corsika: for instance, for pointing the telescope towards North
|
---|
329 | we should set $\Phi = 180^\circ$, because that would be the $\Phi$
|
---|
330 | value for a particle or photon coming from North (see again
|
---|
331 | fig. \ref{coorsystems}, left). This wrong transformation of coordinates
|
---|
332 | oriented the telescope in a way that the situation was always like the
|
---|
333 | one shown in fig. \ref{parabola}, and the image was formed in the
|
---|
334 | camera also for $\Theta > 0$, though also defocused.
|
---|
335 | \par
|
---|
336 | The telescope coordinate system shown in figure \ref{coorsystems}
|
---|
337 | (right) has its z-axis along the telescope axis, and the origin in the
|
---|
338 | center of the mirror dish. This system is used in the ray tracing
|
---|
339 | routine of the reflector simulation. When the telescope points up
|
---|
340 | ($\Theta = \Phi = 0$) this system matches exactly the one in Corsika.
|
---|
341 | The general transformation between both is a simple rotation,
|
---|
342 | since for the sake of simplicity we assume in the simulation that the
|
---|
343 | origins always coincide. In Reflector v.05 or older the rotation
|
---|
344 | matrix was wrong: it had been written assuming that ($\Phi$, $\Theta$)
|
---|
345 | indicated the direction towards which the telescope pointed. Actually,
|
---|
346 | for the reasons already exposed, the telescope must point to
|
---|
347 | ($\Phi +\pi$, $\Theta$). The function in charge of building the rotation
|
---|
348 | matrix is {\it makeOmega} (a part of {\it ph2cph.c}), which is called
|
---|
349 | from {\it reflector.c}. For the present version we have simply
|
---|
350 | replaced $\Phi$ by $\Phi + \pi$ in the function call. The transformation of
|
---|
351 | coordinates is shown in figure \ref{telecoor}, and can be seen as a
|
---|
352 | rotation of angle $\Phi +\pi$ around the z axis of Corsika plus a
|
---|
353 | rotation of angle $\Theta$ around the y'' axis of the telescope (the
|
---|
354 | same way in which the real MAGIC points).
|
---|
355 | %
|
---|
356 | \paragraph {New coordinate system of the camera \label{newcoordi}}
|
---|
357 | We have introduced another change in Reflector 0.6 regarding the
|
---|
358 | coordinates. In versions up to 0.5 the coordinates ($x_{camera}$,
|
---|
359 | $y_{camera}$) of the photon impact point on the camera plane were
|
---|
360 | given in the telescope system (x'', y'', z'') described in
|
---|
361 | fig. \ref{telecoor}. This was a bit confusing (a rotation of the
|
---|
362 | telescope in the zenith axis resulted in a displacement in x'' of the
|
---|
363 | images), in particular it would have been messy when working in wobble
|
---|
364 | mode. We have now adopted the camera coordinate system proposed in
|
---|
365 | TDAS 01-05: when the observer is looking from the center of the
|
---|
366 | reflector in the direction of the telescope axis (towards the camera)
|
---|
367 | the $x_{camera}$ axis points horizontally to the right, and the
|
---|
368 | $y_{camera}$ axis points upwards. It is trivial from figure
|
---|
369 | \ref{telecoor} to see that the transformation needed to obtain these
|
---|
370 | coordinates is: $x_{camera} = -y''$, $\:y_{camera} = -x''$. This has been
|
---|
371 | added at the end of {\it ph2cph.c}.
|
---|
372 | %
|
---|
373 | \begin{figure}[h]
|
---|
374 | \begin{center}
|
---|
375 | \epsfig{file=eps/telecoor.eps,width=\textwidth}
|
---|
376 | \caption{Transformation of coordinates between the Corsika and
|
---|
377 | MAGIC coordinate systems.\label{telecoor}}
|
---|
378 | \end{center}
|
---|
379 | \end{figure}
|
---|
380 | %
|
---|
381 | \paragraph {How old was the ray-tracing bug?\\}
|
---|
382 | %
|
---|
383 | The bug was certainly present in versions 0.4 and 0.5, but may be even
|
---|
384 | older. Nevertheless, there is no doubt that the reflector program used
|
---|
385 | for the simulation shown in the MAGIC design report (which must have been
|
---|
386 | an early version of the present one) was working fine. Extensive proof
|
---|
387 | of this is provided in an appendix of the design report. A plausible
|
---|
388 | explanation could be that, up to some date, the data being read in by
|
---|
389 | the reflector program (the Corsika output) contained direction cosines
|
---|
390 | which really referred to the upgoing versors of the photon directions,
|
---|
391 | and until then the program worked well. Then may be the output of
|
---|
392 | Corsika was changed to its present form, and the change went unnoticed.
|
---|
393 | The Corsika version used then was 4.52, whereas all further work has
|
---|
394 | been done with Corsika 5.20 or later versions. The Corsika history
|
---|
395 | file shows no record of any change in this respect, but given that we
|
---|
396 | have always used a slightly modified Corsika, it would not be
|
---|
397 | surprising if the Cherenkov output was modified at some point. There
|
---|
398 | is no documentation on this, so if anyone has any relevant information,
|
---|
399 | please make it public.
|
---|
400 | %
|
---|
401 | \paragraph {Influence of the bug on image analysis\\}
|
---|
402 | The fixing of the bug (resulting in sharper images) will for sure
|
---|
403 | improve the results of the image analysis, in particular with regard
|
---|
404 | to gamma / hadron separation. This could in part explain the
|
---|
405 | differences we have been observing in the expected performance of
|
---|
406 | MAGIC with respect to what was foreseen in the design report. However,
|
---|
407 | we note here again that in the simulation used there, not only was the
|
---|
408 | reflector working well, but also no noise was introduced in the
|
---|
409 | reflecting process. This was surely too optimistic, and it implies
|
---|
410 | that it will be hard to reproduce those results using a more realistic
|
---|
411 | approach which accounts for mirror imperfections. However, the
|
---|
412 | introduction of the noise (fig. \ref{refl06images}) has a less
|
---|
413 | dramatic effect than the defocusing which the bug was producing.
|
---|
414 | %
|
---|
415 | \subsection {Second bug: photon timing}
|
---|
416 | After a first release of Reflector 0.6 had been made public, another
|
---|
417 | important bug was found. We tried to check whether the simulated
|
---|
418 | reflecting dish was really ``isochronous''. A paralel beam of photons,
|
---|
419 | all sharing the same arrival time on the ground, were processed by the
|
---|
420 | simulation program and their arrival times on the camera plane were
|
---|
421 | histogrammed. The result can be seen in fig. \ref{timing} (dashed
|
---|
422 | histograms). This time the bug was quite evident: since Corsika gives
|
---|
423 | us the arrival time of photons on ground, the path from the point
|
---|
424 | where the photon hits the dish to the ground has to be subtracted (or
|
---|
425 | added, because since the center of the dish in the MC is at $z = 0$,
|
---|
426 | the mirror reflecting the photon may have $z < 0$ when the dish is
|
---|
427 | inclined). The sign in this subtraction (in {\it ph2cph.c}) was
|
---|
428 | wrong. This bug was present in both versions 0.5 and 0.4, and might
|
---|
429 | be related to the other one (a change of orientation of the z axis
|
---|
430 | at some point may have produced it). Since in the simulation made for
|
---|
431 | the design report the timing played little or no role (the camera
|
---|
432 | simulation did not consider the arrival times of photons) it is not
|
---|
433 | possible to know whether the bug was already in the code by then.
|
---|
434 | \par
|
---|
435 | This bug means that all the studies made up to now regarding photon
|
---|
436 | arrival times on the camera are completely useless (for instance, the
|
---|
437 | optimization of the time parameters in the L1 trigger has to be redone
|
---|
438 | from scratch!).
|
---|
439 | %
|
---|
440 | \begin{figure}[h]
|
---|
441 | \begin{center}
|
---|
442 | \epsfig{file=eps/timing.eps,width=\textwidth}
|
---|
443 | \caption{Test of reflector isochrony. The arrival time
|
---|
444 | distributions of photons in the camera are shown for (buggy) Reflector
|
---|
445 | 0.5 and for Reflector 0.6. The sketch in the center shows the test for
|
---|
446 | the case in which the light beam is paralel to the telescope axis
|
---|
447 | (left plot). On the right, the same test has been made with light
|
---|
448 | arriving 1 degree off axis.
|
---|
449 | \label{timing}}
|
---|
450 | \end{center}
|
---|
451 | \vspace*{-1cm}
|
---|
452 | \end{figure}
|
---|
453 |
|
---|
454 | \subsection {Performance of the new version}
|
---|
455 | In figure \ref{coma} we show the images of a point-like source at 10
|
---|
456 | km from the telescope, produced with the Reflector version 0.6,
|
---|
457 | and using the new version of the magic.def file (see see next
|
---|
458 | section). No noise has been introduced in the reflection, the observed
|
---|
459 | spots are just the result of optical aberrations. The light source has
|
---|
460 | been put at slightly different viewing angles
|
---|
461 | from the telescope. The results are comparable to those in the design
|
---|
462 | report, actually these are a bit better, the difference probably being
|
---|
463 | that the focal lengths of the mirror tiles in the older magic.def file
|
---|
464 | were discretized in only eight values, while now they change rather
|
---|
465 | continuously. Some images of a point source at infinity (a star) can be
|
---|
466 | seen in fig. \ref{coma_star}. We can see that for any incidence angle,
|
---|
467 | the area within which 50$\%$ of the light is concentrated is smaller
|
---|
468 | than that of a small pixel.
|
---|
469 | \par
|
---|
470 | In figure \ref{refl06images} the images of three gamma events ($\theta
|
---|
471 | = 10^\circ$, E = 16, 46, 232 GeV), the same of fig. \ref{evcompare}
|
---|
472 | are shown. They have been produced with Reflector 0.6 assuming perfect
|
---|
473 | spherical mirrors (left) and realistic ones (right). The images look
|
---|
474 | reasonable, much sharper than with the older versions, even when the
|
---|
475 | mirror imperfections are taken into account.
|
---|
476 | \par
|
---|
477 | %
|
---|
478 | \begin{figure}[p]
|
---|
479 | \begin{center}
|
---|
480 | \epsfig{file=eps/coma.eps,width=0.85\textwidth}
|
---|
481 | \caption{Reflector 0.6. Images of a point-like source at
|
---|
482 | 10 km from the telescope for different incident angles (from on-axis
|
---|
483 | to 2 degrees off-axis). The quantity d50 indicates the diameter of a
|
---|
484 | circle (plotted) containing 50$\%$ of the reflected light. Note that
|
---|
485 | the z-axis scale is logarithmic, and the same in the first five
|
---|
486 | plots. The last plot shows the x-axis projections in linear scale.
|
---|
487 | \label{coma}}
|
---|
488 | \end{center}
|
---|
489 | \vspace*{-1cm}
|
---|
490 | \end{figure}
|
---|
491 | %
|
---|
492 | \begin{figure}[p]
|
---|
493 | \begin{center}
|
---|
494 | \epsfig{file=eps/refl06images.eps,width=0.85\textwidth}
|
---|
495 | \caption{Reflector 0.6. Images of the three gamma showers shown in
|
---|
496 | fig. \ref{evcompare}, without noise added in the reflection (left) and
|
---|
497 | with the standard noise (right) as described in section
|
---|
498 | \ref{descrip}. Note that the orientation of the images has changed as a
|
---|
499 | result of the introduction of a new camera coordinate system (see page
|
---|
500 | \pageref{newcoordi}).
|
---|
501 | \label{refl06images}}
|
---|
502 | \end{center}
|
---|
503 | \vspace*{-1cm}
|
---|
504 | \end{figure}
|
---|
505 | %
|
---|
506 | \begin{figure}[p]
|
---|
507 | \begin{center}
|
---|
508 | \epsfig{file=eps/coma_star.eps,width=0.85\textwidth}
|
---|
509 | \caption{Reflector 0.6. Images of a star. The quantity d50
|
---|
510 | indicates the diameter of a circle (plotted) containing 50$\%$ of the
|
---|
511 | reflected light.
|
---|
512 | \label{coma_star}}
|
---|
513 | \end{center}
|
---|
514 | \vspace*{-1cm}
|
---|
515 | \end{figure}
|
---|
516 | %
|
---|
517 | \subsection{The new magic.def file}
|
---|
518 | A new magic.def file (see sect. \ref{neededfiles}) has been created
|
---|
519 | and included in the Reflector 0.6 package. Now the number of
|
---|
520 | individual mirror tiles is 956, matching
|
---|
521 | the number and distribution of the final MAGIC design. The mirror
|
---|
522 | centers and orientations are those corresponding to a paraboloid of
|
---|
523 | 1697 cm focal (hence the camera plane is placed at 1700 cm from the
|
---|
524 | dish). The focal lengths have been calculated by R. Mirzoyan taking
|
---|
525 | into account the so called ``shortening effect'' (see design report).
|
---|
526 | A new axisdev.dat file (se again \ref{neededfiles}) with data for the
|
---|
527 | 956 mirrors is also included.
|
---|
528 | %
|
---|
529 | \subsection{The {\itshape cermaker} program}
|
---|
530 | A test program to produce cer files (input for the reflector)
|
---|
531 | containing photons from a point-light source of light placed in any
|
---|
532 | position has been added to the Reflector package {\it
|
---|
533 | (tester/cermaker.c)}. This is the same program used to produce the
|
---|
534 | plots shown in this report. The usage is as follows:
|
---|
535 | \begin{verbatim}
|
---|
536 | cermaker source_x(cm) source_y(cm) source_z(cm) [events]
|
---|
537 | \end{verbatim}
|
---|
538 | The source position is given with respect to the telescope. The output
|
---|
539 | file is called {\it cer000001}, and can be read by the reflector program.
|
---|
540 | %
|
---|
541 | \subsection{Other changes in Reflector 0.6}
|
---|
542 |
|
---|
543 | Some other minor improvements have been introduced in Reflector 0.6:
|
---|
544 |
|
---|
545 | \begin{enumerate}
|
---|
546 |
|
---|
547 | \item reflector.c: Introduced NaN (Not a Number) check in the photon
|
---|
548 | loop. If NaNs are found in a photon data block (there are some in the
|
---|
549 | Corsika output from time to time, for unkown reason), it is not processed.
|
---|
550 |
|
---|
551 | \item ph2cph.c: Introduced "check of positiveness" before taking a
|
---|
552 | square root in the calculation of the photon trajectory intersection
|
---|
553 | with the paraboloid (resulted sometimes in NaNs when the photon did
|
---|
554 | not intersect the paraboloid).
|
---|
555 |
|
---|
556 | \item Added an option for the wobble mode in the input card (see
|
---|
557 | section \ref{opt}).
|
---|
558 |
|
---|
559 | \item New output format (see sect. \ref{out}): added a Run header,
|
---|
560 | which is like that of Corsika, plus a couple of variables concerning
|
---|
561 | the reflector parameters: the wobble mode and the atmospheric model
|
---|
562 | used for the simulation. The event header has also been changed to
|
---|
563 | include all the information present in the Corsika event
|
---|
564 | header. We also added in the event header three new variables which
|
---|
565 | tell us for each event what fraction of the Cherenkov photons on the
|
---|
566 | camera plane has been produced by electrons, muons, or other
|
---|
567 | particles.
|
---|
568 | \par
|
---|
569 | Finally, the ascii files {\it magic.def}, {\it
|
---|
570 | axisdev.dat} and {\it reflectivity.dat} which the program has used as
|
---|
571 | input are now attached at the end of the output file, so that each
|
---|
572 | output file contains all the relevant information on how it was
|
---|
573 | produced.
|
---|
574 |
|
---|
575 | \end{enumerate}
|
---|
576 |
|
---|
577 | %------------------------------------------------------------
|
---|
578 | \section{How to Install Reflector Program \label{installation}}
|
---|
579 |
|
---|
580 | You can get the current version of the Reflector Program from the
|
---|
581 | MAGIC web page: \\
|
---|
582 | {\bf http://hegra1.mppmu.mpg.de/MAGICWeb/ }\\
|
---|
583 | You can find
|
---|
584 | the latest public version of this program as tarred gzipped file in
|
---|
585 | the Monte Carlo Download area (you need the usual password). You have to
|
---|
586 | download the file reflector\_0.6.tar.gz and then follow the
|
---|
587 | instructions below:
|
---|
588 |
|
---|
589 | \begin{description}
|
---|
590 | \item[Decompress the file using:]
|
---|
591 | gunzip reflector*.tar.gz
|
---|
592 | \item[Unpack the tar file with:]
|
---|
593 | tar xvf reflector*.tar
|
---|
594 | \item[Go to the directory where the source files are:]
|
---|
595 | cd MagicProgs/Simulation/Detector/Reflector\_0.6/
|
---|
596 | \item[Make symbolic links running the script:]
|
---|
597 | refl-install
|
---|
598 | \item[Check if all dependencies are fulfilled:]
|
---|
599 | make depend
|
---|
600 | \item[Compile the program:]
|
---|
601 | make
|
---|
602 | \end{description}
|
---|
603 |
|
---|
604 | If everything goes right you should have an executable file called
|
---|
605 | {\bf reflector}.
|
---|
606 |
|
---|
607 | %------------------------------------------------------------
|
---|
608 | \section{How to Run Reflector Program \label{running}}
|
---|
609 |
|
---|
610 | You need a steering card to run the Reflector program. You can find an
|
---|
611 | example in the {\bf MagicProgs/Simulation/Detector/Reflector\_0.6/input.card}
|
---|
612 | file. You have to modify this file according to your needs (see below
|
---|
613 | for instructions about steering card) and then run the program with the
|
---|
614 | following statement:\\
|
---|
615 |
|
---|
616 | \hspace{1cm}{\bf reflector $<$ input.card}
|
---|
617 |
|
---|
618 | %------------------------------------------------------------
|
---|
619 | \section{Needed Files \label{neededfiles}}
|
---|
620 |
|
---|
621 | The Reflector program needs some other files to run. These files are
|
---|
622 | the following:
|
---|
623 | \begin{itemize}
|
---|
624 | \item {\bf magic.def}: contains the description of MAGIC telescope
|
---|
625 | geometry, together with some other parameters needed by the Reflector
|
---|
626 | program.
|
---|
627 | \item {\bf axisdev.dat}: contains data to simulate the possible
|
---|
628 | deviation of the spot of each single mirror on the camera plane due
|
---|
629 | to its non perfect alignment. The values are x, y coordinates
|
---|
630 | distributed at random (according to a gaussian with $\sigma =
|
---|
631 | 0.5$ cm).
|
---|
632 | \item {\bf reflectivity.dat}: contains the mirror reflectivity index as
|
---|
633 | a function of the wavelength.
|
---|
634 | \end{itemize}
|
---|
635 |
|
---|
636 | All these files are usually in the {\bf
|
---|
637 | MagicProgs/Simulation/Detector/Data/} directory and {\it in principle} you
|
---|
638 | should {\bf not} make any change in them to run the program.
|
---|
639 |
|
---|
640 | %------------------------------------------------------------
|
---|
641 | \section{Steering Card}
|
---|
642 |
|
---|
643 | The steering card sets all the parameters and options
|
---|
644 | to steer the reflection simulation. Each line of the steering card is
|
---|
645 | a statement with its parameters, if it is the case. Lines beginning
|
---|
646 | with \# are considered comments. The Reflector program parses all the
|
---|
647 | lines sequentially. Then if you repeat a statement with different
|
---|
648 | options only the last one will be considered.
|
---|
649 |
|
---|
650 | \subsection{Mandatory Commands \label{commands}}
|
---|
651 |
|
---|
652 | \begin{description}
|
---|
653 |
|
---|
654 | \item[reflector 0.6]
|
---|
655 |
|
---|
656 | This statement must be the first line of the steering card
|
---|
657 | file. The Reflector program checks it to verify if it is reading
|
---|
658 | a steering card.
|
---|
659 |
|
---|
660 | \item[output\_file /disk99/reflex/Gamma\_0\_7\_1001to1010\_w0.rfl]
|
---|
661 |
|
---|
662 | The output\_file command specifies the name and the
|
---|
663 | path of the output file. The path can be absolute, like in the
|
---|
664 | example above, or relative. Although any name can be used,
|
---|
665 | conventionally the Reflector program
|
---|
666 | output file name has the .rfl extension, and starts with
|
---|
667 | the primary particle name. The first number indicates the
|
---|
668 | zenith angle of the incident primaries, the second one
|
---|
669 | indicates the production site (7 is for Padua) and is related
|
---|
670 | to the random number generator seed used by CORSIKA. Then the run
|
---|
671 | number range is shown (10 runs in this case, from 1001 to
|
---|
672 | 1010). Each run corresponds to 10000 showers. Finally, the
|
---|
673 | label "w0" means no wobble mode was used (telescope pointing
|
---|
674 | at the source). Alternatively, the "w+" or "w-" labels (only
|
---|
675 | in gamma files) refer to the two pointings in the
|
---|
676 | Wobble-observation mode (see TDAS 01-05 by W. Wittek).
|
---|
677 |
|
---|
678 | \item[ct\_file ../Data/magic.def]
|
---|
679 |
|
---|
680 | The ct\_file statement defines where the program can find the
|
---|
681 | telescope characteristics. The path in the example above is
|
---|
682 | correct to run reflector in
|
---|
683 | MagicProgs/Simu\-la\-tion/De\-tector/Reflector\_0.6/ directory.
|
---|
684 | If you want to run it in a different directory you have to modify the
|
---|
685 | path accordingly.
|
---|
686 |
|
---|
687 | \item[atm\_model ATM\_CORSIKA]
|
---|
688 | The atm\_model statement says to the program what kind of
|
---|
689 | atmospheric absorption model to use. Possible choices are:
|
---|
690 | ATM\_CORSIKA, ATM\_ISO\-THERMAL, ATM\_90\-PER\-CENT and
|
---|
691 | ATM\_NO\-ATMO\-SPHE\-RE.
|
---|
692 |
|
---|
693 | \item[cer\_files]
|
---|
694 |
|
---|
695 | All the lines following this statement are considered files to
|
---|
696 | be processed by the Reflector program, one for each line,
|
---|
697 | eventually with their paths (see the example below). Therefore this
|
---|
698 | command must be the last one.\\
|
---|
699 | \\
|
---|
700 | cer\_files\\
|
---|
701 | /disk99/cer001001\\
|
---|
702 | /disk99/cer001002\\
|
---|
703 | /disk99/cer001003\\
|
---|
704 | ........ \\
|
---|
705 | /disk99/cer001009\\
|
---|
706 | /disk99/cer001010\\
|
---|
707 | \\
|
---|
708 | The cer file name can be followed by two numbers, for example:
|
---|
709 | \\
|
---|
710 | /disk99/cer001001 376 5723\\
|
---|
711 | \\
|
---|
712 | In this case the program processes only the events between and
|
---|
713 | including the numbers given.
|
---|
714 |
|
---|
715 | \end{description}
|
---|
716 |
|
---|
717 | \subsection{Optional Commands \label{opt}}
|
---|
718 |
|
---|
719 | \begin{description}
|
---|
720 |
|
---|
721 | \item[verbose\_level 1]
|
---|
722 |
|
---|
723 | Sets the quantity of information printed out by Reflector
|
---|
724 | when running. Possible values are 0 to 4
|
---|
725 |
|
---|
726 | \item[max\_events 50000]
|
---|
727 |
|
---|
728 | Fixes the maximum number of events to process.
|
---|
729 |
|
---|
730 | \item[energy\_cuts 100 1000]
|
---|
731 |
|
---|
732 | This statement forces the Reflector to process only showers
|
---|
733 | with primary energy between the given values (GeV).
|
---|
734 |
|
---|
735 | \item[seeds n1 n2]
|
---|
736 |
|
---|
737 | Seeds for the random number generators to used by the program
|
---|
738 | for the simulation of the absorption (both in the atmosphere
|
---|
739 | and on the mirror). Default values are 3141592 and
|
---|
740 | 2718182.
|
---|
741 |
|
---|
742 | \item[telescope\_position x y]
|
---|
743 |
|
---|
744 | Option included in version 0.5 of Reflector. Usually it is
|
---|
745 | not needed, since for normal MC production for MAGIC the
|
---|
746 | telescope is placed at the origin of coordinates (0,0). But,
|
---|
747 | if for some reason, we produce cerxxxxxx files with the
|
---|
748 | telescope in a different position, we must inform the
|
---|
749 | Reflector program in the input card using this option
|
---|
750 | (otherwise Reflector will fail to {\it find} the photons
|
---|
751 | in the cer file).
|
---|
752 |
|
---|
753 | \item[reflectivity\_file /path/reflectivity.dat]
|
---|
754 |
|
---|
755 | File containing mirror reflectivity as a function of
|
---|
756 | wavelength (see section \ref{neededfiles}). If this option is
|
---|
757 | not supplied, the program will look for
|
---|
758 | ``../Data/reflectivity.dat'' as previous versions of
|
---|
759 | Reflector did.
|
---|
760 |
|
---|
761 | \item[axisdev\_file /path/axisdev.dat]
|
---|
762 |
|
---|
763 | File containing single mirror spot deviation in {\bf x} and
|
---|
764 | {\bf y} on the camera in cm (see section
|
---|
765 | \ref{neededfiles}) for each mirror. If this option is not
|
---|
766 | supplied, the program will look for ``../Data/axisdev.dat''
|
---|
767 | as previous versions of Reflector did.
|
---|
768 |
|
---|
769 | \item[fixed\_target $\Theta$ $\Phi$]
|
---|
770 |
|
---|
771 | This statement fixes the telescope axis position. The first
|
---|
772 | number is the zenith angle $\Theta$ (deg) while the second is
|
---|
773 | the azimuthal angle $\Phi$ (deg). This corresponds to {\it
|
---|
774 | CORSIKA}'s definition of primary particle incident direction
|
---|
775 | (see fig. \ref{coorsystems}, left). For instance, $\phi = 90^\circ$
|
---|
776 | means that the telescope is pointing towards East. If this
|
---|
777 | option is omitted the telescope will always point in the
|
---|
778 | direction of the Corsika primary (whatever it is), or a
|
---|
779 | slightly modified direction if the wobble\_mode option is used
|
---|
780 | (see next point). When running the reflector over gamma data
|
---|
781 | generated in a range of zenith angles, one should therefore
|
---|
782 | ommit the fixed\_target option.
|
---|
783 |
|
---|
784 | \item[wobble\_mode w]
|
---|
785 |
|
---|
786 | Indicates whether the reflection should be done in the wobble
|
---|
787 | mode, that is, with shifted pointing with respect to the
|
---|
788 | nominal telescope orientation (given by fixed\_target or
|
---|
789 | otherwise, see above). The wobble mode is described in TDAS
|
---|
790 | 01-05. Possible values for w are 0 (no wobble mode), 1, -1
|
---|
791 | (image shift along $x_{camera}$ axis) and 3 (image shift along
|
---|
792 | $y_{camera}$ axis).
|
---|
793 |
|
---|
794 | \end{description}
|
---|
795 |
|
---|
796 | %------------------------------------------------------------
|
---|
797 |
|
---|
798 | \newpage
|
---|
799 | \section{Output file \label{out}}
|
---|
800 | The output file begins with two ascii lines:\\
|
---|
801 | \\
|
---|
802 | \verb"reflector 0.6" \\
|
---|
803 | \verb"START---RUN" \\
|
---|
804 | After the \verb"START---RUN" flag there is a carriage return, and then
|
---|
805 | the run header which is basically the one from Corsika with two added
|
---|
806 | variables, {\it wobble\_mode} and {\it atmospheric\_model}. Check the
|
---|
807 | Corsika manual for the meaning and units of the rest of them. All of the
|
---|
808 | variables 4-byte real numbers except the first, which is a 4 character
|
---|
809 | string containing the run header ascii label from Corsika:
|
---|
810 | \vspace*{0.5cm}
|
---|
811 | \\
|
---|
812 | %
|
---|
813 | \begin{tabular}{ll}
|
---|
814 | \parbox{5cm}{Variable} & Description \\
|
---|
815 | \hline
|
---|
816 | & \\
|
---|
817 | ASCII Label & 'RUNH' \\
|
---|
818 | RunNumber & \\
|
---|
819 | date & \\
|
---|
820 | Corsika\_version & \\
|
---|
821 | NumObsLev & \\
|
---|
822 | HeightLev[10] & \\
|
---|
823 | SlopeSpec & \\
|
---|
824 | ELowLim & \\
|
---|
825 | EUppLim & \\
|
---|
826 | EGS4\_flag & \\
|
---|
827 | NKG\_flag & \\
|
---|
828 | Ecutoffh & \\
|
---|
829 | Ecutoffe & \\
|
---|
830 | Ecutoffg & \\
|
---|
831 | C[50] & \\
|
---|
832 | wobble\_mode & Wobble mode with which the reflector was run (TDAS
|
---|
833 | 01-05) \\
|
---|
834 | atmospheric\_model & Atmospheric model used for the absorption
|
---|
835 | simulation \\
|
---|
836 | & 0 = no atmosphere; 1 = atm\_90percent; \\
|
---|
837 | & 2 = atm\_isothermal; 3 = atm\_corsika. \\
|
---|
838 | dummy1[18] & not used \\
|
---|
839 | CKA[40] & \\
|
---|
840 | CETA[5] & \\
|
---|
841 | CSTRBA[11] & \\
|
---|
842 | dummy2[104] & not used \\
|
---|
843 | AATM[5] & \\
|
---|
844 | BATM[5] & \\
|
---|
845 | CATM[5] & \\
|
---|
846 | NFL[4] & \\
|
---|
847 | &\\
|
---|
848 | \hline
|
---|
849 | \end{tabular}
|
---|
850 |
|
---|
851 | \newpage
|
---|
852 |
|
---|
853 | Then there comes a ``\verb"START-EVENT"'' flag, followed by a carriage
|
---|
854 | return and then the binary event header. Each variable is a 4-byte
|
---|
855 | float number except for the first one which is the event header label
|
---|
856 | from Corsika (a string of 4 characters). Some of of the variables from
|
---|
857 | Corsika are not explained here (see Corsika manual instead).
|
---|
858 | \vspace*{0.5cm}
|
---|
859 | \\
|
---|
860 | \begin{tabular}{ll}
|
---|
861 | \parbox{5cm}{Variable} & Description \\
|
---|
862 | \hline
|
---|
863 | & \\
|
---|
864 | ASCII label & 'EVTH' \\
|
---|
865 | EvtNumber & Event Number \\
|
---|
866 | PrimaryID & Primary particle identification code \\
|
---|
867 | Etotal & Primary particle total energy (GeV) \\
|
---|
868 | Thick0 & CORSIKA's starting altitude in g/cm2 \\
|
---|
869 | FirstTarget & CORSIKA's number of first target if fixed \\
|
---|
870 | zFirstInt & Height of first interaction in cm \\
|
---|
871 | p[3] & Primary particle momentum in x,y,-z directions (GeV) \\
|
---|
872 | Theta & Primary particle zenith angle (rad) \\
|
---|
873 | Phi & Primary particle azimuth angle (rad) \\
|
---|
874 |
|
---|
875 | NumRndSeq & Number of different CORSIKA random sequences (max. 10) \\
|
---|
876 | RndData[10][3] & RndData[i][0]: integer seed of sequence i \\
|
---|
877 | & RndData[i][1]: number of offset random calls (mod $10^6$) of sequence i. \\
|
---|
878 | & RndData[i][2]: number of offset random calls ($/10^6$) of sequence i. \\
|
---|
879 |
|
---|
880 | RunNumber & Run number \\
|
---|
881 | DateRun & Date of run yymmdd \\
|
---|
882 | Corsika\_version & Version of {\it CORSIKA} \\
|
---|
883 |
|
---|
884 | NumObsLev & Number of observation levels (should be always 1 for
|
---|
885 | us) \\
|
---|
886 | HeightLev[10] & Height of observation levels in cm \\
|
---|
887 |
|
---|
888 | SlopeSpec & Energy spectrum slope \\
|
---|
889 | ELowLim & Energy lower limit (GeV) \\
|
---|
890 | EUppLim & Energy upper limit (GeV) \\
|
---|
891 | Ecutoffh & \\
|
---|
892 | Ecutoffm & \\
|
---|
893 | Ecutoffe & \\
|
---|
894 | Ecutoffg & \\
|
---|
895 | NFLAIN & \\
|
---|
896 | NFLDIF & \\
|
---|
897 | NFLPI0 & \\
|
---|
898 | NFLPIF & \\
|
---|
899 | NFLCHE & \\
|
---|
900 | NFRAGM & \\
|
---|
901 | Bx & \\
|
---|
902 | By & \\
|
---|
903 | EGS4yn & \\
|
---|
904 | NKGyn & \\
|
---|
905 | GHEISHAyn & \\
|
---|
906 | VENUSyn & \\
|
---|
907 | & \\
|
---|
908 | \hline
|
---|
909 | \end{tabular}
|
---|
910 | %
|
---|
911 | \newpage
|
---|
912 | %
|
---|
913 |
|
---|
914 | \begin{tabular}{ll}
|
---|
915 |
|
---|
916 | \parbox{5cm}{Variable} & Description \\
|
---|
917 | \hline
|
---|
918 | & \\
|
---|
919 | CERENKOVyn & \\
|
---|
920 | NEUTRINOyn & \\
|
---|
921 | HORIZONTyn & \\
|
---|
922 | COMPUTER & \\
|
---|
923 |
|
---|
924 | ThetaMin & Minimum Theta of primaries (deg) \\
|
---|
925 | ThetaMax & Maximum Theta of primaries (deg) \\
|
---|
926 | PhiMin & Minimum Phi of primaries (deg) \\
|
---|
927 | PhiMax & Maximum Phi of primaries (deg) \\
|
---|
928 | CBunchSize & \\
|
---|
929 | CDetInX & \\
|
---|
930 | CDetInY & \\
|
---|
931 | CSpacInX & \\
|
---|
932 | CSpacInY & \\
|
---|
933 | CLenInX & \\
|
---|
934 | CLenInY & \\
|
---|
935 | COutput & \\
|
---|
936 | AngleNorthX & \\
|
---|
937 | MuonInfo & \\
|
---|
938 | StepLength & \\
|
---|
939 | CWaveLower & Wavelength lower limit (nm) \\
|
---|
940 | CWaveUpper & Wavelength upper limit (nm) \\
|
---|
941 | Multipl & \\
|
---|
942 | CorePos[2][20] & Core positions of randomized shower \\
|
---|
943 | SIBYLL[2] & \\
|
---|
944 | QGSJET[2] & \\
|
---|
945 | DPMJET[2] & \\
|
---|
946 | VENUS\_cross & \\
|
---|
947 | mu\_mult\_scat & \\
|
---|
948 | NKG\_range & \\
|
---|
949 | EFRCTHN[2] & \\
|
---|
950 | WMAX[2] & \\
|
---|
951 | rthin\_rmax & \\
|
---|
952 | viewcone\_angles[2] & Inner and outer angles of Corsika's VIEWCONE
|
---|
953 | option. \\
|
---|
954 | telescopePhi & Telescope azimuth (rad). Measured from South, counter-clockwise \\
|
---|
955 | telescopeTheta & Telescope zenith angle (rad) \\
|
---|
956 | TimeFirst & Arrival time on camera of first photon (ns) \\
|
---|
957 | TimeLast & Arrival time on camera of last photon (ns) \\
|
---|
958 |
|
---|
959 | & 6 next variables: CORSIKA longitudinal particle fit parameters \\
|
---|
960 | & \hspace{0.5cm} (see CORSIKA manual for precise meaning and units)\\
|
---|
961 | longi\_Nmax & Numer of charged particles at maximum \\
|
---|
962 | longi\_t0 & Atmospheric depth of shower starting point (N=0) \\
|
---|
963 | longi\_tmax & Atmospheric depth of shower maximum (g/cm$^2$) \\
|
---|
964 | longi\_a & \\
|
---|
965 | longi\_b & For {\bf longi\_a}, {\bf longi\_b}, {\bf longi\_c}, see CORSIKA manual \\
|
---|
966 | longi\_c & \\
|
---|
967 | longi\_chi2 & $\chi^2/dof$ of the fit\\
|
---|
968 | & \\
|
---|
969 | \hline
|
---|
970 | \end{tabular}
|
---|
971 |
|
---|
972 | \newpage
|
---|
973 |
|
---|
974 | \begin{tabular}{ll}
|
---|
975 | \parbox{5cm}{Variable} & Description \\
|
---|
976 | \hline
|
---|
977 | & \\
|
---|
978 | CORSIKAPhs & Original photons written by {\it CORSIKA} \\
|
---|
979 | AtmAbsPhs & Photons absorbed by the atmosphere \\
|
---|
980 | MirrAbsPhs & Photons absorbed by the mirror \\
|
---|
981 | OutOfMirrPhs & Photons outside the mirror \\
|
---|
982 | BlackSpotPhs & Photons lost in the "black spot" \\
|
---|
983 | OutOfChamPhs & Photons outside the camera \\
|
---|
984 | CPhotons & Photons reaching the camera \\
|
---|
985 |
|
---|
986 | elec\_cph\_fraction & Fraction of C-photons produced by electrons \\
|
---|
987 | muon\_cph\_fraction & Fraction of C-photons produced by muons \\
|
---|
988 | other\_cph\_fraction & Fraction of C-photons produced by electrons \\
|
---|
989 | & \\
|
---|
990 | \hline
|
---|
991 | \end{tabular}
|
---|
992 |
|
---|
993 | \vspace*{1cm}
|
---|
994 | The event header is followed by 8-word blocks, one for each photon
|
---|
995 | that reaches the camera. A photon block contains the following
|
---|
996 | variables:
|
---|
997 | \vspace*{0.5cm}
|
---|
998 | \\
|
---|
999 | \begin{tabular}{ll}
|
---|
1000 | Variable & Description \\
|
---|
1001 | \hline
|
---|
1002 | & \\
|
---|
1003 | w & Wavelength (nm) \\
|
---|
1004 | x, y & Impact point in camera coordinates (cm) \\
|
---|
1005 | u, v & Director cosines \\
|
---|
1006 | t & Arrival time on camera (ns) \\
|
---|
1007 | h & Production height (cm) \\
|
---|
1008 | phi & Incidence angle with respect to camera plane (rad) \\
|
---|
1009 | & \\
|
---|
1010 | \hline
|
---|
1011 | \end{tabular}
|
---|
1012 | \vspace*{0.5cm}
|
---|
1013 | \\
|
---|
1014 | After the last event photon block there is a blank line, an \verb$END---EVENT$
|
---|
1015 | flag, another blank line and then the following event. After the last
|
---|
1016 | event in a run it appears the flag ``\verb$END-----RUN$'', while after all
|
---|
1017 | the processed runs, a ``\verb$END----FILE$'' flag is written. Finally,
|
---|
1018 | after this flag an ``ascii tail'' has been added to the file: it
|
---|
1019 | consists of the ascii files {\it magic.def}, {\it axisdev.dat} and {\it
|
---|
1020 | reflectivity.dat} one after the other separated by blank lines. In
|
---|
1021 | this way all the relevant parameters used to produce the output are
|
---|
1022 | kept together with the reflected events.
|
---|
1023 |
|
---|
1024 | %------------------------------------------------------------
|
---|
1025 |
|
---|
1026 | \section{Appendix A}
|
---|
1027 |
|
---|
1028 | The list of all Reflector files follows.
|
---|
1029 | \begin{verbatim}
|
---|
1030 |
|
---|
1031 | MagicProgs/Simulation/Detector/Reflector_0.6/Changelog
|
---|
1032 | MagicProgs/Simulation/Detector/Reflector_0.6/Makefile
|
---|
1033 | MagicProgs/Simulation/Detector/Reflector_0.6/atm.c
|
---|
1034 | MagicProgs/Simulation/Detector/Reflector_0.6/atm.h
|
---|
1035 | MagicProgs/Simulation/Detector/Reflector_0.6/attach.c
|
---|
1036 | MagicProgs/Simulation/Detector/Reflector_0.6/attenu.f
|
---|
1037 | MagicProgs/Simulation/Detector/Reflector_0.6/config.mk.linux
|
---|
1038 | MagicProgs/Simulation/Detector/Reflector_0.6/config.mk.linux-gnu
|
---|
1039 | MagicProgs/Simulation/Detector/Reflector_0.6/config.mk.osf1
|
---|
1040 | MagicProgs/Simulation/Detector/Reflector_0.6/diag.c
|
---|
1041 | MagicProgs/Simulation/Detector/Reflector_0.6/diag.h
|
---|
1042 | MagicProgs/Simulation/Detector/Reflector_0.6/geometry.c
|
---|
1043 | MagicProgs/Simulation/Detector/Reflector_0.6/geometry.h
|
---|
1044 | MagicProgs/Simulation/Detector/Reflector_0.6/header.c
|
---|
1045 | MagicProgs/Simulation/Detector/Reflector_0.6/header.h
|
---|
1046 | MagicProgs/Simulation/Detector/Reflector_0.6/init.c
|
---|
1047 | MagicProgs/Simulation/Detector/Reflector_0.6/init.h
|
---|
1048 | MagicProgs/Simulation/Detector/Reflector_0.6/input.card
|
---|
1049 | MagicProgs/Simulation/Detector/Reflector_0.6/lagrange.h
|
---|
1050 | MagicProgs/Simulation/Detector/Reflector_0.6/parms.c
|
---|
1051 | MagicProgs/Simulation/Detector/Reflector_0.6/parms.h
|
---|
1052 | MagicProgs/Simulation/Detector/Reflector_0.6/ph2cph.c
|
---|
1053 | MagicProgs/Simulation/Detector/Reflector_0.6/refl-install
|
---|
1054 | MagicProgs/Simulation/Detector/Reflector_0.6/reflector.c
|
---|
1055 | MagicProgs/Simulation/Detector/Reflector_0.6/version.h
|
---|
1056 |
|
---|
1057 | MagicProgs/Simulation/Detector/Reflector_0.6/doc/Tdas0211.ps.gz
|
---|
1058 | MagicProgs/Simulation/Detector/Reflector_0.6/doc/Tdas0211.tex
|
---|
1059 | MagicProgs/Simulation/Detector/Reflector_0.6/doc/magic-tdas.sty
|
---|
1060 | MagicProgs/Simulation/Detector/Reflector_0.6/doc/magiclogo.eps
|
---|
1061 | MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/colimation.eps.gz
|
---|
1062 | MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/coma.eps.gz
|
---|
1063 | MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/coma_star.eps.gz
|
---|
1064 | MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/coorsystems.eps.gz
|
---|
1065 | MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/evcompare.eps.gz
|
---|
1066 | MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/parabola.eps.gz
|
---|
1067 | MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/refl06images.eps.gz
|
---|
1068 | MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/spot10kmf1694.eps.gz
|
---|
1069 | MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/spot10kmf1700.eps.gz
|
---|
1070 | MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/spot_inf_f1697.eps.gz
|
---|
1071 | MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/telecoor.eps.gz
|
---|
1072 | MagicProgs/Simulation/Detector/Reflector_0.6/doc/eps/timing.eps.gz
|
---|
1073 |
|
---|
1074 | MagicProgs/Simulation/Detector/Reflector_0.6/tester/Makefile
|
---|
1075 | MagicProgs/Simulation/Detector/Reflector_0.6/tester/cermaker.c
|
---|
1076 |
|
---|
1077 | MagicProgs/Simulation/Detector/Data/axisdev.dat
|
---|
1078 | MagicProgs/Simulation/Detector/Data/magic.def
|
---|
1079 | MagicProgs/Simulation/Detector/Data/reflectivity.dat
|
---|
1080 |
|
---|
1081 | MagicProgs/Simulation/Detector/lib/libranlib.a.osf1
|
---|
1082 | MagicProgs/Simulation/Detector/lib/libranlib.a.linux
|
---|
1083 |
|
---|
1084 | \end{verbatim}
|
---|
1085 |
|
---|
1086 | %%% BIBLIOGRAPHY %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
1087 |
|
---|
1088 | %%>>>> Use the following if you are using BibTeX for bibliography
|
---|
1089 | %\theBibliography
|
---|
1090 |
|
---|
1091 | %%>>>> Or the following if you include here by hand your
|
---|
1092 | %%>>>> bibliographic entries
|
---|
1093 |
|
---|
1094 | \end{document}
|
---|
1095 | %
|
---|
1096 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
1097 | %%% Upper-case A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
|
---|
1098 | %%% Lower-case a b c d e f g h i j k l m n o p q r s t u v w x y z
|
---|
1099 | %%% Digits 0 1 2 3 4 5 6 7 8 9
|
---|
1100 | %%% Exclamation ! Double quote " Hash (number) #
|
---|
1101 | %%% Dollar $ Percent % Ampersand &
|
---|
1102 | %%% Acute accent ' Left paren ( Right paren )
|
---|
1103 | %%% Asterisk * Plus + Comma ,
|
---|
1104 | %%% Minus - Point . Solidus /
|
---|
1105 | %%% Colon : Semicolon ; Less than <
|
---|
1106 | %%% Equals = Greater than > Question mark ?
|
---|
1107 | %%% At @ Left bracket [ Backslash \
|
---|
1108 | %%% Right bracket ] Circumflex ^ Underscore _
|
---|
1109 | %%% Grave accent ` Left brace { Vertical bar |
|
---|
1110 | %%% Right brace } Tilde ~
|
---|
1111 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
1112 | %% Local Variables:
|
---|
1113 | %% mode:latex
|
---|
1114 | %% mode:font-lock
|
---|
1115 | %% mode:auto-fill
|
---|
1116 | %% time-stamp-line-limit:100
|
---|
1117 | %% End:
|
---|
1118 | %% EOF
|
---|