Ejemplo n.º 1
0
    'jet2pt',
    'jet3pt',
    'jet1eta_narrow',
    #'jet2eta_narrow',
    #'jet3eta_narrow',
]

_QUANTITY_PAIRS = [
    ("mpf", "ptbalance"),
]

_cut_final_no_eta = CutSet("basicToNoEta",
                           weights=[
                               "alpha<0.3",
                               "zpt>30",
                           ],
                           labels=[
                               r"$\\alpha<0.3$",
                               r"$p_\\mathrm{T}^\\mathrm{Z}>30~GeV$",
                           ])

_SELECTION_CUTS = [
    SELECTION_CUTS['finalcuts'],
    #SELECTION_CUTS['basiccuts'] + _cut_final_no_eta,
    #SELECTION_CUTS['nocuts'],
]

_ADDITIONAL_CUTS_ZPT = [
    {
        'cut':
        CutSet(
Ejemplo n.º 2
0
import numpy as np

from Excalibur.JEC_Plotter.core import QUANTITIES, CutSet, btb_cut_factory

_Z_BOSON_MASS_GEV = 91.1876

# -- Selection cuts: systems of cuts to apply to a Sample

SELECTION_CUTS = dict(
    nocuts=CutSet('ZJetnocuts',
                  weights=["1.0"],
                  labels=[r"${\\bf ZJet}$ no sel.",
                         ],
                  zjet_folder='nocuts'),
    basiccuts=CutSet('ZJetbasic',
                     weights=["1.0"],
                     labels=[r"${\\bf ZJet}$ basic sel.",
                             ],
                     zjet_folder='basiccuts'),
    extendedeta=CutSet('ZJetextendedeta',
                     weights=[
                              "zpt>30", "alpha<0.3"],
                     labels=[r"${\\bf ZJet}$ extended $\\eta$ sel.",
                             r"$\\alpha<0.3$",
                             r"$p_\\mathrm{T}^\\mathrm{Z}>30~GeV$",
                             ],
                     zjet_folder='basiccuts'),
    noalphanoetacuts=CutSet('ZJetnoalphanoetacuts',
                     weights=["zpt>30"],
                     labels=[r"${\\bf ZJet}$ basic sel.",
                             r"$p_\\mathrm{T}^\\mathrm{Z}>30~GeV$",
Ejemplo n.º 3
0
    'eta_13_25': dict(abseta=(1.3, 2.5), ),
    'eta_25_30': dict(abseta=(2.5, 3.0), ),
    'eta_30_50': dict(abseta=(3.0, 5.0), ),
    'pt_0_50': dict(pt=(0.0, 50.0), ),
    'pt_50_150': dict(pt=(50.0, 150.0), ),
    'pt_150_5000': dict(pt=(150.0, 5000.0), ),
}

_REGION_CUTS = {
    _region_name: {
        'cut':
        CutSet(
            '{}'.format(_region_name),
            weights=[
                "{obj}{prop}>{lo}&&{obj}{prop}<={hi}".format(
                    obj='z',  #"jet1",
                    prop=prop,
                    lo=_region_dict[prop][0],
                    hi=_region_dict[prop][1]) for prop in _region_dict
            ],
            labels=[]),
        'label':
        '{}'.format(_region_name)
    }
    for _region_name, _region_dict in _REGION_SPEC.iteritems()
}

_SELECTION_CUTS = [
    # SELECTION_CUTS['finalcuts'],
    # SELECTION_CUTS['extendedeta'],
    # SELECTION_CUTS['extendedeta']+_COLD_REGION_CUTS['cold']['cut'],
    # SELECTION_CUTS['extendedeta']+_COLD_REGION_CUTS['control']['cut'],
Ejemplo n.º 4
0
    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=[
        "abs(jet1eta)<1.3",
    ],
    labels=[
        r"$|\\eta^{Jet1}|<1.3$",
    ]
)

_SELECTION_CUTS = [
    SELECTION_CUTS['finalcuts'],
    SELECTION_CUTS['basiccuts'] + _cut_final_no_eta,
]

_z_cut_colors = [
    "k",
    "red",
    "blue",
    "green",
    "violet",
Ejemplo n.º 5
0
_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',
                    ],
                    labels=[])

_SELECTION_CUTS = []
for _pt_cut in _PT_CUTS:
    #for _eta_cut in _ETA_CUTS:
    for _abseta_cut in _ABSETA_CUTS:
        #_SELECTION_CUTS.append(SELECTION_CUTS['nocuts'] + _jetid_cut + _eta_cut + _pt_cut)
        #_SELECTION_CUTS.append(SELECTION_CUTS['nocuts'] + _eta_cut + _pt_cut)
        _SELECTION_CUTS.append(SELECTION_CUTS['basiccuts'] + _abseta_cut +
                               _pt_cut)
        _SELECTION_CUTS.append(SELECTION_CUTS['basiccuts'] + _abseta_cut)
Ejemplo n.º 6
0
_SAMPLE_NAME = "03Feb2017"

_CORR_FOLDER = "L1L2L3"

_QUANTITIES = [
    'mpf', 'ptbalance', 'npv', 'zpt', 'zphi', 'zmass', 'jet1pt', 'jet2pt',
    'jet3pt', 'jet1phi', 'jet2phi', 'jet3phi', 'jet1pt_over_jet1ptraw'
]

_TIME_QUANTITY = 'run'

_cut_final_no_alpha = CutSet("basicToNoAlpha",
                             weights=[
                                 "abs(jet1eta)<1.3",
                                 "zpt>30",
                             ],
                             labels=[
                                 r"$|\\eta^\\mathrm{Jet1}|<1.3$",
                                 r"$p_\\mathrm{T}^\\mathrm{Z}>30~GeV$",
                             ])

_SELECTION_CUTS = [
    SELECTION_CUTS['basiccuts'] + ADDITIONAL_CUTS['user']['basicToFinal'],
    SELECTION_CUTS['basiccuts'] + _cut_final_no_alpha
]

_ADDITIONAL_CUTS = [{
    'cut': ADDITIONAL_CUTS['run_periods']['runB'],
    'label': r"RunB",
    'color': 'pink'
}, {
Ejemplo n.º 7
0
_QUANTITY_PAIRS = [
    ('jet1phi', 'jet1eta'),
    ('jet2phi', 'jet2eta'),
    ('jet3phi', 'jet3eta'),
    ('zphi', 'zeta'),
    # -- zoomed in plots
    ('jet1phi_zoom', 'jet1eta_zoom'),
    ('jet2phi_zoom', 'jet2eta_zoom'),
    ('jet3phi_zoom', 'jet3eta_zoom'),
]

_cut_final_no_eta = CutSet("basicToNoEta",
                           weights=[
                               "alpha<0.3",
                               "zpt>30",
                           ],
                           labels=[
                               r"$\\alpha<0.3$",
                               r"$p_\\mathrm{T}^\\mathrm{Z}>30~GeV$",
                           ])

_SELECTION_CUTS = [
    SELECTION_CUTS['finalcuts'],
    SELECTION_CUTS['basiccuts'] + _cut_final_no_eta,
    #SELECTION_CUTS['basiccuts'],
    #SELECTION_CUTS['nocuts']
]


def _workflow(sample, jecv):
    _phs = []