EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lmprin.F
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file lmprin.F
1 
2 C **********************************************************************
3 
4  SUBROUTINE lmprin (IKODE,FVAL)
5 
6  IMPLICIT NONE
7 
8 C...This is the MINUIT routine MPRINT.
9 CC PRINTS THE VALUES OF THE PARAMETERS AT THE TIME OF THE CALL.
10 CC ALSO PRINTS OTHER RELEVANT INFORMATION SUCH AS FUNCTION VALUE,
11 CC ESTIMATED DISTANCE TO MINIMUM, PARAMETER ERRORS, STEP SIZES.
12 CC ACCORDING TO THE VALUE OF IKODE,THE PRINTOUT IS LONG FORMAT,
13 CC SHORT FORMAT, OR MINOS FORMAT (0,1,2)
14 CC
15 
16  COMMON
17  1/lmmine/ erp(30) ,ern(30)
18  2/lmpari/ x(15) ,xt(15) ,dirin(15) ,maxint ,npar
19  3/lmpare/ u(30) ,werr(30) ,maxext ,nu
20  4/lmlimi/ alim(30) ,blim(30) ,lcode(30) ,lcorsp(30) ,limset
21  5/lmvari/ v(15,15)
22  7/lmfix / ipfix(15),xs(15) ,xts(15) ,dirins(15) ,npfix
23  7/lmfix2/ grds(15) ,g2s(15) ,gsteps(15),aberfs(15)
24  c/lmcasc/ y(16) ,jh ,jl
25  f/lmderi/ gin(30) ,grd(15) ,g2(15) ,gstep(15) ,aberf(15)
26  g/lmsimv/ p(15,16) ,pstar(15),pstst(15) ,pbar(15) ,prho(15)
27  j/lmvart/ vt(15,15)
28  COMMON
29  6/lmunit/ isysrd ,isyswr ,isyspu
30  8/lmtitl/ title(13),date(2) ,isw(7) ,nblock
31  9/lmconv/ epsi ,apsi ,vtest ,nstepq ,nfcn ,nfcnmx
32  a/lmcard/ cword ,cword2 ,cword3 ,word7(7)
33  b/lmmini/ amin ,up ,newmin ,itaur ,sigma,epsmac
34 
35  REAL erp,ern
36  INTEGER maxint,npar
37  REAL x,xt,dirin
38  INTEGER maxext ,nu
39  REAL u,werr
40  INTEGER lcode,lcorsp,limset
41  REAL alim,blim
42  REAL v
43  INTEGER ipfix,npfix
44  REAL xs,xts,dirins
45  REAL grds,g2s,gsteps,aberfs
46  REAL y
47  INTEGER jh,jl
48  REAL gin,grd,g2,gstep,aberf
49  REAL p,pstar,pstst,pbar,prho
50  REAL vt
51 ***** COMMON
52  INTEGER isysrd ,isyswr ,isyspu
53  REAL title,date
54  INTEGER isw,nblock
55  REAL epsi ,apsi ,vtest
56  INTEGER nstepq ,nfcn ,nfcnmx
57  REAL cword ,cword2 ,cword3 ,word7
58  REAL amin ,up ,sigma,epsmac
59  INTEGER newmin ,itaur
60 
61  COMMON /lminuc/ namkin(4),nam(30)
62  CHARACTER*10 namkin,nam
63  SAVE /lminuc/
64 
65  COMMON /lpflag/ lst3
66  INTEGER lst3
67  SAVE /lpflag/
68 
69 
70  INTEGER ikode,i,l,kount
71  REAL fval,ti,e,dx,al,ba,du1,du2,x1,x2
72 
73 C . GET TIME AND PRINT HEADINGS .
74  CALL ltimex(ti)
75  IF(lst3.GE.5) WRITE (isyswr,1000)
76  e = sigma
77  kount = 0
78 C . . . LOOP OVER PARAMETERS . .
79  DO 200 i= 1, nu
80  IF(nam(i).EQ.' ') goto 200
81  20 l = lcorsp(i)
82  IF (l .EQ. 0) go to 55
83 C VARIABLE PARAMETER. CALCULATE EXTERNAL ERROR IF V EXISTS
84  IF (isw(2) .LT. 1) go to 27
85  dx = sqrt(abs(v(l,l)*up))
86  IF (lcode(i) .LE. 1) go to 26
87  al = alim(i)
88  ba = blim(i) - al
89  du1 = al + 0.5 *(sin(x(l)+dx) +1.0) * ba - u(i)
90  du2 = al + 0.5 *(sin(x(l)-dx) +1.0) * ba - u(i)
91  IF (dx .GT. 1.0) du1 = ba
92  dx = 0.5 * (abs(du1) + abs(du2))
93  26 werr(i) = dx
94  27 x1 = x(l)
95  x2 = dirin(l)
96  IF (ikode .LT. 2) go to 29
97  x1 = erp(i)
98  x2 = ern(i)
99  29 IF (kount) 30,30,40
100  30 kount = 1
101  IF(lst3.GE.5)
102  &WRITE (isyswr,1001) fval,nfcn,ti,e, l,i,nam(i),u(i),werr(i),x1,x2
103  go to 45
104  40 IF(lst3.GE.5) WRITE (isyswr,1002) l,i,nam(i),u(i),werr(i),x1,x2
105  45 IF (lcode(i) .LE. 1) go to 200
106  IF(lst3.GE.1.AND. abs(cos(x(l))) .LT. 0.001) WRITE (isyswr,1004)
107  go to 200
108 C FIXED PARAMETER. PRINT ONLY IF IKODE .GT.0
109  55 IF (ikode .EQ. 0) go to 200
110  IF (kount) 60,60,70
111  60 kount = 1
112  IF(lst3.GE.5) WRITE (isyswr,1001) fval,nfcn,ti,e, l,i,nam(i),u(i)
113  go to 200
114  70 IF(lst3.GE.5) WRITE (isyswr,1003) i,nam(i),u(i)
115  200 CONTINUE
116  IF(lst3.GE.5.AND.
117  &ikode.GE.1 .AND.isw(2).GE.1) WRITE (isyswr,1005) up
118  RETURN
119  1000 FORMAT(/ 4x,'FCN VALUE',5x,'CALLS',4x,'TIME',4x,' EDM ',4x ,
120  +'INT.EXT. PARAMETER VALUE ERROR INTERN.VALUE ',
121  +'INT.STEP SIZE')
122  1001 FORMAT(e15.7,i7,f9.2,e11.2,i6,i4,1x,a10,4e14.5)
123  1002 FORMAT(1h ,41x,i6,i4,1x,a10,4e14.5)
124  1003 FORMAT(1h ,47x ,i4,1x,a10,4e14.5)
125  1004 FORMAT(1h ,52x ,'WARNING - - ABOVE PARAMETER IS AT LIMIT.')
126  1005 FORMAT(/45x,'ERRORS CORRESPOND TO FUNCTION CHANGE OF ',e12.4)
127  END