parser.add_argument( "--sync", action='store_true', help="issue rsync command to sync plots folder to lxplus web server") parser.add_argument("--preserve", action='store_true', help="preserve plots in ROOT file") args = parser.parse_args() import ROOT ROOT.gROOT.SetBatch() sdml = SigDatasetMapLoader() sigDS, sigSCALE = sdml.fetch() dml = DatasetMapLoader() bkgDS, bkgMAP, bkgSCALE = dml.fetch('bkg') dataDS, dataMAP = dml.fetch('data') @contextmanager def _setIgnoreLevel(level): originalLevel = ROOT.gErrorIgnoreLevel ROOT.gErrorIgnoreLevel = level yield ROOT.gErrorIgnoreLevel = originalLevel """Leptonjet isolation, pt, """
get_pu_weights_function, get_ttbar_weight) from FireHydrant.Tools.metfilter import MetFilters from FireHydrant.Tools.trigger import Triggers from FireHydrant.Tools.uproothelpers import fromNestNestIndexArray np.seterr(divide='ignore', invalid='ignore', over='ignore') parser = argparse.ArgumentParser(description="leptonjet ABCD") parser.add_argument( "--sync", action='store_true', help="issue rsync command to sync plots folder to lxplus web server") args = parser.parse_args() dml = DatasetMapLoader() # dataDS, dataMAP = dml.fetch('data') bkgDS, bkgMAP, bkgSCALE = dml.fetch('bkg') sdml = SigDatasetMapLoader() sigDS_2mu2e, sigSCALE_2mu2e = sdml.fetch('2mu2e') sigDS_4mu, sigSCALE_4mu = sdml.fetch('4mu') class LjABCDProcessor(processor.ProcessorABC): def __init__(self, data_type='bkg'): self.data_type = data_type dataset_axis = hist.Cat('dataset', 'dataset') iso_axis = hist.Bin('iso', 'min pfIso', 50, 0, 0.5) bin_axis = hist.Bin('val', 'binary value', 3, 0, 3)
List interesting/filtered event numbers """ import awkward import coffea.processor as processor import numpy as np from coffea import hist from coffea.analysis_objects import JaggedCandidateArray from FireHydrant.Analysis.DatasetMapLoader import DatasetMapLoader from FireHydrant.Tools.correction import (get_nlo_weight_function, get_pu_weights_function, get_ttbar_weight) from FireHydrant.Tools.metfilter import MetFilters from FireHydrant.Tools.trigger import Triggers from FireHydrant.Tools.uproothelpers import fromNestNestIndexArray dml = DatasetMapLoader() # bkgDS, bkgMAP, bkgSCALE = dml.fetch('bkg') dataDS, dataMAP = dml.fetch('data') """list events""" class LeptonjetEventDrawer(processor.ProcessorABC): def __init__(self, data_type='data'): self.data_type = data_type self._accumulator = processor.dict_accumulator({ 'run_1': processor.column_accumulator(np.zeros(shape=(0, ))), 'lumi_1': processor.column_accumulator(np.zeros(shape=(0, ))), 'event_1': processor.column_accumulator(np.zeros(shape=(0, ))),