Script to plot the input variables used for NN training.
- add/change signal samples to plot
plotter.addSample(
sampleName = "NAME",
sampleFile = data_dir+"FILENAME",
plotColor = ROOT.COLOR,
signalSample = True)
- add/change background samples to plot
plotter.addSample(
sampleName = "NAME",
sampleFile = data_dir+"FILENAME",
plotColor = ROOT.COLOR)
- add/change categories to plot (example category name is
4j_ge3t
)
plotter.addCategory("(ge)[nJets]j_(ge)[nTags]t")
- add/change variable plotting in plot_configs/variableConfig.csv
variablename
name of the variable used in ntuplesminvalue
bin range: minimal value of the plotted histogrammaxvalue
bin range: maximal value of the plotted histogramnumberofbins
number of bins plottedlogoption
logarithmic y-axis rangex
to activate,-
to deactivatedisplayname
displayed name of the variable on the plot
to execute with default options use
python plotInputVariables.py
or use the following options
-
File Options
-o DIR
to change the name of the ouput directory, can be either a string or absolute path (default isplots_InputFeatures
)-i DIR
to change the name of the input directory, can be either a string or absolute path (default isInputFeatures
)-v FILE
to change the variable Selection to plot, if the file is in/variable_sets/
the name is sufficient, else the absolute path is needed (default isexample_variables
)
-
Plot Options
-l
to create logarithmic plots-r
to deactivate additional ratio plots--ratiotitle=STR
change the Title of the ratio plot (default is"#frac{signal}{background}"
)-k
to deactivate KS score
-
Scaling Options
--scalesignal
to scale signal (default is1
), possible options:1
to scale Signal to background IntegralFLOAT
to scale Signal with float value (for example--scalesignal=41
)False
to not scale Signal
--lumiscale
to scale number of events according to luminosity (default is1
)
-
Private Work Option
-p
to activate Private work Option,- will add "private work"- label to plots
- ATTENTION: deactivates scaling options, therefore changes y-axis title to "normalized to unit area" instead of "Events expected"
Example:
python plotInputVariables.py -i /path/to/input/files -o testPlots -v test_set --scalesignal=False --lumiscale=41 --ratiotitle=#frac{ttH}{ttbar}