Skip to content

Conversation

alexander-held
Copy link
Member

@alexander-held alexander-held commented Apr 4, 2023

very much a work in progress right now

useful insert for debugging

use https://github.com/scikit-hep/scikit-hep-testdata/raw/main/src/skhep_testdata/data/nanoAOD_2015_CMS_Open_Data_ttbar.root as input file for quicker debugging

    import os
    import urllib.request

    ttbar_file = "https://xrootd-local.unl.edu:1094//store/user/AGC/nanoAOD/TT_TuneCUETP8M1_13TeV-powheg-pythia8/cmsopendata2015_ttbar_19980_PU25nsData2015v1_76X_mcRun2_asymptotic_v12_ext3-v1_00000_0000.root"

    # download for subsequent use
    local_file_name = "ttbar.root"
    if not os.path.exists(local_file_name):
        urllib.request.urlretrieve(ttbar_file, filename=local_file_name)

    NanoAODSchema.warn_missing_crossrefs = False # silences warnings about branches we will not use here
    from coffea.nanoevents import NanoEventsFactory

    metadata = {'process': 'ttbar', 'variation': 'nominal', 'nevts': 1334428, 'xsec': 729.84, 'dataset': 'ttbar__nominal'}
    events = NanoEventsFactory.from_root("ttbar.root", schemaclass=NanoAODSchema, treepath="Events", metadata=metadata, permit_dask=True).events()
    output = TtbarAnalysis(DISABLE_PROCESSING, IO_FILE_PERCENT).process(events)
    breakpoint()
    print(output["hist"].dask)
    print(dak.necessary_columns(output["hist"]))
    print(output["hist"].compute())
    breakpoint()

@alexander-held alexander-held marked this pull request as draft April 4, 2023 17:42
@alexander-held
Copy link
Member Author

closing this: superseded by the work in #164

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant