Changeset 688 for trunk/MagicSoft


Ignore:
Timestamp:
03/05/01 16:41:16 (24 years ago)
Author:
harald
Message:
There was an error if one starts simulation from zenithangle = 0.
Ciro send me the solution.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Simulation/Corsika/Mmcs/main.f

    r687 r688  
    739739c And then, RE-calculate the GLOBAL direction in CORSIKA
    740740c We use formulae for spherical triangles
    741         theprim = acos( cos(THETAP)*cos(spinthe)+
     741
     742        if ( THETAP .EQ. 0.0 ) then                   
     743           theprim = spinthe
     744           phiprim = spinphi
     745        elseif ( spinthe .eq. 0.0 ) then
     746           theprim = THETAP
     747           phiprim = 0.0
     748        else
     749           theprim = acos( cos(THETAP)*cos(spinthe)+
    742750     $                  sin(THETAP)*sin(spinthe)*cos(spinphi) )
    743         phiprim = asin( sin(spinthe)*sin(spinphi)/sin(theprim) )
     751           phiprim = asin( sin(spinthe)*sin(spinphi)/sin(theprim) )
     752        endif
    744753        THETAP = theprim
    745754        EVTH(140) = spinthe
Note: See TracChangeset for help on using the changeset viewer.