Changeset 19616


Ignore:
Timestamp:
Sep 3, 2019, 5:58:15 PM (2 weeks ago)
Author:
tbretz
Message:
As a first step take out all photons which hit the lens surface straight above the draft surface.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/msimreflector/MFresnelLens.cc

    r19614 r19616  
    260260    // Positive Fresnel Lenses ... are usually corrected for spherical aberration.
    261261
     262    // sin(omega) = R / sqrt(R^2+f^2)
     263    // tan(alpha) = sin(omega) / [ 1 - sqrt(n^2-sin(omega)^2) ]
     264
     265    const double so    = rc / sqrt(rc*rc + F*F);
     266    const double alpha = atan(so / (1-sqrt(n0*n0 - so*so))); // alpha<0, Range [0deg; -50deg]
     267
    262268    // Tim Niggemann:
    263269    // The surface of the lens follows the shape of a parabolic lens to compensate spherical aberration
    264270    // Draft angle: psi(r) = 3deg + r * 0.0473deg/mm
    265271
    266     // sin(omega) = R / sqrt(R^2+f^2)
    267     // tan(alpha) = sin(omega) / [ 1 - sqrt(n^2-sin(omega)^2) ]
    268 
    269     const double so    = rc / sqrt(rc*rc + F*F);
    270     const double alpha = atan(so / (1-sqrt(n0*n0 - so*so))); // alpha<0
     272    const double psi = (3 + r0*4.73e-3)*TMath::DegToRad(); // Range [0deg; 15deg]
     273
     274    // Find dw value of common z-value
     275    //
     276    // tan(90-psi)  =  z/dw
     277    // tan(alpha)   = -z/(w-dw)
     278    //
     279    // -> dw = w/(1-tan(90-psi)/tan(alpha))
     280
     281    // In a simplified world, all photons which hit the draft surface get lost
     282    // FIXME: This needs proper calculation in the same manner than for the main surface
     283    const double dw = w/(1-tan(TMath::Pi()/2-psi)/tan(alpha));
     284    if (p.R()>r1-dw)
     285        return -1;
    271286
    272287    //             theta                   peak_z
Note: See TracChangeset for help on using the changeset viewer.