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

Go to the source code of this file.

Functions/Subroutines

subroutine csamppolang (a, b, c, cost, icon)
 

Function/Subroutine Documentation

◆ csamppolang()

subroutine csamppolang ( real*8  a,
real*8  b,
real*8  c,
real*8  cost,
integer  icon 
)

Definition at line 8 of file csampPolAng.f.

References rndc(), and true.

Referenced by cspiangofpin().

8  implicit none
9  real*8 a, b, c, cost
10  integer icon
11 
12  real*8 eps/1.e-3/, u, xn, tmpc, x, tmp
13  integer nc
14 !
15  call rndc(u)
16  xn=2*u-1.
17  tmpc= (2*a+2./3.*c)*u
18  nc=0
19 ! *** until loop***
20  do while (.true.)
21  x=xn
22  xn=x -
23  * ((x**3+1.)*c/3 + (x**2-1.)*b/2 +a*(x+1.)
24  * - tmpc ) / ( (c*x + b)*x + a )
25  tmp=abs(x-xn)
26  nc=nc+1
27  if(nc .gt. 15 .or. abs(xn) .gt. 1.) then
28  icon=1
29  goto 900
30  endif
31  if (tmp .lt. eps)
32  * goto 100
33  enddo
34  100 continue
35  icon=0
36  cost=x
37  900 continue
dE dx *! Nuc Int sampling table e
Definition: cblkMuInt.h:130
block data cblkElemag data *AnihiE ! Eposi< 1 TeV, anihilation considered *X0/365.667/, ! radiation length of air in kg/m2 *Ecrit/81.e-3/, ! critical energy of air in GeV *MaxComptonE/1./, ! compton is considered below 1 GeV *MaxPhotoE/1.e-3/, ! above this, PhotoElectric effect neg. *MinPhotoProdE/153.e-3/, ! below 153 MeV, no gp --> hadrons ! scattering const not MeV *Knockon true
Definition: cblkElemag.h:7
subroutine rndc(u)
Definition: rnd.f:91
real(4), save a
Definition: cNRLAtmos.f:20
real(4), save b
Definition: cNRLAtmos.f:21
real cut integer nc
Definition: Zprivate.h:1
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21
dE dx *! Nuc Int sampling table c
Definition: cblkMuInt.h:130
Here is the call graph for this function:
Here is the caller graph for this function: