COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cprimAcceptance.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine cprimacceptance (comp, e_or_p, rigth, cos1, cos2, fai1, fai2, prob)
 
real *8 function crigfunc1 (zen)
 
real *8 function crigfunc2 (phi)
 
subroutine csetcosdeg (cosin, degin)
 

Function/Subroutine Documentation

◆ cprimacceptance()

subroutine cprimacceptance ( type (component comp,
real*8  e_or_p,
real*8  rigth,
real*8  cos1,
real*8  cos2,
real*8  fai1,
real*8  fai2,
real*8  prob 
)

Definition at line 3 of file cprimAcceptance.f.

References cconv_prim_e(), crigfunc1(), d, and kdexpintf().

Referenced by __getacceptance.f__(), and cprimflux().

3 #include "Zglobalc.h"
4 #include "Zptcl.h"
5 #include "Zprimary.h"
6 
7  real*8 azmmin, azmmax, rig, cosx
8  logical degree, cosfactor
9  common /zpirmflux/ azmmin, azmmax, rig, cosx,
10  * degree, cosfactor
11 
12 
13  type(component)::comp ! input primary component
14  real*8 e_or_p ! input. E or p as given in primary file
15  real*8 rigth ! input. threshold rigidty below which geomagneic
16  ! effect appears. make it 0 if
17  ! no rigidity cut.
18  real*8 cos1, cos2 ! input. cos zenith range (cos1 < cos2)
19  real*8 fai1, fai2 ! input. azimuthal angle range (fai1< fai2) deg.
20  real*8 prob ! output. average prob. that the primary can come
21 
22  type(ptcl):: aptcl
23 !
24 
25  external crigfunc1
26  real*8 crigfunc1
27  real*8 error, ans
28 
29  integer icon
30  data eps/1.d-4/
31 
32 
33 
34  azmmin = fai1
35  azmmax = fai2
36  call cconv_prim_e(comp, e_or_p, aptcl)
37 ! rigidity
38  rig =
39  * sqrt( aptcl%fm%p(4)**2 - aptcl%mass**2 )/aptcl%charge
40 
41  if(rig .lt. rigth) then
42  call kdexpintf(crigfunc1, cos1, cos2, eps, ans, error, icon)
43  prob= ans/( (fai2-fai1) * (cos2 - cos1 )) ! fai is in deg. o.k
44  else
45  prob = 1.0
46  endif
atmos%rho(atmos%nodes) **exp(-(z-atmos%z(atmos%nodes))/Hinf) elseif(z .lt. atmos%z(1)) then ans=atmos%rho(1) **exp((atmos%z(1) -z)/atmos%H(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) a=atmos%a(i) if(a .ne. 0.d0) then ans=atmos%rho(i) **(1+a *(z-atmos%z(i))/atmos%H(i)) **(-1.0d0-1.d0/a) else ans=*atmos%rho(i) *exp(-(z-atmos%z(i))/atmos%H(i)) endif endif ! zsave=z ! endif cvh2den=ans end ! ---------------------------------- real *8 function cvh2temp(z) implicit none ! vettical height to temperatur(Kelvin) real *8 z ! input. vertical height in m ! output is temperature of the atmospher in Kelvin real *8 ans integer i if(z .gt. atmos%z(atmos%nodes)) then ans=atmos%T(atmos%nodes) elseif(z .lt. atmos%z(1)) then ans=atmos%T(1)+atmos%b(1) *(z - atmos%z(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) ans=atmos%T(i)+atmos%b(i) *(z-atmos%z(i)) endif cvh2temp=ans end !--------------------------------------------- real *8 function cthick2h(t) implicit none real *8 t ! input. air thickness in kg/m^2 real *8 logt, ans integer i real *8 dod0, fd, a logt=log(t) if(t .ge. atmos%cumd(1)) then ans=atmos%z(1) - *(logt - atmos%logcumd(1)) *atmos%H(1) elseif(t .le. atmos%cumd(atmos%nodes)) then ans=atmos%z(atmos%nodes) - *Hinf *log(t/atmos%cumd(atmos%nodes)) else call kdwhereis(t, atmos%nodes, atmos%cumd, 1, i) ! i is such that X(i) > x >=x(i+1) ans
real * azmmin
Definition: Zflux.h:1
subroutine cconv_prim_e(comp, e_or_p, aPtcl)
Definition: csampPrimary.f:128
subroutine kdexpintf(func, a, b, eps, ans, error, icon)
Definition: kdexpIntF.f:55
dE dx *! Nuc Int sampling table d
Definition: cblkMuInt.h:130
real azmmax
Definition: Zflux.h:1
Definition: Zptcl.h:75
real *8 function crigfunc1(zen)
real zen logical degree
Definition: Zflux.h:1
Here is the call graph for this function:
Here is the caller graph for this function:

◆ crigfunc1()

real*8 function crigfunc1 ( real*8  zen)

Definition at line 50 of file cprimAcceptance.f.

References crigfunc2(), and k16pgaussleg().

Referenced by cprimacceptance().

50  implicit none
51 #include "Zglobalc.h"
52 #include "Zptcl.h"
53 #include "Zprimary.h"
54 
55  real*8 azmmin, azmmax, rig, cosx
56  logical degree, cosfactor
57  common /zpirmflux/ azmmin, azmmax, rig, cosx,
58  * degree, cosfactor
59 
60  real*8 zen
61 
62  real*8 ans
63 
64 
65  external crigfunc2
66  real*8 crigfunc2
67 
68 ! integrate over phi = azmmin, azmmax
69  cosx = zen
71  crigfunc1 = ans
72  if(cosfactor) then
73  crigfunc1 = crigfunc1 * cosx
74  endif
atmos%rho(atmos%nodes) **exp(-(z-atmos%z(atmos%nodes))/Hinf) elseif(z .lt. atmos%z(1)) then ans=atmos%rho(1) **exp((atmos%z(1) -z)/atmos%H(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) a=atmos%a(i) if(a .ne. 0.d0) then ans=atmos%rho(i) **(1+a *(z-atmos%z(i))/atmos%H(i)) **(-1.0d0-1.d0/a) else ans=*atmos%rho(i) *exp(-(z-atmos%z(i))/atmos%H(i)) endif endif ! zsave=z ! endif cvh2den=ans end ! ---------------------------------- real *8 function cvh2temp(z) implicit none ! vettical height to temperatur(Kelvin) real *8 z ! input. vertical height in m ! output is temperature of the atmospher in Kelvin real *8 ans integer i if(z .gt. atmos%z(atmos%nodes)) then ans=atmos%T(atmos%nodes) elseif(z .lt. atmos%z(1)) then ans=atmos%T(1)+atmos%b(1) *(z - atmos%z(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) ans=atmos%T(i)+atmos%b(i) *(z-atmos%z(i)) endif cvh2temp=ans end !--------------------------------------------- real *8 function cthick2h(t) implicit none real *8 t ! input. air thickness in kg/m^2 real *8 logt, ans integer i real *8 dod0, fd, a logt=log(t) if(t .ge. atmos%cumd(1)) then ans=atmos%z(1) - *(logt - atmos%logcumd(1)) *atmos%H(1) elseif(t .le. atmos%cumd(atmos%nodes)) then ans=atmos%z(atmos%nodes) - *Hinf *log(t/atmos%cumd(atmos%nodes)) else call kdwhereis(t, atmos%nodes, atmos%cumd, 1, i) ! i is such that X(i) > x >=x(i+1) ans
real * azmmin
Definition: Zflux.h:1
real *8 function crigfunc2(phi)
subroutine k16pgaussleg(func, a, b, n, ans)
Definition: k16pGaussLeg.f:20
real azmmax
Definition: Zflux.h:1
real zen
Definition: Zflux.h:1
real *8 function crigfunc1(zen)
real zen logical degree
Definition: Zflux.h:1
Here is the call graph for this function:
Here is the caller graph for this function:

◆ crigfunc2()

real*8 function crigfunc2 ( real*8  phi)

Definition at line 78 of file cprimAcceptance.f.

References crigcut().

Referenced by crigfunc1().

78  implicit none
79 #include "Zglobalc.h"
80 #include "Zptcl.h"
81 #include "Zprimary.h"
82  real*8 phi ! iput in degree
83 ! for fixed cos and phi; get R(theta, fai, rig)
84 
85  real*8 azmmin, azmmax, rig, cosx
86  logical degree, cosfactor
87  common /zpirmflux/ azmmin, azmmax, rig, cosx,
88  * degree, cosfactor
89 
90  real*8 temp
91 !
92  real*8 prob
93 !
94  if(degree) then
95  temp = acos(cosx)/torad
96  else
97  temp = cosx
98  endif
99  call crigcut(phi, temp, rig, prob)
100  crigfunc2 = prob
subroutine crigcut(azmin, zen, rig, prob)
Definition: crigCut.f:6
real * azmmin
Definition: Zflux.h:1
real *8 function crigfunc2(phi)
real(4), dimension(:), allocatable, save temp
Definition: cNRLAtmos.f:29
real azmmax
Definition: Zflux.h:1
latitude latitude this system is used *****************************************************************! type coord sequence union map real z z in m endmap xyz map real ! latitude in deg is to the north ! longitude in deg is to the east *h ! height in m endmap llh map real ! polar angle * phi
Definition: Zcoord.h:25
real zen logical degree
Definition: Zflux.h:1
Here is the call graph for this function:
Here is the caller graph for this function:

◆ csetcosdeg()

subroutine csetcosdeg ( logical  cosin,
logical  degin 
)

Definition at line 104 of file cprimAcceptance.f.

Referenced by __getacceptance.f__(), __getst.f__(), and __showspec.f__().

104  implicit none
105  logical cosin, degin
106  real*8 azmmin, azmmax, rig, cosx
107  logical degree, cosfactor
108  common /zpirmflux/ azmmin, azmmax, rig, cosx,
109  * degree, cosfactor
110 
111  cosfactor = cosin
112  degree = degin
real * azmmin
Definition: Zflux.h:1
real azmmax
Definition: Zflux.h:1
real zen logical degree
Definition: Zflux.h:1
Here is the caller graph for this function: