35 real(8),
save::
xth = 0.05
36 real(8),
save::
pw = 0.5
98 real(8),
save::
k1u=0.25
118 real(8),
intent(in):: x
119 logical,
intent(out):: split
126 split = (x-
xth)**
pw > u
127 elseif(
mode == -3 )
then 131 write(0,*)
' you have to supply your owon code here' 132 write(0,*)
' to judge if this particle should be ' 133 write(0,*)
' split or not' 135 *
' Place is cJudgeSplit; first subroutine in csoftenPiK' 141 subroutine csoftenpik(inciptcl, pstore, nin, nout)
151 #include "Zmanagerp.h" 152 type(
ptcl):: inciptcl
154 integer,
intent(in)::nin
155 type(
ptcl):: pstore(*)
157 integer,
intent(out)::nout
158 logical,
save::first=.
true.
167 *
"$COSMOSTOP/UserHook/modifyX/softenparam.dat", jcon)
169 write(0,*)
'Data file for csoftenPiK could not be found' 170 write(0,*)
'in $COSMOSTOP/Util/Data/softenpiK.dat' 171 write(0,*)
'Forgot to set COSMOSTOP ?' 184 if( u <
repeat-nrepeat)
then 185 nrepeat = nrepeat + 1
194 call csoftenpik0(inciptcl, pstore, nnow, nout, exist)
195 if( exist == 0 )
exit 199 call csoftenpik1(inciptcl, pstore, nnow, nout, exist)
200 if( exist == 0 )
exit 206 subroutine csoftenpik0(inciptcl, pstore, nin, nout, exist)
217 type(
ptcl):: inciptcl
219 integer,
intent(in)::nin
220 type(
ptcl):: pstore(*)
222 integer,
intent(out)::nout
223 integer,
intent(out)::exist
230 real(8):: x, E0, Ex, u, u1, u2
237 e0 = inciptcl.fm.
p(4) - inciptcl.
mass 254 x = (pstore(i).fm.
p(4)-pstore(i).
mass)/e0
255 if( abs(
mode) == 3 )
then 262 * .or. pstore(i).
code ==
keta )
then 267 if( .not. split ) cycle
275 work(nw).fm.
p(4) = e1 + work(nw).
mass 279 work(nw).fm.
p(4) = e2 + work(nw).
mass 292 elseif(
mode == 1 )
then 296 * .or. pstore(i).
code ==
keta )
then 299 pstore(i).fm.
p(4) = pstore(i).
mass 300 pstore(i).fm.
p(1:3) = 0.
305 elseif(
mode == 2 )
then 309 * pstore(i).
charge == 0 ) .or.
312 pstore(i).fm.
p(4) = pstore(i).
mass 313 pstore(i).fm.
p(1:3) = 0.
318 elseif(
mode == 0 )
then 321 write(0,*)
' mode err=',
mode,
' in csoftenPiK0' 325 if(abs(
mode) == 3)
then 331 subroutine csoftenpik1(inciptcl, pstore, nin, nout, exist)
342 type(
ptcl):: inciptcl
344 integer,
intent(in)::nin
345 type(
ptcl):: pstore(*)
347 integer,
intent(out)::nout
348 integer,
intent(out)::exist
355 real(8):: x, E0, Ex, u, u1, u2
362 real(8):: xcent, centval
367 e0 = inciptcl.fm.
p(4) - inciptcl.
mass 384 x = (pstore(i).fm.
p(4)-pstore(i).
mass)/e0
386 if( abs(
mode) == 3 )
then 393 * .or. pstore(i).
code ==
keta )
then 402 split = u <
k1u*(temp/centval)
403 if( .not. split ) cycle
411 work(nw).fm.
p(4) = e1 + work(nw).
mass 415 work(nw).fm.
p(4) = e2 + work(nw).
mass 428 elseif(
mode == 1 )
then 432 * .or. pstore(i).
code ==
keta )
then 435 pstore(i).fm.
p(4) = pstore(i).
mass 436 pstore(i).fm.
p(1:3) = 0.
441 elseif(
mode == 2 )
then 445 * pstore(i).
charge == 0 ) .or.
448 pstore(i).fm.
p(4) = pstore(i).
mass 449 pstore(i).fm.
p(1:3) = 0.
454 elseif(
mode == 0 )
then 457 write(0,*)
' mode err=',
mode,
' in csoftenPiK0' 461 if(abs(
mode) == 3)
then 471 real(8),
intent(out):: E1
472 real(8),
intent(out):: E2
473 integer,
intent(out):: icon
474 real(8):: u, Emin, Em
484 e1 = u*( p.fm.p(4) - p.
mass)
485 e2 = (p.fm.p(4) -p.
mass) - e1
500 subroutine cae2p( pc )
517 p2 =e**2- ( pc.fm.
p(1)**2 + pc.fm.
p(2)**2 + pc.
mass**2)
518 if( p2 > pc.
mass**2 )
then 519 pc.fm.
p(3) = sign(sqrt(p2), pc.fm.
p(3))
522 p2 = pc.fm.
p(1)**2 + pc.fm.
p(2)**2 + pc.fm.
p(3)**2
523 if( e <= pc.
mass .or. p2 == 0. )
then 526 cf = sqrt( (e**2 - pc.
mass**2) / p2 )
527 pc.fm.
p(1:3) = pc.fm.
p(1:3)*cf
531 subroutine cgetmaxptcl(pstore, nin, pcode, pcharge, maxi, maxE)
538 integer,
intent(in):: nin
539 type(
ptcl):: pstore(nin)
541 integer(2),
intent(in):: pcode
542 integer(2),
intent(in):: pcharge
543 integer,
intent(out):: maxi
544 real(8),
intent(out):: maxE
553 if( pstore(i).
code /= pcode ) cycle
554 if( pstore(i).
charge /= pcharge ) cycle
555 if( maxe < pstore(i).fm.
p(4) )
then 556 maxe = pstore(i).fm.
p(4)
562 subroutine csoftenfe(inci, fwbwin, a, nin, nout)
568 integer,
intent(in):: fwbwin
574 integer,
intent(in)::nin
575 integer,
intent(out)::nout
580 integer::i, nc1, nc2, ncout1, ncout2
586 if(a(i).fm.
p(3) > 0.)
then 594 if( nc1 > 0 .and. ibits(fwbwin,0,1)>0 )
then 599 if( nc2 > 0 .and. ibits(fwbwin,1,1)>0 )
then 618 integer,
intent(in):: io
624 do while(
cgetparmn(io, vname, vvalue ) )
658 integer,
intent(in):: io
660 write(io,*)
'----------------------' 683 if(sep(2:10) ==
'---------')
exit 739 write(io, *)
' ', vname,
' ', x,
' /' 748 write(io,*)
' ', vname,
' ', x,
' /' 756 write(io, *)
' ', vname,
' ', c,
' /' 765 write(io, *)
' ', vname,
' ', i,
' /' 774 character*2 qmk/
" '"/
775 if(klena(cha) .gt. 0)
then 776 write(io, *)
' ', vname, qmk, cha(1:klena(cha)),
779 write(io, *)
' ', vname, qmk,
' ', qmk,
' /' 788 write(io, *)
' ', vname,
' ', logi,
' /' 791 function crejk1( x )
result(ans)
793 real(8),
intent(in):: x
798 function cxthu( E0 )
result(ans)
800 real(8),
intent(in):: E0
802 ans = 12.0*(e0/1.e8)**0.1
805 function ck1u( E0 )
result(ans)
807 real(8),
intent(in):: E0
809 ans = 0.3*(e0/1.e8)**0.09
812 function cgetparmn( io, vname, vv )
result(ans)
816 character*(*) vname, vv
821 character*(linel) line
825 read(io,
'(a)', end=100 ) line
826 if( line(1:1) .eq.
" " .and. line(2:2) .ne.
" ")
then 827 loc = index( line(3:linel),
" ") + 2
828 vname = line(2:loc-1)
829 loc2 = index( line,
"/")
830 if(loc2 .eq. 0 )
then 831 write(0,* )
' "/" is missing in the input data file ' 832 write(0,*)
' The line is: ', line
835 vv = line(loc+1:linel)
849 real(8),
intent(in)::E0
858 xth = 0.1
d0/(e0/1000.
d0)**0.2
integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
subroutine csoftenpik(inciptcl, pstore, nin, nout)
subroutine cwriteparai(io, vname, i)
subroutine creadparac(vvalue, cha)
subroutine creadparal(vvalue, logi)
subroutine creadparar2(vvalue, x, n)
max ptcl codes in the kkaon
real(8) function cxthu(E0)
block data cblkElemag data *AnihiE ! Eposi< 1 TeV, anihilation considered *X0/365.667/, ! radiation length of air in kg/m2 *Ecrit/81.e-3/, ! critical energy of air in GeV *MaxComptonE/1./, ! compton is considered below 1 GeV *MaxPhotoE/1.e-3/, ! above this, PhotoElectric effect neg. *MinPhotoProdE/153.e-3/, ! below 153 MeV, no gp --> hadrons ! scattering const not MeV *Knockon true
logical function cgetparmn(io, vname, vv)
subroutine cjudgesplit(pj, x, split)
subroutine creadsoftenpara(io)
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
*Zfirst p fm *Zfirst p Zfirst p code
subroutine creadparar(vvalue, x)
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
subroutine copenf(io, fnin, icon)
real(8) function csoftenfixxth(E0)
subroutine cwriteparacx(io, vname, c)
real(8) function ck1u(E0)
subroutine cwriteparal(io, vname, logi)
real(8) function crejk1(x)
subroutine creadparacx(vvalue, c)
subroutine cwriteparar2(io, vname, x, n)
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p charge
subroutine csoftenfe(inci, fwbwin, a, nin, nout)
subroutine csplitmeson(p, E1, E2, icon)
subroutine csoftenpik1(inciptcl, pstore, nin, nout, exist)
subroutine cgetmaxptcl(pstore, nin, pcode, pcharge, maxi, maxE)
block data cblkElemag data *AnihiE ! Eposi< 1 TeV, anihilation considered *X0/365.667/, ! radiation length of air in kg/m2 *Ecrit/81.e-3/, ! critical energy of air in GeV *MaxComptonE/1./, ! compton is considered below 1 GeV *MaxPhotoE/1.e-3/, ! above this, PhotoElectric effect neg. *MinPhotoProdE/153.e-3/, ! below 153 MeV, no gp --> hadrons ! scattering const not MeV *Knockon ! knockon is considered Obsolete *PhotoProd false
max ptcl codes in the keta
subroutine cwriteparac(io, vname, cha)
subroutine csoftenpik0(inciptcl, pstore, nin, nout, exist)
subroutine creadparai(vvalue, i)
subroutine cwriteparar(io, vname, x)
*Zfirst p fm *Zfirst p mass
max ptcl codes in the kpion
subroutine cwritesoftenpara(io)