Millepede-II V04-17-04
Modules | Functions/Subroutines | Variables
mphistab.f90 File Reference

Histogramming package. More...

Go to the source code of this file.

Modules

module  hmpcons
 Histogram constants.
 
module  hmpdata
 Histogram data.
 
module  gmpcons
 XY constants.
 
module  gmpdata
 Histogram data.
 
module  stmamod
 storage manager data.
 

Functions/Subroutines

subroutine hmpdef (ih, xa, xb, text)
 book, reset histogram More...
 
subroutine hmpldf (ih, text)
 book, reset log histogram More...
 
subroutine hmpent (ih, x)
 entry flt.pt. More...
 
subroutine hmplnt (ih, ix)
 entry integer More...
 
subroutine hmprnt (ih)
 print, content vert More...
 
subroutine hmplun (lunw)
 unit for output More...
 
subroutine hmpwrt (ih)
 write histogram text file More...
 
subroutine hmpmak (inhist, fnhist, jnhist, xl, dl)
 hist scale from data More...
 
subroutine bintab (tab, n, xa, xb)
 hist scale from data More...
 
subroutine kprint (lun, list, n)
 print integer array More...
 
subroutine gmpdef (ig, ityp, text)
 book, reset XY storage More...
 
subroutine gmpxy (ig, x, y)
 add (X,Y) pair More...
 
subroutine gmpxyd (ig, x, y, dx, dy)
 add (X,Y,DX,DY) More...
 
subroutine gmpms (ig, x, y)
 mean sigma(X) from Y More...
 
subroutine gmprnt (ig)
 print XY data More...
 
subroutine gmplun (lunw)
 unit for output More...
 
subroutine gmpwrt (ig)
 write XY text file More...
 
subroutine stmars (ndim)
 init/reset storage More...
 
subroutine stmapr (jflc, x, y)
 store pair (X,Y) More...
 
subroutine stmadp (jflc, four)
 store double pair More...
 
subroutine stmacp (jflc, array, n)
 copy (cp) all pairs to array More...
 
subroutine stmacp4 (jflc, array, n)
 copy (cp) all pairs to array4 More...
 
subroutine stmacp1 (jflc, array, n)
 copy (cp) all pairs to array1 More...
 
subroutine stmarm (jflc)
 remove (rm) stored pairs More...
 
subroutine rmesig (x, n, xloc, xsca)
 robust mean and sigma More...
 

Variables

integer(mpi), parameter hmpcons::numhis =16
 number of histograms More...
 
integer(mpi), parameter hmpcons::nbin =120
 number of bins More...
 
integer(mpi), parameter hmpcons::nsampl =120
 number of samples for auto scaling More...
 
integer(mpi) hmpdata::lun =7
 unit for output More...
 
integer(mpi), dimension(nbin, numhis) hmpdata::inhist
 histogram (bin) data More...
 
integer(mpi), dimension(5, numhis) hmpdata::jnhist
 histogram statistics More...
 
integer(mpi), dimension(numhis) hmpdata::khist =0
 histgram type More...
 
integer(mpi), dimension(numhis) hmpdata::kvers
 histogram version More...
 
real(mps), dimension(nsampl, numhis) hmpdata::fnhist
 initial data for auto scaling More...
 
real(mps), dimension(6, numhis) hmpdata::xl
 histogram binning More...
 
real(mpd), dimension(2, numhis) hmpdata::dl
 histogram moments More...
 
character(len=60), dimension(numhis) hmpdata::htext
 histogram text More...
 
integer(mpi), parameter gmpcons::numgxy =10
 number of XY data plots More...
 
integer(mpi) gmpdata::lun =7
 unit for output More...
 
integer(mpi) gmpdata::nlimit =500
 max. More...
 
integer(mpi), dimension(numgxy) gmpdata::nstr =0
 initialization flag More...
 
integer(mpi), dimension(numgxy) gmpdata::igtp
 type of XY data More...
 
integer(mpi), dimension(numgxy) gmpdata::lvers
 version More...
 
integer(mpi), dimension(3, numgxy) gmpdata::nst
 counters for GMPMS More...
 
integer(mpi), dimension(5, numgxy) gmpdata::jflc
 meta data More...
 
integer(mpi), dimension(5, numgxy) gmpdata::kflc
 meta data More...
 
real(mps), dimension(10, numgxy) gmpdata::xyplws
 additional data for GMPMS More...
 
real(mps), dimension(numgxy) gmpdata::y1
 first Y (as X) for GMPMS More...
 
real(mps), dimension(:,:), allocatable gmpdata::array
 X,Y. More...
 
real(mps), dimension(:,:), allocatable gmpdata::array4
 X,Y,DX,DY. More...
 
real(mps), dimension(:), allocatable gmpdata::array1
 Y(X) More...
 
character(len=60), dimension(numgxy) gmpdata::gtext
 text More...
 
real(mps), dimension(:,:), allocatable stmamod::tk
 
integer(mpi), dimension(:), allocatable stmamod::next
 
integer(mpi) stmamod::iflc1
 
integer(mpi) stmamod::iflc2
 

Detailed Description

Histogramming package.

Author
Volker Blobel, University Hamburg, 2005-2009 (initial Fortran77 version)
Claus Kleinwort, DESY (maintenance and developement)
                          HMP... and GMP...
                    Histogram and XY data in text files

     Booking:

     CALL HMPDEF(IH,XA,XB,TEXT)               CALL GMPDEF(IG,ITYP,TEXT)
     where                                    where
        IH    = 1 ... 10                         IG    = 1 ... 10
        XA,XB = left, right limit                ITYP  = 1 dots
        TEXT  = explanation                            = 2 line
                                                       = 3 dots and line
                                                       = 4 symbols
                                                       = 5 mean/sigma
                                                 TEXT  = explanation

     CALL HMPLUN(LUNW)                        CALL GMPLUN(LUNW)
     unit for output                          unit for output

     CALL HMPENT(IH,X)                        CALL GMPXY(IG,X,Y)
     entry flt.pt. X                          add (X,Y) pair

                                              CALL GMPXYD(IG,X,Y,DX,DY)
                                              add (X,Y,DX,DY) ITYP=4

        new                                   CALL GMPMS(IG,X,Y)
                                              mean/sigma from x,y

     Booking log integer histogram:

     CALL HMPLDF(IH,TEXT)
     book and reset log integer histogram

     CALL HMPLNT(IH,IX)
     entry integer IX

     Printing and writing:

     CALL HMPRNT(IH)                          CALL GMPRNT(IG)
     print histogram IH or all, if 0          print data Ig or all, if 0

     CALL HMPWRT(IH)                          CALL GMPWRT(IG)
     write histogram IH or all to file        write data IG or all to file


     Storage manager for GMP...

      CALL STMARS(NDIM)           !! init/reset  storage manager, partially dynamic

      CALL STMAPR(JFLC,X,Y)       !! store pair (X,Y)

      CALL STMADP(JFLC,FOUR)      !! store double pair

      CALL STMACP(JFLC,ARRAY,N)   !! copy (cp) all pairs to array

      CALL STMARM(JFLC)           !! remove (rm) stored paiirs

The number of histograms is limited to NUMHIS (=15), the number of XY data plots to NUMGXY (=10) and the storage of XY points to NDIM (=5000). As each XY plot can contain up to NLIMIT (=500) points (before averaging) NDIM should be NLIMIT*NUMGXY.

Definition in file mphistab.f90.

Function/Subroutine Documentation

◆ bintab()

subroutine bintab ( real(mps), dimension(n), intent(in)  tab,
integer(mpi), intent(in)  n,
real(mps), intent(out)  xa,
real(mps), intent(out)  xb 
)

hist scale from data

Definition at line 479 of file mphistab.f90.

References heapf(), and hmpcons::nsampl.

Referenced by hmpmak().

◆ gmpdef()

subroutine gmpdef ( integer(mpi), intent(in)  ig,
integer(mpi), intent(in)  ityp,
character (len=*), intent(in)  text 
)

◆ gmplun()

subroutine gmplun ( integer(mpi), intent(in)  lunw)

unit for output

Definition at line 974 of file mphistab.f90.

References gmpdata::lun.

Referenced by mptwo().

◆ gmpms()

subroutine gmpms ( integer(mpi), intent(in)  ig,
real(mps), intent(in)  x,
real(mps), intent(in)  y 
)

◆ gmprnt()

subroutine gmprnt ( integer(mpi), intent(in)  ig)

◆ gmpwrt()

subroutine gmpwrt ( integer(mpi), intent(in)  ig)

◆ gmpxy()

subroutine gmpxy ( integer(mpi), intent(in)  ig,
real(mps), intent(in)  x,
real(mps), intent(in)  y 
)

add (X,Y) pair

Definition at line 766 of file mphistab.f90.

References gmpdata::igtp, gmpdata::jflc, and stmapr().

Referenced by mdiags(), mptwo(), and xloopn().

◆ gmpxyd()

subroutine gmpxyd ( integer(mpi), intent(in)  ig,
real(mps), intent(in)  x,
real(mps), intent(in)  y,
real(mps), intent(in)  dx,
real(mps), intent(in)  dy 
)

add (X,Y,DX,DY)

Definition at line 781 of file mphistab.f90.

References gmpdata::igtp, gmpdata::jflc, and stmadp().

Referenced by xloopn().

◆ hmpdef()

subroutine hmpdef ( integer(mpi), intent(in)  ih,
real(mps), intent(in)  xa,
real(mps), intent(in)  xb,
character (len=*), intent(in)  text 
)

book, reset histogram

Definition at line 121 of file mphistab.f90.

References hmpdata::dl, hmpdata::htext, hmpdata::inhist, hmpdata::jnhist, hmpdata::khist, hmpdata::kvers, and hmpdata::xl.

Referenced by loop1(), loop2(), loopn(), mdiags(), and mptwo().

◆ hmpent()

subroutine hmpent ( integer(mpi), intent(in)  ih,
real(mps), intent(in)  x 
)

entry flt.pt.

Definition at line 182 of file mphistab.f90.

References hmpdata::dl, hmpdata::fnhist, hmpmak(), hmpdata::inhist, hmpdata::jnhist, hmpdata::khist, and hmpdata::xl.

Referenced by loop1(), loopbf(), loopn(), mdiags(), mptwo(), ndbits(), and peread().

◆ hmpldf()

subroutine hmpldf ( integer(mpi), intent(in)  ih,
character (len=*), intent(in)  text 
)

book, reset log histogram

Definition at line 157 of file mphistab.f90.

References hmpdata::htext, hmpdata::inhist, hmpdata::jnhist, hmpdata::khist, hmpdata::kvers, and hmpdata::xl.

Referenced by loop1().

◆ hmplnt()

subroutine hmplnt ( integer(mpi), intent(in)  ih,
integer(mpi), intent(in)  ix 
)

entry integer

Definition at line 222 of file mphistab.f90.

References hmpdata::inhist, hmpdata::jnhist, and hmpdata::khist.

Referenced by loop1(), and peread().

◆ hmplun()

subroutine hmplun ( integer(mpi), intent(in)  lunw)

unit for output

Definition at line 328 of file mphistab.f90.

References hmpdata::lun.

Referenced by mptwo().

◆ hmpmak()

subroutine hmpmak ( integer(mpi), dimension(nbin), intent(out)  inhist,
real(mps), dimension(nsampl), intent(in)  fnhist,
integer(mpi), dimension(5), intent(inout)  jnhist,
real(mps), dimension(6), intent(inout)  xl,
real(mpd), dimension(2), intent(out)  dl 
)

hist scale from data

Definition at line 421 of file mphistab.f90.

References bintab(), and heapf().

Referenced by hmpent(), hmprnt(), and hmpwrt().

◆ hmprnt()

subroutine hmprnt ( integer(mpi), intent(in)  ih)

◆ hmpwrt()

subroutine hmpwrt ( integer(mpi), intent(in)  ih)

◆ kprint()

subroutine kprint ( integer(mpi), intent(inout)  lun,
integer(mpi), dimension(n), intent(in)  list,
integer(mpi), intent(in)  n 
)

print integer array

Definition at line 596 of file mphistab.f90.

Referenced by hmpwrt().

◆ rmesig()

subroutine rmesig ( real(mps), dimension(n), intent(inout)  x,
integer(mpi), intent(in)  n,
real(mps), intent(out)  xloc,
real(mps), intent(out)  xsca 
)

robust mean and sigma

Definition at line 1260 of file mphistab.f90.

References heapf().

Referenced by gmpms(), gmprnt(), and gmpwrt().

◆ stmacp()

subroutine stmacp ( integer(mpi), dimension(5), intent(in)  jflc,
real(mps), dimension(2,*), intent(out)  array,
integer(mpi), intent(out)  n 
)

copy (cp) all pairs to array

Definition at line 1175 of file mphistab.f90.

References stmamod::next, and stmamod::tk.

Referenced by gmprnt(), and gmpwrt().

◆ stmacp1()

subroutine stmacp1 ( integer(mpi), dimension(5), intent(in)  jflc,
real(mps), dimension(*), intent(out)  array,
integer(mpi), intent(out)  n 
)

copy (cp) all pairs to array1

Definition at line 1222 of file mphistab.f90.

References stmamod::next, and stmamod::tk.

Referenced by gmpms(), gmprnt(), and gmpwrt().

◆ stmacp4()

subroutine stmacp4 ( integer(mpi), dimension(5), intent(in)  jflc,
real(mps), dimension(4,*), intent(out)  array,
integer(mpi), intent(out)  n 
)

copy (cp) all pairs to array4

Definition at line 1196 of file mphistab.f90.

References stmamod::next, and stmamod::tk.

Referenced by gmpms(), gmprnt(), and gmpwrt().

◆ stmadp()

subroutine stmadp ( integer(mpi), dimension(5), intent(inout)  jflc,
real(mps), dimension(4), intent(in)  four 
)

store double pair

Definition at line 1138 of file mphistab.f90.

References stmamod::iflc1, stmamod::next, and stmamod::tk.

Referenced by gmpms(), gmprnt(), gmpwrt(), and gmpxyd().

◆ stmapr()

subroutine stmapr ( integer(mpi), dimension(5), intent(inout)  jflc,
real(mps), intent(in)  x,
real(mps), intent(in)  y 
)

store pair (X,Y)

Definition at line 1108 of file mphistab.f90.

References stmamod::iflc1, stmamod::next, and stmamod::tk.

Referenced by gmpms(), and gmpxy().

◆ stmarm()

subroutine stmarm ( integer(mpi), dimension(5), intent(inout)  jflc)

remove (rm) stored pairs

Definition at line 1244 of file mphistab.f90.

References stmamod::iflc2, and stmamod::next.

Referenced by gmpdef(), gmpms(), gmprnt(), and gmpwrt().

◆ stmars()

subroutine stmars ( integer(mpi), intent(in)  ndim)

init/reset storage

Definition at line 1075 of file mphistab.f90.

References stmamod::iflc1, stmamod::iflc2, stmamod::next, and stmamod::tk.

Referenced by gmpdef().