-
Notifications
You must be signed in to change notification settings - Fork 5
NanoAOD v12 fix #46
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
base: main
Are you sure you want to change the base?
NanoAOD v12 fix #46
Conversation
…2018 and 2022 where missing files too
|
In my opinion, we somehow need to mark that a generator weight calculation has failed. Setting the weight to 1 is dangerous as we might end up with a large overestimation of a background. E.g., for DY aMC@NLO samples, the weights significantly differ from 1. My preferred way would be to set the generator weight to 1 during the friend tree production in https://github.com/KIT-CMS/smhtt_ul/blob/master/friends/build_friend_tree.py#L147-L176, and to issue a warning when doing so: from warnings import warn
[...]
def build_rdf(inputfile, dataset_proc, output_file):
[...]
negative_events_fraction = dataset_proc["generator_weight"]
if negative_events_fraction is None:
negative_events_fraction = 1.0
warnings.warn(
"The generator weight is not set in the sample database and is set to 1.0. Consider recalculating the generator weight.",
UserWarning,
)
negative_events_fraction = float(negative_events_fraction)
[...]
[...] |
| "root://xrootd-cms.infn.it///store/data/Run2022G/EGamma/NANOAOD/16Dec2023-v1/2540000/d9cf78ba-0849-4d64-8f63-dc893a273c3c.root", | ||
| "root://xrootd-cms.infn.it///store/data/Run2022G/EGamma/NANOAOD/16Dec2023-v1/2540000/6aaf04d1-773f-4e3d-bd21-8ccd4d5fdbfe.root" | ||
| ], | ||
| "generator_weight": 0.0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to change this to 1, with the only reason of consistency with all other data files. (Comment to all added data files) In general, the generator_weight is not relevant for data.
| "root://xrootd-cms.infn.it///store/mc/Run3Summer22EENanoAODv12/DYto2Mu_MLL-6000_TuneCP5_13p6TeV_powheg-pythia8/NANOAODSIM/130X_mcRun3_2022_realistic_postEE_v6-v2/60000/ee32b8d6-0094-40f9-8709-24fcfd3466c9.root" | ||
| ], | ||
| "generator_weight": null, | ||
| "generator_weight": 1.0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was it really exactly 1? Since this powheg NLO.
Some samples for 2022 had the generator weight set to null, preventing the use of the database in ntuple production. Now the proper values have been calculated. If this failed, the nominal values are set back to 1.0.
A few data samples for 2022 were missing in the detailed database and are now properly added.
Proper calculation of generator weights was done for those samples in 2023 eras that did not proceed before. Now all of them are properly set.
For 2018, there were differences between the detailed database (outdated cross-section and generator weights) and the main database. This has now been resolved so that the detailed database matched the main one.