### TABLE OF CONTENTS

- 1. /histMPf90
- 1.1. histMPf90/histogramMP
- 1.2. histMPf90/AddHistMP
- 1.3. histMPf90/histMPf90_Init
- 1.4. histMPf90/CreateHistMP
- 1.5. histMPf90/ClearHistMP
- 1.6. histMPf90/AddHistMP_IH
- 1.7. histMPf90/Map2HistMP_getN
- 1.8. histMPf90/Map2HistMP_ID
- 1.9. histMPf90/Map2HistMP_KF
- 1.10. histMPf90/WriteHistMP
- 1.11. histMPf90/WriteHistMP_Names
- 1.12. histMPf90/DumpHistMP
- 1.13. histMPf90/FetchHistMP

## /histMPf90 [ Modules ]

NAME

module **histMPf90**

PURPOSE

Encapsulate all routines and datas for multi-particle Histogramms.

Provides all features as histf90, but here the information is stored for many kinds of particles, as e.g. all pions, kaons etc at the same time. Output is in a gnuplot like multicolumn format

Features of Histograms provided by this module:

- store paramaters of the x-binning
- enable two y-values (y and y2)
- track keeping of under-/over-score the given extreme values of x.
- provide simple-to-understand output routines
- provide simple histogram arithmetic
- many others...

NOTES

Programming is fairly similar to "module histf90"

INPUTS

...(This module needs no input)

## histMPf90/histogramMP [ Types ]

[ Top ] [ histMPf90 ] [ Types ]

NAME

type **histogramMP**

PURPOSE

Type definition to store all information for a multiparticle 1D Histogram.

SOURCE

typehistogramMPreal :: xMin ! smallest x-value real :: xMax ! largest x-value real :: xBin ! width of x-Bin real,allocatable :: xExtreme(:,:) ! extremes of used x-values ! (id), (min,max) character*(NameLength) :: Name ! name to be written real,allocatable :: yVal(:,:,:) ! histogramm values: ! (id), (x), (yy1,yy2,yy3...) ! x-bin 0,-1 : extreme values !!! integer :: iSet ! particle set end typehistogramMP

## histMPf90/AddHistMP [ Subroutines ]

[ Top ] [ histMPf90 ] [ Subroutines ]

NAME

subroutine **AddHistMP**(H, ID,IC,anti, x,y,y2)

subroutine **AddHistMP**(H, Part, x,y,y2)

subroutine **AddHistMP**(H, KF, 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.

INPUTS

- type(histogramMP) :: H -- Histogramm to be used
- integer :: ID,IC -- particle (ID and charge)
- logical :: anti -- particle (antiparticle)
- real :: x -- x-value
- real :: y -- weight to be added
- real :: y2 -- second weight to be added [OPTIONAL]

or:

- type(histogramMP) :: H -- Histogramm to be used
- type(particle) :: Part -- particle
- real :: x -- x-value
- real :: y -- weight to be added
- real :: y2 -- second weight to be added [OPTIONAL]

or:

- type(histogramMP) :: H -- Histogramm to be used
- integer :: KF -- particle (KF code)
- real :: x -- x-value
- real :: y -- weight to be added
- real :: y2 -- second weight to be added [OPTIONAL]

OUTPUT

H is changed

## histMPf90/histMPf90_Init [ Subroutines ]

[ Top ] [ histMPf90 ] [ Subroutines ]

NAME

subroutine **histMPf90_Init**

PURPOSE

Init the module

## histMPf90/CreateHistMP [ Subroutines ]

[ Top ] [ histMPf90 ] [ Subroutines ]

NAME

subroutine **CreateHistMP**(H, HName,x1,x2,bin, iPartSet)

PURPOSE

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

INPUTS

- type(histogramMP) :: H -- Histogramm to be created
- character*(*) :: HName -- Name of Histogram
- real :: x1,x2,bin -- Minimal/maximal value for x-coordinate to be considered, bin-width
- integer :: iPartSet -- particle set to consider

possible values for "iPartSet" are:

- 1: pions, kaons, nucleons (i.e. "stable" particles)
- 2: most mesons (except charm), nucleons, Deltas
- 3: stable/reconstructable mesons, no baryons
- 4: all non-strange mesons
- ... to be continued

OUTPUT

---

## histMPf90/ClearHistMP [ Subroutines ]

[ Top ] [ histMPf90 ] [ Subroutines ]

NAME

subroutine **ClearHistMP**(H)

PURPOSE

Sets the histogram to zero again

INPUTS

- type(histogramMP) :: H -- Histogram to be cleared

OUTPUT

H is changed

## histMPf90/AddHistMP_IH [ Subroutines ]

[ Top ] [ histMPf90 ] [ Subroutines ]

NAME

subroutine **AddHistMP_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.

INPUTS

- type(histogramMP) :: H -- Histogramm to be used
- integer :: iH -- nr of Histogram
- real :: x -- x-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

## histMPf90/Map2HistMP_getN [ Functions ]

[ Top ] [ histMPf90 ] [ Functions ]

NAME

integer function **Map2HistMP_getN**(iSet)

PURPOSE

return the number of histograms for the given particle set. returns 0, if the particle set is invalid.

## histMPf90/Map2HistMP_ID [ Functions ]

[ Top ] [ histMPf90 ] [ Functions ]

NAME

integer function **Map2HistMP_ID**(ID,IC,anti, iSet)

PURPOSE

calculate the number of the histogram, where the info of the particle to add is given by "ID,IC,anti".

## histMPf90/Map2HistMP_KF [ Functions ]

[ Top ] [ histMPf90 ] [ Functions ]

NAME

integer function **Map2HistMP_KF**(KF, iSet)

PURPOSE

calculate the number of the histogram, where the info of the particle to add is given by "KF,C".

## histMPf90/WriteHistMP [ Subroutines ]

[ Top ] [ histMPf90 ] [ Subroutines ]

NAME

subroutine **WriteHistMP**(H,iFile,add,mul,iColumn,DoAve,maxVal,H2,file,dump)

PURPOSE

Write out the histogram.

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

INPUTS

- type(histogramMP) :: 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 "average" (cf Notes) [OPTIONAL]
- real :: maxVal -- value used instead "divide by zero" [OPTIONAL]
- type(histogram) :: H2 -- Histogramm to divide by [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 you select "DoAve", the average value (built by dividing column 3 by column 1) is printed instead of the value of column 3 or column 1. This behaviour differs from the behaviour in module histf90 and hist2Df90, where on additional column is inserted in teh output. Setting this flag overrides settings according iColumn, add and mul.

## histMPf90/WriteHistMP_Names [ Subroutines ]

[ Top ] [ histMPf90 ] [ Subroutines ]

NAME

subroutine **WriteHistMP_Names**(H,iFile)

PURPOSE

Write a Header line with the names of the particles

## histMPf90/DumpHistMP [ Subroutines ]

[ Top ] [ histMPf90 ] [ Subroutines ]

NAME

subroutine **DumpHistMP**(H,file,iFile)

PURPOSE

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

INPUTS

- type(histogramMP) :: 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

## histMPf90/FetchHistMP [ Subroutines ]

[ Top ] [ histMPf90 ] [ Subroutines ]

NAME

subroutine **FetchHistMP**(H,file,iFile,flagOK)

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

- type(histogramMP) :: H -- Histogramm to be used
- logical :: flagOK -- flag, if reading was okay [OPTIONAL]

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

NOTES