|
Crombie Tools
|
Classes | |
| class | ParallelStackContainer |
Functions | |
| def | MakePlots (categories, regions, exprArgs, overwrite=True, parallel=True, showCutLines=True, limitHistsDir='', aPlotter=plotter, systematics=None) |
| def | PreparePlots (categories, regions, exprArgs, systematics=None, envelope=None) |
| def | ReadExceptionConfig (region, aPlotter=plotter) |
| def | SetCuts (category, region, aPlotter=plotter) |
| def | SetupFromEnv (aPlotter=plotter) |
Variables | |
| newStackPlotter | |
| plotter | |
| def CrombieTools.PlotTools.PlotStack.MakePlots | ( | categories, | |
| regions, | |||
| exprArgs, | |||
overwrite = True, |
|||
parallel = True, |
|||
showCutLines = True, |
|||
limitHistsDir = '', |
|||
aPlotter = plotter, |
|||
systematics = None |
|||
| ) |
Shortcut to make plots for multiple categories and regions with the same setup.
@param categories is a list of categories to plot.
@param regions is a list of the regions to plot.
@param exprArgs is a list of lists of parameters to be used in PlotStack::MakeCanvas().
Normally, the first expression is the default expression to be plotted.
The basename of the output file is automatically set by this.
If the last argument is actually a dictionary, it will be passed as
key word arguments to ParallelStackContainer.MakePlot() instead.
Key words supported in dictionary and types:
- data_expr takes a string (default '')
- cut_lines takes a list of floats (default from Nminus1Cut)
- var_name takes a string (default variable in exprArgs)
- doNminus1 takes a bool (default True)
@param overwrite overwrites old plots with the same name if set to true.
Otherwise, those plots are skipped.
@param parallel determines whether or not to run the plots in a Multiprocess fashion.
@param showCutLines determines whether or not to show the cut lines that would otherwise exist in
any N - 1 plots generated.
@param limitHistsDir is the directory to place files with the histograms for the limits fit.
@param aPlotter is the plotter to use to plot. The default is the plotter defined in this module.
@param systematics is a dictionary pointing to a list of affected branches for each systematic
Definition at line 126 of file PlotStack.py.
References CrombieTools.Parallelization.RunParallel().
| def CrombieTools.PlotTools.PlotStack.PreparePlots | ( | categories, | |
| regions, | |||
| exprArgs, | |||
systematics = None, |
|||
envelope = None |
|||
| ) |
Prepares plotter with plots to make @param categories list of categories @param regions list of regions to plot @param exprArgs list of tuples containing (expr, nbins, xbins) or (expr, nbins, min, max) @param systematics is a dictionary pointing to a list of affected branches for each systematic @param envelope is a dictionary that points to lists of weight branches to generate an envelope
Definition at line 178 of file PlotStack.py.
References CrombieTools.Nminus1Cut().
Referenced by PlotPreparer.GetHistList().
| def CrombieTools.PlotTools.PlotStack.ReadExceptionConfig | ( | region, | |
aPlotter = plotter |
|||
| ) |
Reads an [exception configuation](@ref formatmc) file from the [environment](@ref envconfig). @param region is the region that needs a different configuration that's about to be plotted. @param aPlotter is the plotter that will be adjusted. The default is the plotter defined in this module.
Definition at line 39 of file PlotStack.py.
| def CrombieTools.PlotTools.PlotStack.SetCuts | ( | category, | |
| region, | |||
aPlotter = plotter |
|||
| ) |
Sets cuts based on category and region.
@param category is the category of the analysis being used.
@param region is the region of the plot being set.
@param aPlotter is the plotter that is having its cuts set.
Default is the plotter defined in this module.
Definition at line 25 of file PlotStack.py.
Referenced by CrombieTools.PlotTools.PlotStack.ParallelStackContainer.MakePlot().
| def CrombieTools.PlotTools.PlotStack.SetupFromEnv | ( | aPlotter = plotter | ) |
A function that sets up a plotter after sourcing a config file. @param aPlotter is the plotter to setup. Defaults to plotter in this module.
Definition at line 9 of file PlotStack.py.
References CrombieTools.DirFromEnv(), CrombieTools.CommonTools.FileConfigReader.SetFunctionFromEnv(), and CrombieTools.CommonTools.FileConfigReader.SetupConfigFromEnv().
| CrombieTools.PlotTools.PlotStack.newStackPlotter |
Definition at line 5 of file PlotStack.py.
| CrombieTools.PlotTools.PlotStack.plotter |
Definition at line 6 of file PlotStack.py.