COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cxsSpecial.f
Go to the documentation of this file.
1 ! This is an unrealistic example of cxsSpecial.
2 ! next is for before Cosmos version 9
3 #define BEFCOSV9
4  subroutine cxsspecial(pj, media, model)
5 ! Normally, in default, the hadronic intraction x-section is provided by the
6 ! currently active model of hadronic interaction (event generator).
7 ! In some case, e.g, if the user wants to use model "A" above 80 GeV/n
8 ! and "dpmjet3" below 80GeV/n, for the event generation, while for hadronic
9 ! interaction x-section, the user wants to use model "B" above 80 GeV/n,
10 ! Then, the user may give
11 ! IntModel='"dpmjet3", 80, "A"',
12 ! XsecModel='dpmjet3", 80, "B"'
13 ! In this case, model "A" and "B" must be pre-registered interaction models
14 ! (If XsecModel is not given, XsecModel=IntModel is assumed.)
15 ! These functionality hasp been available in recent versions.
16 ! However, in some case, instead of model "B", the user may want to use peculiar
17 ! x-section values not providable by existing models (for some test etc).
18 ! In this case, the userp must give
19 ! XsecModel='dpmjet3", 80, "special"'
20 ! and must give the x-sction values through the cxsSpecial subroutine.
21 !
22 ! This file is an exampale of such a subroutine, but is non physical
23 ! and should not be used except fo test purpose. To use this, the user
24 ! may copy this to own application area and should compile together
25 ! with its programs (e.g add a line (from the 1st columun)
26 ! #include "cxsSpeical.f"
27 ! to cphook.f or ephook.f) (
28 !
29 !
30 ! This program is used only when "special" is specified in XsecModel.
31 
32 !
33 #if defined (BEFCOSV9)
34  use modxsecmedia, xmedia=>media
35  implicit none
36 #else
37  implicit none
38 #include "Zmedia.h"
39 #endif
40 
41 
42 #include "Zcode.h"
43 #include "Zptcl.h"
44 #include "Zevhnp.h"
45 
46  character(*),intent(out):: model
47  type(ptcl)::pj ! input. projectile
48 #if defined (BEFCOSV9)
49  type(xsmedia),intent(inout):: media ! media
50 #else
51  type(epmedia),intent(inout):: media
52 #endif
53 
54  real(8):: xs, sumxs
55  integer:: subc
56  logical needown
57  integer:: i
58 
59  needown = .false.
60  subc = pj%subcode
61  needown = subc > 8 .and. pj%fm%p(4)/subc > 100.
62 
63  if( .not. needown) then
64  ! use current active model for x-section
65  call cqactivemdl(model)
66  else
67  ! my own fake x-section
68  do i = 1, media%noOfElem
69 ! xs = 0.3* media%elem(i)%A**0.5 ! very small xs
70  xs = 300. * media%elem(i)%A**0.85 ! very large xs
71  media%elem(i)%nsigma = xs * media%elem(i)%No
72  sumxs = sumxs + media%elem(i)%nsigma
73  enddo
74  media%xs = sumxs
75  endif
76  end
subroutine cqactivemdl(model)
Definition: cfixModel.f:150
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
subroutine cxsspecial(pj, media, model)
Definition: cxsSpecial.f:7