Esempio n. 1
0
from Excalibur.JEC_Plotter.core.plot import _Plot1D
from Excalibur.JEC_Plotter.core import PlotHistograms1D, PlotHistograms2D, QUANTITIES, BinSpec, CutSet
from Excalibur.JEC_Plotter.definitions.Summer16.samples_07Aug2017 import (
    SAMPLES,
    SELECTION_CUTS,
    ADDITIONAL_CUTS,
    RUN_PERIOD_CUT_DICTS,
)

from copy import deepcopy

_eta_binspec = BinSpec.make_from_bin_edges([
    -5.191, -3.839, -3.489, -3.139, -2.964, -2.853, -2.650, -2.500, -2.322,
    -2.172, -1.930, -1.653, -1.479, -1.305, -1.044, -0.783, -0.522, -0.261,
    0.000, 0.261, 0.522, 0.783, 1.044, 1.305, 1.479, 1.653, 1.930, 2.172,
    2.322, 2.500, 2.650, 2.853, 2.964, 3.139, 3.489, 3.839, 5.191
])

_jet1_eta_binspec = BinSpec.make_from_bin_edges([
    -1.305,
    -1.044,
    -0.783,
    -0.522,
    -0.261,
    0.000,
    0.261,
    0.522,
    0.783,
    1.044,
    1.305,
])
Esempio n. 2
0
from Excalibur.JEC_Plotter.core import PlotExtrapolations, QUANTITIES, BinSpec, CutSet
from Excalibur.JEC_Plotter.definitions.Fall17.samples_17Nov2017 import (
    SAMPLES,
    SELECTION_CUTS,
    ADDITIONAL_CUTS,
    RUN_PERIOD_CUT_DICTS,
)

from copy import deepcopy

_CORR_FOLDER = "L1L2L3"

QUANTITIES['mpf'].bin_spec = BinSpec.make_equidistant(50, (0.8, 1.2))
QUANTITIES['ptbalance'].bin_spec = BinSpec.make_equidistant(50, (0.8, 1.2))
QUANTITIES['alpha'].bin_spec = BinSpec.make_from_bin_edges(
    [0.0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.5])

QUANTITIES['jet1eta_narrow'] = deepcopy(QUANTITIES['jet1eta'])
QUANTITIES['jet1eta_narrow'].name = 'jet1eta_narrow'
QUANTITIES['jet1eta_narrow'].bin_spec = BinSpec.make_from_bin_edges([
    0.000, 0.261, 0.522, 0.783, 1.044, 1.305, 1.479, 1.653, 1.930, 2.172,
    2.322, 2.500, 2.650, 2.853, 2.964, 3.139, 3.489, 3.839, 5.191
])

#QUANTITIES['jet1eta_wide'] = deepcopy(QUANTITIES['jet1eta'])
#QUANTITIES['jet1eta_wide'].name = 'jet1eta_wide'
#QUANTITIES['jet1eta_wide'].bin_spec = BinSpec.make_from_bin_edges([0, 0.783, 1.305, 1.93, 2.5, 2.964, 3.2, 5.191])

_QUANTITY_PAIRS = [
    ('alpha', 'ptbalance'),
    ('alpha', 'mpf'),
Esempio n. 3
0
    } for _i_z_cut, _z_cut in enumerate(
        QUANTITIES['zpt'].make_cutsets_from_binspec())
]

_ADDITIONAL_CUTS_ALPHA = [
    {
        'cut':
        CutSet(
            '{:0>2d}_{}'.format(_i_a_cut, _a_cut.name),  # for sorting,
            weights=_a_cut.weights_list,
            labels=[]),
        'label':
        _a_cut.texts[0]
    } for _i_a_cut, _a_cut in enumerate(
        QUANTITIES['alpha'].make_cutsets_from_binspec(
            BinSpec.make_from_bin_edges([0.0, 0.05, 0.1, 0.15, 0.2, 0.3])))
]

_ADDITIONAL_CUTS_ETA = [
    {
        'cut':
        CutSet(
            '{:0>2d}_{}'.format(_i_cut, _cut.name),  # for sorting,
            weights=_cut.weights_list,
            labels=[]),
        'label':
        _cut.texts[0]
    } for _i_cut, _cut in enumerate(
        QUANTITIES['absjet1eta_narrow'].make_cutsets_from_binspec())
]
)

from copy import deepcopy

_CORR_FOLDER = "L1L2L3"

_QUANTITIES = [
    #'jet1ef',
    #'jet1mf',
    'jet1chf',
    'jet1nhf',
    'jet1pf',
]

_ABSETA_CUTS = QUANTITIES['absjet1eta'].make_cutsets_from_binspec(
    BinSpec.make_from_bin_edges([0.0, 1.3, 2.0, 2.5, 3.0, 5.0]))

_ETA_CUTS = QUANTITIES['jet1eta'].make_cutsets_from_binspec(
    BinSpec.make_from_bin_edges(
        [-5.0, -3.0, -2.5, -2.0, -1.3, 0.0, 1.3, 2.0, 2.5, 3.0, 5.0]))

_PT_CUTS = QUANTITIES['jet1pt'].make_cutsets_from_binspec(
    BinSpec.make_from_bin_edges([0, 50, 100, 200, 1000]))

_jetid_cut = CutSet(name='jet1idtight',
                    weights=[
                        'jet1nhf<0.9',
                        'jet1pf<0.9',
                        'jet1ef<0.9',
                        'jet1mf<0.8',
                        'jet1chf>0',
Esempio n. 5
0
from Excalibur.JEC_Plotter.core import PlotHistograms1D, PlotProfiles, QUANTITIES, BinSpec, CutSet, Quantity
from Excalibur.JEC_Plotter.definitions.Summer16.samples_07Aug2017 import (
    SAMPLES,
    SELECTION_CUTS,
    ADDITIONAL_CUTS,
    RUN_PERIOD_CUT_DICTS,
)

from copy import deepcopy

_CORR_FOLDER = "L1L2L3"

QUANTITIES["npumean"].bin_spec = BinSpec.make_from_bin_edges(range(0, 64, 4))
QUANTITIES["delta_zpt_jet1pt"] = Quantity(
    name="delta_zpt_jet1pt",
    expression="zpt-jet1pt",
    label=r"$p_{T}^{Z} - p_{T}^{Jet1}$",
    bin_spec=BinSpec.make_equidistant(n_bins=50, range=(0, 65))
)


_QUANTITY_PU = 'npumean'
_QUANTITIES = [
    'delta_zpt_jet1pt',
    #'jet1pt', 'jet2pt', 'jet3pt', 'zpt',
    #'alpha', 'mpf', 'ptbalance'
]
_QUANTITY_PAIRS = [(_QUANTITY_PU, _q) for _q in _QUANTITIES]

_cut_final_no_eta = CutSet("basicToBarrel",
    weights=[
from Excalibur.JEC_Plotter.core import PlotProfiles, QUANTITIES, BinSpec, CutSet
from Excalibur.JEC_Plotter.definitions.Fall17.samples_09May2018 import (
    SAMPLES,
    SELECTION_CUTS,
    ADDITIONAL_CUTS,
    RUN_PERIOD_CUT_DICTS,
)
from Excalibur.JEC_Plotter.utilities.plot import plot_data_mc_profiles

from copy import deepcopy

QUANTITIES['zmass'].bin_spec = BinSpec.make_equidistant(50, (88.3, 93.3))
QUANTITIES['mpf'].bin_spec = BinSpec.make_equidistant(50, (0.8, 1.2))
QUANTITIES['ptbalance'].bin_spec = BinSpec.make_equidistant(50, (0.8, 1.2))
QUANTITIES['alpha'].bin_spec = BinSpec.make_from_bin_edges(
    [0.0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.5])

_QUANTITY_PAIRS = [
    #('zpt_log', 'ptbalance'),
    #('zpt_log', 'mpf'),
    ##('alpha', 'ptbalance'),
    ##('alpha', 'mpf'),
    #('zpt_log', 'zmass'),
    #('zeta_wide', 'zmass'),
    #('abszeta_narrow', 'zmass'),
    ##('zeta_narrow', 'zmass'),
    ('absjet1eta_narrow', 'ptbalance'),
    ('absjet1eta_narrow', 'mpf'),
    ##('jet1eta_narrow', 'ptbalance'),
    ##('jet1eta_narrow', 'mpf'),
]
Esempio n. 7
0
_QUANTITIES = [
    'mpf',
    'ptbalance',
    #'npv', 'rho',
    #'met'
    #'zpt', 'zphi', 'zmass',
    'jet1pt',
    'jet2pt',
    'jet3pt',
    #'jet1phi', 'jet2phi', 'jet3phi',
    'jet1pt_over_jet1ptraw',
    'jet1res',
]

# redefine binning and plot range to values more meaningful for profiles
QUANTITIES['mpf'].bin_spec = BinSpec.make_equidistant(n_bins=50,
                                                      range=(0.8, 1.2))
QUANTITIES['ptbalance'].bin_spec = BinSpec.make_equidistant(n_bins=50,
                                                            range=(0.7, 1.2))
QUANTITIES['jet1pt'].bin_spec = BinSpec.make_equidistant(n_bins=50,
                                                         range=(50., 150.))
QUANTITIES['jet2pt'].bin_spec = BinSpec.make_equidistant(n_bins=50,
                                                         range=(10., 40.))
QUANTITIES['jet3pt'].bin_spec = BinSpec.make_equidistant(n_bins=50,
                                                         range=(10., 25.))
QUANTITIES['npv'].bin_spec = BinSpec.make_equidistant(n_bins=50,
                                                      range=(10, 70))
QUANTITIES['zmass'].bin_spec = BinSpec.make_equidistant(n_bins=50,
                                                        range=(90., 95.))
QUANTITIES['zpt'].bin_spec = BinSpec.make_equidistant(n_bins=50,
                                                      range=(50., 200.))
Esempio n. 8
0
from Excalibur.JEC_Plotter.core import PlotHistograms2D, CutSet, BinSpec, QUANTITIES
from Excalibur.JEC_Plotter.definitions.Summer16.samples_07Aug2017 import (
    SAMPLES,
    SELECTION_CUTS,
    ADDITIONAL_CUTS,
    RUN_PERIOD_CUT_DICTS,
)

from copy import deepcopy

QUANTITIES['jet1eta_zoom'] = deepcopy(QUANTITIES['jet1eta'])
QUANTITIES['jet1eta_zoom'].name = "jet1eta_zoom"
QUANTITIES['jet1eta_zoom'].bin_spec = BinSpec.make_equidistant(n_bins=50,
                                                               range=(-4.0,
                                                                      -1.5))

QUANTITIES['jet1phi_zoom'] = deepcopy(QUANTITIES['jet1phi'])
QUANTITIES['jet1phi_zoom'].name = "jet1phi_zoom"
QUANTITIES['jet1phi_zoom'].bin_spec = BinSpec.make_equidistant(n_bins=50,
                                                               range=(2.0,
                                                                      2.7))

QUANTITIES['jet2eta_zoom'] = deepcopy(QUANTITIES['jet2eta'])
QUANTITIES['jet2eta_zoom'].name = "jet2eta_zoom"
QUANTITIES['jet2eta_zoom'].bin_spec = BinSpec.make_equidistant(n_bins=50,
                                                               range=(-4.0,
                                                                      -1.5))

QUANTITIES['jet2phi_zoom'] = deepcopy(QUANTITIES['jet2phi'])
QUANTITIES['jet2phi_zoom'].name = "jet2phi_zoom"
QUANTITIES['jet2phi_zoom'].bin_spec = BinSpec.make_equidistant(n_bins=50,
Esempio n. 9
0
from Excalibur.JEC_Plotter.core import PlotHistograms1D, PlotHistograms2D, CutSet, BinSpec, QUANTITIES

from Excalibur.JEC_Plotter.definitions.Summer16.samples_07Aug2017 import (
    SAMPLES,
    SELECTION_CUTS,
    ADDITIONAL_CUTS,
    RUN_PERIOD_CUT_DICTS,
)
from Excalibur.JEC_Plotter.utilities.plot import plot_time_dependence

from copy import deepcopy

_SAMPLE_NAME = "07Aug2017"

QUANTITIES['zmass'].bin_spec = BinSpec.make_equidistant(50, (89.5, 94.2))
QUANTITIES['mpf'].bin_spec = BinSpec.make_equidistant(50, (0.9, 1.15))
QUANTITIES['ptbalance'].bin_spec = BinSpec.make_equidistant(50, (0.8, 1.05))
QUANTITIES['jet1pt_over_jet1ptraw'].bin_spec = BinSpec.make_equidistant(
    50, (0.97, 1.25))

_QUANTITIES = [
    'mpf',
    'ptbalance',
    'zmass',
    #'zpt', 'zphi',
    #'npv',
    #'jet1pt', 'jet2pt', 'jet3pt',
    #'jet1phi', 'jet2phi', 'jet3phi',
    'jet1pt_over_jet1ptraw'
]
Esempio n. 10
0
from Excalibur.JEC_Plotter.core import PlotProfiles, QUANTITIES, BinSpec, CutSet
from Excalibur.JEC_Plotter.definitions.Fall17.samples_17Nov2017 import (
    SELECTION_CUTS,
    ADDITIONAL_CUTS,
    RUN_PERIOD_CUT_DICTS,
)
from Excalibur.JEC_Plotter.definitions.Fall17.samples_17Nov2017 import SAMPLES as SAMPLES_17Nov2017
from Excalibur.JEC_Plotter.definitions.Fall17.samples_09May2018 import SAMPLES as SAMPLES_09May2018
from Excalibur.JEC_Plotter.utilities.plot import plot_data_mc_profiles

from copy import deepcopy

QUANTITIES['zmass'].bin_spec = BinSpec.make_equidistant(50, (88.3, 93.3))
QUANTITIES['mpf'].bin_spec = BinSpec.make_equidistant(50, (0.8, 1.2))
QUANTITIES['ptbalance'].bin_spec = BinSpec.make_equidistant(50, (0.8, 1.2))
QUANTITIES['alpha'].bin_spec = BinSpec.make_from_bin_edges(
    [0.0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.5])

QUANTITIES['jet1chf'].bin_spec = BinSpec.make_equidistant(n_bins=51,
                                                          range=(-0.2, 1.2))
QUANTITIES['jet1nhf'].bin_spec = BinSpec.make_equidistant(n_bins=51,
                                                          range=(-0.2, 1.2))
QUANTITIES['jet1ef'].bin_spec = BinSpec.make_equidistant(n_bins=51,
                                                         range=(-0.2, 1.2))
QUANTITIES['jet1mf'].bin_spec = BinSpec.make_equidistant(n_bins=51,
                                                         range=(-0.2, 1.2))
QUANTITIES['jet1pf'].bin_spec = BinSpec.make_equidistant(n_bins=51,
                                                         range=(-0.2, 1.2))

_QUANTITY_PAIRS = [
    #('zpt_log', 'ptbalance'),