23 IMPLICIT DOUBLE PRECISION (
a-
h,
o-
z)
47 2/mn7ext/ u(mne) ,alim(mne) ,blim(mne)
48 3/mn7err/ erp(mni) ,ern(mni) ,werr(mni) ,globcc(mni)
49 4/mn7inx/ nvarl(mne) ,niofex(mne),nexofi(mni)
50 5/mn7int/
x(mni) ,xt(mni) ,dirin(mni)
51 6/mn7fx2/
xs(mni) ,xts(mni) ,dirins(mni)
52 7/mn7der/ grd(mni) ,g2(mni) ,gstep(mni) ,gin(mne) ,dgrd(mni)
53 8/mn7fx3/ grds(mni) ,g2s(mni) ,gsteps(mni)
54 9/mn7fx1/ ipfix(mni) ,npfix
55 a/mn7var/ vhmat(mnihl)
56 b/mn7vat/ vthmat(mnihl)
57 c/mn7sim/
p(mni,mni+1),pstar(mni),pstst(mni) ,pbar(mni),prho(mni)
59 parameter(maxdbg=10, maxstk=10, maxcwd=20,
maxp=30, maxcpt=101)
62 d/mn7npr/ maxint ,npar ,maxext ,nu
63 e/mn7iou/ isysrd ,isyswr ,isyssa ,npagwd ,npagln ,newpag
64 e/mn7io2/ istkrd(maxstk) ,nstkrd ,istkwr(maxstk) ,nstkwr
65 f/mn7tit/ cfrom ,cstatu ,ctitl ,cword ,cundef ,cvrsn ,covmes
66 g/mn7flg/ isw(7) ,idbg(0:maxdbg) ,nblock ,icomnd
67 h/mn7min/ amin ,
up ,edm ,fval3 ,epsi ,apsi ,dcovar
68 i/mn7cnv/ nfcn ,nfcnmx ,nfcnlc ,nfcnfr ,itaur,istrat,nwrmes(2)
70 k/mn7log/ lwarn ,lrepor ,limset ,lnolim ,lnewmn ,lphead
71 l/mn7cns/ epsmac ,epsma2 ,vlimlo ,vlimhi ,undefi ,bigedm,updflt
72 m/mn7rpt/ xpt(maxcpt) ,ypt(maxcpt)
73 n/mn7cpt/ chpt(maxcpt)
74 o/mn7xcr/ xmidcr ,ymidcr ,xdircr ,ydircr ,ke1cr ,ke2cr
75 CHARACTER ctitl*50, cword*(maxcwd), cundef*10, cfrom*8,
76 + cvrsn*6, covmes(0:3)*22, cstatu*10, chpt*1
77 LOGICAL lwarn, lrepor, limset, lnolim, lnewmn, lphead
80 CHARACTER*4 cgood,cbad,cnone,cwd
83 parameter(cgood=
'GOOD',cbad=
' BAD',cnone=
'NONE')
87 IF (word7(1) .GT. zero)
GO TO 2000
92 CALL fcn(nparx,gin,fzero,u,2,futil)
104 51
FORMAT(/
' CHECK OF GRADIENT CALCULATION IN FCN'/12
x,
'PARAMETER',
105 + 6
x,9hg(in fcn) ,3
x,9hg(
minuit) ,2
x,
'DG(MINUIT)',3
x,9hagreement)
112 IF (abs(gf(lc)-grd(lc)) .GT. err) cwd = cbad
113 IF (gin(
i) .EQ. undefi)
THEN 118 IF (cwd .NE. cgood) isw(3) = 0
119 WRITE (isyswr,99)
i,cpnam(
i),gf(lc),grd(lc),err,cwd
120 99
FORMAT (7
x,i5,2
x ,a10,3e12.4,4
x ,a4)
122 IF (lnone)
WRITE (isyswr,
'(A)')
123 +
' AGREEMENT=NONE MEANS FCN DID NOT CALCULATE THE DERIVATIVE' 124 IF (isw(3) .EQ. 0)
WRITE (isyswr,1003)
125 1003
FORMAT(/
' MINUIT DOES NOT ACCEPT DERIVATIVE CALCULATIONS BY FCN'/
126 +
' TO FORCE ACCEPTANCE, ENTER "SET GRAD 1"'/)
integer npitbl real *nx parameter(n=101, npitbl=46, nx=n-1) real *8 uconst
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/
dE dx *! Nuc Int sampling table e
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 minuit(FCN, FUTIL)
real(4), dimension(:), allocatable, save h
! constants thru Cosmos real ! if multiplied to deg radian Torad ! light velocity m sec ! infinty ! kg m2 *Togpcm2 g cm2 ! g cm2 *Tokgpm2 kg m2 ! cm *Tom m ! m *Tocm cm ! g cm3 *Tokgpm3 kg m3 ! kg m3 *Togpcm3 g cm3 ! sec *Tonsec nsec ! Tesla m ! Avogadro *A2deninv ! mfp *n * xs
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
dE dx *! Nuc Int sampling table d
subroutine mnhes1(FCN, FUTIL)
block data include Zlatfit h c fitting region data data data data data d0 data data d0 data data m
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 ! knockon is considered Obsolete *PhotoProd false
dE dx *! Nuc Int sampling table g
subroutine mnderi(FCN, FUTIL)
! 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
dE dx *! Nuc Int sampling table f
dE dx *! Nuc Int sampling table c