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

Go to the source code of this file.

Functions/Subroutines

subroutine proctime (h, fnotf, nfraca, reduced, idxr, idxf, code, layer)
 
subroutine proctimegettf (x, y, n, frac, tf, nfrac)
 

Function/Subroutine Documentation

◆ proctime()

subroutine proctime ( type(histogram1 h,
integer  fnotf,
integer  nfraca,
integer  reduced,
integer  idxr,
integer  idxf,
integer  code,
integer  layer 
)

Definition at line 44 of file procTime.f.

References ksmooth(), nrbin, parameter(), proctimegettf(), tf(), and tfary0().

Referenced by proctimebin().

44 ! This treats one 1-D histogram with web index (idxr, idxf)
45 !
46  implicit none
47 #include "ZtimeAna.h"
48 
49 #include "../../Hist/Z90histc.h"
50 #include "../../Hist/Z90histo.h"
51 #include "../../Hist/Z90hist1.h"
52 
53  type(histogram1):: h ! input 1 D histogram
54  integer fnotf ! input file number for tf data
55  integer nfraca ! input.
56  ! 1 to 11; upto what % data is obtained.
57  ! For final fitting, T10% is ok so use 2.
58  ! 1->T%5 2->T10% 9->T80% 10->T90% 11->T95%
59  ! 2 vs 11: 2 is 15% faster than 11.
60  integer reduced ! 0--> time is non-reduced time
61  ! 1--> reduced time
62  integer idxr ! web r bin index (1~nrbin=42)
63  integer idxf ! web fai bin index (1~nf)
64  integer code ! ptcl code
65  integer layer ! at which layer
66  integer kwhistixy
67  integer maxsize ! max histogram size
68  integer n ! actual histogram size
69 
70  integer i, j
71  parameter(maxsize=3000)
72  real*8 x(maxsize), y(maxsize)
73  real*8 cgap
74  integer icon
75  integer idxr1, idxr2
76  integer mode
77  save
78  mode=2 ! only this can be used
79 
80 ! get (normalized) integral dist.
81  n = kwhistixy(h, x, y, maxsize)
82  if(n .gt. maxsize) then
83  write(0, *) ' too large histogram size=',n
84  stop 1111
85  endif
86  if( idxr .eq. 1 ) then
87  idxr1 = 0
88  idxr2 = 0
89  endif
90  if(reduced .eq. 1 .and. idxf .eq. 1) then
91 ! check time<0 for fai=0 deg.
92  if(n .gt. 0) then
93  if(x(1) .lt. 0. ) then
94  write(0,*)
95  * 'Although you gave reducedT="yes" in baseInfo'
96  write(0,*)
97  * 'I suspect that histgoram data has non reduced time'
98  write(0,*) 'so I stop here'
99  stop 999
100  endif
101  endif
102  endif
103 
104  if(smooth .gt. 0) then
105 ! smoothin parameter
106  cgap = 0.1/(idxr/30.)**4
107 ! smoothing.( at least one trial is done.)
108 ! at large distances (idxr>30, 10 or more
109 ! trials)
110 
111  call ksmooth(x, 1, y, 1, n, 0, smooth, cgap, icon)
112  else
113  icon = 1
114  endif
115 
116  if(icon .gt. 0 ) then
117  if(idxr1 .eq. 0) idxr1=idxr
118  idxr2=idxr
119 ! get 'tf' values corresponding to 'frac'
120  call proctimegettf(x, y, n, frac, tf, nfraca)
121  do i = 1, nfraca
122  tfary0(idxr, i) = tf(i)
123  enddo
124  endif
125  if(idxr .eq. nrbin) then
126 ! all data at given fai has been obtained.
127 ! data is between idxr1 to idxr2 for r
128 ! do fitting and save the result in tfary
129 
130  write(fnotf,'(3i4)') idxf, code, layer
131  if(mode .eq. 1) then
132  do i = idxr1, idxr2
133  write(fnotf,'(i3,1p11E11.3)')
134  * i, (tfary(i, j), j=1, nfraca)
135  enddo
136  write(fnotf,
137  * '("0 0 0 0 0 0 0 0 0 0 0 0 ")')
138  elseif(mode .eq. 2) then
139  do i = idxr1, idxr2
140  write(fnotf,'(i3, 1p11E11.3)')
141  * i, (tfary0(i, j), j=1, nfraca)
142  enddo
143  write(fnotf,
144  * '("0 0 0 0 0 0 0 0 0 0 0 0 ")')
145  elseif(mode .eq. 3) then
146  do i = idxr1, idxr2
147  write(fnotf,'(i3,1p22E11.3)')
148  * i, (tfary(i, j), j=1, nfraca),
149  * (tfary0(i,j), j=1, nfraca)
150  enddo
151  write(fnotf,
152  * '("0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0")')
153  endif
154  endif
integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
integer nfrac tf(nfrac) data frac/0.05d0
nodes i
subroutine proctimegettf(x, y, n, frac, tf, nfrac)
Definition: procTime.f:158
real(4), dimension(:), allocatable, save h
Definition: cNRLAtmos.f:28
integer, save mode
Definition: csoftenPiK.f:34
! timing nrbin
Definition: Zprivate2.h:12
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
*Zfirst p fm *Zfirst p Zfirst p code
Definition: ZavoidUnionMap.h:1
latitude latitude this system is used *****************************************************************! type coord sequence union map real y
Definition: Zcoord.h:25
integer nfrac real * tfary0(nrbin, nfrac) real *8 tfary(nrbin
subroutine ksmooth(x, intvx, y, intvy, n, jin, repeat, cgap, icon)
Definition: ksmooth.f:3
integer n
Definition: Zcinippxc.h:1
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21
Here is the call graph for this function:
Here is the caller graph for this function:

◆ proctimegettf()

subroutine proctimegettf ( real*8, dimension(n x,
real*8, dimension(n y,
integer  n,
real*8, dimension(nfrac)  frac,
real*8, dimension(nfrac)  tf,
integer  nfrac 
)

Definition at line 158 of file procTime.f.

References kpolintpfe(), and parameter().

Referenced by proctime().

158  implicit none
159  integer n
160  real*8 x(n)
161  real*8 y(n)
162  integer nfrac
163  real*8 frac(nfrac)
164  real*8 tf(nfrac)
165 
166  real*8 error
167  integer i, j
168  integer np
169  parameter(np = 3) ! use np points for interpolation
170 
171  do i = 1, nfrac
172  call kpolintpfe(y, 1, x, 1, n, np,
173  * frac(i), tf(i), error)
174  enddo
integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
integer nfrac tf(nfrac) data frac/0.05d0
nodes i
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
latitude latitude this system is used *****************************************************************! type coord sequence union map real y
Definition: Zcoord.h:25
subroutine kpolintpfe(xa, xstep, ya, ystep, nt, m, x, y, error)
Definition: kpolintp.f:134
integer n
Definition: Zcinippxc.h:1
! structure defining a particle at production ! Basic idea of what is to be contained in ! the particle structue is that dynamical ones should be included those derivable from the particle code ! is not included ******************************************************type fmom momentum sequence union map real e endmap map real * x
Definition: Zptcl.h:21
Here is the call graph for this function:
Here is the caller graph for this function: