Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved func_adl query to not accidentally drop events that are accepted under systematic variations #83

Open
alexander-held opened this issue Oct 17, 2022 · 4 comments
Labels
enhancement New feature or request implementation concerns analysis implementation

Comments

@alexander-held
Copy link
Member

Query including lepton and jet selection:

def get_query(source: ObjectStream) -> ObjectStream:
    return source.Where(lambda e:\
    # == 1 lep
    e.electron_pt.Where(lambda pT: pT > 25).Count() + e.muon_pt.Where(lambda pT: pT > 25).Count()== 1
)\
.Where(lambda e:\
    # >= 4 jets
    e.jet_pt.Where(lambda pT: pT > 25).Count() >= 4
)\
.Where(lambda e:\
    # >= 1 jet with pT > 25 GeV and b-tag >= 0.5
    {"pT": e.jet_pt, "btag": e.jet_btag}.Zip().Where(lambda jet: jet.btag >= 0.5 and jet.pT > 25).Count() >= 1
)\
.Select(lambda e:\
    # return columns
    {
        "electron_pt": e.electron_pt,
        "muon_pt": e.muon_pt,
        "jet_pt": e.jet_pt,
        "jet_eta": e.jet_eta,
        "jet_phi": e.jet_phi,
        "jet_mass": e.jet_mass,
        "jet_btag": e.jet_btag,
    }
)

This does not account for object systematic variations in the processor that can relax acceptance requirements. The query should be loosened accordingly, though it is unclear how to do that in a way that guarantees full acceptance in a general setup.

@alexander-held alexander-held added the enhancement New feature or request label Oct 17, 2022
@gordonwatts
Copy link
Member

I am not clear what the goal is here... Is it the systematics? (the issue title has me wondering)

@alexander-held
Copy link
Member Author

The current query implemented in the notebook does not do any filtering at all, so the goal of this issue would be adding a filter similar to the query above, with suitably relaxed cuts that ensure we can still evaluate systematic variations that end up relaxing the selection.

@gordonwatts
Copy link
Member

Ok - can you (@alexander-held) point me to the file where this query is so I don't modify the wrong thing?

@alexander-held alexander-held changed the title Improved func_adl query Improved func_adl query to not accidentally drop events that are accepted under systematic variations Nov 7, 2022
@alexander-held
Copy link
Member Author

alexander-held commented Nov 7, 2022

@gordonwatts the updated query as shown above is in main now in coffea.ipynb (as of #85 being merged). The missing piece is relaxing the cuts sufficiently such that no (significant number of) events are filtered out that would pass the selection requirements under systematic variations. In the current implementation we have for example a 5% systematic uncertainty for jet pT that can bring events back into acceptance.

I assume that the standard pattern to design a better query would be making it very loose and then tightening it until the results start changing (because we are losing events that would pass under systematic variations).

@alexander-held alexander-held added the implementation concerns analysis implementation label May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request implementation concerns analysis implementation
Projects
None yet
Development

No branches or pull requests

2 participants