COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cdedxInAir.f
Go to the documentation of this file.
1 !#include "BlockData/cblkdedx.h"
2 !#include "BlockData/cblkElemag.h"
3 ! test cdedxInAir
4 ! dedt in (GeV)/(kg/m2)
5 ! so it is 1000 MeV/ ((1000g)/ 10000 cm2) = 1.e4 MeV/(g/cm2)
6 ! implicit none
7 !
8 !#include "Zptcl.h"
9 !#include "Zmass.h"
10 !#include "Zcode.h"
11 !#include "Zelemagp.h"
12 
13 ! type(ptcl):: aPtcl
14 
15 ! integer j
16 ! real*8 rho, dedt, ek
17 !
18 !
19 ! Knockon =.false.
20 ! call cmkptc(kelec, regptcl, -1, aPtcl)
21 ! do j=1, 10
22 ! rho=2.e-3*10.**(-(j-1)/2.)
23 ! ek = aPtcl.mass*1.00001 - aPtcl.mass
24 ! do while (ek .lt. 100.)
25 ! aPtcl.fm.p(4) = ek + aPtcl.mass
26 ! call cdedxInAir(aPtcl, rho, dedt)
27 ! write(*, *) sngl(ek), sngl(dedt*1.e4)
28 ! ek=ek*10.**0.1
29 ! enddo
30 ! write(*, *)
31 ! enddo
32 ! end
33 ! ****************************************************************
34 ! * *
35 ! * cdedxInAir: gives -de/dx (GeV/(kg/m**2)) of e+/e- mu, pi, k,
36 ! * p etc in air.
37 ! ****************************************************************
38 !
39 ! /usage/ call cdedxInAir(ptcl, rhoin, dedt)
40 ! -- input--
41 ! ptcl: type ptcl
42 ! rhoin: density of air in kg/m**3
43 ! -- output --
44 ! dedt; energy loss GeV/(kg/m**2)
45 !
46 !
47 !
48  subroutine cdedxinair(aPtcl, rhoin, dedt, dedtF)
49  implicit none
50 
51 #include "Zptcl.h"
52 #include "Zcode.h"
53 #include "Zelemagp.h"
54 
55  type(ptcl):: aPtcl ! input paticle
56  real*8 rhoin ! input. density
57  real*8 dedt ! output. restriced energy loss rate
58  real*8 dedtF ! output. full energy loss rate
59 !
60  real*8 erg
61  integer charge
62 
63 ! next is moved to cbeginRun
64 ! if(first) then
65 ! call cdedxEleci(RecoilKineMinE, Knockon)
66 ! first = .false.
67 ! endif
68 
69  erg = aptcl%fm%p(4)
70 !
71  if(aptcl%code .eq. kelec) then
72  charge = aptcl%charge
73  call cdedxe(aptcl, rhoin, dedt, dedtf) ! in GeV/(g/cm2)
74  dedt = dedt / 10. ! to GeV/(kg/m2)
75  dedtf = dedtf/10.
76  else
77  call cdedxnone(aptcl, rhoin, dedt, dedtf) ! in GeV/(g/cm2)
78  dedt = dedt / 10. ! in GeV/(kg/m2)
79  dedtf = dedtf/10.
80  endif
81 
82  end
83 
84 
85 
max ptcl codes in the kelec
Definition: Zcode.h:2
subroutine cdedxnone(aPtcl, rhoin, dedt, dedtF)
Definition: cdedxNone.f:9
subroutine cdedxinair(aPtcl, rhoin, dedt, dedtF)
Definition: cdedxInAir.f:49
Definition: Zptcl.h:75
subroutine cdedxe(aPtcl, rho, dedt, dedtF)
Definition: cdedxe.f:9