Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Configuration/Eras/python/Era_Run3_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
from Configuration.Eras.Modifier_run3_RPC_cff import run3_RPC
from Configuration.Eras.Modifier_run3_ecal_cff import run3_ecal
from Configuration.Eras.Modifier_hcalPfCutsFromDB_cff import hcalPfCutsFromDB
from Configuration.Eras.Modifier_run3_muon_2022_cff import run3_muon_2022
from Configuration.Eras.Modifier_run3_muon_2023_cff import run3_muon_2023

Run3 = cms.ModifierChain(Run2_2018.copyAndExclude([run2_GEM_2017, ctpps_2018, run2_egamma_2018, run2_HLTconditions_2018]),
run3_common, run3_egamma, run3_GEM, run3_HB, run3_HFSL, stage2L1Trigger_2021, ctpps_2022, dd4hep, run3_RPC, run3_ecal, hcalPfCutsFromDB)
run3_common, run3_egamma, run3_GEM, run3_HB, run3_HFSL, stage2L1Trigger_2021, ctpps_2022, dd4hep, run3_RPC, run3_ecal, hcalPfCutsFromDB, run3_muon_2022, run3_muon_2023)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just defining one run3_muon Modifier? There doesn't seem to be any need (at least in this PR) to define two.


3 changes: 3 additions & 0 deletions Configuration/Eras/python/Modifier_run3_muon_2022_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import FWCore.ParameterSet.Config as cms

run3_muon_2022=cms.Modifier()
3 changes: 3 additions & 0 deletions Configuration/Eras/python/Modifier_run3_muon_2023_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import FWCore.ParameterSet.Config as cms

run3_muon_2023=cms.Modifier()
24 changes: 24 additions & 0 deletions PhysicsTools/NanoAOD/python/muons_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,30 @@
weightFile = "PhysicsTools/NanoAOD/data/mu_BDTG_2016.weights.xml",
)

run3_muon.toModify(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in line 89, set muonMVATTH with the run3 parameters, and there do run3_common).toModify( with old paremters. which is just changing the fileinpath, the variable order and remove variables

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, I've updated the config to do this. I was not aware this ~run3 could be done. Let me know if it is what you expected.

muonMVATTH,
weightFile = cms.FileInPath("PhysicsTools/NanoAOD/data/mu_BDTG_2022.weights.xml"),
name = cms.string("muonMVATTH"),
isClassifier = cms.bool(True),
variablesOrder = cms.vstring(["LepGood_pt","LepGood_eta","LepGood_pfRelIso03_all","LepGood_miniRelIsoCharged","LepGood_miniRelIsoNeutral","LepGood_jetNDauChargedMVASel","LepGood_jetPtRelv2","LepGood_jetDF","LepGood_jetPtRatio","LepGood_sip3d","LepGood_dxy","LepGood_dz","LepGood_segmentComp"]),
variables = cms.PSet(
LepGood_pt = cms.string("pt"),
LepGood_eta = cms.string("eta"),
LepGood_pfRelIso03_all = cms.string("(pfIsolationR03().sumChargedHadronPt + max(pfIsolationR03().sumNeutralHadronEt + pfIsolationR03().sumPhotonEt - pfIsolationR03().sumPUPt/2,0.0))/pt"),
LepGood_miniRelIsoCharged = cms.string("userFloat('miniIsoChg')/pt"),
LepGood_miniRelIsoNeutral = cms.string("(userFloat('miniIsoAll')-userFloat('miniIsoChg'))/pt"),
LepGood_jetNDauChargedMVASel = cms.string("?userCand('jetForLepJetVar').isNonnull()?userFloat('jetNDauChargedMVASel'):0"),
LepGood_jetPtRelv2 = cms.string("?userCand('jetForLepJetVar').isNonnull()?userFloat('ptRel'):0"),
LepGood_jetDF = cms.string("?userCand('jetForLepJetVar').isNonnull()?max(userCand('jetForLepJetVar').bDiscriminator('pfDeepFlavourJetTags:probbb')+userCand('jetForLepJetVar').bDiscriminator('pfDeepFlavourJetTags:probb')+userCand('jetForLepJetVar').bDiscriminator('pfDeepFlavourJetTags:problepb'),0.0):0.0"),
LepGood_jetPtRatio = cms.string("?userCand('jetForLepJetVar').isNonnull()?min(userFloat('ptRatio'),1.5):1.0/(1.0+(pfIsolationR04().sumChargedHadronPt + max(pfIsolationR04().sumNeutralHadronEt + pfIsolationR04().sumPhotonEt - pfIsolationR04().sumPUPt/2,0.0))/pt)"),
LepGood_sip3d = cms.string("abs(dB('PV3D')/edB('PV3D'))"),
LepGood_dxy = cms.string("log(abs(dB('PV2D')))"),
LepGood_dz = cms.string("log(abs(dB('PVDZ')))"),
LepGood_segmentComp = cms.string("segmentCompatibility"),

)
)

from TrackingTools.TransientTrack.TransientTrackBuilder_cfi import *
muonBSConstrain = cms.EDProducer("MuonBeamspotConstraintValueMapProducer",
src = cms.InputTag("linkedObjects","muons"),
Expand Down