1 #include "BlockData/cblkGene.h" 7 real*8 xin(maxbin), yin(maxbin)
9 integer nbin0, icon, code
10 integer count, status, cond
13 if(count .eq. 3) cond=1
14 if(count .eq. 2) cond=0
15 if( count .ne. 2 .and. count .ne. 3 )
then 16 write(0,*)
'Usage: timeFit.. code [c] < inputfile > outfile' 17 write(0,*)
' code = particle code,',
18 *
' inputfile is output from mkRvsT.csh ' 19 write(0,*)
' c: if exists, write only coeff. on stdout ' 20 write(0,*)
' if omitted, coeff. is output on stderr,',
21 *
' fitted (x,y) on stdout' 24 call getarg(1, buf, status)
36 read(*,*,end=100) xin(nbin0+1), yin(nbin0+1)
40 if(nbin0 .gt. maxbin)
then 41 write(0,*)
' too many time data> ', maxbin
46 call copenfw2(minout,
"/dev/null", 1, icon)
50 call fittime0(cond, code, xin, yin, nbin0)
53 subroutine fittime0(cond, code, xin, yin, nbin)
58 real*8 xin(nbin), yin(nbin)
59 real*8 xuse(nbin), yuse(nbin)
60 real*8 prmout(nparam, nregion)
63 integer n1, n2, region
69 if(code .eq. 2 .and. region .eq. 1) cycle
72 if(xin(i) .gt.
x2(region) )
exit 73 if(xin(i) .lt.
x1(region) ) cycle
74 if(code .eq. 2 .and. xin(i) .lt.
x1h ) cycle
91 write(*,
'(3g12.4)') prmout(1, region), prmout(2, region),
96 * prmout(1, region), prmout(2, region), prmout(3, region)
100 write(0,
'(3g12.4)') prmout(1, region), prmout(2, region),
106 do while ( xx .le.
drx2(region) )
107 f=prmout(1,region)*xx**(prmout(2,region) +
108 * prmout(3,region)*log(xx))
116 subroutine fittime1(region, code, xin, yin, n, prmin, prmout )
120 real*8 prmin(nparam), prmout(nparam)
122 real*8 xin(n), yin(n)
124 integer nlabel(nparam)
125 character*10 pname(nparam)
126 real*8 initval(nparam)
129 data nlabel/ 1, 2, 3/
130 data pname/
'p',
'q',
'r'/
131 data step/ 1., 0.001
d0, 0.0001
d0/
132 real*8 zero, one, three, four, five
133 data zero,one,three,four, five / 0., 1., 3.,4., 5. /
149 initval(i) = prmin(i)
152 call mninit( 5, minout, minsave)
162 call mnparm(nlabel(i), pname(i), initval(i), step(i),
163 *
low(i, code),
up(i, code), ierflg)
165 if (ierflg .ne. 0)
then 166 write (0,
'(a,i3)')
' unable to define parameter no.',i
171 call mnseti(
'tf as a function of core distance')
block data include Zlatfit h c fitting region data x1(1)/0.03/
block data include Zlatfit h c fitting region data data data data data d0 data data d0 data data h g *is for param c g data up(2, 1)/7.0d0/
subroutine mnexcm(FCN, COMAND, PLIST, LLIST, IERFLG, FUTIL)
block data cblkElemag data *AnihiE ! Eposi< 1 TeV, anihilation considered *X0/365.667/, ! radiation length of air in kg/m2 *Ecrit/81.e-3/, ! critical energy of air in GeV *MaxComptonE/1./, ! compton is considered below 1 GeV *MaxPhotoE/1.e-3/, ! above this, PhotoElectric effect neg. *MinPhotoProdE/153.e-3/, ! below 153 MeV, no gp --> hadrons ! scattering const not MeV *Knockon true
subroutine copenfw2(io, fnin, form, icon)
integer maxbin nregion c minsave drx2 ! drawing region real maxdep integer maxpos integer op real x1h common Zfitc * param
integer maxbin nregion c minsave drx2 ! drawing region real maxdep integer maxpos integer op real x1h common Zfitc drx1
block data include Zlatfit h c fitting region data data data data data d0 data data d0 data data h g *is for param c g data low(1, 1)/1.d-5/
block data cblkEvhnp ! currently usable models data RegMdls ad *special data *Cekaon d0
integer maxbin nregion c minsave drx2 ! drawing region real maxdep integer maxpos integer npoint
integer maxbin nregion c minsave drx2 ! drawing region real maxdep integer maxpos integer op real x1h common Zfitc x1h
latitude latitude this system is used *****************************************************************! type coord sequence union map real y
subroutine mnparm(K, CNAMJ, UK, WK, A, B, IERFLG)
subroutine timefnc(npar, gin, f, paramx, iflag)
block data include Zlatfit h c fitting region data x2(1)/0.5/data x1(2)/0.3/
subroutine mninit(I1, I2, I3)
integer maxbin nregion c minsave drx2 ! drawing region real maxdep integer maxpos integer op real x1h common Zfitc * oparam
integer maxbin nregion c minsave drx2 ! drawing region real maxdep integer maxpos integer op real x1h common Zfitc drx2
subroutine fittime1(region, code, xin, yin, n, prmin, prmout)
! 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
subroutine fittime0(cond, code, xin, yin, nbin)