root -b -q -l 'extractPlotsAndComputeTheSFs.C("IDname_BINSname","pathToDataTnPOutputFile","pathToMCTnPOutputFile")'
createJsonFile.py theInputFile.root theOutputJsonFileName.json
- untar the example directory:
tar xfvz exampleTnPoutputs.tar.gz
- run the macro: (one single time per TnP ouput file -> 3 times in the example)
root -b -q -l 'extractPlotsAndComputeTheSFs.C("Medium_EtaBins","Efficiency_v1/DATA_JSON1280/TnP_NUM_Medium_DEN_genTracks_PAR_eta.root","Efficiency_v1/MC_NLO/TnP_NUM_Medium_DEN_genTracks_PAR_eta.root")'
root -b -q -l 'extractPlotsAndComputeTheSFs.C("Medium_PtEtaBins","Efficiency_v1/DATA_JSON1280/TnP_NUM_Medium_DEN_genTracks_PAR_pt_eta.root","Efficiency_v1/MC_NLO/TnP_NUM_Medium_DEN_genTracks_PAR_pt_eta.root")'
root -b -q -l 'extractPlotsAndComputeTheSFs.C("Tight_PtEtaBins","Efficiency_v1/DATA_JSON1280/TnP_NUM_Tight2012_DEN_genTracks_PAR_pt_eta.root","Efficiency_v1/MC_NLO/TnP_NUM_Tight2012_DEN_genTracks_PAR_pt_eta.root")'
- It will produce in the example 3 root files starting by
EfficienciesAndSF_
- merge the root files togeither
$ROOTSYS/bin/hadd EfficienciesAndSF.root EfficienciesAndSF_*.root
- dump the SFs in a json and pkl file
createJsonFile.py EfficienciesAndSF.root theJSONfile.json