COSMOS v7.655  COSMOSv7655
(AirShowerMC)
cinc_writeHyb.f
Go to the documentation of this file.
1 
2  if(observeas) then
3 #if defined (DOMPI)
4  msg = dir(1:lengdir)//"/"//execid(1:lengid)//".hyb"
5 #define NgXXX NgA
6 #define NeXXX NeA
7 #define NmuXXX NmuA
8 #define NhadXXX NhadA
9 #define SumElossXXX SumElossA
10 #else
11  msg = dir(1:lengdir)//"/"//execid(1:lengid)//
12  * "-@."//numb(1:lengn)//".hyb"
13 #define NgXXX Ng
14 #define NeXXX Ne
15 #define NmuXXX Nmu
16 #define NhadXXX Nhad
17 #define SumElossXXX SumEloss
18 #endif
19  call copenfw2(fnob, msg, 1, icon)
20  if(icon .gt. 1) then
21  write(0,*) ' icon=', icon
22  call cerrormsg(msg, 1)
23  call cerrormsg('could not be opened', 0)
24  endif
25  cog = 0.
26  sumne = 0.
27 
28  do i = 1, noofassites
29 
30  asobssites(i).esize = asobssites(i).esize* enhance
31 
32  if(i .gt. 1 .and. i .lt. noofassites ) then
33  dd =(asdepthlist(i+1) - asdepthlist(i-1))/2.0
34  elseif(i .eq. 1) then
35  dd =(asdepthlist(2) - asdepthlist(1))
36  else
37  dd =(asdepthlist(noofassites) -
38  * asdepthlist(noofassites-1))
39  endif
40  cog = cog + asobssites(i).esize*dd*asdepthlist(i)
41  sumne= sumne +asobssites(i).esize*dd
42  enddo
43 ! 0.1 is for g/cm2
44  cog = cog*0.1/sumne
45 
46  cog2 = 0.
47  sumne = 0.
48  do i = 1, noofassites
49  if( asobssites(i).age .gt.
50  * (2.0-asobssites(noofassites).age)) then
51  if(i .gt. 1 .and. i .lt. noofassites ) then
52  dd =( asdepthlist(i+1) - asdepthlist(i-1))/2.0
53  elseif(i .eq. 1) then
54  dd =(asdepthlist(2) - asdepthlist(1))
55  else
56  dd =(asdepthlist(noofassites) -
57  * asdepthlist(noofassites-1))
58  endif
59  dd = dd
60  cog2 = cog2 + asobssites(i).esize*asdepthlist(i)*dd
61  sumne= sumne +asobssites(i).esize*dd
62  endif
63  enddo
64  if(sumne .gt. 0.) then
65  cog2 = cog2*0.1/sumne
66  else
67 ! too deep penetration
68  cog2 = asdepthlist(noofassites)*0.1
69  endif
70 
71 
72  if(fnob .ge. 0 ) then
73  write(fnob,
74  * '("h ", i4, 3i3, 1pE11.3, 0p 3f11.7, f7.2, 2f7.0)')
75  * eventno, inci.p.code,
76  * inci.p.subcode, inci.p.charge,
77  * inci.p.fm.e, -angle.r(1), -angle.r(2), -angle.r(3),
78  * firstz, cog, cog2
79  else
80  write(*,
81  * '("h ", i4, 3i3, 1pE11.3, 0p 3f11.7, f7.2, 2f7.0)')
82  * eventno, inci.p.code,
83  * inci.p.subcode, inci.p.charge,
84  * inci.p.fm.e, -angle.r(1), -angle.r(2), -angle.r(3),
85  * firstz, cog, cog2
86  endif
87 
88  do i = 1, noofassites
89  if(fnob .ge. 0) then
90  write(fnob, '("t ", i3, 2f7.1, 2f6.3, 1p6E11.3)')
91  * i,
92  * asdepthlist(i)*0.1, asobssites(i).mu,
93  * asobssites(i).age, asdepthlist(i)*0.1/cog2,
94  * ngxxx(i), nexxx(i), nmuxxx(i), nhadxxx(i),
95  * asobssites(i).esize, sumelossxxx(i)
96  else
97  write(*, '("t ", i3, 2f7.1, 2f6.3, 1p6E11.3)')
98  * i,
99  * asdepthlist(i)*0.1, asobssites(i).mu,
100  * asobssites(i).age, asdepthlist(i)*0.1/cog2,
101  * ngxxx(i), nexxx(i), nmuxxx(i), nhadxxx(i),
102  * asobssites(i).esize, sumelossxxx(i)
103  endif
104  enddo
105  if(fnob .gt. 0 ) then
106  write(fnob,*)
107  close(fnob)
108  else
109  write(*,*)
110  endif
111  endif
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
dE dx *! Nuc Int sampling table e
Definition: cblkMuInt.h:130
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz r
Definition: ZavoidUnionMap.h:1
nodes i
integer lengn
Definition: interface2.h:1
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
subroutine copenfw2(io, fnin, form, icon)
Definition: copenf.f:205
*Zfirst p fm *Zfirst p Zfirst p code
Definition: ZavoidUnionMap.h:1
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p charge
Definition: ZavoidUnionMap.h:1
*Zfirst p fm *Zfirst p Zfirst p Zfirst p subcode
Definition: ZavoidUnionMap.h:1