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

Go to the source code of this file.

Functions/Subroutines

subroutine cobservation (id)
 

Function/Subroutine Documentation

◆ cobservation()

subroutine cobservation ( integer  id)

Definition at line 4 of file cobservation.f.

References c, chookeabsorbb(), chookobs(), cxyz2det(), cxyz2detd(), cxyz2prim(), cxyz2primd(), horizontal, and perpendicular.

Referenced by ctracking().

4  implicit none
5 #include "Zglobalc.h"
6 #include "Ztrack.h"
7 #include "Ztrackp.h"
8 #include "Ztrackv.h"
9 #include "Zobs.h"
10 #include "Zobsp.h"
11 #include "Zobsv.h"
12 
13  integer id ! input. 1 ==> the ptcl goes out from BorderHeightH
14  ! 2 ==> the ptcl is observed at an observation level
15  ! 3 ==> the ptcl reached at BorderHeightL
16  ! calles below happen only if DETAILED_TRACKING == 1
17  ! 4 ==> the ptcl is going to make an interaction
18  ! 5 ==> the ptcl is going to die
19  ! 6 ==> the ptcl is being discarded because path >
20  ! limit
21  ! 7 ==> the ptcl is being discarded by angle limit
22  ! However, ondimentional mode will not
23  ! call this.
24  ! 8 ==> the ptcl moved a step.
25 
26  type(track)::otrack
27 
28  integer iwhere
29 
30 #if LABELING > 0
31  if( movedtrack%vec%coszenith .lt. 0. ) then
32 ! upgoing.
33  if(movedtrack%where .eq. 1 .or. movedtrack%where .eq. 2 .and.
34  * id .eq. 2) then
35 !c if(MovedTrack.where .le. 31 .and. id .eq. 2) then
36  if(movedtrack%where .eq. 1) then
37  movedtrack%info = movedtrack%info + 1
38  else
39  movedtrack%info = movedtrack%info + 65336
40  endif
41 !c iwhere=MovedTrack.where
42 ! set bit for where-th bit.
43 ! call ksetbit( MovedTrack.info, iwhere )
44  endif
45  endif
46 #endif
47  if(id .eq. 2) then
48  otrack = movedtrack
49 ! no coord. conv. is made unless the ptcl is at observation
50 ! level.
51 !
52 ! convert time into ns
53  if(timestructure .and. abs(obsplane) .ge. 1
54  * .and. abs(obsplane) .le. 2) then
55  otrack%t = ( otrack%t - obssites(otrack%where)%minitime )
56  * /c *tonsec
57  endif
58 
59 ! convert coordinate and direction cos.
60 ! if ObsPlane < 0, no conversion.
61  if(obsplane .eq. horizontal) then
62 
63  call cxyz2det(obssites(otrack%where)%pos%xyz,
64  * otrack%pos%xyz, otrack%pos%xyz)
65 !
66  call cxyz2detd(otrack%vec%w, otrack%vec%w)
67 
68  elseif(obsplane .eq. perpendicular) then
69 
70  call cxyz2prim(obssites(otrack%where)%pos%xyz,
71  * otrack%pos%xyz, otrack%pos%xyz)
72  call cxyz2primd(otrack%vec%w, otrack%vec%w)
73 !///////////
74 ! write(0,*) ' bef chookobs'
75 ! write(0,*) 'xyz=', oTrack.pos.xyz
76 ! write(0,*) 's=', oTrack.vec.w
77 !////////////
78  endif
79 ! call user routine
80  call chookobs(otrack, id)
81  if(eabsorb(1) .ne. 0 ) then
82 ! 2nd int arg. for normal observation
83 ! point.
84  call chookeabsorbb(otrack,2)
85  endif
86  else
87 ! The user may change the energy to discard the
88 ! particle
89  call chookobs(movedtrack,id)
90  endif
Definition: Ztrack.h:44
subroutine chookeabsorbb(a, info)
Definition: chookEabsorb.f:146
subroutine cxyz2prim(base, a, b)
Definition: cxyz2prim.f:5
! Zobs h header file for observation sites definition ! integer horizontal
Definition: Zobs.h:4
subroutine cxyz2detd(a, b)
Definition: cxyz2det.f:80
subroutine cxyz2primd(a, b)
Definition: cxyz2prim.f:37
subroutine chookobs(aTrack, id)
Definition: chook.f:59
subroutine cxyz2det(det, a, b)
Definition: cxyz2det.f:7
! Zobs h header file for observation sites definition ! integer * perpendicular
Definition: Zobs.h:4
dE dx *! Nuc Int sampling table c
Definition: cblkMuInt.h:130
Here is the call graph for this function:
Here is the caller graph for this function: