cms-tau-pog / TauFW

Analysis framework for tau analysis at CMS using NanoAOD
9 stars 41 forks source link

Production of the json file with sum of generator weights #41

Closed hephysicist closed 12 months ago

hephysicist commented 12 months ago

To fix the problem with the normalization of the samples skimmed from nanoAODs I created a simple script: modify_cutflow_hist.py that performs the following operations: 1) Scans over the NanoAOD directory 2) Gets the list of sample names 3) Iterates over the directory for each sample 4) Calculates sum of generator weights 5) Saves these values to json file

Also, It can modify bins of the cutflow histogram using the information from json. I added a function for extracting sum of gen weights to PicoProducer/python/analysis/utils.py for general usage and cross-checks of the normalization. The output of the script is put into /samples directory.