Ignore:
Timestamp:
10/09/02 19:15:28 (22 years ago)
Author:
bigongia
Message:
Version 0.6. Changed output format: added run header, changed event header,
             added ascii parameter files attached at the end of every output
             file to keep all info.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Simulation/Detector/ReflectorII/ph2cph.c

    r1431 r1535  
    9494  float sx, sy;
    9595  float t1, t2;
     96  float dummy = 0.;
     97
    9698
    9799  void makeOmega(float theta, float phi);
     
    255257
    256258  } else {
    257          
    258     d = (float) sqrt( b*b - 4.0*a*c );
    259          
     259
     260    /* Introduce positiveness check, AM 3/7/2002 */
     261
     262    dummy = b*b - 4.0*a*c;
     263
     264    if (dummy < 0.)           /* No intersection */
     265      return 2;
     266
     267    d = (float) sqrt(dummy);
     268
    260269    /*  two possible values for z */
    261270         
     
    276285  xcut[0] = xCT[0] + rCT[0]/rCT[2]*(xcut[2]-xCT[2]);
    277286  xcut[1] = xCT[1] + rCT[1]/rCT[2]*(xcut[2]-xCT[2]);
     287     
    278288
    279289  /* CBC */
     
    285295  sx = Lin2Curv( xcut[0] );
    286296  sy = Lin2Curv( xcut[1] );
    287          
     297
    288298  /* CBC */
    289299  Debug("@4 sx sy %f %f\n", sx, sy);
     
    310320    if (distmirr2 < distmirr) {
    311321      i_mirror = i;
    312       distmirr = distmirr2;
     322      distmirr  = distmirr2;
    313323    }
    314324  }
Note: See TracChangeset for help on using the changeset viewer.