Esempio n. 1
0
from dask import delayed

from htt_plot.datasets.gael_all import *
from htt_plot.tools.cut import Cut
from htt_plot.cuts.mt import *
from htt_plot.tools.plot import build_component, build_components, merge_components, scale_component
from htt_plot.cuts.generic import *
from htt_plot.cuts.mt import cuts_mt
from htt_plot.cuts.tt_triggers import triggers

from htt_plot.tools.plotting.plotter import Plotter
from htt_plot.tools.plotting.tdrstyle import setTDRStyle

setTDRStyle(square=False)

import copy

output_dir = 'plots_1912_tt'
variables = ['mt_tot']
from htt_plot.binning import bins

## MC
fake_components_MC_1 = build_components(
    ['fakesMC1'], mc_datasets, variables,
    l1_FakeFactorApplication_Region_genuinetauMC, bins)
fake_components_MC_2 = build_components(
    ['fakesMC2'], mc_datasets, variables,
    l2_FakeFactorApplication_Region_genuinetauMC, bins)

MC_components = build_components([
    'WJetsToLNu', 'WJetsToLNu_ext', 'WW', 'WZ', 'ZZTo4L', 'ZZTo4L_ext',
Esempio n. 2
0
import htt_plot.tools.config as config
config.parallel = False

from htt_plot.datasets.lucas_all import *
#TODO for debug
from htt_plot.tools.cut import Cut
from htt_plot.tools.plot import hist, add

from htt_plot.cuts.generic import cuts_generic, cut_os, cut_ss
from htt_plot.cuts.mt import cuts_mt
from htt_plot.cuts.mt_triggers import triggers

from htt_plot.tools.plotting.plotter import Plotter
from htt_plot.tools.plotting.tdrstyle import setTDRStyle
setTDRStyle(square=True)

import copy

cuts = cuts_generic + cuts_mt + triggers
var = 'mt_total'
cuts_os = copy.copy(cuts)
cuts_os['os'] = cut_os
cut = str(cuts_os)

weight = 'weight*weight_dy'

# adding weight
cut = '({cut})*({weight})'.format(cut=cut, weight=weight)

bins = 50, 0., 500.
bins_WJ_plot = 25, 0., 150.