24 SUBROUTINE mnparm(K,CNAMJ,UK,WK,A,B,IERFLG)
38 IMPLICIT DOUBLE PRECISION (
a-
h,
o-
z)
67 2/mn7ext/ u(mne) ,alim(mne) ,blim(mne)
68 3/mn7err/ erp(mni) ,ern(mni) ,werr(mni) ,globcc(mni)
69 4/mn7inx/ nvarl(mne) ,niofex(mne),nexofi(mni)
70 5/mn7int/
x(mni) ,xt(mni) ,dirin(mni)
71 6/mn7fx2/
xs(mni) ,xts(mni) ,dirins(mni)
72 7/mn7der/ grd(mni) ,g2(mni) ,gstep(mni) ,gin(mne) ,dgrd(mni)
73 8/mn7fx3/ grds(mni) ,g2s(mni) ,gsteps(mni)
74 9/mn7fx1/ ipfix(mni) ,npfix
75 a/mn7var/ vhmat(mnihl)
76 b/mn7vat/ vthmat(mnihl)
77 c/mn7sim/
p(mni,mni+1),pstar(mni),pstst(mni) ,pbar(mni),prho(mni)
79 parameter(maxdbg=10, maxstk=10, maxcwd=20,
maxp=30, maxcpt=101)
82 d/mn7npr/ maxint ,npar ,maxext ,nu
83 e/mn7iou/ isysrd ,isyswr ,isyssa ,npagwd ,npagln ,newpag
84 e/mn7io2/ istkrd(maxstk) ,nstkrd ,istkwr(maxstk) ,nstkwr
85 f/mn7tit/ cfrom ,cstatu ,ctitl ,cword ,cundef ,cvrsn ,covmes
86 g/mn7flg/ isw(7) ,idbg(0:maxdbg) ,nblock ,icomnd
87 h/mn7min/ amin ,
up ,edm ,fval3 ,epsi ,apsi ,dcovar
88 i/mn7cnv/ nfcn ,nfcnmx ,nfcnlc ,nfcnfr ,itaur,istrat,nwrmes(2)
90 k/mn7log/ lwarn ,lrepor ,limset ,lnolim ,lnewmn ,lphead
91 l/mn7cns/ epsmac ,epsma2 ,vlimlo ,vlimhi ,undefi ,bigedm,updflt
92 m/mn7rpt/ xpt(maxcpt) ,ypt(maxcpt)
93 n/mn7cpt/ chpt(maxcpt)
94 o/mn7xcr/ xmidcr ,ymidcr ,xdircr ,ydircr ,ke1cr ,ke2cr
95 CHARACTER CTITL*50, CWORD*(maxcwd), CUNDEF*10, CFROM*8,
96 + cvrsn*6, covmes(0:3)*22, cstatu*10, chpt*1
97 LOGICAL LWARN, LREPOR, LIMSET, LNOLIM, LNEWMN, LPHEAD
99 CHARACTER CNAMK*10, CHBUFI*4
103 IF (k.LT.1 .OR. k.GT.maxext)
THEN 105 WRITE (isyswr,9) k,maxext
106 9
FORMAT (/
' MINUIT USER ERROR. PARAMETER NUMBER IS',i11/
107 +
', ALLOWED RANGE IS ONE TO',i4/)
112 IF (nvarl(k) .LT. 0)
GO TO 50
116 IF (ipfix(ix) .EQ. k) ktofix = k
118 IF (ktofix .GT. 0)
THEN 119 CALL mnwarn(
'W',
'PARAM DEF',
'REDEFINING A FIXED PARAMETER.')
120 IF (kint .GE. maxint)
THEN 121 WRITE (isyswr,
'(A)')
' CANNOT RELEASE. MAX NPAR EXCEEDED.' 127 IF(niofex(k) .GT. 0) kint = npar-1
131 IF (lphead .AND. isw(5).GE.0)
THEN 135 61
FORMAT(/
' PARAMETER DEFINITIONS:'/
136 +
' NO. NAME VALUE STEP SIZE LIMITS')
137 IF (wk .GT. zero)
GO TO 122
139 IF (isw(5) .GE. 0)
WRITE (isyswr, 82) k,cnamk,uk
140 82
FORMAT (1
x,i5,1
x,1
h',A10,1H',1
x,g13.5,
' constant')
143 122
IF (
a.EQ.zero .AND.
b.EQ.zero)
THEN 146 IF (isw(5) .GE. 0)
WRITE (isyswr, 127) k,cnamk,uk,wk
147 127
FORMAT (1
x,i5,1
x,1
h',A10,1H',1
x,2g13.5,
' no limits')
152 IF (isw(5) .GE. 0)
WRITE (isyswr, 132) k,cnamk,uk,wk,
a,
b 153 132
FORMAT(1
x,i5,1
x,1
h',A10,1H',1
x,2g13.5,2
x,2g13.5)
157 IF (kint .GT. maxint)
THEN 158 WRITE (isyswr,135) maxint
159 135
FORMAT (/
' MINUIT USER ERROR. TOO MANY VARIABLE PARAMETERS.'/
160 +
' THIS VERSION OF MINUIT DIMENSIONED FOR',i4//)
163 IF (nvl .EQ. 1)
GO TO 200
165 WRITE (isyswr,
'(/A,A/A/)')
' USER ERROR IN MINUIT PARAMETER',
166 +
' DEFINITION',
' UPPER AND LOWER LIMITS EQUAL.' 173 CALL mnwarn(
'W',
'PARAM DEF',
'PARAMETER LIMITS WERE REVERSED.')
174 IF (lwarn) lphead=.
true.
176 IF ((
b-
a) .GT. 1.0e7)
THEN 177 WRITE (chbufi,
'(I4)') k
178 CALL mnwarn(
'W',
'PARAM DEF',
179 +
'LIMITS ON PARAM'//chbufi//
' TOO FAR APART.')
180 IF (lwarn) lphead=.
true.
182 danger = (
b-uk)*(uk-
a)
184 +
CALL mnwarn(
'W',
'PARAM DEF',
'STARTING VALUE OUTSIDE LIMITS.')
186 +
CALL mnwarn(
'W',
'PARAM DEF',
'STARTING VALUE IS AT LIMIT.')
203 IF (niofex(ix) .GT. 0) lastin=lastin+1
206 IF (kint .EQ. npar)
GO TO 280
207 IF (kint .GT. npar)
THEN 209 DO 260 in= npar,lastin+1,-1
215 dirin(in+1) = dirin(in)
217 gstep(in+1) = gstep(in)
221 DO 270 in= lastin+1,kint
227 dirin(in)= dirin(in+1)
229 gstep(in)= gstep(in+1)
248 CALL mnpint(sav2,ix,pinti)
251 CALL mnpint(sav2,ix,pinti)
252 vminu = pinti -
x(in)
253 dirin(in) = 0.5 * (abs(vplu) +abs(vminu))
254 g2(in) = 2.0*
up / dirin(in)**2
255 gsmin = 8.*epsma2*abs(
x(in))
256 gstep(in) = max(gsmin, 0.1*dirin(in))
257 IF (amin .NE. undefi)
THEN 258 small = sqrt(epsma2*(amin+
up)/
up)
259 gstep(in) = max(gsmin, small*dirin(in))
261 grd(in) = g2(in)*dirin(in)
263 IF (nvarl(k) .GT. 1)
THEN 264 IF (gstep(in).GT. 0.5) gstep(in)=0.5
265 gstep(in) = -gstep(in)
268 IF (ktofix .GT. 0)
THEN 269 kinfix = niofex(ktofix)
270 IF (kinfix .GT. 0)
CALL mnfixp(kinfix,ierr)
271 IF (ierr .GT. 0)
GO TO 800
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
! 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
subroutine mnpint(PEXTI, I, PINTI)
subroutine mnparm(K, CNAMJ, UK, WK, A, B, IERFLG)
dE dx *! Nuc Int sampling table d
dE dx *! Nuc Int sampling table b
block data include Zlatfit h c fitting region data data data data data d0 data data d0 data data m
subroutine mnfixp(IINT, IERR)
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 h
dE dx *! Nuc Int sampling table g
subroutine mnwarn(COPT, CORG, CMES)
! 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