next up previous contents
Next: Outputing N-tuples and Histograms Up: Creating Histograms Previous: Creating Histograms   Contents

The HIST Option

Although the system is primarily designed to produce n-tuples, it can also produce histograms as well or instead. To produce a histogram, a HIST option is placed at the end of the field entry, for example:-

' revent   magnitude         MCVX+$KMCVX_PSX:                  '
'                       HIST1 123 "Event radius" 100 0. 800. ; '
means that a 1d histogram with id 123 and title ``Event radius'' is to be produced. It will histogram using 100 bins over the range 0. to 800.

The HIST option can be used with the VETO option and they may appear in either order. Although the VETO keyword is optional, it improves readability to include it when using HIST as well.

There are 3 variants of the HIST keyword:-

HIST1 id title nbinx xlo xhi
Produces a one dimensional histogram of the current n-tuple word. The title is enclosed in double quotes. For safety incorrect types, e.g. specifying nbinx as floating point, is not tolerated.

HIST2 id title nbinx xlo xhi nbiny ylo yhi
Similar to HIST1 but produces a two dimensional histogram of the current n-tuple word and following word. For example:-
' vx_x  equals          MCVX+$KMCVX_PSX:                   '
'                       HIST2 456 "X v. Y" 100 -800. 800.  '
'                                          100 -800. 800.; '
' vx_y  equals          MCVX+$KMCVX_PSY;                   '

So this option is not allowed on the last word of an n-tuple. The following word can also have a HIST option, in which case it will be used in two histograms.

HISTP id title nbinx xlo xhi ylo yhi
Similar to HIST2 except that it produces a profile histogram.

To have the same histogram filled more than once, make the histogram id negative on the second and subsequent HIST options and omit all other parameters. For example:-

' vx_x  equals          MCVX+$KMCVX_PSX:                    '
'                       HIST1 456 "X + Y"  100 -800. 800.;  '
' vx_y  equals          MCVX+$KMCVX_PSY:                    '
'                       HIST1 -456;                         '

The same histogram can be used from two or more NTPRs in this way.


next up previous contents
Next: Outputing N-tuples and Histograms Up: Creating Histograms Previous: Creating Histograms   Contents
sno Guest Acct 2009-09-09