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

get_files is missing in muon_definitions.py #5

Open
xiaohu-cern opened this issue Oct 20, 2020 · 3 comments
Open

get_files is missing in muon_definitions.py #5

xiaohu-cern opened this issue Oct 20, 2020 · 3 comments

Comments

@xiaohu-cern
Copy link

Hi, I am running the notebook MuonTnP.ipynb which needs get_files(). But it looks that this function was removed in muon_definitions.py in the past. Should we update the notebook to use any new interface or add back this function? Thanks!

@dntaylor
Copy link
Owner

Yes, the notebook hasn't been updated to the new version. This was refactored to use:

from registry import registry
parquet_files = registry.parquet('muon', 'generalTracks', 'Z', 'Run20178_UL, 'Run2018')

to get the 2018 UL data parquet file names, for example.

@xiaohu-cern
Copy link
Author

Thanks! I see. Since I am learning the structure from the notebook, I can try to reach to the end and find the updates that are needed. the above solution works out. Then there pops out missing definition of 'get_default_num_denom'.

@dntaylor
Copy link
Owner

As you are working through it, compare to flattener.py for the updated usage.
Numerator and denominator definitions are now passed via a config object (see README and examples in config) rather than hard coded.
So you can pass your configuration dict to the Configuration object via:

from config import Configuration
config = Configuration({...})

and then use the same access as the flattener.
Or just iterate over your chosen definitions yourself.
The Configuration object was meant as a simple accessor to a json file that would hold all definitions for a given efficiency set, allowing quick customization, rather than hard coding definitions (as was done before).

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

No branches or pull requests

2 participants