gibuu is hosted by Hepforge, IPPP Durham
GiBUU

TABLE OF CONTENTS


/hist2DMPf90 [ Modules ]

[ Top ] [ Modules ]

NAME

module hist2DMPf90

PURPOSE

Provide an array of 2D histogramms (module hist2Df90) according the multi particle scheme (module histMPf90)

NOTES

This is histogram2D with one additional dimension (=particle, encoded)


hist2DMPf90/histogram2DMP [ Types ]

[ Top ] [ hist2DMPf90 ] [ Types ]

NAME

type histogram2DMP

PURPOSE

Type definition to store all information for 2D Histograms for multiple particles.

SOURCE

  type histogram2DMP
     real             :: xMin(2)        ! smallest x-value: (x1,x2)
     real             :: xMax(2)        ! largest x-value:  (x1,x2)
     real             :: xBin(2)        ! width of x-Bin:   (x1,x2)
     real,allocatable :: xExtreme(:,:,:)! extremes of used x-values
                                        !  (id), (x1,x2), (min,max)
     character*(NameLength) :: Name     ! name to be written
     real,allocatable :: yVal(:,:,:,:)  ! histogramm values:
                                        !  (id), (x1),(x2),(yy1,yy2,yy3)
     integer          :: iSet           ! particle set
  end type histogram2DMP

hist2DMPf90/CreateHist2DMP [ Subroutines ]

[ Top ] [ hist2DMPf90 ] [ Subroutines ]

NAME

subroutine CreateHist2DMP(H, HName,x1,x2,bin, iPartSet,verbose)

PURPOSE

This is the Constructor of a multi-particle 2D-Histogram! Allocate Memory for the entries and put additional variables to their default. The parameter iPartSet specifies, which particles should be included.

INPUTS

  • type(histogram2DMP) :: H -- 2D-Histogramm-Array to be created
  • character*(*) :: HName -- Name of Histogram
  • real,dimension(2) :: x1,x2,bin -- Minimal/maximal value for x-coordinate to be considered, bin-width
  • integer :: iPartSet -- particle set to consider
  • logical :: verbose -- switch for verbosity [OPTIONAL]

possible values for "iPartSet" are:

  • 1: pions, kaons, nucleons (i.e. "stable" particles)
  • 2: all mesons (except charm), nucleons, Deltas
  • ... to be continued

OUTPUT

---


hist2DMPf90/AddHist2DMP [ Subroutines ]

[ Top ] [ hist2DMPf90 ] [ Subroutines ]

NAME

subroutine AddHist2DMP(H, Part, x,y,y2)

PURPOSE

Add to the given histogram at the given x-value the weight y (y2). If y2 is given, also the second column is filled. ID and IC specify the particle. x is a 2D value.

INPUTS

  • type(histogram2DMP) :: H -- Histogramm to be used
  • type(particle) :: Part -- Particle
  • real,dimension(2) :: x -- (x1,x2)-value
  • real :: y -- weight to be added
  • real :: y2 -- second weight to be added [OPTIONAL]

OUTPUT

H is changed


hist2DMPf90/AddHist2DMP_IH [ Subroutines ]

[ Top ] [ hist2DMPf90 ] [ Subroutines ]

NAME

subroutine AddHist2DMP_IH(H, iH, x,y,y2)

PURPOSE

Add to the given histogram at the given x-value the weight y (y2). If y2 is given, also the second column is filled. ID and IC specify the particle. x is a 2D value.

INPUTS

  • type(histogram2DMP) :: H -- Histogramm to be used
  • integer :: iH -- nr of Histogram
  • real,dimension(2) :: x -- (x1,x2)-value
  • real :: y -- weight to be added
  • real :: y2 -- second weight to be added [OPTIONAL]

OUTPUT

H is changed

NOTES

this is an internal routine


hist2DMPf90/WriteHist2DMP_Gnuplot [ Subroutines ]

[ Top ] [ hist2DMPf90 ] [ Subroutines ]

NAME

subroutine WriteHist2DMP_Gnuplot(H,iFile,add,mul, iColumn,DoAve,MaxVal,file,dump)

PURPOSE

Write out the 2D-histogram. Format is suitable as input to gnuplots "splot" command

The entries are multiplied by 'mul' and 'add' is added.

If iColumn is not given, all 3 columns are writen.

INPUTS

  • type(histogram2D) :: H -- Histogramm to be used
  • integer :: iFile -- File number output to redirect [OPTIONAL]
  • real :: add -- factor to add [OPTIONAL]
  • real :: mul -- factor to multiply [OPTIONAL]
  • integer :: iColumn -- Column to write [OPTIONAL]
  • logical :: DoAve -- write also "average" (cf Notes) [OPTIONAL]
  • real :: maxVal -- value used instead "divide by zero" [OPTIONAL]
  • character*(*) :: file -- name of file to open and close [OPTIONAL]
  • logical :: dump -- if true, also dump it binary to file [OPTIONAL]

OUTPUT

write to file number

NOTES

The Histogram Data is not affected!!!

if DoAve is given: Write out the 2D-histogram, but now also divide column 3 by column 1. If column 2 is zero, i.e. no entries, then parameter maxVal is written instead. This column output is NOT divided by bin widths.

This routine does the same as WriteHist2D_Gnuplot for every single 2D-Histogram, but now looping over all stored particles.


hist2DMPf90/DumpHist2DMP [ Subroutines ]

[ Top ] [ hist2DMPf90 ] [ Subroutines ]

NAME

subroutine DumpHist2DMP(H,file,iFile)

PURPOSE

Write all the histogram information unformatted (i.e. binary) to a file

INPUTS

  • type(histogram2DMP) :: H -- Histogramm to be used
  • character*(*) :: file -- name of file to open and close
  • integer,OPTIONAL :: iFile -- File number output to redirect [OPTIONAL]

OUTPUT

H is written UNFORMATTED to the given file


hist2DMPf90/FetchHist2DMP [ Subroutines ]

[ Top ] [ hist2DMPf90 ] [ Subroutines ]

NAME

subroutine FetchHist2DMP(H,file,iFile)

PURPOSE

Read in all the histogram information previously dumped unformatted (i.e. binary) to a file

INPUTS

  • character*(*) :: file -- name of file to open and close
  • integer,OPTIONAL:: iFile -- File number input to redirect [OPTIONAL]

OUTPUT

H is read UNFORMATTED from the given file. Sizes are calculated as in CreateHist, also memory is allocated.

NOTES

No checks about input are performed!