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

Go to the source code of this file.

Functions/Subroutines

subroutine kpoisn (am, n)
 

Function/Subroutine Documentation

◆ kpoisn()

subroutine kpoisn ( real*8  am,
integer  n 
)

Definition at line 25 of file kpoisn.f.

References kgauss(), rndc(), and true.

Referenced by cfnptc(), and softenpik::csoftenpik().

25  implicit none
26  real*8 am
27  integer n
28 !
29  real*8 amsv/-1.98765d37/, ammx/20./
30  real*8 avsv, psv, q, u, sqam, x
31  save amsv, avsv, psv, sqam
32 !
33  logical more
34 !
35  if(am .lt. ammx) then
36  if(amsv .ne. am) then
37  avsv=am
38  psv=exp(-am)
39  endif
40  n=-1
41  q=1.
42  more=.true.
43  do while ( more )
44  n=n+1
45  call rndc(u)
46  q=q*u
47  more= q .ge. psv
48  enddo
49  else
50  if(amsv .ne. am) then
51  amsv=am
52  sqam=sqrt(am)
53  endif
54  more=.true.
55  do while ( more )
56  call kgauss(am, sqam, x)
57  n=x+.5
58  more=n .lt. 0
59  enddo
60  endif
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
subroutine kgauss(m, v, g1)
Definition: kgauss.f:10
function psv(X, Y, XB, IB)
Definition: qgsjet01.f:5223
integer n
Definition: Zcinippxc.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
Here is the call graph for this function:
Here is the caller graph for this function: