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

Go to the source code of this file.

Functions/Subroutines

subroutine cputtrinfo
 
subroutine cwrttrinfo (f, t)
 
subroutine ccoordfortr (how, f, t)
 

Function/Subroutine Documentation

◆ ccoordfortr()

subroutine ccoordfortr ( integer  how,
type(coord f,
type(coord t 
)

Definition at line 119 of file cputTrInfo.f.

References cerrormsg(), cxyz2det(), and cxyz2prim().

Referenced by chooktrace(), cputcerenkov(), and cputtrinfo().

119 
120  implicit none
121 ! ***************************************
122 #include "Ztrack.h"
123 #include "Ztrackp.h"
124 #include "Ztrackv.h"
125 #include "Zobs.h"
126 #include "Zobsv.h"
127 
128  integer how ! input. see Trace in cputTrInfo.
129  type(coord)::f
130  type(coord)::t ! output. transformed 'from to' coord
131 
132  if(how .le. 20) then
133 ! to 1ry system
134  call cxyz2prim(obssites(noofsites)%pos%xyz,
135  * trackbefmove%pos%xyz, f)
136  call cxyz2prim(obssites(noofsites)%pos%xyz,
137  * movedtrack%pos%xyz, t)
138  if(how .ge. 10) then
139  f%r(3) = obssites(noofsites)%pos%depth
140  * - trackbefmove%pos%depth
141  t%r(3) = obssites(noofsites)%pos%depth
142  * - movedtrack%pos%depth
143  endif
144  elseif(how .le. 40) then
145 ! to detector system
146  call cxyz2det(obssites(noofsites)%pos%xyz,
147  * trackbefmove%pos%xyz, f)
148  call cxyz2det(obssites(noofsites)%pos%xyz,
149  * movedtrack%pos%xyz, t)
150  if(how .ge. 30) then
151  f%r(3) = obssites(noofsites)%pos%depth
152  * - trackbefmove%pos%depth
153  t%r(3) = obssites(noofsites)%pos%depth
154  * - movedtrack%pos%depth
155  endif
156  elseif(how .le. 60) then
157  f = trackbefmove%pos%xyz
158  t = movedtrack%pos%xyz
159  if(how .ge. 50) then
160  f%r(3) = obssites(noofsites)%pos%depth
161  * - trackbefmove%pos%depth
162  t%r(3) = obssites(noofsites)%pos%depth
163  * - movedtrack%pos%depth
164  endif
165  else
166  call cerrormsg('100>= how > 60 for ccoordForTr ', 0)
167  endif
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
subroutine cxyz2prim(base, a, b)
Definition: cxyz2prim.f:5
nodes t
Definition: Zcoord.h:43
subroutine cxyz2det(det, a, b)
Definition: cxyz2det.f:7
dE dx *! Nuc Int sampling table f
Definition: cblkMuInt.h:130
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cputtrinfo()

subroutine cputtrinfo ( )

Definition at line 35 of file cputTrInfo.f.

References ccoordfortr(), chooktrace(), cputcerenkov(), and cwrttrinfo().

Referenced by ctracking().

35  implicit none
36 
37 #include "Ztrack.h"
38 #include "Ztrackp.h"
39 ! #include "Ztrackv.h"
40 
41 
42  type(coord)::f
43  type(coord)::t
44 
45  if(trace .ge. 100 .and. trace .lt. 160) then
46  call chooktrace
47  return ! ******************
48  endif
49  if(trace .gt. 60 .or. trace .gt. 160) then
50  call cputcerenkov ! Cerenkov output
51  return ! *****************
52  else
53 ! convert coord.
54  call ccoordfortr(trace, f, t)
55  call cwrttrinfo(f, t)
56  endif
subroutine ccoordfortr(how, f, t)
Definition: cputTrInfo.f:119
subroutine chooktrace
Definition: chook.f:275
subroutine cputcerenkov
Definition: cputCerenkov.f:6
nodes t
Definition: Zcoord.h:43
subroutine cwrttrinfo(f, t)
Definition: cputTrInfo.f:59
dE dx *! Nuc Int sampling table f
Definition: cblkMuInt.h:130
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cwrttrinfo()

subroutine cwrttrinfo ( type(coord f,
type(coord t 
)

Definition at line 59 of file cputTrInfo.f.

Referenced by cputtrinfo().

59  implicit none
60 
61 #include "Ztrack.h"
62 #include "Ztrackp.h"
63 #include "Ztrackv.h"
64 #include "Zobs.h"
65 #include "Zobsv.h"
66 
67  type(coord)::f
68  type(coord)::t
69 
70  real*8 xxx/-1.d37/, yyy/-1.d36/, zzz/1.d34/
71  integer kkk/-1000/, chg/-1000/
72  save xxx, yyy, zzz, kkk, chg
73 
74  if(kkk .ne. movedtrack%p%code .or. f%r(1) .ne. xxx
75  * .or. f%r(2) .ne. yyy .or. f%r(3) .ne. zzz .or.
76  * chg .ne. movedtrack%p%charge ) then
77  if(xxx .ne. -1.d37) then
78  write(tracedev, *)
79  write(tracedev, *)
80  endif
81  if(timestructure) then
82 !! write(TraceDev, '(3g16.8, i4, g11.4, i4, g16.8)')
83  write(tracedev,
84  * '(1p,3g24.16,0p, i4,1p, g24.16,0p, i4, 1p, g24.16)')
85  * f%r(1), f%r(2), f%r(3), trackbefmove%p%code,
86  * trackbefmove%p%fm%p(4)-trackbefmove%p%mass,
87  * trackbefmove%p%charge, trackbefmove%t
88  else
89  write(tracedev, '(3g16.8, i4, g11.4, i4)')
90  * f%r(1), f%r(2), f%r(3), trackbefmove%p%code,
91  * trackbefmove%p%fm%p(4)-trackbefmove%p%mass,
92  * trackbefmove%p%charge
93  endif
94  endif
95  if(timestructure) then
96 !!! write(TraceDev, '(3g16.8, i4, g11.4, i4, g16.8)')
97  write(tracedev,
98  * '(1p,3g24.16,0p, i4,1p, g24.16,0p, i4, 1p, g24.16)')
99  * t%r(1), t%r(2), t%r(3), movedtrack%p%code,
100  * movedtrack%p%fm%p(4)-movedtrack%p%mass,
101  * movedtrack%p%charge, movedtrack%t
102  else
103  write(tracedev, '(3g16.8, i4, g11.4, i4)')
104  * t%r(1), t%r(2), t%r(3), movedtrack%p%code,
105  * movedtrack%p%fm%p(4)-movedtrack%p%mass,
106  * movedtrack%p%charge
107  endif
108  xxx = t%r(1)
109  yyy = t%r(2)
110  zzz = t%r(3)
111  kkk = movedtrack%p%code
112  chg = movedtrack%p%charge
nodes t
Definition: Zcoord.h:43
dE dx *! Nuc Int sampling table f
Definition: cblkMuInt.h:130
Here is the caller graph for this function: