COSMOS v7.655  COSMOSv7655
(AirShowerMC)
chAcol.f
Go to the documentation of this file.
1 ! hadoron-A collision. generic.
2  subroutine chacol(pj, ia, iz, a, ntp)
3  implicit none
4 #include "Zcondc.h"
5 #include "Zcode.h"
6 #include "Zptcl.h"
7 #include "Zevhnp.h"
8 #include "Zevhnv.h"
9 #include "Zspecial.h"
10 !
11  type(ptcl):: pj ! input projectile ptcl
12  integer ia ! input. mass no. of target
13  integer iz ! input. charge no. of target
14  type(ptcl):: a(*) ! output. produced ptcls
15  integer ntp ! number of produced ptcls
16 
17  integer nc
18  integer retry
19  data nc/0/
20  save nc
21  retry = 1
22  do while( retry .ne. 0)
23  call chacolx(pj, ia, iz, a, ntp)
24  if(modifyx .ne. 0) then
25  call ccheckx(pj, ia, iz, a, ntp, retry)
26  nc = nc + 1
27  if(nc .lt. 20) then
28  write(0,*)
29  * '************* X modification is requested !!!!!!!!!'
30  endif
31  else
32  retry = 0
33  endif
34  enddo
35  end
36  subroutine ccheckx(pj, ia, iz, a, ntp, retry)
37  implicit none
38 #include "Zcondc.h"
39 #include "Zcode.h"
40 #include "Zptcl.h"
41 #include "Zevhnp.h"
42 #include "Zevhnv.h"
43 #include "Zspecial.h"
44 !
45  type(ptcl):: pj ! input projectile ptcl
46  integer ia ! input. mass no. of target
47  integer iz ! input. charge no. of target
48  type(ptcl):: a(*) ! output. produced ptcls
49  integer ntp ! number of produced ptcls
50  integer retry ! output. 0 if event is acceptable
51 
52  integer i
53  real*8 u, ePimax, xPimax, eNmax, xNmax, xxx
54 
55  if(pj%code .eq. knuc) then
56 ! find max nucleon
57  epimax = 0.
58  enmax = 0.
59  do i = 1, ntp
60  if( a(i)%code .eq. knuc )then
61  enmax = max(enmax, a(i)%fm%p(4) )
62  elseif( a(i)%code .eq. kpion )then
63  epimax = max(epimax, a(i)%fm%p(4) )
64  endif
65  enddo
66  xpimax = epimax/pj%fm%p(4)
67  xnmax = enmax/pj%fm%p(4)
68  call rndc(u)
69  if(xnmax .gt. 0.97) then
70  retry = 0
71  elseif(modifyx .eq. 1) then
72 ! drop high Pi x; pw=3
73  if(u .lt. (1.0 - xpimax)**modifyxpw1) then
74  retry = 0
75  else
76  retry = 1
77  endif
78  elseif(modifyx .eq. 2) then
79 ! drop high Nx case; pw=3
80  if( u .lt. ((2.-xnmax)/2.)**modifyxpw1 ) then
81  retry = 0
82  else
83  retry = 1
84  endif
85  elseif(modifyx .eq. 3) then
86 ! drop large xPimax*xNmax ; pw =3
87  xxx = xpimax* xnmax
88  if(xxx .lt. 0.005) then
89  retry = 0
90  elseif( xxx .gt. 0.08 ) then
91  retry = 1
92  elseif(u .lt. ((0.08-xxx)/(0.08-0.005))**modifyxpw1 ) then
93  retry = 0
94  else
95  retry = 1
96  endif
97  elseif(modifyx .eq. 4) then
98  xxx = xpimax/xnmax
99  if(xxx .gt. 2.5) then
100  retry = 1
101  elseif(xxx .lt. 0.2) then
102  retry = 0
103  elseif(u .lt. ((2.5-xxx)/(2.5-0.2))**modifyxpw1) then
104  retry = 0
105  else
106  retry = 1
107  endif
108  elseif(modifyx .eq. 5) then
109  xxx=xpimax/xnmax
110  if(xxx .gt. 2.) then
111  retry = 0
112  elseif( u .gt. (1.-xxx/2.)**modifyxpw1) then
113  retry = 0
114  else
115  retry = 1
116  endif
117  elseif(modifyx .eq. 6 ) then
118 ! drop small xxx
119  xxx = xpimax* xnmax
120  if(xxx .gt. 0.05) then
121  retry = 0
122  elseif( u .lt. (1.-xxx/0.05)**modifyxpw1 ) then
123  retry = 0
124  else
125  retry = 1
126  endif
127  else
128  retry = 0
129  endif
130  else
131  retry = 0
132  endif
133  end
134 
135 
136  subroutine chacolx(pj, ia, iz, a, ntp)
137 ! if only.. is omitted "both" in here and cheavyInt.f
138 ! at link time of large program, a message something like
139 ! TargetXs for x86-64 is missing
140 ! comes out and stops.
141 #if !defined (MacIFC)
142  use modxsecmedia
143 #endif
144  implicit none
145 #include "Zcondc.h"
146 #include "Zcode.h"
147 #include "Zptcl.h"
148 #include "Zevhnp.h"
149 #include "Zevhnv.h"
150 #include "Zair.h"
151 
152 !
153  type(ptcl):: pj ! input projectile ptcl
154  integer ia ! input. mass no. of target
155  integer iz ! input. charge no. of target
156  type(ptcl):: a(*) ! output. produced ptcls
157  integer ntp ! number of produced ptcls
158 
159 #if defined (MacIFC)
160 #include "Zworkaround.h"
161 #endif
162 
163 
164 !
165 !c if(IntModel .eq. 'int1') then
166 !c if(pj.fm.p(4) .lt. Elund) then
167 ! h-A collision Fermi momentum is considered inside
168  if( activemdl .eq. 'phits') then
169  call cphits(pj, ia, iz, targetxs, a, ntp)
170  elseif( activemdl .eq. 'dpmjet3') then
171  call cdpmjet(pj, ia, iz, a, ntp)
172  elseif( activemdl .eq. 'jam') then
173 ! TargetXs is the xs on 'ia'. This is used
174 ! in jam to get bmax. better to include it in
175 ! chAcol argment in future ?
176  call cjamevent(pj, ia, iz, targetxs, a, ntp)
177  elseif( activemdl .eq. 'qgsjet2') then
178  call cqgsjet(pj, ia, iz, a, ntp)
179  elseif( activemdl == 'epos') then
180  call ceposgenoneevent(pj, ia, iz, a, ntp)
181  elseif( activemdl == 'sibyll') then
182  call csibyllevent(pj, ia, iz, a, ntp)
183  elseif( activemdl .eq. 'fritiof1.6' .or.
184  * activemdl .eq. 'nucrin') then
185  call chalund(pj, ia, iz, a, ntp)
186  elseif( activemdl .eq. 'ad-hoc') then
187  call chacoladhoc(pj, ia, iz, a, ntp)
188 ! elseif( ActiveMdl .eq. 'fritiof7.02') then
189 ! if(pj.code .eq. kkaon .and. LundPara(5) .ne. 0) then
190 ! call chAcolAdhoc(pj, ia, iz, a, ntp)
191 ! elseif(pj.code .eq. keta) then
192 ! call chAcolAdhoc(pj, ia, iz, a, ntp)
193 ! else
194 ! call chANewLund(pj, ia, iz, a, ntp)
195 ! endif
196  elseif(activemdl .eq. 'gheisha') then
197 ! if(pj.fm.p(4) .lt. Elund) then
198  call chagheisha(pj, ia, iz, a, ntp)
199 ! elseif(pj.fm.p(4) .lt. Elund2) then
200 ! call chAcolAdhoc(pj, ia, iz, a, ntp)
201 ! elseif(pj.fm.p(4) .lt. Elund3) then
202 ! if(pj.code .eq. kkaon .and. LundPara(5) .ne. 0) then
203 ! call chAcolAdhoc(pj, ia, iz, a, ntp)
204 ! elseif(pj.code .eq. keta) then
205 ! call chAcolAdhoc(pj, ia, iz, a, ntp)
206 ! else
207 ! call chANewLund(pj, ia, iz, a, ntp)
208 ! endif
209  elseif(activemdl .eq. 'incdpm3') then
210 ! dpmjet inclusive treatment
211  call cincdpm3(pj, ia, iz, a, ntp)
212  elseif(activemdl .eq. 'byenergy') then
213  if( pj%fm%p(4)-pj%mass .gt. 4.0) then
214  call chacoladhoc(pj, ia, iz, a, ntp)
215  else
216  call chalund(pj, ia, iz, a, ntp)
217  endif
218  else
219  call cerrormsg(activemdl, 1)
220  call cerrormsg('above model not supported',0)
221  endif
222 
223  end
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
block data cblkSpecial data * modifyx
Definition: cblkSpecial.h:6
subroutine chacolx(pj, ia, iz, a, ntp)
Definition: chAcol.f:137
subroutine rndc(u)
Definition: rnd.f:91
block data cblkSpecial data * modifyxpw1
Definition: cblkSpecial.h:6
subroutine chacoladhoc(pj, ia, iz, a, ntp)
Definition: chAcolAdhoc.f:3
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code knuc
Definition: cblkHeavy.h:7
Definition: Zptcl.h:75
max ptcl codes in the kpion
Definition: Zcode.h:2
subroutine chacol(pj, ia, iz, a, ntp)
Definition: chAcol.f:3
subroutine ccheckx(pj, ia, iz, a, ntp, retry)
Definition: chAcol.f:37