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

Go to the source code of this file.

Functions/Subroutines

subroutine ceventloop
 
subroutine csetmolunit
 

Function/Subroutine Documentation

◆ ceventloop()

subroutine ceventloop ( )

Definition at line 3 of file ceventLoop.f.

References cfintracking(), chookbgevent(), chookeabsorbi(), chookenevent(), cinitracking(), cinitstack(), cmkincident(), cpush(), creadseed(), csetmolunit(), ctrackingall(), and cwriteseed().

Referenced by cmanager().

3  implicit none
4 #include "Zmanagerp.h"
5 #include "Zmanager.h"
6 #include "Ztrack.h"
7 #include "Zprimary.h"
8 #include "Zprimaryv.h"
9 #include "Zcondc.h"
10 #include "Ztrackp.h"
11 
12 
13  type(track):: incident
14  integer jold, twoir(2)
15  integer fin, jeof
16 
17 
18  do while (eventno .lt. abs( desteventno(1)) .and.
19  * eventsintherun .lt. abs( desteventno(2)))
20 ! switch to the random number generator 1
21  call rndsw(jold, 1)
22  if(job .ne. 'newflesh') then
23 ! for newflesh, these are managed in chookBgEvent
24 !c EventsInTheRun = EventsInTheRun + 1 ! moved to cmkIncident.f
25 !c EventNo = EventNo + 1 ! from v6.25
26  if(refreshir) then
27 ! special case. init for ir of this event is
28 ! read from 14 which should have been opend by the
29 ! user in chookBrRun
30  read(14, *, end=10) twoir
31  call rnd1r(twoir)
32  endif
33  if(job .eq. 'flesh') then
34 ! get random seed at skelton making
35  call creadseed(seedsave, eventno, jeof)
36  if( jeof .ne. 0 ) goto 10
37 ! reset the seed.
38  call rnd1r(seedsave)
39  endif
40 ! save the initial seed of random number
41  call rnd1s(seedsave)
42  write(0,*) seedsave, eventno+1
43  call cmkincident(incident, fin)
44  if(fin .ne. 0) goto 10 ! all including cuoffed end
45  if(job .eq. ' ' .and. seedfile .ne. ' ') then
46  call cwriteseed
47  endif
48 
49  call cinitracking( incident ) ! init for tracking each event
50  call cinitstack
51  call cpush(incident)
52  endif
53  if(eabsorb(1) .ne. 0 ) then
54  call chookeabsorbi(0)
55  endif
56  if(job .eq. 'newflesh') then
57 ! this may be used always; but next one is original
58  call chookbgevent ! user hook for each event beginning
59  call csetmolunit ! for newflesh, primary is fixed above
60  else
61  call csetmolunit
62  call chookbgevent ! user hook for each event beginning
63  endif
64 
65  call ctrackingall
66  if(job .ne. 'newflesh') then
67 ! next is managed by chookEnEven if new flesh
68  call cfintracking ! enf of tracking of each event
69  endif
70  call chookenevent ! user hook for each event end
71 
72  enddo
73  10 continue
Definition: Ztrack.h:44
subroutine creadseed(ir, no, jeof)
Definition: cwriteSeed.f:77
subroutine cinitstack
Definition: cstack.f:76
subroutine cfintracking
Definition: cfinTracking.f:2
subroutine cmkincident(incident, fin)
Definition: cmkIncident.f:5
subroutine chookenevent
Definition: chook.f:116
subroutine cwriteseed
Definition: cwriteSeed.f:15
subroutine cinitracking(incident)
Definition: ciniTracking.f:2
subroutine chookbgevent
Definition: chook.f:39
subroutine ctrackingall
Definition: ctracking.f:2
subroutine cpush(a)
Definition: cstack.f:4
subroutine chookeabsorbi(info)
Definition: chookEabsorb.f:2
subroutine csetmolunit
Definition: ceventLoop.f:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ csetmolunit()

subroutine csetmolunit ( )

Definition at line 76 of file ceventLoop.f.

References cgetmoliereu(), and cqincident().

Referenced by ceventloop().

76 #include "Ztrack.h"
77 #include "Zobs.h"
78 #include "Zobsp.h"
79 #include "Zobsv.h"
80 
81 ! set Moliere unit at each observtion depth (2r.l above along primary)
82  type(track)::inci
83  type(coord)::angle
84  integer i
85  real*8 mu
86  call cqincident(inci, angle)
87 
88  do i = 1, noofsites
89 ! call cgetMoliereU(ObsSites(i).pos.depth, inci.vec.coszenith, ! bef v7.
90  call cgetmoliereu(obssites(i)%pos%depth, -angle%r(3),
91  * obssites(i)%mu)
92  enddo
93  do i = 1, noofassites
94 ! call cgetMoliereU(ASObsSites(i).pos.depth, inci.vec.coszenith,
95  call cgetmoliereu(asobssites(i)%pos%depth, -angle%r(3),
96  * asobssites(i)%mu)
97  enddo
subroutine cqincident(incident, AngleAtObs)
Definition: cmkIncident.f:486
nodes i
subroutine cgetmoliereu(dep, cosz, rmu)
Definition: cgetMoliereU.f:11
Definition: Ztrack.h:44
Definition: Zcoord.h:43
Here is the call graph for this function:
Here is the caller graph for this function: