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

Go to the source code of this file.

Functions/Subroutines

subroutine cgetxsec2 (model, pj, media, xs, mfp)
 
subroutine cgetxsec (modelin, pj, media, xs, mfp)
 
subroutine cxsjam (pj, media)
 
subroutine cxsphits (pj, media)
 
subroutine cxsdpmjet3 (pj, media)
 
subroutine cxsqgsjet2 (pj, media)
 
subroutine cxsepos (pj, media)
 
subroutine cxssibyll (pj, media)
 
subroutine cxsgheisha (pj, media)
 
subroutine cxsincdpm3 (pj, media)
 
subroutine cxsother (pj, media)
 
subroutine cfixtarget (media)
 
subroutine cworkaround (A, Z, xs, nelem)
 
subroutine cfixtargetmuni (media)
 
subroutine cgetcaprate (media)
 
subroutine cgetphotopxs (model, pj, media, xs, mfp)
 

Function/Subroutine Documentation

◆ cfixtarget()

subroutine cfixtarget ( type(xsmedia), intent(inout)  media)

Definition at line 498 of file cGetXsec.f.

References cerrormsg(), cworkaround(), and rndc().

Referenced by cfixtargetmuni(), cintemuon(), and csampintl().

498  use modxsecmedia, xmedia=>media
499  implicit none
500 #include "Zevhnp.h"
501 
502 !
503 ! Fix the target element,
504 !
505  type(xsmedia),intent(inout):: media ! input/output
506  ! xsmedia information.
507 
508 
509  real*8 u, csigma
510  integer j, ia
511 
512 
513  if( media%xs == smallxs .or. media%xs == largexs ) then
514  j = 1
515  media%elem(j)%nsigma = media%xs
516  elseif( media%noOfElem .eq. 1 ) then
517  j = 1
518  else
519  call rndc(u)
520  u = u* media%xs
521  csigma = 0.
522  do j = 1, media%noOfElem
523  csigma = csigma + media%elem(j)%nsigma
524  if(u <= csigma) goto 10
525  enddo
526  write(0,*) 'media name=', media%name
527  write(0,*) 'media%xs=',media%xs
528  write(0,*) 'media%noOfElem=', media%noOfElem
529  write(0,*) 'media%elem(:)%nsigma=',
530  * media%elem(1:j)%nsigma
531  write(0,*) ' u=',u, ' csigma=',csigma, ' j=',j
532  call cerrormsg('should not come here; cfixTarget',0)
533  endif
534  10 continue
535  colelemno = j
536 ! int value is taken.
537 !c if(model .eq. "dpmjet3" ) then
538  ia = media%elem(j)%A + 0.5
539 !c else
540 !c call rndc(u)
541 !c ia = media%elem(j).A
542 !c if(u .lt. media%elem(j).A -ia ) then
543 !c ia = ia + 1
544 !c endif
545 !c endif
546 
547 ! media%colZ = media%elem(j)%Z
548 ! media%colA = ia
549 ! media%colXs = media%elem(j)%nsigma/media%elem(j)%No
550  targetprotonno = media%elem(j)%Z
551 ! TargetNucleonNo = media%elem(j)%A
552  targetnucleonno = ia
553  targetxs = media%elem(j)%nsigma / media%elem(j)%No
554 ! Nxt needs not be called if !MacIFC
555 ! (see chAcol.f and cheavyInt.f)
556 #if defined (MacIFC)
557  call cworkaround(targetnucleonno, targetprotonno, targetxs,
558  * colelemno)
559 #endif
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
subroutine rndc(u)
Definition: rnd.f:91
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
subroutine cworkaround(A, Z, xs, nelem)
Definition: cGetXsec.f:563
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cfixtargetmuni()

subroutine cfixtargetmuni ( type(xsmedia), intent(inout)  media)

Definition at line 585 of file cGetXsec.f.

References cfixtarget().

Referenced by csampintl().

585 ! fix target for muon nuclear interaction
586 ! In the case of muon n.i, x-section for each
587 ! element is not computed and elem(:)%nsigma is
588 ! not ready. So we roughly compute it and fix
589 ! the target
590  use modxsecmedia, xmedia=>media
591  implicit none
592 #include "Zevhnp.h"
593 
594  type(xsmedia),intent(inout):: media ! input/output
595  ! xsmedia information.
596 
597 
598  real*8 u, csigma, s0
599  integer j, ia
600 
601  s0=media%xs/sum( media%elem(:)%No * media%elem(:)%A )
602  media%elem(:)%nsigma =
603  * s0 *media%elem(:)%No * media%elem(:)%A
604  call cfixtarget(media)
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
subroutine cfixtarget(media)
Definition: cGetXsec.f:498
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cgetcaprate()

subroutine cgetcaprate ( type(xsmedia), intent(inout)  media)

Definition at line 608 of file cGetXsec.f.

References cmucap().

Referenced by cintemuon().

608  use modxsecmedia, xmedia=>media
609  implicit none
610 #include "Zptcl.h"
611 #include "Zcode.h"
612 #include "Zevhnp.h"
613 
614  type(xsmedia),intent(inout):: media ! input
615 
616  integer i
617  real(8):: sumns, capr
618 
619  sumns = 0.
620  do i = 1, media%noOfElem
621  call cmucap( int(media%elem(i)%A), int(media%elem(i)%Z),
622  * capr)
623  media%elem(i)%nsigma = capr*media%elem(i)%No
624  sumns = sumns + media%elem(i)%nsigma
625  enddo
626  media%xs = sumns ! this is not mb x-sec. but is used
627  ! to fix the target (with media%elem(i)%nsigma
nodes i
subroutine cmucap(a, z, capr)
Definition: cmucap.f:12
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cgetphotopxs()

subroutine cgetphotopxs ( character*16  model,
type(ptcl pj,
type(xsmedia), intent(inout)  media,
real(8), intent(out)  xs,
real(8), intent(out)  mfp 
)

Definition at line 631 of file cGetXsec.f.

References cgpxsec(), and d0.

Referenced by csampgintl().

631 ! cgetxs for photo-hadron production
632  use modxsecmedia, xmedia=>media
633  implicit none
634 #include "Zptcl.h"
635 #include "Zcode.h"
636 #include "Zevhnp.h"
637 !
638  character*16 model ! input. Active interaction model.
639  ! for x-section calclation . at present not used
640  type(ptcl)::pj ! input. a photon
641  type(xsmedia),intent(inout):: media ! input
642  real(8),intent(out):: xs ! obtained cross-section for the
643  ! media% in mb
644  ! if xs==smallxs, no collision
645  ! xs==largexs, instant collision
646  real(8),intent(out):: mfp ! obtained mean free path in kg/m2
647 
648  integer i
649  real(8):: sumns
650 
651  sumns = 0.
652  do i = 1, media%noOfElem
653  call cgpxsec(media%elem(i)%A, pj%fm%p(4), xs)
654  if( xs < smallxs ) then
655  xs = smallxs
656  endif
657  if( xs == smallxs .or. xs == largexs ) then
658  sumns = xs
659  exit
660  else
661  media%elem(i)%nsigma = xs*media%elem(i)%No
662  sumns = sumns + media%elem(i)%nsigma
663  endif
664  enddo
665  media%xs = sumns
666 
667  if(media%xs /= smallxs .and. media%xs /= largexs) then
668  if( media%xs <= 0. ) then
669  xs = smallxs
670  mfp = largexs
671  else
672  xs = media%xs
673  mfp =1.0d0/( media%mbtoPkgrm *media%xs)
674  endif
675  elseif( media%xs == smallxs ) then
676  xs = smallxs
677  mfp = largexs
678  else
679  xs = largexs
680  mfp = smallxs
681  endif
nodes i
! constants thru Cosmos real ! if multiplied to deg radian Torad ! light velocity m sec ! infinty ! kg m2 *Togpcm2 g cm2 ! g cm2 *Tokgpm2 kg m2 ! cm *Tom m ! m *Tocm cm ! g cm3 *Tokgpm3 kg m3 ! kg m3 *Togpcm3 g cm3 ! sec *Tonsec nsec ! Tesla m ! Avogadro *A2deninv ! mfp *n * xs
Definition: Zglobalc.h:18
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
Definition: Zptcl.h:75
subroutine cgpxsec(a, energy, xs)
Definition: cgpXsec.f:11
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cgetxsec()

subroutine cgetxsec ( character(*), intent(in)  modelin,
type(ptcl pj,
type(xsmedia), intent(inout)  media,
real(8), intent(out)  xs,
real(8), intent(out)  mfp 
)

Definition at line 23 of file cGetXsec.f.

References antip, cxsdpmjet3(), cxsepos(), cxsgheisha(), cxsincdpm3(), cxsjam(), cxsother(), cxsphits(), cxsqgsjet2(), cxssibyll(), cxsspecial(), d0, kneue, kneumu, and knuc.

Referenced by cgetxsec2(), and csamphadint().

23 ! @JAXA, xs=0 leads to 0-divide error and after 10 repeats
24 ! stop is made. At other systems, 0 divide
25 ! in this case has no bad effect.
26 ! So change is made as follows.
27 ! xs == smallxs is made to xs <= smallxs.
28 !
29 ! get hadronic interaction cross-section for
30 ! given interaction model, projectile and medium.
31 ! The media information must have been set via
32 ! cXsecMedia.f90
33 ! xmedia=>media is to avoid name
34 ! collision of media in modXsecMedia and
35 ! media argument in the subroutine def.
36  use modxsecmedia, xmedia=>media
37  implicit none
38 #include "Zcode.h"
39 #include "Zptcl.h"
40 #include "Zevhnp.h"
41  character(*),intent(in):: modelin
42  type(ptcl)::pj ! input. projectile
43  type(xsmedia),intent(inout):: media ! media
44  real(8),intent(out):: xs ! collision xsection in mb
45  ! if xs==smallxs, no collision
46  ! xs==largexs, instant collision
47  real(8),intent(out):: mfp ! mean free path in kg/m2
48 
49  character(8):: model
50 
51  if( pj%code == knuc ) then
52  if( pj%subcode == antip .and. pj%fm%p(4) - pj%mass <= 0.) then
53  xs = largexs
54  media%xs = xs
55  mfp = 0.
56  return ! *******************
57  endif
58  elseif( pj%code == kneue .or. pj%code == kneumu ) then
59  xs = smallxs
60  media%xs = xs
61  mfp = largexs
62  return ! *******************
63  endif
64 
65  model = modelin
66  if( model == "special" ) then
67 ! model might be given in next call on return by the user;
68 ! (pj and target are not suited for giving xs so that
69 ! some another relevant model might have been given there for XS calc.
70  call cxsspecial(pj, media, model)
71  endif
72 
73  if( model /= "special" ) then
74  select case(model)
75  case( "phits" )
76  call cxsphits(pj, media)
77  case( "dpmjet3" )
78  call cxsdpmjet3(pj, media)
79  case( "jam" )
80  call cxsjam(pj, media)
81  case( "qgsjet2" )
82  call cxsqgsjet2(pj, media)
83  case( "epos" )
84  call cxsepos(pj, media)
85  case( "sibyll" )
86  call cxssibyll(pj, media)
87  case( "gheisha" )
88  call cxsgheisha(pj, media)
89  case("incdpm3")
90  call cxsincdpm3(pj, media)
91  case default
92  call cxsother( pj, media)
93  end select
94  endif
95  if(media%xs < smallxs) then
96  media%xs = smallxs
97  endif
98  if( media%xs /= smallxs .and. media%xs /= largexs) then
99  mfp = 1.0d0/( media%mbtoPkgrm * media%xs)
100  elseif( media%xs <= smallxs ) then
101  mfp = largexs
102  else
103  mfp = 0.
104  endif
105  xs = media%xs
106 
subroutine cxsgheisha(pj, media)
Definition: cGetXsec.f:407
subroutine cxsjam(pj, media)
Definition: cGetXsec.f:111
subroutine cxssibyll(pj, media)
Definition: cGetXsec.f:346
max ptcl codes in the kneue
Definition: Zcode.h:2
! constants thru Cosmos real ! if multiplied to deg radian Torad ! light velocity m sec ! infinty ! kg m2 *Togpcm2 g cm2 ! g cm2 *Tokgpm2 kg m2 ! cm *Tom m ! m *Tocm cm ! g cm3 *Tokgpm3 kg m3 ! kg m3 *Togpcm3 g cm3 ! sec *Tonsec nsec ! Tesla m ! Avogadro *A2deninv ! mfp *n * xs
Definition: Zglobalc.h:18
subroutine cxsother(pj, media)
Definition: cGetXsec.f:464
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
subroutine cxsepos(pj, media)
Definition: cGetXsec.f:300
subroutine cxsphits(pj, media)
Definition: cGetXsec.f:156
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code knuc
Definition: cblkHeavy.h:7
max ptcl codes in the kneumu
Definition: Zcode.h:2
subroutine cxsqgsjet2(pj, media)
Definition: cGetXsec.f:252
subroutine cxsincdpm3(pj, media)
Definition: cGetXsec.f:440
subroutine cxsdpmjet3(pj, media)
Definition: cGetXsec.f:204
Definition: Zptcl.h:75
max ptcl codes in the kseethru ! subcode integer antip
Definition: Zcode.h:2
subroutine cxsspecial(pj, media, model)
Definition: cxsSpecial.f:7
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cgetxsec2()

subroutine cgetxsec2 ( character(*), intent(in)  model,
type(ptcl pj,
type(xsmedia), intent(inout)  media,
real(8), intent(out)  xs,
real(8), intent(out)  mfp 
)

Definition at line 2 of file cGetXsec.f.

References cgetxsec().

2  ! normally this is not to be used. use cGetXsec
3  use modxsecmedia, xmedia=>media
4  implicit none
5 #include "Zcode.h"
6 #include "Zptcl.h"
7 #include "Zevhnp.h"
8  character(*),intent(in):: model
9  type(ptcl)::pj ! input. projectile
10  type(xsmedia),intent(inout):: media ! media
11  real(8),intent(out):: xs ! collision xsection in mb
12  ! if xs==smallxs, no collision
13  ! xs==largexs, instant collision
14  real(8),intent(out):: mfp ! mean free path in kg/m2
15 
16  call cgetxsec(model, pj, media, xs, mfp)
17  if(xs /= largexs .and. xs /= smallxs) then
18  xs = xs * media%sumNo
19  endif
! constants thru Cosmos real ! if multiplied to deg radian Torad ! light velocity m sec ! infinty ! kg m2 *Togpcm2 g cm2 ! g cm2 *Tokgpm2 kg m2 ! cm *Tom m ! m *Tocm cm ! g cm3 *Tokgpm3 kg m3 ! kg m3 *Togpcm3 g cm3 ! sec *Tonsec nsec ! Tesla m ! Avogadro *A2deninv ! mfp *n * xs
Definition: Zglobalc.h:18
subroutine cgetxsec(modelin, pj, media, xs, mfp)
Definition: cGetXsec.f:23
Definition: Zptcl.h:75
Here is the call graph for this function:

◆ cworkaround()

subroutine cworkaround ( integer, intent(in)  A,
integer, intent(in)  Z,
real(8), intent(in)  xs,
integer, intent(in)  nelem 
)

Definition at line 563 of file cGetXsec.f.

Referenced by cfixtarget().

563 ! With MacIFC,
564 ! TargetNucleonNo, TargetProtonNo, TargetXs
565 ! colElemNo
566 ! cannot be recognized at link time
567 ! from chAcol.f cheavyInt.f so we trnasfer info.
568 ! thru common. (VERY STRANGE; compiler problem)
569  implicit none
570  integer,intent(in):: a ! TargetNucleonNo
571  integer,intent(in):: z ! TargetProtonNo
572  real(8),intent(in):: xs ! TargetXs
573  integer,intent(in):: nelem ! element # of the target elemnt
574  ! in the mediumNo
575 #include "Zworkaround.h"
576 
577  targetnucleonno = a
578  targetprotonno = z
579  targetxs = xs
580  colelemno = nelem
nodes z
! constants thru Cosmos real ! if multiplied to deg radian Torad ! light velocity m sec ! infinty ! kg m2 *Togpcm2 g cm2 ! g cm2 *Tokgpm2 kg m2 ! cm *Tom m ! m *Tocm cm ! g cm3 *Tokgpm3 kg m3 ! kg m3 *Togpcm3 g cm3 ! sec *Tonsec nsec ! Tesla m ! Avogadro *A2deninv ! mfp *n * xs
Definition: Zglobalc.h:18
real(4), save a
Definition: cNRLAtmos.f:20
Here is the caller graph for this function:

◆ cxsdpmjet3()

subroutine cxsdpmjet3 ( type(ptcl pj,
type(xsmedia), intent(inout)  media 
)

Definition at line 204 of file cGetXsec.f.

References cinelx(), ctotx(), d0, knuc, and kpion.

Referenced by cgetxsec().

204  use modxsecmedia, xmedia=>media
205  implicit none
206 #include "Zptcl.h"
207 #include "Zcode.h"
208 #include "Zevhnp.h"
209  type(ptcl)::pj ! input ptcl
210  type(xsmedia),intent(inout):: media ! input/output
211 
212  integer i, ia
213  real(8):: sumns, xs, iar
214 
215  sumns=0.
216  do i =1, media%noOfElem
217  ia = media%elem(i)%A + 0.5d0
218  iar = ia
219  if( pj%code >= kpion .and. pj%code <= knuc ) then
220  if( pj%fm%p(4) .lt. 4.1d0 ) then ! Et is better than Ek
221 ! call ctotx(pj, media%elem(i)%A, xs) !2017/sep/20
222  call ctotx(pj, iar, xs)
223 !//////////////////
224 ! if( pj.code == 6 .and. pj.charge == -1 .and.
225 ! * (pj.fm.p(4)- pj.mass) < 1d-3 ) then
226 ! write(0,*) '********* ', pj.fm.p(4)-pj.mass,
227 ! * xs
228 ! write(0,*) ' largexs=',largexs
229 ! endif
230 !///////////////////
231  else
232 ! call cinelx(pj, media%elem(i)%A, media%elem(i)%Z, xs)
233  call cinelx(pj, iar, media%elem(i)%Z, xs)
234  endif
235  else
236  call cinelx(pj, iar, media%elem(i)%Z, xs)
237 ! call cinelx(pj, media%elem(i)%A, media%elem(i)%Z, xs)
238  endif
239  if( xs <= smallxs .or. xs == largexs ) then
240  sumns = xs
241  exit
242  else
243  media%elem(i)%nsigma = xs*media%elem(i)%No
244  sumns = sumns + media%elem(i)%nsigma
245  endif
246  enddo
247  media%xs = sumns
subroutine cinelx(pj, A, Z, xs)
Definition: cinelx.f:4
nodes i
! constants thru Cosmos real ! if multiplied to deg radian Torad ! light velocity m sec ! infinty ! kg m2 *Togpcm2 g cm2 ! g cm2 *Tokgpm2 kg m2 ! cm *Tom m ! m *Tocm cm ! g cm3 *Tokgpm3 kg m3 ! kg m3 *Togpcm3 g cm3 ! sec *Tonsec nsec ! Tesla m ! Avogadro *A2deninv ! mfp *n * xs
Definition: Zglobalc.h:18
subroutine ctotx(pjin, Ain, xs)
Definition: ctotx.f:7
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
********************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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cxsepos()

subroutine cxsepos ( type(ptcl pj,
type(xsmedia), intent(inout)  media 
)

Definition at line 300 of file cGetXsec.f.

References cmkptc(), d0, kgnuc, and knuc.

Referenced by cgetxsec().

300  use modxsecmedia, xmedia=>media
301  implicit none
302 #include "Zptcl.h"
303 #include "Zcode.h"
304 #include "Zevhnp.h"
305  type(ptcl)::pj ! input ptcl
306  type(xsmedia),intent(inout):: media ! input/output
307 
308  integer i, ia, iz
309  real(8):: sumns, xs, tga, u, tgz
310 
311  type(ptcl)::tg
312 
313  sumns=0.
314  do i =1, media%noOfElem
315  tga = media%elem(i)%A
316  tgz = media%elem(i)%Z
317  ia =tga + 0.5d0
318  iz =tgz
319 ! see qgs part
320 ! ia = tga
321 ! call rndc(u)
322 ! if(u .lt. tga - ia ) then
323 ! ia = min(ia + 1, 209)
324 ! endif
325 
326  if(ia > 1 ) then
327  call cmkptc(kgnuc, ia, iz, tg)
328  else
329  call cmkptc(knuc, ia, iz, tg)
330  endif
331  tg%fm%p(1:3) = 0.
332  tg%fm%p(4) = tg%mass
333  call ceposinioneevent(pj, tg, xs)
334  if( xs <= smallxs .or. xs == largexs ) then
335  sumns = xs
336  exit
337  else
338  media%elem(i)%nsigma = xs*media%elem(i)%No
339  sumns = sumns + media%elem(i)%nsigma
340  endif
341  enddo
342  media%xs = sumns
nodes i
max ptcl codes in the kgnuc
Definition: Zcode.h:2
! constants thru Cosmos real ! if multiplied to deg radian Torad ! light velocity m sec ! infinty ! kg m2 *Togpcm2 g cm2 ! g cm2 *Tokgpm2 kg m2 ! cm *Tom m ! m *Tocm cm ! g cm3 *Tokgpm3 kg m3 ! kg m3 *Togpcm3 g cm3 ! sec *Tonsec nsec ! Tesla m ! Avogadro *A2deninv ! mfp *n * xs
Definition: Zglobalc.h:18
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code knuc
Definition: cblkHeavy.h:7
subroutine cmkptc(code, subcode, charge, p)
Definition: cmkptc.f:15
Definition: Zptcl.h:75
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cxsgheisha()

subroutine cxsgheisha ( type(ptcl pj,
type(xsmedia), intent(inout)  media 
)

Definition at line 407 of file cGetXsec.f.

References cinelx(), knuc, and kpion.

Referenced by cgetxsec().

407  use modxsecmedia, xmedia=>media
408  implicit none
409 #include "Zptcl.h"
410 #include "Zcode.h"
411 #include "Zevhnp.h"
412  type(ptcl)::pj ! input ptcl
413  type(xsmedia),intent(inout):: media ! input/output
414 
415  integer i, ia
416  real(8):: sumns, xs, tga, tgz
417 
418 
419  sumns=0.
420  do i =1, media%noOfElem
421  tga = media%elem(i)%A
422  tgz = media%elem(i)%Z
423  if(pj%code >= kpion .and. pj%code <= knuc ) then
424  call cxsecgheisha(pj, tga, tgz, xs)
425  else
426  call cinelx(pj, tga, tgz, xs)
427  endif
428  if( xs <= smallxs .or. xs == largexs ) then
429  sumns = xs
430  exit
431  else
432  media%elem(i)%nsigma = xs*media%elem(i)%No
433  sumns = sumns + media%elem(i)%nsigma
434  endif
435  enddo
436  media%xs = sumns
subroutine cinelx(pj, A, Z, xs)
Definition: cinelx.f:4
nodes i
! constants thru Cosmos real ! if multiplied to deg radian Torad ! light velocity m sec ! infinty ! kg m2 *Togpcm2 g cm2 ! g cm2 *Tokgpm2 kg m2 ! cm *Tom m ! m *Tocm cm ! g cm3 *Tokgpm3 kg m3 ! kg m3 *Togpcm3 g cm3 ! sec *Tonsec nsec ! Tesla m ! Avogadro *A2deninv ! mfp *n * xs
Definition: Zglobalc.h:18
********************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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cxsincdpm3()

subroutine cxsincdpm3 ( type(ptcl pj,
type(xsmedia), intent(inout)  media 
)

Definition at line 440 of file cGetXsec.f.

References d0.

Referenced by cgetxsec().

440  use modxsecmedia, xmedia=>media
441  implicit none
442 #include "Zptcl.h"
443 #include "Zcode.h"
444 #include "Zevhnp.h"
445 
446  type(ptcl)::pj ! input. a particle (hadronic)
447  type(xsmedia),intent(inout):: media ! input/output
448 
449  real(8):: ek, crossint
450  integer:: kinc
451 
452  ek = pj%fm%p(4)- pj%mass
453  if( ek > 0.2d0 ) then
454 ! special for inclusive treatment. target is always air
455 ! *********************************
456  call cccode2hcode(pj, kinc)
457  media%xs = crossint(kinc, ek)
458  else
459  media%xs = smallxs
460  endif
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
Definition: Zptcl.h:75
Here is the caller graph for this function:

◆ cxsjam()

subroutine cxsjam ( type(ptcl pj,
type(xsmedia), intent(inout)  media 
)

Definition at line 111 of file cGetXsec.f.

References cinelx(), ctotx(), d0, knuc, and kpion.

Referenced by cgetxsec().

111  use modxsecmedia, xmedia=>media
112  implicit none
113 #include "Zptcl.h"
114 #include "Zcode.h"
115 #include "Ztrackp.h"
116 #include "Zevhnp.h"
117  type(ptcl)::pj ! input ptcl
118  type(xsmedia),intent(inout):: media ! input/output
119 
120 
121  integer i, ia
122  real(8):: sumns, xs, iar
123  sumns=0.
124 
125  do i = 1, media%noOfElem
126  ia = media%elem(i)%A + 0.5d0
127  iar = ia
128  if(pj%code >= kpion .and. pj%code <= knuc ) then
129  if( jamxs == 1 ) then
130  call ctotx(pj, iar, xs)
131  elseif( jamxs == 0 ) then
132  call cinelx(pj, iar, media%elem(i)%Z, xs)
133  else
134  write(0,*)
135  * ' JamXs=',jamxs, ' not usable in cxsJam'
136  stop
137  endif
138  else
139  call cinelx(pj, iar, media%elem(i)%Z, xs)
140  endif
141  if( xs < smallxs ) then
142  xs = smallxs
143  endif
144  if( xs == smallxs .or. xs == largexs ) then
145  sumns = xs
146  exit
147  else
148  media%elem(i)%nsigma = xs*media%elem(i)%No
149  sumns = sumns + media%elem(i)%nsigma
150  endif
151  enddo
152  media%xs = sumns
subroutine cinelx(pj, A, Z, xs)
Definition: cinelx.f:4
nodes i
! constants thru Cosmos real ! if multiplied to deg radian Torad ! light velocity m sec ! infinty ! kg m2 *Togpcm2 g cm2 ! g cm2 *Tokgpm2 kg m2 ! cm *Tom m ! m *Tocm cm ! g cm3 *Tokgpm3 kg m3 ! kg m3 *Togpcm3 g cm3 ! sec *Tonsec nsec ! Tesla m ! Avogadro *A2deninv ! mfp *n * xs
Definition: Zglobalc.h:18
subroutine ctotx(pjin, Ain, xs)
Definition: ctotx.f:7
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
********************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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cxsother()

subroutine cxsother ( type(ptcl pj,
type(xsmedia), intent(inout)  media 
)

Definition at line 464 of file cGetXsec.f.

References cinelx(), and d0.

Referenced by cgetxsec().

464  use modxsecmedia, xmedia=>media
465  implicit none
466 #include "Zptcl.h"
467 #include "Zcode.h"
468 #include "Zevhnp.h"
469 
470  type(ptcl)::pj ! input. a particle (hadronic)
471  type(xsmedia),intent(inout):: media ! input/output
472 
473 
474  integer i, ia
475  real(8):: sumns, xs, iar
476 
477  sumns = 0.
478 
479  do i = 1, media%noOfElem
480  ia = media%elem(i)%A + 0.5d0
481  iar = ia
482  call cinelx(pj, iar, media%elem(i)%Z, xs)
483 !//////////////
484 ! write(0,*) 'in othert; xs=',xs, i, media%noOfElem
485 !////////////
486  if( xs <= smallxs .or. xs == largexs ) then
487  sumns = xs
488  exit
489  else
490  media%elem(i)%nsigma = xs*media%elem(i)%No
491  sumns = sumns + media%elem(i)%nsigma
492  endif
493  enddo
494  media%xs = sumns
subroutine cinelx(pj, A, Z, xs)
Definition: cinelx.f:4
nodes i
! constants thru Cosmos real ! if multiplied to deg radian Torad ! light velocity m sec ! infinty ! kg m2 *Togpcm2 g cm2 ! g cm2 *Tokgpm2 kg m2 ! cm *Tom m ! m *Tocm cm ! g cm3 *Tokgpm3 kg m3 ! kg m3 *Togpcm3 g cm3 ! sec *Tonsec nsec ! Tesla m ! Avogadro *A2deninv ! mfp *n * xs
Definition: Zglobalc.h:18
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
Definition: Zptcl.h:75
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cxsphits()

subroutine cxsphits ( type(ptcl pj,
type(xsmedia), intent(inout)  media 
)

Definition at line 156 of file cGetXsec.f.

References antip, cinelx(), kgnuc, and knuc.

Referenced by cgetxsec().

156  use modxsecmedia, xmedia=>media
157  implicit none
158 #include "Zptcl.h"
159 #include "Zcode.h"
160 #include "Zevhnp.h"
161  type(ptcl)::pj ! input ptcl
162  type(xsmedia),intent(inout):: media ! input/output
163 
164 
165  integer i, icon
166  real(8):: sumns, xs, u, elaxs
167  integer::ka, subc, ia, iz
168 
169  sumns=0.
170  ka = pj%code
171  subc = pj%subcode
172  do i =1, media%noOfElem
173  ia = media%elem(i)%A + 0.5
174  iz = media%elem(i)%Z
175  if( ( ka == knuc .and. subc /= antip )
176  * .or. ka == kgnuc) then
177  call cphitsxs(pj, ia, iz, elaxs,xs, icon)
178 !c no need to add. xs is already total 2010.Nov.16
179 !cc xs = xs + elaxs ! phits elaxs for heavy is 0
180  else
181 ! if( ka >= kpion .and. ka <= knuc ) then
182 ! if( (pj.fm.p(4)-pj.mass) < 10.d0 ) then ! include elastic
183 ! call ctotx(pj, media%elem(i)%A, xs)
184 ! else
185  call cinelx(pj, media%elem(i)%A, media%elem(i)%Z, xs)
186 
187 ! endif
188 ! else
189 ! call cinelx(pj, media%elem(i)%A, media%elem(i)%Z, xs)
190 ! endif
191  endif
192  if( xs <= smallxs .or. xs == largexs ) then
193  sumns = xs
194  exit
195  else
196  media%elem(i)%nsigma = xs*media%elem(i)%No
197  sumns = sumns + media%elem(i)%nsigma
198  endif
199  enddo
200  media%xs = sumns
subroutine cinelx(pj, A, Z, xs)
Definition: cinelx.f:4
nodes i
max ptcl codes in the kgnuc
Definition: Zcode.h:2
! constants thru Cosmos real ! if multiplied to deg radian Torad ! light velocity m sec ! infinty ! kg m2 *Togpcm2 g cm2 ! g cm2 *Tokgpm2 kg m2 ! cm *Tom m ! m *Tocm cm ! g cm3 *Tokgpm3 kg m3 ! kg m3 *Togpcm3 g cm3 ! sec *Tonsec nsec ! Tesla m ! Avogadro *A2deninv ! mfp *n * xs
Definition: Zglobalc.h:18
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code knuc
Definition: cblkHeavy.h:7
Definition: Zptcl.h:75
max ptcl codes in the kseethru ! subcode integer antip
Definition: Zcode.h:2
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cxsqgsjet2()

subroutine cxsqgsjet2 ( type(ptcl pj,
type(xsmedia), intent(inout)  media 
)

Definition at line 252 of file cGetXsec.f.

References cinelx(), d0, kgnuc, knuc, and kpion.

Referenced by cgetxsec().

252  use modxsecmedia, xmedia=>media
253  implicit none
254 #include "Zptcl.h"
255 #include "Zcode.h"
256 #include "Zevhnp.h"
257  type(ptcl)::pj ! input ptcl
258  type(xsmedia),intent(inout):: media ! input/output
259 
260 
261  integer i, ia
262  real(8):: sumns, xs, tga, u, tgz
263 
264 
265  sumns=0.
266  do i =1, media%noOfElem
267  tga = media%elem(i)%A
268  tgz = media%elem(i)%Z
269 ! ia =tga
270 ! call rndc(u)
271 ! if(u .lt. tga - ia ) then
272 ! ia = min(ia + 1, 209)
273 ! endif
274 ! above method is not so good. should statistically be ok
275 ! For H2, A is 1.008 so some times ia becomes 2. If one makes
276 ! a table, 2 is always used. and dangerous. To be accurate
277 ! media must be mixed A=1 andn A=2...
278 ! Now we treat such case roughly. by round off (四捨五入)
279  ia = tga + 0.5d0
280  ia = min(ia, 209)
281  if( (pj%code >= kpion .and. pj%code <= knuc) .or.
282  * pj%code == kgnuc ) then
283  call cxsecqgs(pj, ia, xs)
284  else
285  call cinelx(pj, tga, tgz, xs)
286  endif
287 
288  if( xs <= smallxs .or. xs == largexs ) then
289  sumns = xs
290  exit
291  else
292  media%elem(i)%nsigma = xs*media%elem(i)%No
293  sumns = sumns + media%elem(i)%nsigma
294  endif
295  enddo
296  media%xs = sumns
subroutine cinelx(pj, A, Z, xs)
Definition: cinelx.f:4
nodes i
max ptcl codes in the kgnuc
Definition: Zcode.h:2
! constants thru Cosmos real ! if multiplied to deg radian Torad ! light velocity m sec ! infinty ! kg m2 *Togpcm2 g cm2 ! g cm2 *Tokgpm2 kg m2 ! cm *Tom m ! m *Tocm cm ! g cm3 *Tokgpm3 kg m3 ! kg m3 *Togpcm3 g cm3 ! sec *Tonsec nsec ! Tesla m ! Avogadro *A2deninv ! mfp *n * xs
Definition: Zglobalc.h:18
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
********************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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cxssibyll()

subroutine cxssibyll ( type(ptcl pj,
type(xsmedia), intent(inout)  media 
)

Definition at line 346 of file cGetXsec.f.

References cmkptc(), d0, kgnuc, and knuc.

Referenced by cgetxsec().

346  use modxsecmedia, xmedia=>media
347  implicit none
348 #include "Zptcl.h"
349 #include "Zcode.h"
350 #include "Zevhnp.h"
351  type(ptcl)::pj ! input ptcl
352  type(xsmedia),intent(inout):: media ! input/output
353 
354  integer i, ia, iz
355  real(8):: sumns, xs, tga, u, tgz
356 
357  type(ptcl)::tg
358 
359  sumns=0.
360  do i =1, media%noOfElem
361  tga = media%elem(i)%A
362  tgz = media%elem(i)%Z
363  iz =tgz
364  ia = tga + 0.5d0
365 ! see QGS part
366 ! ia =tga
367 ! call rndc(u)
368 ! if(u .lt. tga - ia ) then
369 ! ia = min(ia + 1, 209)
370 ! endif
371  ia = min(ia, 209)
372  if(ia > 1 ) then
373  call cmkptc(kgnuc, ia, iz, tg)
374  else
375  call cmkptc(knuc, ia, iz, tg)
376  endif
377  tg%fm%p(1:3) = 0.
378  tg%fm%p(4) = tg%mass
379  if( media%name == "Air" )then
380  if( i == 1) then
381  tg%subcode = 0 !sibyll can do for almost Air target only.
382  call csibyllxs(pj, tg, xs)
383  else
384  xs =0.
385  endif
386  else
387  call csibyllxs(pj, tg, xs)
388  if( xs <= smallxs .or. xs == largexs ) then
389  sumns = xs
390  exit
391  endif
392  endif
393  if( media%name == "Air") then
394 ! only 1 virtual element 'air' so weight should be 1
395 ! In the event generator, should not choose N target
396 ! but use "air" target. i>1 xs=0
397  media%elem(i)%nsigma = xs
398  else
399  media%elem(i)%nsigma = xs*media%elem(i)%No
400  endif
401  sumns = sumns + media%elem(i)%nsigma
402  enddo
403  media%xs = sumns
nodes i
max ptcl codes in the kgnuc
Definition: Zcode.h:2
! constants thru Cosmos real ! if multiplied to deg radian Torad ! light velocity m sec ! infinty ! kg m2 *Togpcm2 g cm2 ! g cm2 *Tokgpm2 kg m2 ! cm *Tom m ! m *Tocm cm ! g cm3 *Tokgpm3 kg m3 ! kg m3 *Togpcm3 g cm3 ! sec *Tonsec nsec ! Tesla m ! Avogadro *A2deninv ! mfp *n * xs
Definition: Zglobalc.h:18
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
Definition: cblkEvhnp.h:5
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code knuc
Definition: cblkHeavy.h:7
subroutine cmkptc(code, subcode, charge, p)
Definition: cmkptc.f:15
Definition: Zptcl.h:75
Here is the call graph for this function:
Here is the caller graph for this function: