diff --git a/README.md b/README.md index 884f73a1..faa1b99c 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # BTVNanoCommissioning [![Linting](https://github.com/cms-btv-pog/BTVNanoCommissioning/actions/workflows/python_linting.yml/badge.svg)](https://github.com/cms-btv-pog/BTVNanoCommissioning/actions/workflows/python_linting.yml) -[![TTbar DL](https://github.com/cms-btv-pog/BTVNanoCommissioning/actions/workflows/ttbar_DL_workflow.yml/badge.svg)](https://github.com/cms-btv-pog/BTVNanoCommissioning/actions/workflows/ttbar_DL_workflow.yml) -[![TTbar SL](https://github.com/cms-btv-pog/BTVNanoCommissioning/actions/workflows/ttbar_SL_workflow.yml/badge.svg)](https://github.com/cms-btv-pog/BTVNanoCommissioning/actions/workflows/ttbar_SL_workflow.yml) +[![btag ttbar](https://github.com/cms-btv-pog/BTVNanoCommissioning/actions/workflows/ttbar_workflow.yml/badge.svg)](https://github.com/cms-btv-pog/BTVNanoCommissioning/actions/workflows/ttbar_workflow.yml) +[![ctag ttbar](https://github.com/cms-btv-pog/BTVNanoCommissioning/actions/workflows/ctag_ttbar_workflow.yml/badge.svg)](https://github.com/cms-btv-pog/BTVNanoCommissioning/actions/workflows/ctag_ttbar_workflow.yml) [![ctag DY+jets Workflow](https://github.com/cms-btv-pog/BTVNanoCommissioning/actions/workflows/ctag_DY_workflow.yml/badge.svg)](https://github.com/cms-btv-pog/BTVNanoCommissioning/actions/workflows/ctag_DY_workflow.yml) [![ctag W+c Workflow](https://github.com/cms-btv-pog/BTVNanoCommissioning/actions/workflows/ctag_Wc_workflow.yml/badge.svg)](https://github.com/cms-btv-pog/BTVNanoCommissioning/actions/workflows/ctag_Wc_workflow.yml) [![BTA Workflow](https://github.com/cms-btv-pog/BTVNanoCommissioning/actions/workflows/BTA_workflow.yml/badge.svg)](https://github.com/cms-btv-pog/BTVNanoCommissioning/actions/workflows/BTA_workflow.yml) diff --git a/metadata/test_bta_run3.json b/metadata/test_bta_run3.json index 1da3a091..a312400f 100644 --- a/metadata/test_bta_run3.json +++ b/metadata/test_bta_run3.json @@ -1,8 +1,6 @@ { - "JetMETRun2022D-27Jun2023-v2": [ - "root://eoscms.cern.ch//eos/cms/store/group/cmst3/group/deepjet/PFNano_Run3_v12/data_2022CDE_rereco_JetMET/JetMET/Run2022D-27Jun2023-v2_BTV_Run3_2022_Comm_v2_NanoV12/230927_120318/0000/nano_data2022CDE_135.root" - ], - "QCD_PT-120to170_MuEnrichedPt5_TuneCP5_13p6TeV_pythia8":[ - "root://eoscms.cern.ch//store/group/phys_btag/PFNano_Run3/mc_summer22EE/QCD_PT-120to170_MuEnrichedPt5_TuneCP5_13p6TeV_pythia8/Run3Summer22EEMiniAODv3-124X_mcRun3_2022_realistic_postEE_v1-v1_BTV_Run3_2022_Comm_v2_NanoV12/231001_184438/0000/nano_mcRun3_EE_1-1.root" - ] +"JetMETRun2022D-22Sep2023-v1": [ + "root://eoscms.cern.ch//eos/cms/store/group/cmst3/group/deepjet//PFNano_Run3/data_2022_MINIAODv4/JetMET/Run2022D-22Sep2023-v1_BTV_Run3_2022_Comm_MINIAODv4/231125_161517/0000/data_defaultAK4_1.root"], + "QCD_PT-15to20_MuEnrichedPt5_TuneCP5_13p6TeV_pythia8": [ + "root://grid-cms-xrootd.physik.rwth-aachen.de:1094//store/user/milee/PFNano_Run3/mc_summer22_MINIAODv4/QCD_PT-15to20_MuEnrichedPt5_TuneCP5_13p6TeV_pythia8/Run3Summer22MiniAODv4-130X_mcRun3_2022_realistic_v5-v2_BTV_Run3_2022_Comm_MINIAODv4/231124_225033/0000/MC_defaultAK4_preEE_20.root"] } diff --git a/src/BTVNanoCommissioning/data/PU/Summer22EERun3/puwei_2022_postEE.histo.root b/src/BTVNanoCommissioning/data/PU/Summer22EERun3/puwei_2022_postEE.histo.root new file mode 100644 index 00000000..aec897b6 Binary files /dev/null and b/src/BTVNanoCommissioning/data/PU/Summer22EERun3/puwei_2022_postEE.histo.root differ diff --git a/src/BTVNanoCommissioning/data/PU/Summer22Run3/puwei_2022_preEE.histo.root b/src/BTVNanoCommissioning/data/PU/Summer22Run3/puwei_2022_preEE.histo.root new file mode 100644 index 00000000..dfd36c9b Binary files /dev/null and b/src/BTVNanoCommissioning/data/PU/Summer22Run3/puwei_2022_preEE.histo.root differ diff --git a/src/BTVNanoCommissioning/helpers/update_branch.py b/src/BTVNanoCommissioning/helpers/update_branch.py index c667b5e3..9e596b41 100644 --- a/src/BTVNanoCommissioning/helpers/update_branch.py +++ b/src/BTVNanoCommissioning/helpers/update_branch.py @@ -31,14 +31,7 @@ def missing_branch(events): events.Jet, {"btagDeepFlavC": jets.btagDeepFlavC}, ) - if hasattr(events.Jet, "btagDeepCvL") and not hasattr(events.Jet, "btagDeepC"): - jets["btagDeepC"] = ( - events.Jet.btagDeepCvL / (1.0 - events.Jet.btagDeepCvL) - ) * events.Jet.btagDeepB - events.Jet = update( - events.Jet, - {"btagDeepC": jets.btagDeepC}, - ) + if hasattr(events.Jet, "btagDeepFlavC") and not hasattr( events.Jet, "btagDeepFlavCvL" ): @@ -83,46 +76,7 @@ def missing_branch(events): "btagDeepFlavCvB": jets.btagDeepFlavCvB, }, ) - if not hasattr(events.Jet, "btagDeepB"): - jets = events.Jet - jets["btagDeepB"] = events.Jet.btagDeepB_b + events.Jet.btagDeepB_bb - events.Jet = update( - events.Jet, - {"btagDeepB": jets.btagDeepB}, - ) - if hasattr(events.Jet, "btagDeepC") and not hasattr(events.Jet, "btagDeepCvL"): - jets["btagDeepCvL"] = np.maximum( - np.minimum( - np.where( - (events.Jet.btagDeepC > 0) & (events.Jet.pt > 15), - (events.Jet.btagDeepC / (1.0 - events.Jet.btagDeepB)), - -1, - ), - 0.999999, - ), - -1, - ) - jets["btagDeepCvB"] = np.maximum( - np.minimum( - np.where( - (events.Jet.btagDeepC > 0) & (events.Jet.pt > 15), - ( - events.Jet.btagDeepC - / (events.Jet.btagDeepC + events.Jet.btagDeepB) - ), - -1, - ), - 0.999999, - ), - -1, - ) - events.Jet = update( - events.Jet, - { - "btagDeepCvL": jets.btagDeepCvL, - "btagDeepCvB": jets.btagDeepCvB, - }, - ) + if hasattr(events, "METFixEE2017"): events.MET = events.METFixEE2017 if not hasattr(events.PuppiMET, "MetUnclustEnUpDeltaX"): diff --git a/src/BTVNanoCommissioning/utils/AK4_parameters.py b/src/BTVNanoCommissioning/utils/AK4_parameters.py index 2029020f..30634157 100644 --- a/src/BTVNanoCommissioning/utils/AK4_parameters.py +++ b/src/BTVNanoCommissioning/utils/AK4_parameters.py @@ -41,8 +41,8 @@ }, "Summer22Run3": { "lumiMask": "Cert_Collisions2022_355100_362760_Golden.json", - "PU": "puweight_Winter22Run3-69p2mb.histo.root", # use same 80.0mb for Summer22 - "JME": "winter_jec_compiled.pkl.gz", # not this is from Winter22Run3 since this is not yet finished + "PU": "puwei_2022_preEE.histo.root", # new PU files, based on preEE + "JME": "jec_compiled.pkl.gz", # update to latest JEC "LSF": { "mu_json": "ScaleFactors_Muon_trackerMuons_Z_2022_Prompt_ID_ISO_schemaV2.json", "mu_ID": "NUM_TightID_DEN_TrackerMuons", @@ -56,7 +56,7 @@ }, "Summer22EERun3": { "lumiMask": "Cert_Collisions2022_355100_362760_Golden.json", - "PU": "puweight_Summer22EERun3-80p0mb.histo.root", # 69.2mb + "PU": "puwei_2022_postEE.histo.root", # new PU file, post EE "JME": "jec_compiled.pkl.gz", "LSF": { "ele_json": "electron.json.gz", diff --git a/src/BTVNanoCommissioning/utils/histogrammer.py b/src/BTVNanoCommissioning/utils/histogrammer.py index f6889f3b..a62a9ffb 100644 --- a/src/BTVNanoCommissioning/utils/histogrammer.py +++ b/src/BTVNanoCommissioning/utils/histogrammer.py @@ -357,12 +357,6 @@ def histogrammer(events, workflow): ) ### discriminators disc_list = [ - "btagDeepB", - "btagDeepC", - "btagDeepB_b", - "btagDeepB_bb", - "btagDeepCvL", - "btagDeepCvB", "btagDeepFlavB", "btagDeepFlavC", "btagTransDeepFlavB",