COSMOS v7.655  COSMOSv7655
(AirShowerMC)
csampEIntL.f
Go to the documentation of this file.
1 ! csampEIntL: sample electron interaction length.
2  subroutine csampeintl
3  use modxsecmedia
4  use modmcscontrol
5 !
6 ! brems, knock-on, and anihilation are considered
7 !
8  implicit none
9 #include "Ztrack.h"
10 #include "Ztrackp.h"
11 #include "Ztrackv.h"
12 #include "Zelemagp.h"
13 
14 !
15 
16  real*8 t
17  real*8 cupsilon, cmBremMFP, u
18  real*8 ee, den, cvh2den, prob
19 !
20  ee = trackbefmove%p%fm%p(4)
21  if(lpmeffect .and. ee .gt. lpmbrememin) then
22 ! den = cthick2den(TrackBefMove.pos.depth)
23  den = cvh2den(trackbefmove%pos%height)
24  call cbremlpmxsec(ee, den, prob)
25  call rndc(u)
26  t = -log(u) / prob
27  else
28  call cbremspath(ee, t)
29  endif
30  call csetintinf(t*x0, .false., 'brems')
31  if(knockon) then
32  if(trackbefmove%p%charge .eq. -1) then
33  call cmollerpath(ee, recoilkinemine, prob, t)
34  call csetintinf(t*x0, .false., 'mscat')
35  else
36  call cbhabhapath(ee, recoilkinemine, prob, t)
37  call csetintinf(t*x0, .false., 'bscat')
38  endif
39  endif
40  if(trackbefmove%p%charge .eq. 1 .and.
41  * ee .lt. anihie ) then
42 ! if(ee - TrackBefMove.p.mass .lt. 100.e-6) then
43 ! t = 0.
44 ! else
45  call canihipath(ee, prob, t)
46 ! endif
47  call csetintinf(t*x0, .false., 'anihi')
48  endif
49  if(magbrem .eq. 2) then
50  if(ee .gt. magbrememin) then
51 ! compute upsilon
52  upsilon = cupsilon(trackbefmove%p, mag)
53  if( upsilon .gt. upsilonmin ) then
54  call rndc(u)
55  t = -log(u) * cmbremmfp(ee, upsilon, 0.d0)
56  call csetintinf(t, .true., 'mbrem')
57  endif
58  endif
59  endif
60 
61  if( donewmcs ) then
62  call cfixmcsmodel( trackbefmove%p )
63  else
64  activemcs = 'Mol'
65  endif
66  if( activemcs == 'El_con' ) then
67  call cfixmixedconst(1, int(trackbefmove%p%charge ) )
68  elseif(activemcs == 'El_hin' ) then
69  write(0,*) ' El_hin is not supported in Cosmos'
70  stop
71  endif
72 
73 
74  end
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
! Parameters used for hadronic cascade shower is generated newline ! For you may give as as or em quick generation of AS for heavy primaries is tried See chookASbyH f character *Generate2 don t touch this for skeleton flesh use integer MagBrem no magnetic bremsstrahlung is considered newline ! if and Ee energy loss due to magnetic brems is considered newline ! if and Ee real sampling of gamma is performed WaitRatio ! must be made small so that WaitRatio *E0 sim MagBremEmin integer MagPair no magnetic pair creation is considered newline ! if and Eg real sampling is the LPM effect is considered when Ee LpmBremEmin for electrons and ! Eg LpmPairEmin for gamma rays real *MagBremEmin E magnetic bremsstrahlung by electrons may be considered if not considered at all newline total energy loss due to brems is considered newline gamma energy is sampled actually newline ! If upsilon(Ee/m *B/Bcr) is small
subroutine cbremspath(Ee, path)
Definition: cbremsPath.f:2
subroutine cmollerpath(ein, w, prob, path)
Definition: cmollerPath.f:9
subroutine csetintinf(lenOrThick, decay, procname)
Definition: csetIntInf.f:4
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
subroutine csampeintl
Definition: csampEIntL.f:3
subroutine cfixmcsmodel(aPtcl)
Definition: cfixMCSmodel.f:2
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
subroutine cbhabhapath(ein, w, prob, path)
Definition: cbhabhaPath.f:8
subroutine canihipath(ein, prob, path)
Definition: canihiPath.f:14
subroutine cbremlpmxsec(e, rhoin, xs)
Definition: cbremLMPXsec.f:29