#define ACCL1 #define ACCL2 #define ACCL3 #ifdef ACCL1 #define ACCL0 #endif #ifdef ACCL2 #define ACCL0 #endif #define WNUM 40 // cannot be divisible by 13 #define MAXLYS 180 // maximum number of ice layers #define MAXGEO 5200 // maximum number of OMs #define NPHO 100 // maximum number of photons propagated by one thread #define NTHR 320 // NTHR*NBLK should not exceed the count of different random number multipliers #define NBLK 360 // must be a multiple of WNUM, should be divisible by the number of multiprocessors #define HNUM 1048576 // size of the output hit buffer, must hold hits from up to NPHO*NTHR*NBLK photons static const float xx=1.e-5; static const float OVR=5; static const float R=OVR*0.178; union name{ unsigned short k; struct{ unsigned char dom; unsigned char str; unsigned short one; }; float f; name(){ f=1.0; } }; struct DOM{ float r[3]; }; struct hit{ int i; float t; }; struct photon{ int q; float n[3]; float t, r[3]; }; #ifdef ACCL2 static const int cx=10, cy=10, cz=10; #endif struct ices{ float wvl; // wavelength of this block float ocm; // 1 / speed of light in medium float coschr, sinchr; // cos and sin of the cherenkov angle struct{ float abs; // absorption float sca; // scattering } z [MAXLYS]; }; struct dats{ union{ struct{ int hidx; float r[3]; }; struct{ DOM * oms; name * names; }; }; int type; // 0=flasher/1=cascade int hnum; // size of hits buffer int size; // size of kurt table int rsize; // count of multipliers int gsize; // count of initialized OMs float g; // float ocv; // 1 / speed of light in vacuum float dh, hdh, rdh, hmin; // step, 1/step, min and max depth #ifdef ACCL2 int cn[3]; float cl[3], crst[3]; short cidx[cx][cy][cz]; short carr[cx*cy*cz+MAXGEO]; #endif hit * hits; unsigned int * rm; unsigned long long * rs; photon * pz; ices * w[WNUM]; int nfla; };