COSMOS v7.655  COSMOSv7655
(AirShowerMC)
csnchp.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine csnchp (icon)
 
subroutine ckno (ave, sampled)
 
subroutine cknonarrow (ave, sampled)
 
subroutine cnbk (roots, ak)
 
subroutine cfnptc (a, ntot)
 
subroutine cfrnnb (efsl, rn)
 
subroutine cfrkc (efsl, rk)
 
subroutine cnddb (efrs, ddb)
 

Function/Subroutine Documentation

◆ cfnptc()

subroutine cfnptc ( type(ptcl), dimension(*)  a,
integer  ntot 
)

Definition at line 119 of file csnchp.f.

References cfrkc(), cfrnnb(), cmkptc(), cnddb(), d, kddb, keta, kkaon, knnb, kpion, kpoisn(), and ksgmim().

Referenced by cgnlp().

119 ! ******************
120 ! fix # of ptcls of each type, give mass, code
121 !
122 ! nch: integer. Input. # of charged ptcls to be sampled.
123 
124 ! a: /ptcl/ Output. to get ptcls. (mass, code,
125 ! charge) are assigned. some of subcode is
126 ! also assigned. (nn~, dd~ mass should be
127 ! refixed later)
128 ! ntot: integer. Output. to get the toal # of ptcls to be
129 ! produced.
130 !
131 ! *** Note ***
132 ! After this call, the # of particle of pi+-0, K+-0,
133 ! etc can be obtained as Npi0 etc which are in
134 ! ../Zevhnv.h
135 ! ----------------------------
136  implicit none
137 !---- include '../../Zptcl.h'
138 #include "Zptcl.h"
139 !---- include '../../Zcode.h'
140 #include "Zcode.h"
141 !---- include '../../Zmass.h'
142 #include "Zmass.h"
143 !---- include '../Zevhnp.h'
144 #include "Zevhnp.h"
145 !---- include '../Zevhnv.h'
146 #include "Zevhnv.h"
147  type(ptcl):: a(*)
148  integer ntot
149 !
150 !
151  real*8 missml, rnnb, rkc, p, exe, ddb
152  integer nchc, ntp, i
153 !
154 
155  missml = log( missingp%mass ) * 2
156 ! get average fraction of n-n~ pair to Nch (non leading)
157 ! lamda decay product. (exclude lamda c)
158  call cfrnnb(missml, rnnb)
159 ! get average fraction; (k+ + k-)/(pi+ + pi-)
160 !c call cfrkc(missml, rkc)
161  call cfrkc(log(efrs)*2, rkc)
162 ! get average # of dd~ pair
163 ! this is to account for the prompt muon production
164  call cnddb(efrs, ddb)
165  ddb=ddb * mudirp ! mudirp; default is 1.0
166 ! fix the # of particles of each type -------------
167  if(nch .eq. 0) then
168  nnnb = 0
169  nkaon = 0
170  nddb = 0
171  npic = 0
172  nk0 = 0
173  nkch = 0
174  call kpoisn(avncharged/2, npi0)
175 ! call ckno(Avncharged/2, Npi0)
176  else
177  nchc=nch
178  p =rnnb*nchc
179  call kpoisn(p, nnnb)
180 ! call ckno(p, Nnnb)
181  call kpoisn(ddb, nddb)
182 ! call ckno(ddb, Nddb)
183 ! the number of remaining charge(statistically)
184  nchc = nchc-nnnb - nddb
185 ! k+,k-,k0,k0~ (eqaul number in each type)
186  p =rkc/(1.+rkc)*nchc
187  call kpoisn(p , nkch)
188 ! call ckno(p , Nkch)
189  nkaon = nkch*2
190  nk0 = nkaon- nkch
191  npic = max(nchc- nkch, 0)
192  p = nch*.51
193  call kpoisn(p, npi0)
194 ! call ckno(p, Npi0)
195  endif
196  if(npi0 .gt. 10) then
197 ! assume some of them are eta. the pi0/eta ratio is
198 ! a parameter. normally 0.2. which means Neta= 0.16*Npi0
199 ! this is only to see the effect at >>10^19 ev region where
200 ! the decay of pi0 is inhibited and only eta can be the
201 ! source of h.e gamma.
202  neta = eta2pi0 / (1 . + eta2pi0) * npi0
203  npi0 = npi0 - neta
204  else
205  neta = 0
206  endif
207 !
208  ntp=0 ! counter for storing ptlcs in a.
209  do i=1, nnnb
210 ! sample additional excitation mass of nn~
211 ! <>=400 MeV
212  call ksgmim(1, 400.d-3, exe)
213  ntp=ntp+1
214  call cmkptc(knnb, 0, 0, a(ntp))
215  a(ntp)%mass=exe + a(ntp)%mass
216  enddo
217 ! (d,d~)
218  do i=1, nddb
219 ! sample additional excitation mass of dd~=
220  call ksgmim(1, 400.d-3, exe)
221  ntp=ntp+1
222  call cmkptc(kddb, 0, 0, a(ntp))
223  a(ntp)%mass=exe + a(ntp)%mass
224  enddo
225 ! pi+/-
226  do i=1, npic
227  ntp=ntp+1
228 ! + or - is determined later (set tentative +)
229  call cmkptc(kpion, 0, 1, a(ntp))
230  enddo
231 ! pi0
232  do i=1, npi0
233  ntp=ntp+1
234  call cmkptc(kpion, 0, 0, a(ntp))
235  enddo
236  do i = 1, neta
237  ntp = ntp + 1
238  call cmkptc(keta, 0, 0, a(ntp))
239  enddo
240 ! kaon +/ -
241  do i=1, nkch
242  ntp=ntp+1
243 ! + or - is determined later (set tentative +)
244  call cmkptc(kkaon, 0, 1, a(ntp))
245  enddo
246 ! k0
247  do i=1, nk0
248  ntp=ntp+1
249 ! k0,k0~ (long,short) is determined later
250  call cmkptc(kkaon, 0, 0, a(ntp))
251  enddo
252  ntot=ntp
subroutine cnddb(efrs, ddb)
Definition: csnchp.f:288
nodes i
max ptcl codes in the kkaon
Definition: Zcode.h:2
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
subroutine cfrkc(efsl, rk)
Definition: csnchp.f:266
subroutine kpoisn(am, n)
Definition: kpoisn.f:25
subroutine cfrnnb(efsl, rn)
Definition: csnchp.f:256
dE dx *! Nuc Int sampling table d
Definition: cblkMuInt.h:130
max ptcl codes in the knnb
Definition: Zcode.h:2
real(4), save a
Definition: cNRLAtmos.f:20
subroutine cmkptc(code, subcode, charge, p)
Definition: cmkptc.f:15
max ptcl codes in the keta
Definition: Zcode.h:2
subroutine ksgmim(n, av, x)
Definition: ksgamd.f:167
Definition: Zptcl.h:75
max ptcl codes in the kpion
Definition: Zcode.h:2
max ptcl codes in the kddb
Definition: Zcode.h:2
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cfrkc()

subroutine cfrkc ( real*8  efsl,
real*8  rk 
)

Definition at line 266 of file csnchp.f.

Referenced by cfnptc().

266  implicit none
267 !---- include '../../Zptcl.h'
268 #include "Zptcl.h"
269 !---- include '../Zevhnp.h'
270 #include "Zevhnp.h"
271 !---- include '../Zevhnv.h'
272 #include "Zevhnv.h"
273 ! fraction of k_charge to the pi_charge
274 ! efsl=log(s/gev**2). Cmsp.mass=root(s)
275 ! rk=0.07, 12.3, 14, 21 at 10, 100, 10000 GeV, 10**18 eV.
276 
277  real*8 efsl, rk, tmp
278  tmp = cmsp%mass**2-4.63
279  if(tmp .le. 0.) then
280  rk = 0.
281  else
282  rk=(kpilog*(efsl+0.069) + kpicns)*
283  * exp(-8.0/ tmp)
284  endif
Here is the caller graph for this function:

◆ cfrnnb()

subroutine cfrnnb ( real*8  efsl,
real*8  rn 
)

Definition at line 256 of file csnchp.f.

References d0.

Referenced by cfnptc().

256 ! fraction of (nn~) pairs; including lamda decay products
257 ! (but not lamda_c) to the total charged ptcls
258 ! efsl: log(s/gev**2). s is effective s. based on UA5
259  implicit none
260  real*8 efsl, rn
261 ! rn= 0.0115*efsl - 0.015 ; this is # of n + n~
262  rn= 0.0057d0*efsl - 0.0075d0
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
Here is the caller graph for this function:

◆ ckno()

subroutine ckno ( real*8  ave,
integer  sampled 
)

Definition at line 75 of file csnchp.f.

References d0, and rndc().

75 !
76 ! use z*exp(-pi/4 *x**2) dz
77 !
78  implicit none
79  real*8 ave ! input. average number
80  integer sampled
81 !
82  real*8 u
83  real*8 sqrtpi/1.772453851/ ! sqrt(pi)
84 
85  call rndc(u)
86 ! not add 0.5
87  sampled = max(0.d0, sqrt( -log(u) )* 2.0/sqrtpi * ave )
subroutine rndc(u)
Definition: rnd.f:91
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
! constants thru Cosmos real * sqrtpi
Definition: Zglobalc.h:2
Here is the call graph for this function:

◆ cknonarrow()

subroutine cknonarrow ( real*8  ave,
integer  sampled 
)

Definition at line 91 of file csnchp.f.

References rndc().

Referenced by csnchp().

91 !
92 ! use z**2 exp(-0.73 *x**3) dz
93 !
94  implicit none
95  real*8 ave ! input. average number
96  integer sampled
97 !
98  real*8 u
99  call rndc(u)
100  sampled = ( -log(u)/0.73)**0.333 * ave
subroutine rndc(u)
Definition: rnd.f:91
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cnbk()

subroutine cnbk ( real*8  roots,
real*8  ak 
)

Definition at line 104 of file csnchp.f.

References d0.

Referenced by csnchp().

104  implicit none
105  real*8 roots, ak
106 ! Negative binormial parameter k.(UA5 parameterization)
107 ! slog= log(s/gev**2); effective s
108  real*8 slog
109 !
110  slog = log(roots)*2
111  if(slog .gt. 5.3d0)then
112  ak= 1.d0/ (slog * 0.029d0 - 0.104d0)
113  else
114  ak=-1.d0
115  endif
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
Here is the caller graph for this function:

◆ cnddb()

subroutine cnddb ( real*8  efrs,
real*8  ddb 
)

Definition at line 288 of file csnchp.f.

References d, and d0.

Referenced by cfnptc().

288 ! average # of ddb pairs for p-p collisions
289 ! efrs: effective roots in GeV
290 ! *** for p-p or pi-p collision. the number of ddb
291 ! ---------old----------------
292 ! is assumed to be 1.e-3*log(roots)* exp(-78/roots)
293 ! at 1 TeV lab., this is about 6.2e-4
294 ! at 10000 TeV lab., 8e-3
295 ! ---------after v3.0 ----------
296 ! is assumed to be 3.e-3*roots**0.25* exp(-78/roots)
297 ! at 1 TeV lab., this is about 1.2e-3
298 ! at 10000 TeV lab. 2.e-2
299  implicit none
300 
301  real*8 efrs, ddb
302 !
303  ddb=3.d-3 * efrs ** 0.25 * exp(-78.d0/efrs)
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
dE dx *! Nuc Int sampling table d
Definition: cblkMuInt.h:130
Here is the caller graph for this function:

◆ csnchp()

subroutine csnchp ( integer  icon)

Definition at line 3 of file csnchp.f.

References ccpmul(), cknonarrow(), cnbk(), d0, knbino(), masp, and maspic.

Referenced by cgnlp().

3 ! sample # of charged ptcls
4 ! ******************************************************
5 ! Nch: integer. Output. sampled charged
6 ! particle number (excludeing
7 ! leadings)
8 ! icon: integer. Output. 0 --> o.k
9 ! 1 --> n.g (missing mass
10 ! is too small)
11  implicit none
12 
13 #include "Zptcl.h"
14 #include "Zmass.h"
15 #include "Zevhnv.h"
16 !
17  integer icon
18  real*8 redf
19  real*8 missgm ! missing mass
20  real*8 roots, parmk
21 
22 !
23  roots = cmsp%mass
24  missgm = missingp%mass
25  if(missgm .gt. maspic*1.1) then
26 ! Efrs = missgm* 2.5 *(roots/200.)**0.05
27 ! Efrs = missgm* 2.5 *(roots/200.)**0.06
28  efrs =max(
29  * missgm* 2.5 *(roots/200.)**0.06,
30  * missgm*2. + pjtatr%mass + masp)
31 
32 ! <nch> as a funcion of roots
33  call ccpmul(efrs, avncharged)
34 ! call ccpmul(roots, Avncharged)
35 ! see p.l 116b p195; correction : NOW OBSOLUTE. in this case
36 ! we must use Avncharged by roots.
37 ! for available energy (reduction factor)
38 ! redf=1.5d0*sqrt(missgm/roots) good at 53 gev
39 ! * /(1.d0+ 95.d0/Pjlab.fm.p(4))**0.30d0 *.977d0
40 ! redf=1.560d0*sqrt(missgm/roots) ! good at 900 gev
41 ! * /(1.d0+ 95.d0/Pjlab.fm.p(4))**0.30d0
42 ! compromise two above.
43 ! redf = 1.4385 * (Pjlab.fm.p(4)/1490)**0.0143 *
44 ! * sqrt(missgm/roots)
45 
46 ! <n> from ccpmul is for NSD.
47 ! For inclusion of SD events,
48 ! aven must be corrected at low energies
49 ! Avncharged = Avncharged* redf ! effective <N>
50 
51 !
52 ! fix n_b (=negative binormial) parameter k
53  call cnbk(efrs, parmk)
54 ! sample n_charge
55  if(parmk .le. 0.d0) then
56  call cknonarrow(avncharged, nch)
57 ! call kpoisn(Avncharged, Nch)
58  elseif(avncharged .lt. 8.) then
59 ! normal distribution is too wide
60  call cknonarrow(avncharged, nch)
61 ! call kpoisn(Avncharged, Nch)
62  else
63 ! negative binomial
64  call knbino(parmk, avncharged, nch)
65  endif
66  icon=0
67  else
68  nch=0
69  icon=1
70  endif
71 
subroutine ccpmul(roots, avn)
Definition: cgnlp.f:69
subroutine cnbk(roots, ak)
Definition: csnchp.f:104
subroutine cknonarrow(ave, sampled)
Definition: csnchp.f:91
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
masp
Definition: Zmass.h:5
subroutine knbino(k, avn, n)
Definition: knbino.f:15
maspic
Definition: Zmass.h:5
Here is the call graph for this function:
Here is the caller graph for this function: