next up previous contents index
Next: Report Templates Up: CTP Definition Files Previous: Test/Cut Definitions   Contents   Index

Histogram Definitions

The histogram part of the analysis package is essentially a book keeper for HBOOK. It reads a list of what variables are to be histogrammed over what limits. Using the information in the configuration file, histograms are booked with standard HBOOK calls. For each event, all the histograms (subject to test conditions) are incremented. The programmer is thus saved from managing the source code for booking and filling.

begin hist hms
 ;Histname, Data source, nbins, low, high, test_flag $title
 h1,mass,1000,0,2000,goodphase $Mass distribution of good tracks
 h2,fptheta,(thmax-thmin)/2,thmin,thmax,allclean $Angular distr at focal plane

 ;Histname, X Data source, Y Data source, nxbins, xlow, xhigh
 ; , nybins, ylow, yhigh, test_flag $title
 twod,mass,fptheta,100,0,2000,25,-50,50,allclean $A 2-D histogram
end hist

The format for defining histograms is at present a simple comma separated list of arguments. The first item on each line is the histogram ``name''. This name may be used to display the histogram in the histogram display application. The second item is the variable name of the quantity to be histogrammed. The analyzer must set this variable for each event. The next three items are the number of bins followed by the lower and upper limits of the histogram. (The binning arguments have the same meaning as in the HBOOK1 call.) These three arguments may be expressions that include registered variables. These expressions are evaluated at the time that the histograms are booked. The last item is a test flag. The histogram will only be incremented for events where the test flag is true. Both the variable to histogram and the test flag may be an array named followed by an index in parentheses. This index may also be an expression that is evaluated at the time the histogram is booked. If the line defining a histogram contains a $, the remainder of the line will be used as the histogram title. A similar format exists for 2 dimensional histograms.


next up previous contents index
Next: Report Templates Up: CTP Definition Files Previous: Test/Cut Definitions   Contents   Index
Mohammad Ahmed 2003-07-23