source: JEM-EUSO/esaf_lal/trunk/packages/simulation/detector/optics/include/Ntrace_lenses.hh @ 13

Last change on this file since 13 was 13, checked in by moretto, 11 years ago

Initial import of the january version of esaf

File size: 2.5 KB
Line 
1/* -------------------------------------------------------------------------
2 *   trace_lenses.h
3 *
4 *   --- header file for trace_lenses.c
5 *
6 * Copyright (c) 2000-2010 N.Sakaki, Y.Takizawa, Y.Kawasaki
7 * All rights reserved.
8 * $Id$
9 * -------------------------------------------------------------------------
10 */
11#ifndef _NTRACE_LENSES_H
12#define _NTRACE_LENSES_H
13
14#include <stdio.h>
15#include "Ntrace_optics.hh"
16#include "Nphoton.hh"
17
18
19#ifdef NTRACE
20#define NSURFPTS 65536
21#define NMATPTS 128
22
23/* alias */
24#define X      0
25#define Y      1
26#define Z      2
27#define PX     3
28#define PY     4
29#define PZ     5
30#define L      6
31#define T      7
32
33/* error codes */
34
35#define RT_NO_SPINTERSECTION       -2
36#define RT_HIT_SIDE_WALL           -3
37#define RT_NO_INTERSECTION1        -4
38#define RT_NO_INTERSECTION2        -5
39#define RT_OUT_OF_SURFACE1         -6
40#define RT_OUT_OF_SURFACE2         -7
41#define RT_REFLECTION_DISCARDED    -8
42#define RT_NO_REFRACTED_LIGHT      -9
43#define RT_REFLECTED_IN_REF       -10
44#define RT_ABSORBED               -11
45#define RT_OUT_OF_IRIS            -12
46#define RT_STRAY_LIGHT            -13
47#define RT_ESCAPE_FROM_ENTRANCE   -14
48#define RT_EXCEED_ITER_MAX        -15
49#define RT_OUT_OF_DOES            -16
50
51#define RT_REFRACTED                1
52#define RT_REFLECTED                2
53
54#define SURFACE0                    0
55#define SURFACE1                -1000
56#define SURFACE2                -2000
57#define SURFACE3                -3000
58#define SURFACE4                -4000
59#define SURFACED                -5000
60#define SURFACE5                -5000
61#define SURFACE6                -6000
62#define SURFACE7                -7000
63#define SURFACE_FS              -8000
64#endif
65
66
67namespace NTraceLens {
68int ReadLensData(tel_param *p, FILE *fplog);
69double Get_n(int matid, tel_param *p, double lambda);
70double Get_k(int matid, tel_param *p, double lambda);
71int refract(NPhoton *photon, double nnn[3],double n1,double n2);
72int trace_lens(tel_param *para, NPhoton *photon, FILE *fplog);
73int CalSpheVec(double aX, double aY, double aZ, double aCZ, double nnnDIFF[3]);
74int ReadDiffractData(tel_param *p, FILE *fplog);
75double Cal_D(double r, tel_param *p);
76int diffract(int ID, tel_param *p, NPhoton *photon, double Zc,
77             double n1, double n2, double wl, double wl0, int m);
78int CheckRcut(tel_param *p, NPhoton *photon, int flag);
79double differential_r(int i, double *lens_r,double *lens_z, int n_lens_elem);
80void SetRunGen(int i);
81void SetEffFactor(double ef);
82
83};
84
85#endif /* _TRACE_LENSES_H */
Note: See TracBrowser for help on using the repository browser.