source: JEM-EUSO/esaf_cc_at_lal/packages/simulation/externals/slast/src/atm/depth_r_rint.F @ 114

Last change on this file since 114 was 114, checked in by moretto, 11 years ago

actual version of ESAF at CCin2p3

File size: 1.1 KB
Line 
1*
2*     ... THIS FUNCTION RETURNS THE DEPTH IN THE ATMOSPHERE ...
3*     ... BETWEEN THE POINT WITH RADIUS_VECTOR R(3) AND THE ...
4*     ... INTERACTION POINT
5*     ... DATE: 3.06.2002
6*     ... AUTHOR: D.V. NAUMOV
7*
8      REAL FUNCTION DEPTH_R_RINT(R)
9      IMPLICIT NONE
10#include "detector.inc"
11#include "event.inc"
12      REAL R(3), PI, HALF_PI, Hstar, H_INT,THETA_INT,H_R,THETA_R
13      REAL DEPTH_R, DEPTH_INT, DEPTH_INTEGRAL,EPS
14*
15      PI      = ACOS(-1.)
16      EPS = 1.e-3
17      HALF_PI = PI/2 -EPS
18*     
19      CALL IMPACT(R,Hstar,H_INT,THETA_INT,H_R,THETA_R)
20      IF(THETA_R.LE.HALF_PI) THEN
21         DEPTH_R = DEPTH_INTEGRAL(THETA_R,H_R)
22      ELSE
23         THETA_R = PI - THETA_R
24         DEPTH_R = 2*DEPTH_INTEGRAL(HALF_PI,Hstar)-
25     +        DEPTH_INTEGRAL(THETA_R,H_R)
26      ENDIF
27*     
28      IF(THETA_INT.LE.HALF_PI) THEN
29        DEPTH_INT = DEPTH_INTEGRAL(THETA_INT,H_INT)
30      ELSE
31         THETA_INT = PI - THETA_INT
32         DEPTH_INT = 2*DEPTH_INTEGRAL(HALF_PI,Hstar)-
33     +        DEPTH_INTEGRAL(THETA_INT,H_INT)
34         
35      ENDIF
36      DEPTH_R_RINT  = DEPTH_R - DEPTH_INT
37      IF(DEPTH_R_RINT.LT.0.) DEPTH_R_RINT = 0.
38 1000 CONTINUE
39      END
Note: See TracBrowser for help on using the repository browser.