Skip to content

This tool is designed to convert the physics-object level correction factors given by CMS POGs (json format) into flattened text files (in pT-eta bins) to bypass correctionlib dependency.

Notifications You must be signed in to change notification settings

phazarik/correctionlib-to-text

Repository files navigation

Correctionlib to text

Correctionlib is a library that provides a standardized interface for evaluating physics object correction factors and scale factors defined in JSON format [see documentation]. It supports python and C++ (that I know of). It returns correction parameters typically in bins of pT and eta of the physics objects. I designed this correctionlib-to-text converter for systems not compatible with correctionlib, where I flatten the information organised in json format and write down into text files with a pandas dataframe structure. These text files can be parsed easily into C++ or python based analysis framework. Instructions for each types of corrections are given in the respective directories:

Required dependencies

  • correctionlib [can be installed with conda install correctionlib]
  • json
  • pandas
  • numpy

Choices that I made while creating the text files

  • Medium ID corrections for muon.
  • Medium working point for b-jets.

Feel free to use and modify this project as per your needs. Contact me if you need help.

About

This tool is designed to convert the physics-object level correction factors given by CMS POGs (json format) into flattened text files (in pT-eta bins) to bypass correctionlib dependency.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published