Skip to content

Add efficiencies to JSON

Jona Motta requested to merge jmotta/spark_tnp:Spark3 into Spark3

This MR adds the possibility to include trigger efficiencies in the JSON files containing the trigger SFs. This would bring the MUO POG JSON files for trigger SFs in line with the EGM and TAU POG which already provide this information.

This is done by adding two new options to the prepare step of the workflow in order to store either SFs or MC or DATA efficiency in the JSONs for example as follows:

./tnp_fitter.py prepare muon generalTracks Z Run2022 <config>              # fills a JSON with SFs
./tnp_fitter.py prepare muon generalTracks Z Run2022 <config> --doMCeff    # fills a JSON with the MC efficiencies
./tnp_fitter.py prepare muon generalTracks Z Run2022 <config> --doDATAeff  # fills a JSON with the DATA efficiencies

This will produce three JSON files with schema V1 that can then be merged as follows:

python3 scripts/convert_jsons_to_schema_v2.py bbtautau_trigger/efficiencies/muon/generalTracks/Z/Run2022/

which is then a JSON with schema V2 that contains both efficiencies and SFs accessible as:

NUM_<sel_num>_DEN_<sel_den>
NUM_<sel_num>_DEN_<sel_den>_MCeff
NUM_<sel_num>_DEN_<sel_den>_DATAeff
Edited by Jona Motta

Merge request reports