Description
Dear experts,
I am trying to apply JEC, JER corrections using txt files from twiki.
I can make the corrections for jecs like L1, L2, L3 but I cannot load the Uncertainty file. I found that the format of name is different.
Names must be formatted as ''. is in coffea/jetmet_tools/JetCorrectionUncertainty.py file but name of jec for run3 has one more '_'.
And also I tried changing name of .txt file but it has same error like this.
Traceback (most recent call last): File "check_jecs2.py", line 111, in <module> print("function jet_factory: ", jet_factory("2022pre","AK4PFPuppi", False)) File "check_jecs2.py", line 82, in jet_factory return jet_factory_factory(jec_files(year, jec_algo, dojer), year) File "check_jecs2.py", line 78, in jet_factory_factory jec_stack = JECStack(ext.make_evaluator()) File "/home/jhong/.local/lib/python3.8/site-packages/coffea/jetmet_tools/JECStack.py", line 58, in __init__ self._junc = JetCorrectionUncertainty( File "/home/jhong/.local/lib/python3.8/site-packages/coffea/jetmet_tools/JetCorrectionUncertainty.py", line 84, in __init__ raise Exception( Exception: Summer22_22Sep2023_V2_MC_Uncertainty_AK4PFPuppi is a <class 'coffea.lookup_tools.jme_standard_function.jme_standard_function'> and not a jec_uncertainty_lookup!
I use the jetfactory code like this:
`
def jet_factory_factory(files, year):
ext = extractor()
directory='data/JetMETCorr/'+year
for filename in files:
ext.add_weight_sets([f"* * {directory+'/'+filename}"])
ext.finalize()
jec_stack = JECStack(ext.make_evaluator())
return CorrectedJetsFactory(jec_name_map, jec_stack)
def jet_factory(year, jec_algo, dojer):
return jet_factory_factory(jec_files(year, jec_algo, dojer), year)
`
I attached one uncertainty file I used
Summer22_22Sep2023_V2_MC_Uncertainty_AK4PFPuppi.txt
Desktop (please complete the following information):
- OS: linux
- Version Centos7