COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cifDead.f
Go to the documentation of this file.
1 ! cifDead; see if too low energy
2 !
3  subroutine cifdead(a, icon)
4  implicit none
5 #include "Ztrack.h"
6 #include "Zcode.h"
7 #include "Ztrackv.h"
8 #include "Ztrackp.h"
9 #include "Zobs.h"
10 #include "Zobsp.h"
11 #include "Zincidentv.h"
12 
13 !
14 ! inform total eneegy to the user when the a particle
15 ! kinetic energy < Emin. (chaned)
16  type(track)::a ! input. a track to be examined
17  integer icon ! output. 0 ==> alive
18  ! 1 ==> energy < threshold
19  ! 2 ==> path exceeded the limit
20  ! 3 ==> out of upper bound
21  ! 4 ==> out of lower bound
22  ! 5 ==> angle out of limit
23  real*8 ke, cosfromaxis
24  integer jold
25 
26  icon = 0
27 ! for (evaporation) heavy fragment, KE<0 happens
28 ! due to the fact that p,n mass diff is neglected
29 ! we don't care.
30  ke = max(a%p%fm%p(4) - a%p%mass, 0.d0)
31 
32  if(a%t .gt. pathlimit ) then
33  call chookeabsorbd(a, ke, 2)
34  icon = 2
35  elseif(a%pos%height .ge. borderheighth) then
36  call chookeabsorbb(a, 1)
37  icon = 3
38  elseif(a%pos%height .le. borderheightl) then
39  call chookeabsorbb(a, 3)
40  icon = 4
41  elseif( backanglimit .gt. -1.0) then
42  if( a%p%fm%p(4) .gt. a%p%mass) then ! check only moving one
43  call cscalerprod(a%vec%w, dcatobsxyz, cosfromaxis)
44  if(cosfromaxis .lt. backanglimit) then
45  if(eabsorb(1) .ne. 0) then
46  call chookeabsorbd(a, ke, 4)
47  endif
48 ! discard it
49  icon = 5
50  endif
51  endif
52  endif
53 
54  if( icon .ne. 0 ) return !**************
55 
56  if(a%p%code .eq. kphoton .or. a%p%code .eq. kelec ) then
57  if( ke .lt. kemincas2) then
58  call rndsw(jold, 2)
59  endif
60  if(a%p%charge .eq. 1) then
61  if(a%p%fm%p(4)+a%p%mass .lt. kemincas) then
62 ! if(ke .lt. KEminCas) then
63  icon = 1
64  if(btest(eabsorb(1), bitpositron-1)) then
65 !
66  call chookeabsorbd(a, a%p%fm%p(4)+a%p%mass, 0)
67 ! call chookEabsorbD(a, ke, 0)
68  endif
69  endif
70  elseif( ke .lt. kemincas ) then
71  icon = 1
72  if(a%p%code .eq. kphoton) then
73  if(btest(eabsorb(1), bitphoton-1)) then
74  call chookeabsorbd(a, ke, 0)
75  endif
76  else
77  if(btest(eabsorb(1), bitelectron-1)) then
78  call chookeabsorbd(a, ke, 0)
79  endif
80  endif
81  endif
82  elseif(a%p%code .eq. knuc) then
83 !/ if( a.p.subcode .eq. antip) then
84  if(a%p%charge .eq. -1 .or.
85  * ( a%p%charge .eq. 0 .and. a%p%subcode .eq. antip )) then
86 ! can annihilate
87  if( a%p%fm%p(4)+a%p%mass .lt. kemin ) then
88 ! if( ke .lt. KEmin ) then
89  icon = 1
90  if(btest(eabsorb(1), bitantinuc) ) then
91  call chookeabsorbd(a, a%p%fm%p(4)+a%p%mass, 0)
92 ! call chookEabsorbD(a, ke, 0)
93  endif
94  endif
95  if( a%p%fm%p(4) .lt. kemin2) then
96  call rndsw(jold, 2)
97  endif
98  else
99  if( ke .lt. keminobs(knuc) ) then
100  icon = 1
101  if(a%p%charge .eq. 1 ) then
102  if(btest(eabsorb(1), bitproton) ) then
103  call chookeabsorbd(a, ke, 0)
104  endif
105  elseif (btest(eabsorb(1), bitneutron) ) then
106  call chookeabsorbd(a, ke, 0)
107  endif
108  endif
109  if(ke .lt. kemin2) then
110  call rndsw(jold, 2)
111  endif
112  endif
113  elseif(a%p%code .eq. kpion .or.
114  * a%p%code .eq. kkaon .or.
115  * a%p%code .eq. kmuon) then
116 ! can decay; max energy of last electron is Et incident
117 ! allmost all decay before coming here. don't worry
118 ! 2013/Feb.26
119 ! if(a.p.fm.p(4) .lt. KEmin) then
120  if( a%p%fm%p(4) .lt. min(kemin,keminobs(a%p%code) )) then
121 ! if(ke .lt. KEmin) then
122  icon = 1
123  if(a%p%fm%p(4) .lt. a%p%mass) then
124 ! very rare but happened (~2 times in 100 TeV p)
125  a%p%fm%p(4) = a%p%mass
126  endif
127  if(btest(eabsorb(1), bitdecay-1)) then
128  call chookeabsorbd(a, ke, 0)
129 ! call chookEabsorbD(a, a.p.fm.p(4), 0)
130  endif
131  endif
132  if(a%p%fm%p(4) .lt. kemin2) then
133  call rndsw(jold, 2)
134  endif
135  elseif( a%p%code .eq. kgnuc ) then
136 ! heavey
137  if( ke .lt. keminobs(knuc)) then
138  icon = 1
139  if(btest(eabsorb(1), bitproton) ) then
140  call chookeabsorbd(a, ke, 0)
141  endif
142  if(ke .lt. kemin2) then
143  call rndsw(jold, 2)
144  endif
145  endif
146  else
147 ! other particles; basically they should decay
148 ! so we use here total energy ???
149 ! if(a.p.fm.p(4) .lt. KEmin) then
150  if(ke .lt. keminobs(8)) then
151  icon = 1
152  if(btest(eabsorb(1), bitother-1)) then
153 ! call chookEabsorbD(a, a.p.fm.p(4), 0 )
154  call chookeabsorbd(a, ke, 0 )
155  endif
156  endif
157  if(ke .lt. kemin2) then
158  call rndsw(jold, 2)
159  endif
160  endif
161 
162  if( a%where .gt. endlevel2) then
163  call rndsw(jold, 2)
164  endif
165  end
max ptcl codes in the kgnuc
Definition: Zcode.h:2
subroutine chookeabsorbd(a, dE, info)
Definition: chookEabsorb.f:79
const int kphoton
Definition: Zcode.h:6
Definition: Ztrack.h:44
max ptcl codes in the kkaon
Definition: Zcode.h:2
max ptcl codes in the kelec
Definition: Zcode.h:2
subroutine chookeabsorbb(a, info)
Definition: chookEabsorb.f:146
subroutine cifdead(a, icon)
Definition: cifDead.f:4
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code knuc
Definition: cblkHeavy.h:7
max ptcl codes in the kseethru ! subcode integer antip
Definition: Zcode.h:2
max ptcl codes in the kpion
Definition: Zcode.h:2
max ptcl codes in the kmuon
Definition: Zcode.h:2
subroutine cscalerprod(a, b, c)
Definition: cscalerProd.f:4