COSMOS v7.655  COSMOSv7655
(AirShowerMC)
softenpik Module Reference

Functions/Subroutines

subroutine cjudgesplit (pj, x, split)
 
subroutine csoftenpik (inciptcl, pstore, nin, nout)
 
subroutine csoftenpik0 (inciptcl, pstore, nin, nout, exist)
 
subroutine csoftenpik1 (inciptcl, pstore, nin, nout, exist)
 
subroutine csplitmeson (p, E1, E2, icon)
 
subroutine cae2p (pc)
 
subroutine cgetmaxptcl (pstore, nin, pcode, pcharge, maxi, maxE)
 
subroutine csoftenfe (inci, fwbwin, a, nin, nout)
 
subroutine creadsoftenpara (io)
 
subroutine cwritesoftenpara (io)
 
subroutine cskipsep (io)
 
subroutine creadparar (vvalue, x)
 
subroutine creadparar2 (vvalue, x, n)
 
subroutine creadparacx (vvalue, c)
 
subroutine creadparai (vvalue, i)
 
subroutine creadparac (vvalue, cha)
 
subroutine creadparal (vvalue, logi)
 
subroutine cwriteparar (io, vname, x)
 
subroutine cwriteparar2 (io, vname, x, n)
 
subroutine cwriteparacx (io, vname, c)
 
subroutine cwriteparai (io, vname, i)
 
subroutine cwriteparac (io, vname, cha)
 
subroutine cwriteparal (io, vname, logi)
 
real(8) function crejk1 (x)
 
real(8) function cxthu (E0)
 
real(8) function ck1u (E0)
 
logical function cgetparmn (io, vname, vv)
 
real(8) function csoftenfixxth (E0)
 

Variables

integer, save mode = 3
 
real(8), save xth = 0.05
 
real(8), save pw = 0.5
 
real(8), save repeat = 2.5
 
real(8), save e0th = 500.
 
integer, save fwbw = 3
 
logical, save special =.false.
 
logical, save leadingpik =.true.
 
logical, save usexincms =.false.
 
real(8), save k1u =0.25
 
real(8), save xthl =1.d0
 
real(8), save xthu =10.d0
 
real(8), save rejpw =0.
 
logical, save modified
 
real(8), save e0lab =1.e12
 
integer, parameter half =12000
 

Function/Subroutine Documentation

◆ cae2p()

subroutine cae2p ( type(ptcl pc)

Definition at line 501 of file csoftenPiK.f.

References mass, and p.

Referenced by csoftenpik0(), and csoftenpik1().

501 ! adjust mpmentum by refering to changed E
502 ! keep the Pt same, if possible
503  implicit none
504 #include "Zcode.h"
505 #include "Zptcl.h"
506 
507 
508  type(ptcl):: pc
509 
510  real(8):: e, p2, cf
511 
512  e = pc.fm.p(4)
513 !
514 ! Pt^2 + Pz^2 +m^2= E^2
515 ! so new Pz =sqrt( E^2-Pt^2-m^2)
516 ! the sign is the same as original one
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))
520  else
521 ! keep the direction and shirnk the magnitude of p
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
524  pc.fm.p(1:3) = 0.
525  else
526  cf = sqrt( (e**2 - pc.mass**2) / p2 )
527  pc.fm.p(1:3) = pc.fm.p(1:3)*cf
528  endif
529  endif
dE dx *! Nuc Int sampling table e
Definition: cblkMuInt.h:130
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
Definition: Zptcl.h:75
*Zfirst p fm *Zfirst p mass
Definition: ZavoidUnionMap.h:1
Here is the caller graph for this function:

◆ cgetmaxptcl()

subroutine cgetmaxptcl ( type(ptcl), dimension(nin)  pstore,
integer, intent(in)  nin,
integer(2), intent(in)  pcode,
integer(2), intent(in)  pcharge,
integer, intent(out)  maxi,
real(8), intent(out)  maxE 
)

Definition at line 532 of file csoftenPiK.f.

References charge, code, and p.

Referenced by csoftenpik0(), and csoftenpik1().

532 ! get max energy ptcl with the same code / charge as incident
533 ! if meson is incident, most probably, it is leading.
534  implicit none
535 #include "Zcode.h"
536 #include "Zptcl.h"
537 
538  integer,intent(in):: nin ! # of ptcls in pstore
539  type(ptcl):: pstore(nin)
540 
541  integer(2),intent(in):: pcode ! incident code
542  integer(2),intent(in):: pcharge ! // charge
543  integer,intent(out):: maxi ! index of maxE in pstore //
544  real(8),intent(out):: maxe ! max Energy with the same code/charg as
545  ! incident. if there is no such, 0
546 
547 
548  integer i
549 
550  maxi = 0
551  maxe = 0.
552  do i = 1, nin
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)
557  maxi = i
558  endif
559  enddo
nodes i
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
*Zfirst p fm *Zfirst p Zfirst p code
Definition: ZavoidUnionMap.h:1
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p charge
Definition: ZavoidUnionMap.h:1
Definition: Zptcl.h:75
Here is the caller graph for this function:

◆ cgetparmn()

logical function cgetparmn ( integer  io,
character*(*)  vname,
character*(*)  vv 
)

Definition at line 813 of file csoftenPiK.f.

References false, parameter(), and true.

813 ! get parameter variable name and given value(s) from io
814  implicit none
815  integer io
816  character*(*) vname, vv ! output
817  logical ans
818 
819  integer linel
820  parameter( linel = 100)
821  character*(linel) line
822  integer loc, loc2
823  vname = " "
824  do while(.true.)
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
833  stop 1234
834  endif
835  vv = line(loc+1:linel) ! some data containes '/' such as '../../Media' so put all
836  ! data.
837  goto 50
838  endif
839  enddo
840  50 continue
841  ans = .true.
842  return
843  100 continue
844  ans =.false.
integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
atmos%rho(atmos%nodes) **exp(-(z-atmos%z(atmos%nodes))/Hinf) elseif(z .lt. atmos%z(1)) then ans=atmos%rho(1) **exp((atmos%z(1) -z)/atmos%H(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) a=atmos%a(i) if(a .ne. 0.d0) then ans=atmos%rho(i) **(1+a *(z-atmos%z(i))/atmos%H(i)) **(-1.0d0-1.d0/a) else ans=*atmos%rho(i) *exp(-(z-atmos%z(i))/atmos%H(i)) endif endif ! zsave=z ! endif cvh2den=ans end ! ---------------------------------- real *8 function cvh2temp(z) implicit none ! vettical height to temperatur(Kelvin) real *8 z ! input. vertical height in m ! output is temperature of the atmospher in Kelvin real *8 ans integer i if(z .gt. atmos%z(atmos%nodes)) then ans=atmos%T(atmos%nodes) elseif(z .lt. atmos%z(1)) then ans=atmos%T(1)+atmos%b(1) *(z - atmos%z(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) ans=atmos%T(i)+atmos%b(i) *(z-atmos%z(i)) endif cvh2temp=ans end !--------------------------------------------- real *8 function cthick2h(t) implicit none real *8 t ! input. air thickness in kg/m^2 real *8 logt, ans integer i real *8 dod0, fd, a logt=log(t) if(t .ge. atmos%cumd(1)) then ans=atmos%z(1) - *(logt - atmos%logcumd(1)) *atmos%H(1) elseif(t .le. atmos%cumd(atmos%nodes)) then ans=atmos%z(atmos%nodes) - *Hinf *log(t/atmos%cumd(atmos%nodes)) else call kdwhereis(t, atmos%nodes, atmos%cumd, 1, i) ! i is such that X(i) > x >=x(i+1) ans
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
Definition: cblkElemag.h:7
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
Definition: cblkElemag.h:7
Here is the call graph for this function:

◆ cjudgesplit()

subroutine cjudgesplit ( type(ptcl pj,
real(8), intent(in)  x,
logical, intent(out)  split 
)

Definition at line 114 of file csoftenPiK.f.

References mode, pw, rndc(), and xth.

Referenced by csoftenpik0().

114  implicit none
115 ! judge if this x should be split
116 #include "Zptcl.h"
117  type(ptcl):: pj ! input. projectile. you may use this
118  real(8),intent(in):: x ! KE ratio
119  logical,intent(out):: split ! .true. or .false.. if true, split meson
120 
121  real(8):: u
122 
123  if( mode == 3) then
124  call rndc(u) ! uniform rn in (0,1)
125 ! if pw in (x-xth)**pw is smaller, stronger softening
126  split = (x-xth)**pw > u
127  elseif(mode == -3 ) then
128 ! comment out next lines and supply your judgement
129 ! and fix split (.true. or .false.)
130 ! you may use xth, pw etc which are defined before "contains"
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'
134  write(0,*)
135  * ' Place is cJudgeSplit; first subroutine in csoftenPiK'
136  stop
137  endif
138 
integer, save mode
Definition: csoftenPiK.f:34
subroutine rndc(u)
Definition: rnd.f:91
real(8), save pw
Definition: csoftenPiK.f:36
Definition: Zptcl.h:75
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21
real(8), save xth
Definition: csoftenPiK.f:35
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ck1u()

real(8) function softenpik::ck1u ( real(8), intent(in)  E0)

Definition at line 806 of file csoftenPiK.f.

Referenced by csoftenpik().

806  implicit none
807  real(8),intent(in):: e0 ! lab E0 in Gev
808  real(8):: ans ! k1u
809  ans = 0.3*(e0/1.e8)**0.09
atmos%rho(atmos%nodes) **exp(-(z-atmos%z(atmos%nodes))/Hinf) elseif(z .lt. atmos%z(1)) then ans=atmos%rho(1) **exp((atmos%z(1) -z)/atmos%H(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) a=atmos%a(i) if(a .ne. 0.d0) then ans=atmos%rho(i) **(1+a *(z-atmos%z(i))/atmos%H(i)) **(-1.0d0-1.d0/a) else ans=*atmos%rho(i) *exp(-(z-atmos%z(i))/atmos%H(i)) endif endif ! zsave=z ! endif cvh2den=ans end ! ---------------------------------- real *8 function cvh2temp(z) implicit none ! vettical height to temperatur(Kelvin) real *8 z ! input. vertical height in m ! output is temperature of the atmospher in Kelvin real *8 ans integer i if(z .gt. atmos%z(atmos%nodes)) then ans=atmos%T(atmos%nodes) elseif(z .lt. atmos%z(1)) then ans=atmos%T(1)+atmos%b(1) *(z - atmos%z(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) ans=atmos%T(i)+atmos%b(i) *(z-atmos%z(i)) endif cvh2temp=ans end !--------------------------------------------- real *8 function cthick2h(t) implicit none real *8 t ! input. air thickness in kg/m^2 real *8 logt, ans integer i real *8 dod0, fd, a logt=log(t) if(t .ge. atmos%cumd(1)) then ans=atmos%z(1) - *(logt - atmos%logcumd(1)) *atmos%H(1) elseif(t .le. atmos%cumd(atmos%nodes)) then ans=atmos%z(atmos%nodes) - *Hinf *log(t/atmos%cumd(atmos%nodes)) else call kdwhereis(t, atmos%nodes, atmos%cumd, 1, i) ! i is such that X(i) > x >=x(i+1) ans
Here is the caller graph for this function:

◆ creadparac()

subroutine creadparac ( character*(*)  vvalue,
character*(*)  cha 
)

Definition at line 720 of file csoftenPiK.f.

720  implicit none
721  character*(*) vvalue
722  character*(*) cha
723  read(vvalue, *) cha

◆ creadparacx()

subroutine creadparacx ( character*(*)  vvalue,
complex*8  c 
)

Definition at line 706 of file csoftenPiK.f.

706  implicit none
707  character*(*) vvalue
708  complex*8 c
709  read( vvalue, *) c
dE dx *! Nuc Int sampling table c
Definition: cblkMuInt.h:130

◆ creadparai()

subroutine creadparai ( character*(*)  vvalue,
integer  i 
)

Definition at line 713 of file csoftenPiK.f.

713  implicit none
714  character*(*) vvalue
715  integer i
716  read(vvalue, *) i
nodes i

◆ creadparal()

subroutine creadparal ( character*(*)  vvalue,
logical  logi 
)

Definition at line 727 of file csoftenPiK.f.

727  implicit none
728  character*(*) vvalue
729  logical logi
730  read(vvalue, *) logi

◆ creadparar()

subroutine creadparar ( character*(*)  vvalue,
real*8  x 
)

Definition at line 688 of file csoftenPiK.f.

688  implicit none
689  integer io
690  character*(*) vvalue
691  real*8 x
692 ! read(vvalue, *) x, x
693  read(vvalue, *) x
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21

◆ creadparar2()

subroutine creadparar2 ( character*(*)  vvalue,
real*8, dimension(n x,
integer  n 
)

Definition at line 696 of file csoftenPiK.f.

696  implicit none
697  integer io
698  character*(*) vvalue
699  integer n
700  real*8 x(n)
701  read(vvalue, *) x
integer n
Definition: Zcinippxc.h:1
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21

◆ creadsoftenpara()

subroutine creadsoftenpara ( integer, intent(in)  io)

Definition at line 617 of file csoftenPiK.f.

References cgetparmn(), creadparai(), creadparal(), creadparar(), cskipsep(), e0th, fwbw, k1u, leadingpik, mode, pw, rejpw, repeat, special, usexincms, xth, xthl, and xthu.

617  implicit none
618  integer,intent(in):: io ! logical dev. #
619  character*24 vname
620  character*100 vvalue
621 
622 
623  call cskipsep(io)
624  do while( cgetparmn(io, vname, vvalue ) )
625  select case(vname)
626  case('mode')
627  call creadparai(vvalue, mode)
628  case('xth')
629  call creadparar(vvalue, xth)
630  case('E0th')
631  call creadparar(vvalue, e0th)
632  case('fwbw')
633  call creadparai(vvalue, fwbw)
634  case('pw')
635  call creadparar(vvalue, pw)
636  case('repeat')
637  call creadparar(vvalue, repeat)
638  case('special')
639  call creadparal(vvalue, special)
640  case('leadingPiK')
641  call creadparal(vvalue, leadingpik)
642  case('useXinCMS')
643  call creadparal(vvalue, usexincms)
644  case('k1u')
645  call creadparar(vvalue, k1u)
646  case('xthl')
647  call creadparar(vvalue, xthl)
648  case('xthu')
649  call creadparar(vvalue, xthu)
650  case('rejpw')
651  call creadparar(vvalue, rejpw)
652  end select
653  enddo
real(8), save rejpw
Definition: csoftenPiK.f:101
logical, save special
Definition: csoftenPiK.f:55
integer, save fwbw
Definition: csoftenPiK.f:50
logical, save usexincms
Definition: csoftenPiK.f:90
subroutine creadparal(vvalue, logi)
logical, save leadingpik
Definition: csoftenPiK.f:81
logical function cgetparmn(io, vname, vv)
integer, save mode
Definition: csoftenPiK.f:34
real(8), save xthl
Definition: csoftenPiK.f:99
real(8), save pw
Definition: csoftenPiK.f:36
subroutine creadparar(vvalue, x)
real(8), save e0th
Definition: csoftenPiK.f:46
real(8), save repeat
Definition: csoftenPiK.f:40
real(8), save k1u
Definition: csoftenPiK.f:98
real(8), save xthu
Definition: csoftenPiK.f:100
subroutine creadparai(vvalue, i)
subroutine cskipsep(io)
real(8), save xth
Definition: csoftenPiK.f:35
Here is the call graph for this function:

◆ crejk1()

real(8) function softenpik::crejk1 ( real(8), intent(in)  x)

Definition at line 792 of file csoftenPiK.f.

References rejpw, xth, xthl, and xthu.

Referenced by csoftenpik1().

792  implicit none
793  real(8),intent(in):: x
794  real(8):: ans
795  ans = ( log(x/(xth/xthu)) * log((xth*xthl)/x) )**rejpw
real(8), save rejpw
Definition: csoftenPiK.f:101
atmos%rho(atmos%nodes) **exp(-(z-atmos%z(atmos%nodes))/Hinf) elseif(z .lt. atmos%z(1)) then ans=atmos%rho(1) **exp((atmos%z(1) -z)/atmos%H(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) a=atmos%a(i) if(a .ne. 0.d0) then ans=atmos%rho(i) **(1+a *(z-atmos%z(i))/atmos%H(i)) **(-1.0d0-1.d0/a) else ans=*atmos%rho(i) *exp(-(z-atmos%z(i))/atmos%H(i)) endif endif ! zsave=z ! endif cvh2den=ans end ! ---------------------------------- real *8 function cvh2temp(z) implicit none ! vettical height to temperatur(Kelvin) real *8 z ! input. vertical height in m ! output is temperature of the atmospher in Kelvin real *8 ans integer i if(z .gt. atmos%z(atmos%nodes)) then ans=atmos%T(atmos%nodes) elseif(z .lt. atmos%z(1)) then ans=atmos%T(1)+atmos%b(1) *(z - atmos%z(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) ans=atmos%T(i)+atmos%b(i) *(z-atmos%z(i)) endif cvh2temp=ans end !--------------------------------------------- real *8 function cthick2h(t) implicit none real *8 t ! input. air thickness in kg/m^2 real *8 logt, ans integer i real *8 dod0, fd, a logt=log(t) if(t .ge. atmos%cumd(1)) then ans=atmos%z(1) - *(logt - atmos%logcumd(1)) *atmos%H(1) elseif(t .le. atmos%cumd(atmos%nodes)) then ans=atmos%z(atmos%nodes) - *Hinf *log(t/atmos%cumd(atmos%nodes)) else call kdwhereis(t, atmos%nodes, atmos%cumd, 1, i) ! i is such that X(i) > x >=x(i+1) ans
real(8), save xthl
Definition: csoftenPiK.f:99
real(8), save xthu
Definition: csoftenPiK.f:100
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21
real(8), save xth
Definition: csoftenPiK.f:35
Here is the caller graph for this function:

◆ cskipsep()

subroutine cskipsep ( integer  io)

Definition at line 678 of file csoftenPiK.f.

References true.

678  implicit none
679  integer io
680  character(10) sep
681  do while (.true.)
682  read(io, '(a)') sep
683  if(sep(2:10) == '---------') exit
684  enddo
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
Definition: cblkElemag.h:7

◆ csoftenfe()

subroutine csoftenfe ( type(ptcl inci,
integer, intent(in)  fwbwin,
type(ptcl), dimension(*)  a,
integer, intent(in)  nin,
integer, intent(out)  nout 
)

Definition at line 563 of file csoftenPiK.f.

References csoftenpik(), and p.

Referenced by __gencol.f__(), and cutptcl().

563 ! front end of softening when it is to be done at CMS
564 ! x is defined simply by E/E0,
565  implicit none
566 #include "Zptcl.h"
567  type(ptcl):: inci ! incident ptcl (in cms); symmetric case
568  integer,intent(in):: fwbwin ! modification is applied to
569  ! 1--> forward only 2--> backword only
570  ! 3--> both ; However, 1 is used when
571  ! Cosmos output (in cms) is the target, independently of
572  ! fwbw.
573  type(ptcl):: a(*) ! array containing ptcl info.
574  integer,intent(in)::nin ! # of ptcls in w
575  integer,intent(out)::nout ! # of ptcls put in w after modification
576 
577  type(ptcl):: w1(half) ! working array
578  type(ptcl):: w2(half) ! working array
579 
580  integer::i, nc1, nc2, ncout1, ncout2
581 
582 ! do modification extract Pz>0 and Pz<0
583  nc1 = 0
584  nc2 = 0
585  do i = 1, nin
586  if(a(i).fm.p(3) > 0.) then
587  nc1 = nc1 + 1
588  w1(nc1) = a(i)
589  else
590  nc2 = nc2 + 1
591  w2(nc2) = a(i)
592  endif
593  enddo
594  if( nc1 > 0 .and. ibits(fwbwin,0,1)>0 ) then ! LSB pos=0
595  call csoftenpik(inci, w1, nc1, ncout1)
596  else
597  ncout1 = nc1
598  endif
599  if( nc2 > 0 .and. ibits(fwbwin,1,1)>0 ) then ! 2nd bit pos=1
600  call csoftenpik(inci, w2, nc2, ncout2)
601  else
602  ncout2 = nc2
603  endif
604 
605  nout = 0
606  do i = 1, ncout1
607  nout = nout + 1
608  a(nout) = w1(i)
609  enddo
610  do i = 1, ncout2
611  nout = nout + 1
612  a(nout) = w2(i)
613  enddo
subroutine csoftenpik(inciptcl, pstore, nin, nout)
Definition: csoftenPiK.f:142
nodes i
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
real(4), save a
Definition: cNRLAtmos.f:20
Definition: Zptcl.h:75
integer, parameter half
Definition: csoftenPiK.f:108
Here is the call graph for this function:
Here is the caller graph for this function:

◆ csoftenfixxth()

real(8) function softenpik::csoftenfixxth ( real(8), intent(in)  E0)

Definition at line 848 of file csoftenPiK.f.

References d0.

Referenced by csoftenpik().

848  implicit none
849  real(8),intent(in)::e0 ! proton/pi/K incident E. in GeV
850  real(8):: xth !
851 ! fix the xth above which softening is performed
852 ! at 10^12 eV: 0.1
853 ! 10^13 0.063
854 ! 10^14 0.04
855 ! 10^16 0.01585
856 ! 10^17 0.01
857 ! 10^19 0.004
858  xth = 0.1d0/(e0/1000.d0)**0.2
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
real(8), save xth
Definition: csoftenPiK.f:35
Here is the caller graph for this function:

◆ csoftenpik()

subroutine csoftenpik ( type(ptcl inciptcl,
type(ptcl), dimension(*)  pstore,
integer, intent(in)  nin,
integer, intent(out)  nout 
)

Definition at line 142 of file csoftenPiK.f.

References ck1u(), copenf(), creadsoftenpara(), csoftenfixxth(), csoftenpik0(), csoftenpik1(), cwritesoftenpara(), cxthu(), e0lab, false, k1u, kpoisn(), repeat, rndc(), xth, and xthu.

Referenced by csoftenfe(), and cutptcl().

142 ! inciptcl made a collsion and generated nin particles in pstore
143 ! particle information may be at CMS or Lab.
144 ! If we want to make the x-dist. softer,
145 ! A) For Cosmos (air target), we may use the Lab system
146 ! (for large X, the distribution would be the same
147 ! as CMS)
148  implicit none
149 #include "Zcode.h"
150 #include "Zptcl.h"
151 #include "Zmanagerp.h"
152  type(ptcl):: inciptcl ! input. incident ptcl at collision
153 !
154  integer,intent(in)::nin ! # of ptcls in pstore
155  type(ptcl):: pstore(*) ! input/output. ptcls to be softened.
156  ! Softened ones are put here
157  integer,intent(out)::nout ! # of ptcls re-stored in pstore
158  logical,save::first=.true.
159  integer:: jcon, i
160  integer:: nrepeat
161  real(8):: u
162  integer:: exist
163  integer:: nnow
164 
165  if( first ) then
166  call copenf(tempdev,
167  * "$COSMOSTOP/UserHook/modifyX/softenparam.dat", jcon)
168  if( jcon /= 0 ) then
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 ?'
172  stop
173  else
174  call creadsoftenpara(tempdev)
175  endif
176  call cwritesoftenpara(0)
177  first = .false.
178  endif
179  if( repeat < 0. ) then
180  call kpoisn(-repeat, nrepeat)
181  else
182  call rndc(u)
183  nrepeat = repeat
184  if( u < repeat-nrepeat) then
185  nrepeat = nrepeat + 1
186  endif
187  endif
188 
189  nnow = nin
191  k1u = ck1u(e0lab)
192  xthu =cxthu(e0lab)
193  do i = 1, nrepeat
194  call csoftenpik0(inciptcl, pstore, nnow, nout, exist)
195  if( exist == 0 ) exit
196  nnow = nout
197  enddo
198  do i = 1, 1
199  call csoftenpik1(inciptcl, pstore, nnow, nout, exist)
200  if( exist == 0 ) exit
201  nnow = nout
202  enddo
logical, save first
Definition: cNRLAtmos.f:8
nodes i
real(8) function cxthu(E0)
Definition: csoftenPiK.f:799
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
Definition: cblkElemag.h:7
subroutine rndc(u)
Definition: rnd.f:91
subroutine creadsoftenpara(io)
subroutine kpoisn(am, n)
Definition: kpoisn.f:25
subroutine copenf(io, fnin, icon)
Definition: copenf.f:8
real(8) function csoftenfixxth(E0)
Definition: csoftenPiK.f:848
real(8), save repeat
Definition: csoftenPiK.f:40
real(8) function ck1u(E0)
Definition: csoftenPiK.f:806
real(8), save k1u
Definition: csoftenPiK.f:98
subroutine csoftenpik1(inciptcl, pstore, nin, nout, exist)
Definition: csoftenPiK.f:332
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
Definition: cblkElemag.h:7
real(8), save xthu
Definition: csoftenPiK.f:100
subroutine csoftenpik0(inciptcl, pstore, nin, nout, exist)
Definition: csoftenPiK.f:207
Definition: Zptcl.h:75
real(8), save e0lab
Definition: csoftenPiK.f:103
subroutine cwritesoftenpara(io)
real(8), save xth
Definition: csoftenPiK.f:35
Here is the call graph for this function:
Here is the caller graph for this function:

◆ csoftenpik0()

subroutine csoftenpik0 ( type(ptcl inciptcl,
type(ptcl), dimension(*)  pstore,
integer, intent(in)  nin,
integer, intent(out)  nout,
integer, intent(out)  exist 
)

Definition at line 207 of file csoftenPiK.f.

References cae2p(), cgetmaxptcl(), charge, cjudgesplit(), code, csplitmeson(), e0lab, e0th, keta, kkaon, kpion, leadingpik, mass, mode, modified, p, true, and xth.

Referenced by csoftenpik().

207 ! inciptcl made a collision and generated nin particles in pstore
208 ! particle. information may be at CMS or Lab.
209 ! If we want to make the x-dist. softer,
210 ! A) For Cosmos (air target), we may use the Lab system
211 ! (for large X, the distribution would be the same
212 ! as CMS)
213  implicit none
214 #include "Zcode.h"
215 #include "Zptcl.h"
216 
217  type(ptcl):: inciptcl ! input. incident ptcl at collision
218 !
219  integer,intent(in)::nin ! # of ptcls in pstore
220  type(ptcl):: pstore(*) ! input/output. ptcls to be softened.
221  ! Softened ones are put here
222  integer,intent(out)::nout ! # of ptcls re-stored in pstore
223  integer,intent(out)::exist ! # of particcls with X> Xth
224 ! ----------------------------------------------
225  type(ptcl):: work(2)
226  logical ok
227  integer::maxi
228  real(8)::maxe
229  integer::i, j
230  real(8):: x, e0, ex, u, u1, u2
231  real(8):: e1, e2
232  real(8)::temp
233  integer:: nc ! counting # of ptcls in pstore
234  integer:: nw, icon
235  logical:: split
236 
237  e0 = inciptcl.fm.p(4) - inciptcl.mass
238  nout = nin
239  exist = 0
240  if( e0lab < e0th) return !!!!!
241  nc = nin
242 ! if pi/K is incident, regards the highest one as leading
243 ! and avoid to modify
244  if(leadingpik .and. (inciptcl.code == kpion .or.
245  * inciptcl.code == kkaon ) ) then
246 ! find max energy ptcl index and E; eta cannot be incident
247  call cgetmaxptcl(pstore, nc, inciptcl.code, inciptcl.charge,
248  * maxi, maxe)
249  else
250  maxi = 0
251  endif
252 
253  do i = 1, nin
254  x = (pstore(i).fm.p(4)-pstore(i).mass)/e0
255  if( abs(mode) == 3 ) then
256  if( i /= maxi ) then
257 ! softening
258  if(x > xth ) then
259 ! modify high X of pi/K/eta
260  if(pstore(i).code == kpion .or.
261  * pstore(i).code == kkaon
262  * .or. pstore(i).code == keta ) then
263  nw = 0
264  exist = exist + 1
265 ! judge to split this
266  call cjudgesplit(inciptcl, x, split)
267  if( .not. split ) cycle
268 
269  call csplitmeson(pstore(i), e1, e2, icon)
270  if(icon == 0) then
271  modified = .true.
272  ! split; if impossilbe, do nothing
273  nw = nw + 1
274  work(nw) = pstore(i)
275  work(nw).fm.p(4) = e1 + work(nw).mass
276  call cae2p(work(nw)) ! adjust momentum
277  nw = nw + 1
278  work(nw) = pstore(i)
279  work(nw).fm.p(4) = e2 + work(nw).mass
280  call cae2p(work(nw))
281 ! original one is replaced by E1
282  pstore(i) = work(1)
283 ! others are appended to pstore.
284  do j = 2, nw ! altough always nw=2
285  nc = nc + 1
286  pstore(nc) = work(j)
287  enddo
288  endif
289  endif
290  endif
291  endif
292  elseif( mode == 1 ) then
293  if( i /= maxi ) then
294 ! discard all pi/K/eta with x>xth (except leanding)
295  if(pstore(i).code == kpion .or. pstore(i).code == kkaon
296  * .or. pstore(i).code == keta ) then
297  if( x > xth ) then
298 ! to neglect, put mass as E
299  pstore(i).fm.p(4) = pstore(i).mass
300  pstore(i).fm.p(1:3) = 0.
301  modified = .true.
302  endif
303  endif
304  endif
305  elseif( mode == 2 ) then
306  if( i /= maxi) then
307 ! discard only pi0/eta
308  if( ( pstore(i).code == kpion .and.
309  * pstore(i).charge == 0 ) .or.
310  * pstore(i).code == keta ) then
311  if(x> xth) then
312  pstore(i).fm.p(4) = pstore(i).mass
313  pstore(i).fm.p(1:3) = 0. ! put zero energy
314  modified = .true.
315  endif
316  endif
317  endif
318  elseif( mode == 0 ) then
319 ! do nothing
320  else
321  write(0,*) ' mode err=',mode, ' in csoftenPiK0'
322  stop
323  endif
324  enddo
325  if(abs(mode) == 3) then
326  nout = nc
327  endif
nodes i
logical, save modified
Definition: csoftenPiK.f:102
max ptcl codes in the kkaon
Definition: Zcode.h:2
logical, save leadingpik
Definition: csoftenPiK.f:81
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
Definition: cblkElemag.h:7
integer, save mode
Definition: csoftenPiK.f:34
subroutine cjudgesplit(pj, x, split)
Definition: csoftenPiK.f:114
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
real(4), dimension(:), allocatable, save temp
Definition: cNRLAtmos.f:29
*Zfirst p fm *Zfirst p Zfirst p code
Definition: ZavoidUnionMap.h:1
real(8), save e0th
Definition: csoftenPiK.f:46
subroutine cae2p(pc)
Definition: csoftenPiK.f:501
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p charge
Definition: ZavoidUnionMap.h:1
subroutine csplitmeson(p, E1, E2, icon)
Definition: csoftenPiK.f:467
subroutine cgetmaxptcl(pstore, nin, pcode, pcharge, maxi, maxE)
Definition: csoftenPiK.f:532
max ptcl codes in the keta
Definition: Zcode.h:2
real cut integer nc
Definition: Zprivate.h:1
Definition: Zptcl.h:75
*Zfirst p fm *Zfirst p mass
Definition: ZavoidUnionMap.h:1
max ptcl codes in the kpion
Definition: Zcode.h:2
real(8), save e0lab
Definition: csoftenPiK.f:103
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21
real(8), save xth
Definition: csoftenPiK.f:35
Here is the call graph for this function:
Here is the caller graph for this function:

◆ csoftenpik1()

subroutine csoftenpik1 ( type(ptcl inciptcl,
type(ptcl), dimension(*)  pstore,
integer, intent(in)  nin,
integer, intent(out)  nout,
integer, intent(out)  exist 
)

Definition at line 332 of file csoftenPiK.f.

References cae2p(), cgetmaxptcl(), charge, code, crejk1(), csplitmeson(), e0lab, e0th, k1u, keta, kkaon, kpion, leadingpik, mass, mode, modified, p, rndc(), true, xth, xthl, and xthu.

Referenced by csoftenpik().

332 ! inciptcl made a collision and generated nin particles in pstore
333 ! particle. information may be at CMS or Lab.
334 ! If we want to make the x-dist. softer,
335 ! A) For Cosmos (air target), we may use the Lab system
336 ! (for large X, the distribution would be the same
337 ! as CMS)
338  implicit none
339 #include "Zcode.h"
340 #include "Zptcl.h"
341 
342  type(ptcl):: inciptcl ! input. incident ptcl at collision
343 !
344  integer,intent(in)::nin ! # of ptcls in pstore
345  type(ptcl):: pstore(*) ! input/output. ptcls to be softened.
346  ! Softened ones are put here
347  integer,intent(out)::nout ! # of ptcls re-stored in pstore
348  integer,intent(out)::exist ! # of particcls with X> Xth
349 ! ----------------------------------------------
350  type(ptcl):: work(2)
351  logical ok
352  integer::maxi
353  real(8)::maxe
354  integer::i, j
355  real(8):: x, e0, ex, u, u1, u2
356  real(8):: e1, e2
357  real(8)::temp
358  integer:: nc ! counting # of ptcls in pstore
359  integer:: nw, icon
360  logical:: split
361 
362  real(8):: xcent, centval
363  xcent = sqrt(xth/xthu*xth*xthl)
364  centval = crejk1(xcent)
365 
366 
367  e0 = inciptcl.fm.p(4) - inciptcl.mass
368  nout = nin
369  exist = 0
370  if( e0lab < e0th) return !!!!!
371  nc = nin
372 ! if pi/K is incident, regards the highest one as leading
373 ! and avoid to modify
374  if(leadingpik .and. (inciptcl.code == kpion .or.
375  * inciptcl.code == kkaon ) ) then
376 ! find max energy ptcl index and E; eta cannot be incident
377  call cgetmaxptcl(pstore, nc, inciptcl.code, inciptcl.charge,
378  * maxi, maxe)
379  else
380  maxi = 0
381  endif
382 
383  do i = 1, nin
384  x = (pstore(i).fm.p(4)-pstore(i).mass)/e0
385  if( x > xth*xthl ) cycle
386  if( abs(mode) == 3 ) then
387  if( i /= maxi ) then
388 ! softening
389  if(x > xth/xthu) then
390 ! modify high X of pi/K/eta
391  if(pstore(i).code == kpion .or.
392  * pstore(i).code == kkaon
393  * .or. pstore(i).code == keta ) then
394  nw = 0
395  exist = exist + 1
396 ! judge to split this
397 !! call cJudgeSplit(inciptcl, x, split)
398  call rndc(u)
399  temp = crejk1(x)
400 ! split = u < 0.25*(temp/centval)
401 ! split = u < 0.125*(temp/centval)
402  split = u < k1u*(temp/centval)
403  if( .not. split ) cycle
404 
405  call csplitmeson(pstore(i), e1, e2, icon)
406  if(icon == 0) then
407  modified = .true.
408  ! split; if impossilbe, do nothing
409  nw = nw + 1
410  work(nw) = pstore(i)
411  work(nw).fm.p(4) = e1 + work(nw).mass
412  call cae2p(work(nw)) ! adjust momentum
413  nw = nw + 1
414  work(nw) = pstore(i)
415  work(nw).fm.p(4) = e2 + work(nw).mass
416  call cae2p(work(nw))
417 ! original one is replaced by E1
418  pstore(i) = work(1)
419 ! others are appended to pstore.
420  do j = 2, nw ! altough always nw=2
421  nc = nc + 1
422  pstore(nc) = work(j)
423  enddo
424  endif
425  endif
426  endif
427  endif
428  elseif( mode == 1 ) then
429  if( i /= maxi ) then
430 ! discard all pi/K/eta with x>xth (except leanding)
431  if(pstore(i).code == kpion .or. pstore(i).code == kkaon
432  * .or. pstore(i).code == keta ) then
433  if( x > xth ) then
434 ! to neglect, put mass as E
435  pstore(i).fm.p(4) = pstore(i).mass
436  pstore(i).fm.p(1:3) = 0.
437  modified = .true.
438  endif
439  endif
440  endif
441  elseif( mode == 2 ) then
442  if( i /= maxi) then
443 ! discard only pi0/eta
444  if( ( pstore(i).code == kpion .and.
445  * pstore(i).charge == 0 ) .or.
446  * pstore(i).code == keta ) then
447  if(x> xth) then
448  pstore(i).fm.p(4) = pstore(i).mass
449  pstore(i).fm.p(1:3) = 0. ! put zero energy
450  modified = .true.
451  endif
452  endif
453  endif
454  elseif( mode == 0 ) then
455 ! do nothing
456  else
457  write(0,*) ' mode err=',mode, ' in csoftenPiK0'
458  stop
459  endif
460  enddo
461  if(abs(mode) == 3) then
462  nout = nc
463  endif
nodes i
logical, save modified
Definition: csoftenPiK.f:102
max ptcl codes in the kkaon
Definition: Zcode.h:2
logical, save leadingpik
Definition: csoftenPiK.f:81
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
Definition: cblkElemag.h:7
integer, save mode
Definition: csoftenPiK.f:34
subroutine rndc(u)
Definition: rnd.f:91
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
real(8), save xthl
Definition: csoftenPiK.f:99
real(4), dimension(:), allocatable, save temp
Definition: cNRLAtmos.f:29
*Zfirst p fm *Zfirst p Zfirst p code
Definition: ZavoidUnionMap.h:1
real(8), save e0th
Definition: csoftenPiK.f:46
real(8) function crejk1(x)
Definition: csoftenPiK.f:792
subroutine cae2p(pc)
Definition: csoftenPiK.f:501
real(8), save k1u
Definition: csoftenPiK.f:98
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p charge
Definition: ZavoidUnionMap.h:1
subroutine csplitmeson(p, E1, E2, icon)
Definition: csoftenPiK.f:467
subroutine cgetmaxptcl(pstore, nin, pcode, pcharge, maxi, maxE)
Definition: csoftenPiK.f:532
real(8), save xthu
Definition: csoftenPiK.f:100
max ptcl codes in the keta
Definition: Zcode.h:2
real cut integer nc
Definition: Zprivate.h:1
Definition: Zptcl.h:75
*Zfirst p fm *Zfirst p mass
Definition: ZavoidUnionMap.h:1
max ptcl codes in the kpion
Definition: Zcode.h:2
real(8), save e0lab
Definition: csoftenPiK.f:103
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21
real(8), save xth
Definition: csoftenPiK.f:35
Here is the call graph for this function:
Here is the caller graph for this function:

◆ csplitmeson()

subroutine csplitmeson ( type(ptcl p,
real(8), intent(out)  E1,
real(8), intent(out)  E2,
integer, intent(out)  icon 
)

Definition at line 467 of file csoftenPiK.f.

References false, mass, rndc(), true, and xth.

Referenced by csoftenpik0(), and csoftenpik1().

467  implicit none
468 #include "Zcode.h"
469 #include "Zptcl.h"
470  type(ptcl):: p ! input, a high energy ptcl
471  real(8),intent(out):: e1 ! split ptcl energy KE
472  real(8),intent(out):: e2 ! split ptcl
473  integer,intent(out):: icon ! 0--> split ok, 1--> no split
474  real(8):: u, emin, em
475  logical ok
476  integer::count
477 
478  ok = .false.
479 
480  count = 0
481  do while(.not. ok)
482  call rndc(u)
483  u = u*(1.-xth) + xth
484  e1 = u*( p.fm.p(4) - p.mass)
485  e2 = (p.fm.p(4) -p.mass) - e1
486 ! if(E1 > p.mass .and.
487 ! * E2 > p.mass ) then
488  ok = .true.
489 ! else
490 ! count = count + 1
491 ! if(count > 20) then
492 ! icon = 1
493 ! return
494 ! endif
495 ! endif
496  enddo
497  icon = 0
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
Definition: cblkElemag.h:7
subroutine rndc(u)
Definition: rnd.f:91
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
*************************block data cblkTracking *************************implicit none data *ExactThick *Freec *RatioToE0 *MagChgDist *TimeStructure *Truncn *Truncx data *IncMuonPolari *KEminObs *ThinSampling *EthinRatio *Generate em
Definition: cblkTracking.h:9
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
Definition: cblkElemag.h:7
Definition: Zptcl.h:75
*Zfirst p fm *Zfirst p mass
Definition: ZavoidUnionMap.h:1
real(8), save xth
Definition: csoftenPiK.f:35
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cwriteparac()

subroutine cwriteparac ( integer  io,
character*(*)  vname,
character*(*)  cha 
)

Definition at line 769 of file csoftenPiK.f.

769  implicit none
770  integer io
771  character*(*) vname
772  character*(*) cha
773  integer klena
774  character*2 qmk/" '"/ ! '
775  if(klena(cha) .gt. 0) then
776  write(io, *) ' ', vname, qmk, cha(1:klena(cha)),
777  * qmk,' /'
778  else
779  write(io, *) ' ', vname, qmk, ' ', qmk, ' /'
780  endif
integer function klena(cha)
Definition: klena.f:20

◆ cwriteparacx()

subroutine cwriteparacx ( integer  io,
character*(*)  vname,
complex*8  c 
)

Definition at line 752 of file csoftenPiK.f.

752  implicit none
753  integer io
754  character*(*) vname
755  complex*8 c
756  write(io, *) ' ', vname,' ', c,' /'
dE dx *! Nuc Int sampling table c
Definition: cblkMuInt.h:130

◆ cwriteparai()

subroutine cwriteparai ( integer  io,
character*(*)  vname,
integer  i 
)

Definition at line 760 of file csoftenPiK.f.

760  implicit none
761  integer io
762  character*(*) vname
763  integer i
764 
765  write(io, *) ' ', vname,' ', i,' /'
nodes i

◆ cwriteparal()

subroutine cwriteparal ( integer  io,
character*(*)  vname,
logical  logi 
)

Definition at line 783 of file csoftenPiK.f.

783  implicit none
784  integer io
785  character*(*) vname
786  logical logi
787 
788  write(io, *) ' ', vname,' ', logi,' /'

◆ cwriteparar()

subroutine cwriteparar ( integer  io,
character*(*)  vname,
real*8  x 
)

Definition at line 734 of file csoftenPiK.f.

734  implicit none
735  integer io
736  character*(*) vname
737  real*8 x
738 
739  write(io, *) ' ', vname,' ', x,' /'
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21

◆ cwriteparar2()

subroutine cwriteparar2 ( integer  io,
character*(*)  vname,
real*8, dimension(n x,
integer  n 
)

Definition at line 742 of file csoftenPiK.f.

742  implicit none
743  integer io
744  integer n ! arra size of x
745  character*(*) vname
746  real*8 x(n)
747 
748  write(io,*) ' ', vname,' ', x,' /'
integer n
Definition: Zcinippxc.h:1
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21

◆ cwritesoftenpara()

subroutine cwritesoftenpara ( integer, intent(in)  io)

Definition at line 657 of file csoftenPiK.f.

References cwriteparai(), cwriteparal(), cwriteparar(), e0th, fwbw, k1u, leadingpik, mode, pw, rejpw, repeat, special, usexincms, xth, xthl, and xthu.

657  implicit none
658  integer,intent(in):: io
659 
660  write(io,*)'----------------------'
661  call cwriteparai(io,'mode', mode)
662  call cwriteparar(io,'xth', xth)
663  call cwriteparar(io,'E0th', e0th)
664  call cwriteparai(io,'fwbw', fwbw)
665  call cwriteparar(io,'pw', pw)
666  call cwriteparar(io,'repeat',repeat)
667  call cwriteparal(io,'special',special)
668  call cwriteparal(io,'leadingPiK',leadingpik)
669  call cwriteparal(io,'useXinCMS', usexincms)
670  call cwriteparar(io,'k1u', k1u)
671  call cwriteparar(io,'xthl', xthl)
672  call cwriteparar(io,'xthu', xthu)
673  call cwriteparar(io,'rejpw', rejpw)
subroutine cwriteparai(io, vname, i)
real(8), save rejpw
Definition: csoftenPiK.f:101
logical, save special
Definition: csoftenPiK.f:55
integer, save fwbw
Definition: csoftenPiK.f:50
logical, save usexincms
Definition: csoftenPiK.f:90
logical, save leadingpik
Definition: csoftenPiK.f:81
integer, save mode
Definition: csoftenPiK.f:34
real(8), save xthl
Definition: csoftenPiK.f:99
real(8), save pw
Definition: csoftenPiK.f:36
real(8), save e0th
Definition: csoftenPiK.f:46
real(8), save repeat
Definition: csoftenPiK.f:40
subroutine cwriteparal(io, vname, logi)
real(8), save k1u
Definition: csoftenPiK.f:98
real(8), save xthu
Definition: csoftenPiK.f:100
subroutine cwriteparar(io, vname, x)
real(8), save xth
Definition: csoftenPiK.f:35
Here is the call graph for this function:

◆ cxthu()

real(8) function softenpik::cxthu ( real(8), intent(in)  E0)

Definition at line 799 of file csoftenPiK.f.

Referenced by csoftenpik().

799  implicit none
800  real(8),intent(in):: e0 ! lab E0 in Gev
801  real(8):: ans ! xthu
802  ans = 12.0*(e0/1.e8)**0.1
atmos%rho(atmos%nodes) **exp(-(z-atmos%z(atmos%nodes))/Hinf) elseif(z .lt. atmos%z(1)) then ans=atmos%rho(1) **exp((atmos%z(1) -z)/atmos%H(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) a=atmos%a(i) if(a .ne. 0.d0) then ans=atmos%rho(i) **(1+a *(z-atmos%z(i))/atmos%H(i)) **(-1.0d0-1.d0/a) else ans=*atmos%rho(i) *exp(-(z-atmos%z(i))/atmos%H(i)) endif endif ! zsave=z ! endif cvh2den=ans end ! ---------------------------------- real *8 function cvh2temp(z) implicit none ! vettical height to temperatur(Kelvin) real *8 z ! input. vertical height in m ! output is temperature of the atmospher in Kelvin real *8 ans integer i if(z .gt. atmos%z(atmos%nodes)) then ans=atmos%T(atmos%nodes) elseif(z .lt. atmos%z(1)) then ans=atmos%T(1)+atmos%b(1) *(z - atmos%z(1)) else call kdwhereis(z, atmos%nodes, atmos%z, 1, i) ans=atmos%T(i)+atmos%b(i) *(z-atmos%z(i)) endif cvh2temp=ans end !--------------------------------------------- real *8 function cthick2h(t) implicit none real *8 t ! input. air thickness in kg/m^2 real *8 logt, ans integer i real *8 dod0, fd, a logt=log(t) if(t .ge. atmos%cumd(1)) then ans=atmos%z(1) - *(logt - atmos%logcumd(1)) *atmos%H(1) elseif(t .le. atmos%cumd(atmos%nodes)) then ans=atmos%z(atmos%nodes) - *Hinf *log(t/atmos%cumd(atmos%nodes)) else call kdwhereis(t, atmos%nodes, atmos%cumd, 1, i) ! i is such that X(i) > x >=x(i+1) ans
Here is the caller graph for this function:

Variable Documentation

◆ e0lab

real(8), save e0lab =1.e12

Definition at line 103 of file csoftenPiK.f.

Referenced by csoftenpik(), csoftenpik0(), csoftenpik1(), and cutptcl().

103  real(8),save:: e0lab=1.e12 ! not input. current E0 in lab.
real(8), save e0lab
Definition: csoftenPiK.f:103

◆ e0th

real(8), save e0th = 500.

Definition at line 46 of file csoftenPiK.f.

Referenced by creadsoftenpara(), csoftenpik0(), csoftenpik1(), and cwritesoftenpara().

46  real(8),save:: e0th = 500. ! 500 GeV over this we apply cut/mod.
real(8), save e0th
Definition: csoftenPiK.f:46

◆ fwbw

integer save fwbw = 3

Definition at line 50 of file csoftenPiK.f.

Referenced by __gencol.f__(), creadsoftenpara(), and cwritesoftenpara().

50  integer,save:: fwbw = 3 ! Used in Gencol; modification is applied to
integer, save fwbw
Definition: csoftenPiK.f:50

◆ half

◆ k1u

real(8), save k1u =0.25

Definition at line 98 of file csoftenPiK.f.

Referenced by creadsoftenpara(), csoftenpik(), csoftenpik1(), and cwritesoftenpara().

98  real(8),save:: k1u=0.25 !
real(8), save k1u
Definition: csoftenPiK.f:98

◆ leadingpik

logical save leadingpik =.true.

Definition at line 81 of file csoftenPiK.f.

Referenced by creadsoftenpara(), csoftenpik0(), csoftenpik1(), and cwritesoftenpara().

81  logical,save:: leadingpik=.true. ! for Pi/K incident case,
logical, save leadingpik
Definition: csoftenPiK.f:81
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
Definition: cblkElemag.h:7

◆ mode

integer save mode = 3

Definition at line 34 of file csoftenPiK.f.

Referenced by cjudgesplit(), creadsoftenpara(), csoftenpik0(), csoftenpik1(), and cwritesoftenpara().

34  integer,save:: mode = 3
integer, save mode
Definition: csoftenPiK.f:34

◆ modified

logical save modified

Definition at line 102 of file csoftenPiK.f.

Referenced by csoftenpik0(), csoftenpik1(), and cutptcl().

102  logical,save:: modified ! not input. used in Cosmos
logical, save modified
Definition: csoftenPiK.f:102

◆ pw

real(8), save pw = 0.5

Definition at line 36 of file csoftenPiK.f.

Referenced by cjudgesplit(), creadsoftenpara(), cwritesoftenpara(), fitlat0(), and latfnc().

36  real(8),save:: pw = 0.5 ! softening is determined by
real(8), save pw
Definition: csoftenPiK.f:36

◆ rejpw

real(8), save rejpw =0.

Definition at line 101 of file csoftenPiK.f.

Referenced by creadsoftenpara(), crejk1(), and cwritesoftenpara().

101  real(8),save:: rejpw=0.
real(8), save rejpw
Definition: csoftenPiK.f:101

◆ repeat

real(8), save repeat = 2.5

Definition at line 40 of file csoftenPiK.f.

Referenced by creadsoftenpara(), csoftenpik(), and cwritesoftenpara().

40  real(8),save:: repeat = 2.5 ! apply the simple softenning repeat times
real(8), save repeat
Definition: csoftenPiK.f:40

◆ special

logical save special =.false.

Definition at line 55 of file csoftenPiK.f.

Referenced by creadsoftenpara(), cutptcl(), and cwritesoftenpara().

55  logical,save:: special=.false. ! This is used olny in modifyX of
logical, save special
Definition: csoftenPiK.f:55
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
Definition: cblkElemag.h:7

◆ usexincms

logical save usexincms =.false.

Definition at line 90 of file csoftenPiK.f.

Referenced by creadsoftenpara(), cutptcl(), and cwritesoftenpara().

90  logical,save:: usexincms=.false. !This is used only in Cosmos.
logical, save usexincms
Definition: csoftenPiK.f:90
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
Definition: cblkElemag.h:7

◆ xth

real(8), save xth = 0.05

Definition at line 35 of file csoftenPiK.f.

Referenced by cjudgesplit(), creadsoftenpara(), crejk1(), csoftenpik(), csoftenpik0(), csoftenpik1(), csplitmeson(), and cwritesoftenpara().

35  real(8),save:: xth = 0.05 ! over this x, we apply cut or modification
real(8), save xth
Definition: csoftenPiK.f:35

◆ xthl

real(8), save xthl =1.d0

Definition at line 99 of file csoftenPiK.f.

Referenced by creadsoftenpara(), crejk1(), csoftenpik1(), and cwritesoftenpara().

99  real(8),save:: xthl=1.d0
real(8), save xthl
Definition: csoftenPiK.f:99
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5

◆ xthu

real(8), save xthu =10.d0

Definition at line 100 of file csoftenPiK.f.

Referenced by creadsoftenpara(), crejk1(), csoftenpik(), csoftenpik1(), and cwritesoftenpara().

100  real(8),save:: xthu=10.d0
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
real(8), save xthu
Definition: csoftenPiK.f:100