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

Go to the source code of this file.

Functions/Subroutines

subroutine csampgintl
 

Function/Subroutine Documentation

◆ csampgintl()

subroutine csampgintl ( )

Definition at line 3 of file csampGIntL.f.

References ccomptpath(), cgetphotopxs(), cpairlpmxsec(), cpairpath(), cphotoeepath(), csetintinf(), cxrayp(), d, false, rndc(), and true.

Referenced by csampintl().

3  use modxsecmedia
4 !
5 ! pair, compton, photo-electric eff. photo-hadron
6 !
7  implicit none
8 #include "Zglobalc.h"
9 #include "Ztrack.h"
10 #include "Ztrackp.h"
11 #include "Ztrackv.h"
12 #include "Zevhnv.h"
13 #include "Zelemagp.h"
14 
15 !
16 
17  real*8 t, tkgpm2, cxai, den, cvh2den, eg
18  real*8 prob, u, cmpairmfp, mfp, xs
19  real*8 tcomp, tphot, tpair, tgp, tcoh
20  real*8 xprob(5), txray(5)
21 
22  real*4 xsec(5) ! coh, incoh, P%E 1/(g/cm2)
23  real*8 xaimin/0.1/
24 !////////////////
25  integer,save::nzero=0
26 !/////////////
27 !
28  eg = trackbefmove%p%fm%p(4)
29  if(lpmeffect .and. eg .gt. lpmpairemin) then
30 ! den = cthick2den(TrackBefMove.pos.depth)
31  den = cvh2den(trackbefmove%pos%height) ! better
32  call cpairlpmxsec(eg, den, prob)
33  call rndc(u)
34  t = -log(u) /prob
35  elseif( eg .gt. 1.022d-3 ) then
36  if(eg .le. excom2 ) then
37  call cxrayp(eg, 4, 5, xprob, txray)
38  prob= xprob(4)+xprob(5) ! 1/r%l
39  if( prob > 0. ) then
40  call rndc(u)
41  t = -log(u)/prob ! r%l
42  else
43  call cpairpath(eg, t)
44  endif
45  else
46  call cpairpath(eg, t)
47  endif
48  else
49  t = infty
50  endif
51  call csetintinf(t*x0, .false., 'pair')
52 
53  if(eg .le. excom1 ) then
54 ! use Xcom data
55  call cxrayp(eg, 1, 3, xprob, txray)
56  call csetintinf(txray(2)*x0, .false., 'compt')
57  call csetintinf(txray(3)*x0, .false., 'photoe')
58  call csetintinf(txray(1)*x0, .false., 'cohs')
59  else
60  if( eg .lt. maxcomptone ) then
61  call ccomptpath(eg, prob, t)
62  else
63  t = infty
64  endif
65  call csetintinf(t*x0, .false., 'compt')
66  if( eg .lt. maxphotoe ) then
67  call cphotoeepath(eg, prob, t)
68  call csetintinf(t*x0, .false., 'photoe')
69  endif
70  endif
71 ! photo hadron prod.
72  if( eg .gt. minphotoprode .and. howphotop > 0 ) then
73  call cgetphotopxs(activemdl2, trackbefmove%p,
74  * media(1), xs, mfp) ! xs in mb. mfp in kg/m2
75  call rndc(u)
76  tkgpm2 = -mfp*log(u)
77 !!! call cghPath(eg, tkgpm2) ! old interface
78  call csetintinf(tkgpm2, .false., 'photop')
79  endif
80 
81 ! magnetic pair
82  if(magpair .eq. 1 .and. eg .gt. magpairemin) then
83  xai = cxai(trackbefmove%p, mag)
84  if(xai .gt. xaimin) then
85  call rndc(u)
86  t = -log(u) * cmpairmfp(eg, xai)
87  call csetintinf(t, .true., 'mpair')
88  endif
89  endif
real *8 function cxai(gam, mag)
Definition: cxai.f:6
subroutine ccomptpath(Eg, p, path)
Definition: ccomptPath.f:18
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
! constants thru Cosmos real ! if multiplied to deg radian Torad ! light velocity m sec ! infinty ! kg m2 *Togpcm2 g cm2 ! g cm2 *Tokgpm2 kg m2 ! cm *Tom m ! m *Tocm cm ! g cm3 *Tokgpm3 kg m3 ! kg m3 *Togpcm3 g cm3 ! sec *Tonsec nsec ! Tesla m ! Avogadro *A2deninv ! mfp *n * xs
Definition: Zglobalc.h:18
subroutine cpairlpmxsec(eg, rhoin, xs)
Definition: cpairLPMXsec.f:16
subroutine cxrayp(Exin, m1, m2, p, path)
Definition: cGetXXsec.f:89
subroutine csetintinf(lenOrThick, decay, procname)
Definition: csetIntInf.f:4
subroutine cphotoeepath(eg, tp, path)
Definition: cphotoEEPath.f:35
real *8 function cmpairmfp(eg, xai)
Definition: cmPairMFP.f:4
real(4), dimension(:), allocatable, save den
Definition: cNRLAtmos.f:28
dE dx *! Nuc Int sampling table d
Definition: cblkMuInt.h:130
subroutine cgetphotopxs(model, pj, media, xs, mfp)
Definition: cGetXsec.f:631
real *8 function cvh2den(z)
Definition: ciniSegAtoms.f:54
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 ! knockon is considered Obsolete *PhotoProd false
Definition: cblkElemag.h:7
nodes t
subroutine cpairpath(Eg, path)
Definition: cpairPath.f:2
Here is the call graph for this function:
Here is the caller graph for this function: