Ignore:
Timestamp:
04/04/03 21:15:24 (22 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Simulation/Detector
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Simulation/Detector/ReflectorII/Changelog

    r1725 r1908  
    11** Add changes at the beginning! **
     2
     34/04/2003 A. Moralejo
     4
     5init.h, geometry.c, ph2cph.c:
     6introduced variable ct_max_radius, the maximum distance in x or y from the
     7center to the edge of the telescope, measured on the parabolic dish. This
     8is used in a fast check of whether the photon hits the disk in ph2cph.c
     9
     10ph2cph.c:
     11in function Lin2Curv(float x), changed the calculation of the curvilinear
     12coordinates (which before was only valid for ~17 m focus paraboloids).
    213
    31422/01/2003 A. Moralejo
  • trunk/MagicSoft/Simulation/Detector/ReflectorII/geometry.c

    r1614 r1908  
    1818int     ct_NPixels;             /*  number of pixels            */
    1919float   ct_PixelWidth;          /*  pixel width (cm)            */
     20float   ct_max_radius;          /* Maximum value of curvilinear
     21                                 * coordinates of the center of
     22                                 * the mirrors.
     23                                 */
    2024
    2125mirror *ct_data=NULL;           /*  ptr to mirror data          */
     
    3236static void ReadMirrorTable(FILE *geofile)
    3337{   int i;      /*  Mirror index        */
     38
     39    ct_max_radius = 0.;
    3440
    3541    if ((ct_data=(mirror *)malloc(sizeof(mirror)*ct_NMirrors)) == NULL)
     
    4955          break;
    5056
     57        ct_max_radius = (ct_data[i].sx > ct_max_radius? ct_data[i].sx :
     58                         ct_max_radius);
     59        ct_max_radius = (ct_data[i].sy > ct_max_radius? ct_data[i].sy :
     60                         ct_max_radius);
    5161      }
     62
    5263    if (i < ct_NMirrors)
    5364      FatalError(MIRR_FEW___FTL, i);
     
    198209    fclose(geofile);
    199210
     211    ct_max_radius += ct_RMirror;
     212
    200213    if (strlen(reflectivity_filename) == 0)
    201214      strcpy(reflectivity_filename, REFLECTIVITY_FILE);
  • trunk/MagicSoft/Simulation/Detector/ReflectorII/init.h

    r1722 r1908  
    5959extern int   ct_NPixels;                /*  number of pixels            */
    6060extern float ct_PixelWidth;             /*  pixel width (cm)            */
    61 
     61extern float ct_max_radius;             /* Approximate mirror dish radius,
     62                                         * used for fast rejection of photons
     63                                         * not hitting the dish (in ph2cph.c).
     64                                         */
    6265
    6366typedef struct
  • trunk/MagicSoft/Simulation/Detector/ReflectorII/ph2cph.c

    r1624 r1908  
    9292
    9393  float distmirr, distmirr2;  /* distances used in MAGIC reflection routine */
     94
     95
    9496  float sx, sy;
    9597  float t1, t2;
     
    307309
    308310  /*  is it outside the dish? */
    309          
    310   if ((fabs(sx) > 850.0) || (fabs(sy) > 850.0)) {
     311  if ((fabs(sx) > ct_max_radius) || (fabs(sy) > ct_max_radius)) {
    311312    /*
    312313    cout << "CONDITION 1 !" << endl << flush;
     
    848849Lin2Curv(float x)
    849850{
     851/*
    850852  x /= 100.f;
    851853  return ((x + 0.000144175317185f * x * x * x)*100.f);
     854*/
     855
     856  double k = 0.25/ct_Focal_mean;
     857  return ((2*k*x*sqrt(1+4*k*k*x*x)+asinh(2*k*x))/4/k);
    852858}
    853859
Note: See TracChangeset for help on using the changeset viewer.