Histograms creation

Creation of one and two dimensional histograms

zon 1 2 function/fun1 100 htfun1.f 100. 0. 1. 1dh 110 'Test 1-dim Histo' 100 0. 1. 1000. 1 CALL UROUT.F(5000) 6 FUN/FUN2 200 HTFUN2 25. 0. 1. 25. 0. 1. CONT hi/li 3 5 HISTOGRAM/FILE 1 PAWHISTS.HBOOK 1024 N 4 HROUT 0

The FORTRAN Routines HTFUN1,HTFUN2 and UROUT

function htfun1(x) 6 function htfun2(x,y data c1,c2,xm1,xm2,xs1,xs2 htfun2=100*htfun1(x)*htfun1(y) +/1.,0.5,0.3,0.7,0.07,0.12/ end a1=-0.5*((x-xm1)/xs1)**2 a2=-0.5*((x-xm2)/xs2)**2 x1=c1 subroutine urout(nev) x2=c2 do i=1,nev if(abs(a1).gt.0.0001)x1=c1*exp(a1) 2 x=HRNDM1(100,I) if(abs(a2).gt.0.0001)x2=c2*exp(a2) 2 CALL HFILL(110,X,0.,1.) htfun1=x1+x2 enddo end end

  1. In this example COMIS is used in the simplest way, via the command CALL ( CALL UROUT.F ). This command just calls the FORTRAN routine given as parameter and executes it.
  2. It is possible to call several routines of the CERN library. HELP CALL gives the list of available routines (see next page). Here the routines HRNDM1 and HFILL (to fill an histogram) are called by UROUT .
  3. It is possible to store the histograms in memory into a direct access file opened via the command HIST/FILE . Here CHOPT=N means: ``create a New HBOOK file''. If the first parameter ( LUN ) is 0 the next free logical unit will be used.
  4. To store an histogram in a file it is enough to execute the command HROUT . HROUT 0 (or HROUT * ) stores all the histograms currently in memory.
  5. Several files can be attached via HIST/FILE during a PAW session. To change the current file it is enough to execute CD //LUNn where `` n '' is the first parameter given to HI/FILE . Note that the command LD // gives the list of all the files currently attached. Each attached direct access file is similar to a directory (cf UNIX).
  6. HTFUN2 is in the file htfun1.f . That is why it can be invoked without the extension .f because it has been compiled during the CALL to htfun1 .
Most of the time, the histograms are created and filled outside PAW in batch programs calling HBOOK directly, and after interactively analyzed with PAW.


The following routines from the CERN Program Library can be called:

From HBOOK

HBOOK1,HBOOK2,HBOOKN,HFILL,HF1,HPRINT,HDELET,HRESET HFITGA,HFITPO,HFITEX,HPROJ1,HPROJ2,HFN,HGFIT,HRENID HROPEN,PAOPEN,PACLOS,PAREAD,PAWRIT,HCDIR,HGIVEN,HKIND HTITLE,HBFUN1,HBFUN2,HRNDM1,HRNDM2,HBARX,HBARY,HDIFFB HPAK,HPAKE,HUNPAK,HGIVE,HGN,HGNF,HGNPAR,HF2,HFF1,HFF2 HRIN,HROUT,HI,HIE,HIX,HIJ,HIF,HIDALL,HNOENT,HX,HXY HTITLE,HCOPY,HSTATI,HBPROF,HOPERA,HIDOPT,HDERIV,HBAR2 HMAXIM,HMINIM,HMAX,HMIN,HSUM,HNORMA,HMCINI,HMCMLL HEXIST,HREND,HRGET,HRPUT,HSCR,HFIND,HCX,HCXY,HLABEL HBPROX,HBPROY,HBANDX,HBANDY,HBSLIX,HBSLIY,HPROF2 HBOOKB,HBSTAT,HDIFF,HUNPKE,HREBIN,HERROR,HGNTB,HSTAF HOUTPU,HERMES,HISTDO,HFUNC,HXI,HIJXY,HXYIJ,HLPOS,HFC1 HSPLI1,HSPLI2,HMDIR,HLDIR,HLOCAT,HFITH,HFITV,HFINAM HBNT,HBNAME,HBNAMC,HFNT,HFNTB,HGNT,HGNTF,HGNTV,HBSET HRENAME,HNTDUP

From HPLOT

HPLOT,HPLSYM,HPLERR,HPLEGO,HPLNT,HPLSUR,HPLSOF,HPLFRA HPLABL,HPLSET,HPLGIV,HPLOC,HPLTOC,HPLNEW,HPLOPT

From ZEBRA

MZSTOR,MZDIV,MZLINK,MZWORK,MZBOOK,MZDROP,MZPUSH MZWIPE,MZGARB,MZFORM,LZFIND,LZFID,DZSHOW,DZVERI FZIN,FZOUT,FZFILE,FZENDI,FZENDO RZCDIR,RZLDIR,RZFILE,RZEND,RZIN,RZOUT,RZVIN,RZVOUT RZOPEN,RZIODO,RZCLOS,RZQUOT

From KUIP

KUGETV,KUDPAR,KUVECT,KILEXP,KUTIME,KUEXEL,KUPROS KUNWG,KUCMD,KUGUID,KUNDPV,KUPAR,KUPVAL,KUACT

From HIGZ

IPL,IPM,IFA,IGTEXT,IGBOX,IGAXIS,IGPIE,IGRAPH,IGHIST IGARC,IGLBL,IGRNG,IGMETA,IGSA,IGSET,IRQLC,IRQST,ISCR ISELNT,ISFAIS,ISFASI,ISLN,ISMK,ISVP,ISWN,ITX,ICLRWK IGPAVE,IGTERM,ISFACI,IGHTOR,IGONT

From KERNLIB

VZERO,UCOPY,RANNOR,LENOCC,SBIT0,SBIT1,SBYT JBIT,JBYT,UCTOH,UHTOC,CLTOU,CUTOL,ERF,ERFC,FREQ,GAMMA PROB,DENLAN,DSTLAN,DIFLAN,XM1LAN,XM2LAN,RANLAN RNDM,RDMIN,RDMOUT,SORTZV,CSF77

The following common blocks may be referenced

/PAWC/, /QUEST/, /KCWORK/, /PAWPAR/, /PAWIDN/ /HCFITS/, /HCFITD/, /RZCLUN/


Last update: 96/05/24 17.20
Olivier.Couet@Cern.Ch