Skip to content
Klaas Padeken edited this page Sep 11, 2017 · 6 revisions

Plotter

New things

Check here for any new features that have been added to the code!

Scale Factors

Now the Plotter has the ability to use Scale Factors. Just put this after the type name of the file ie

<INFILE NAME>  <OUTFILE NAME> <XSEC> <SKIM EFF> <TYPE> <SCALE FACTOR>

The scale factor is optional, so this change is compatible with the old configuration files.

The other change is the cross-section, when set to a negative number, the input file is not normalized. This gives the same sort of functionality as the viewing the infile as data (ie not changed), but it is treated as a background.

The intended use is for making data driven QCD possible. This would look like in the config file:

files/Data.root QCD.root -1 1 bg <SF> //Here the skim efficiency doesn't matter and SF is the QCD SF

Explicit Binning

If you want to explicitly give the binning for a histogram, you can now do it. All of it is managed in the file style/sample.binning (Hopefully to change soon so you can specify your own file name). The format works as such:

Name [[<Number bins 1>, <Bin Width 1>], [<Number bins 2>, <Bin Width 2>],...]

The function is you put the number of bins that you want of a certain width in a bracket till you are done with the histogram. Currently you have to start from the beginning of the histogram, so if you have a cut on pt at 50, the histogram will start at 0 even though values start a 50.

If you want the whole histogram to be divided into bins of a certain size, you have the functionality of doing this:

Name [-1, <Your Width>]

Likewise, if you want to split your histogram into a certain number of equally sized bins, you can do this:

Name [<Total Number of Bins>, -1]

An example to illustrate how the binning is read in. If you want divide you histogram by the ranges: 0, 80, 100, 120, 140, 160, 180, 200, 250, 300, 350, 400, 600, 800, 1000 you would have to put this:

Name [[1, 80], [6, 20], [4,50], [3, 200]]

Spaces don't matter since these are comma separated values.

How to Run

To make the files and run them, simply type

make
./Plotter config/<YOUR CONFIG FILE>

The config files are given names based on the update time, so to make sure you are using the correct values for cross-section and luminosity, use the newest config file (will be updated on semi-regular basis)

This plotter is made for making stack plots and associated information. Because it is made for making stack plots, a background is needed for the program. It will crash if you do not have a background.

To change the looks of the graph, most of the style options are in the style directory. The default style is used if nothing is specified in the config file, but any personal style can be made

To learn more about the config files, look at the config wiki page

To learn more about the different options available to alter functions of the code, look at the command line wiki page

If you want to know more about the python plotter, see Home for Duke