COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cinteNEP.f
Go to the documentation of this file.
1 ! treat interaction of MovedTrack for non e,g
2 !
3  subroutine cintenep
4  implicit none
5 
6 #include "Zcode.h"
7 #include "Ztrack.h"
8 #include "Ztrackv.h"
9 !
10 !
11 ! used to judge if user hook should be called
12 ! after MovedTrack interacted.
13 !
14 !
15  character*80 msg
16 !
17 ! ** ptcl stacking is done in each subroutine; should be changed
18 ! (except for hadronic interactions)
19 !////////////
20 ! logical deb
21 ! common /cccdeb/deb
22 !/////////////
23 
24 
25 !/////////
26 ! if(deb) then
27 ! write(*,*) 'NEP:proc=', IntInfArray(ProcessNo).process
28 ! endif
29 !////////////
30 
31  if(intinfarray(processno)%process .eq. 'knock') then
32  call csetknock
33  else
34  if(movedtrack%p%code .eq. kpion) then
35  call cintepion
36  elseif(movedtrack%p%code .eq. kkaon) then
37  call cintekaon
38  elseif(movedtrack%p%code .eq. knuc) then
39  call cintenuc
40  elseif(movedtrack%p%code .eq. kmuon) then
41  call cintemuon
42  elseif( movedtrack%p%code .eq. kgnuc ) then
43  call cinteheavy
44  elseif(movedtrack%p%code .ge. kalfa .and.
45  * movedtrack%p%code .le. khvymax ) then
46 !cc elseif(MovedTrack.p.code .ge. kdeut .and.
47  call cinteheavy
48  elseif(movedtrack%p%code .eq. ktriton) then
49  call cinteheavy
50  elseif(movedtrack%p%code .eq. kdmes ) then
51  call cintedmes
52  elseif(movedtrack%p%code .eq. knnb) then
53  call cintennb
54  elseif(movedtrack%p%code .eq. kddb) then
55  call cinteddb
56  elseif(movedtrack%p%code .eq. keta) then
57  call cinteeta
58  elseif(movedtrack%p%code .eq. kgzai) then
59  call cintegzai
60  elseif(movedtrack%p%code .eq. kbomega) then
61  call cintebomega
62  elseif(movedtrack%p%code .eq. klambda) then
63  call cintelambda
64  elseif(movedtrack%p%code .eq. klambdac) then
65  call cintelambdac
66  elseif(movedtrack%p%code .eq. ksigma) then
67  call cintesigma
68  elseif(movedtrack%p%code .eq. krho) then
69  call cinterho
70  elseif(movedtrack%p%code .eq. komega) then
71  call cinteomega
72  elseif(movedtrack%p%code .eq. kphi) then
73  call cintephi
74  elseif(movedtrack%p%code .eq. kds ) then
75  call cinteds
76  elseif(movedtrack%p%code .eq. ketap ) then
77  call cinteetap
78  elseif(movedtrack%p%code .eq. kdelta ) then
79  call cintedelta
80  elseif(movedtrack%p%code .eq. ktau ) then
81  call cintetau
82  else
83  write(0,*) ' E=', movedtrack%p%fm%p(4)
84  write(msg, *) ' ptcl =', movedtrack%p%code,
85  * ' interaction=',
86  * intinfarray(processno)%process,
87  * ' should not occure'
88  call cerrormsg(msg, 0)
89  endif
90  endif
91  end
92  subroutine csetknock
93  implicit none
94 #include "Zcode.h"
95 #include "Ztrack.h"
96 #include "Ztrackv.h"
97 !
98 
99  real*8 e1, er, tmp, cos1, cosr, cs, sn, sinr, sine
100  type(coord)::dc
101  type(coord)::dc1
102  type(coord)::dcr
103 !
104  type(track)::aTrack
105 
106  integer idx !
107 
108  atrack = movedtrack
109 ! surv elec surv elec
110  call cknockea(atrack%p, e1, er, cos1, cosr)
111 ! we must put recoil electron into Pwork first and
112 ! then survival high energy ptcl. This order will
113 ! be reversed when particles in Pwork are stacked.
114 ! (this inversion is to manage nuclear interactions where
115 ! the leading particle is put last in Pwork).
116 ! Therefore the low energy electron is first extracted.
117 ! Otherwise, stack overflow may take place for inclinde muons
118 ! (<= v5.33)
119 ! idx is to resolve the problem with a minumum effort.
120 !
121 ! survival paticle angle negligible always so
122 ! you may put dc.r = (0, 0, 1)
123  tmp=1.d0-cos1*cos1
124  if(tmp .lt. 0.d0) then
125  tmp=0.d0
126  cos1=1.d0
127  endif
128  sine=sqrt(tmp)
129 
130  call kcossn(cs, sn)
131  dc%r(1) = cs*sine
132  dc%r(2) = sn*sine
133  dc%r(3) = cos1
134 ! convert angle
135  call ctransvectz(movedtrack%vec%w, dc, dc1)
136 
137  atrack%p%fm%p(4) = e1
138  call csetdircos(dc1, atrack)
139  call ce2p(atrack)
140 ! Nproduced = Nproduced + 1
141  idx = nproduced + 2
142 ! Pwork(Nproduced) = aTrack.p
143  pwork(idx) = atrack%p
144 ! knock on electron
145  tmp=1.d0-cosr*cosr
146 
147  if(tmp .lt. 0.d0) then
148  tmp=0.d0
149  cosr=1.d0
150  endif
151  sinr=sqrt(tmp)
152  dc%r(1) = -cs*sinr
153  dc%r(2) = -sn*sinr
154  dc%r(3) = cosr
155  call ctransvectz(movedtrack%vec%w, dc, dcr)
156  atrack%p%fm%p(4) = er
157  call csetdircos(dcr, atrack)
158 !
159  call cmkptc(kelec, 0, -1, atrack%p)
160 
161  call ce2p(atrack)
162 ! Nproduced = Nproduced + 1
163  idx = nproduced + 1
164  pwork(idx) = atrack%p
165 
166  nproduced = nproduced + 2
167  end
168 
169 
170 
subroutine cintekaon
Definition: cinteNuc.f:71
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
subroutine cinteheavy
Definition: cinteNuc.f:149
max ptcl codes in the kgzai
Definition: Zcode.h:2
max ptcl codes in the ketap
Definition: Zcode.h:2
subroutine cintedelta
Definition: cinteNuc.f:132
max ptcl codes in the kdmes
Definition: Zcode.h:2
max ptcl codes in the kgnuc
Definition: Zcode.h:2
max ptcl codes in the kphi
Definition: Zcode.h:2
subroutine ce2p(aTrack)
Definition: ce2p.f:5
max ptcl codes in the klambdac
Definition: Zcode.h:2
subroutine cintennb
Definition: cinteNuc.f:235
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 cintephi
Definition: cinteNuc.f:452
subroutine csetknock
Definition: cinteNEP.f:93
max ptcl codes in the ktriton
Definition: Zcode.h:2
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kalfa
Definition: cblkHeavy.h:7
subroutine cinteddb
Definition: cinteNuc.f:256
subroutine cintelambdac
Definition: cinteNuc.f:379
max ptcl codes in the komega
Definition: Zcode.h:2
subroutine cintenep
Definition: cinteNEP.f:4
subroutine cintesigma
Definition: cinteNuc.f:277
subroutine cintebomega
Definition: cinteNuc.f:328
subroutine cintetau
Definition: cinteNuc.f:495
subroutine cintepion
Definition: cinteNuc.f:37
subroutine cinteetap
Definition: cinteNuc.f:362
subroutine cinteomega
Definition: cinteNuc.f:431
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
max ptcl codes in the klambda
Definition: Zcode.h:2
subroutine cinteeta
Definition: cinteNuc.f:345
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code knuc
Definition: cblkHeavy.h:7
max ptcl codes in the krho
Definition: Zcode.h:2
subroutine cknockea(aPtcl, erg2, erge, cos1, cosr)
Definition: cKnock.f:55
subroutine cinteds
Definition: cinteNuc.f:473
subroutine cintegzai
Definition: cinteNuc.f:311
subroutine ctransvectz(zax, dir1, dir2)
Definition: ctransVectZ.f:21
subroutine csetdircos(dc, aTrack)
Definition: cgetZenith.f:4
max ptcl codes in the knnb
Definition: Zcode.h:2
subroutine kcossn(cs, sn)
Definition: kcossn.f:13
max ptcl codes in the kds
Definition: Zcode.h:2
max ptcl codes in the ktau
Definition: Zcode.h:2
subroutine cinterho
Definition: cinteNuc.f:410
subroutine cmkptc(code, subcode, charge, p)
Definition: cmkptc.f:15
subroutine cintelambda
Definition: cinteNuc.f:294
max ptcl codes in the khvymax
Definition: Zcode.h:2
max ptcl codes in the keta
Definition: Zcode.h:2
Definition: Zcoord.h:43
subroutine cintedmes
Definition: cinteNuc.f:98
max ptcl codes in the kpion
Definition: Zcode.h:2
subroutine cintemuon
Definition: cinteNuc.f:174
max ptcl codes in the ksigma
Definition: Zcode.h:2
max ptcl codes in the kddb
Definition: Zcode.h:2
max ptcl codes in the kmuon
Definition: Zcode.h:2
subroutine cintenuc
Definition: cinteNuc.f:2
max ptcl codes in the kbomega
Definition: Zcode.h:2