COSMOS v7.655  COSMOSv7655
(AirShowerMC)
testSampPrim.f
Go to the documentation of this file.
1 ! test primary sampling routines
2 #include "BlockData/cblkGene.h"
3 
4  implicit none
5 #include "Zmanagerp.h"
6 #include "Ztrack.h"
7 #include "Ztrackv.h"
8 #include "Zprimary.h"
9 #include "Zcode.h"
10 
11  type(ptcl):: p
12  type(track)::incident
13  type(coord):: angle
14 
15  real*8 eorporrig
16  integer label, icon, i
17  real*8 mom, kepn, kepA
18  integer fin
19 
20  call creadparam(5)
21  call cbeginrun
22  call cprintprim(errorout)
23  write(0,*) 'id code subc chg orgE TKE TE P KE/n'
24  do i = 1, abs(desteventno(1))
25  icon = 1
26  do while (icon .ne. 0)
27  call csampprimary(incident%p, fin)
28  if(fin .ne. 0) goto 10
29  call csprimang(angle)
30  call cmkinc(incident, angle)
31  if(cutofffile .ne. ' ') then
32  call cifcutoff(icon)
33  else
34  icon =0
35  endif
36  enddo
37  10 continue
38  call cqprime(eorporrig)
39  call cqprimlabel(label)
40  p = incident%p
41  kepn =( p%fm%p(4)-p%mass)
42 
43  kepa = kepn
44  if(p%code .eq. kgnuc) then
45  kepn = kepn / p%subcode
46  endif
47 
48  mom = sqrt(p%fm%p(4)**2 - p%mass**2)
49  write(*, '(i2, 3i4,1p, 5g14.4)')
50  * label,
51  * p%code, p%subcode, p%charge,
52  * eorporrig, kepa, p%fm%p(4), mom, kepn
53  enddo
54  end
55  subroutine chooktrace
56  end
57  subroutine chookceren
58  end
59  subroutine chookcerens
60  end
61  subroutine chookcerene
62  end
63  subroutine chookbgrun
64  end
subroutine cqprimlabel(label)
Definition: csampPrimary.f:345
nodes i
max ptcl codes in the kgnuc
Definition: Zcode.h:2
Definition: Ztrack.h:44
subroutine cprintprim(out)
Definition: cprintPrim.f:3
subroutine csprimang(dir)
Definition: csPrimAng.f:14
subroutine cmkinc(incident, angle)
Definition: cmkIncident.f:246
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
subroutine chookceren
Definition: det2Exyz.f:63
subroutine creadparam(io)
Definition: creadParam.f:5
subroutine chooktrace
Definition: chook.f:275
subroutine chookcerene
Definition: det2Exyz.f:67
subroutine chookcerens(no, primary, angle)
Definition: ctemplCeren.f:19
subroutine cqprime(p_or_e)
Definition: csampPrimary.f:313
Definition: Zptcl.h:75
Definition: Zcoord.h:43
subroutine csampprimary(p, fin)
Definition: csampPrimary.f:13
subroutine cbeginrun
Definition: cbeginRun.f:7
subroutine chookbgrun
Definition: chook.f:15
subroutine cifcutoff(icon)
Definition: cmkIncident.f:556