from argparse import ArgumentParser
from dps.config.latex_labels import samples_latex, channel_latex, variables_latex
from dps.config.variable_binning import control_plots_bins
from dps.config.histogram_colours import histogram_colours as colours
from dps.config.xsection import XSectionConfig
from dps.utils.file_utilities import make_folder_if_not_exists
from dps.utils.plotting import make_data_mc_comparison_plot, make_shape_comparison_plot, \
Histogram_properties
from dps.utils.hist_utilities import prepare_histograms, clean_control_region
from dps.utils.ROOT_utils import get_histograms_from_trees, set_root_defaults
from dps.utils.latex import setup_matplotlib
from dps.utils.pandas_utilities import dict_to_df, df_to_file
from uncertainties import ufloat
setup_matplotlib()

def plotHistograms(
		histogram_files, 
		var_to_plot,
		output_folder):
	'''
	'''
	global measurement_config

	weightBranchSignalRegion  = 'EventWeight * PUWeight * BJetWeight'
	weightBranchControlRegion = 'EventWeight'

	# Names of QCD regions to use
	qcd_data_region             = ''
	qcd_data_region_electron    = 'QCD non iso e+jets'
	qcd_data_region_muon        = 'QCD non iso mu+jets 1p5to3'
예제 #2
0
from argparse import ArgumentParser
from dps.config.latex_labels import samples_latex, channel_latex, variables_latex
from dps.config.variable_binning import control_plots_bins
from dps.config.histogram_colours import histogram_colours as colours
from dps.config.xsection import XSectionConfig
from dps.utils.file_utilities import make_folder_if_not_exists
from dps.utils.plotting import make_data_mc_comparison_plot, make_shape_comparison_plot, \
Histogram_properties
from dps.utils.hist_utilities import prepare_histograms, clean_control_region
from dps.utils.ROOT_utils import get_histograms_from_trees, set_root_defaults
from dps.utils.latex import setup_matplotlib
from dps.utils.pandas_utilities import dict_to_df, df_to_file
from uncertainties import ufloat

setup_matplotlib()


def plotHistograms(histogram_files, var_to_plot, output_folder):
    '''
	'''
    global measurement_config

    weightBranchSignalRegion = 'EventWeight * PUWeight * BJetWeight'
    weightBranchControlRegion = 'EventWeight'

    # Names of QCD regions to use
    qcd_data_region = ''
    qcd_data_region_electron = 'QCD non iso e+jets'
    qcd_data_region_muon = 'QCD non iso mu+jets 1p5to3'

    sr_e_tree = 'TTbar_plus_X_analysis/EPlusJets/Ref selection/AnalysisVariables'