Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14_0_X] Change unsubjet_map in btag info producers to tracked #44597

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
flip = cms.bool(False),
jet_radius = cms.double(0.4),
jets = cms.InputTag("hltPFPuppiJetForBtagEta2p4"),
unsubjet_map = cms.InputTag(""),
max_jet_eta = cms.double(2.5),
mightGet = cms.optional.untracked.vstring,
min_candidate_pt = cms.double(0.95),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
flip = cms.bool(False),
jet_radius = cms.double(0.4),
jets = cms.InputTag("hltAK4PFPuppiJets"),
unsubjet_map = cms.InputTag(""),
max_jet_eta = cms.double(2.5),
mightGet = cms.optional.untracked.vstring,
min_candidate_pt = cms.double(0.95),
Expand Down
11 changes: 11 additions & 0 deletions HLTrigger/Configuration/python/customizeHLTforCMSSW.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,15 @@ def customizeHLTfor44511(process):
delattr(producer, 'AXOL1TLModelVersion')
return process

def customizeHLTfor44597(process):
"""
Customisation for running HLT with the updated btag info producers from the PR 44597
"""
for type in ["DeepFlavourTagInfoProducer", "ParticleTransformerAK4TagInfoProducer", "DeepBoostedJetTagInfoProducer"]:
for producer in producers_by_type(process, type):
if hasattr(producer, 'unsubjet_map'):
delattr(producer, 'unsubjet_map')
return process

# CMSSW version specific customizations
def customizeHLTforCMSSW(process, menuType="GRun"):
Expand All @@ -273,4 +282,6 @@ def customizeHLTforCMSSW(process, menuType="GRun"):
# customizes AXOL1TL condition in the L1 menu
process = customizeHLTfor44511(process)

process = customizeHLTfor44597(process)

return process
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ DeepBoostedJetTagInfoProducer::DeepBoostedJetTagInfoProducer(const edm::Paramete
trkPhi_value_map_token_ = consumes<edm::ValueMap<float>>(trkPhi_value_map_tag);
}

const auto &unsubjet_map_tag = iConfig.getUntrackedParameter<edm::InputTag>("unsubjet_map", {});
const auto &unsubjet_map_tag = iConfig.getParameter<edm::InputTag>("unsubjet_map");
if (!unsubjet_map_tag.label().empty()) {
unsubjet_map_token_ = consumes<JetMatchMap>(unsubjet_map_tag);
use_unsubjet_map_ = true;
Expand Down Expand Up @@ -335,7 +335,7 @@ void DeepBoostedJetTagInfoProducer::fillDescriptions(edm::ConfigurationDescripti
desc.add<edm::InputTag>("secondary_vertices", edm::InputTag("inclusiveCandidateSecondaryVertices"));
desc.add<edm::InputTag>("pf_candidates", edm::InputTag("particleFlow"));
desc.add<edm::InputTag>("jets", edm::InputTag("ak8PFJetsPuppi"));
desc.addUntracked<edm::InputTag>("unsubjet_map", {});
desc.add<edm::InputTag>("unsubjet_map", {});
desc.add<edm::InputTag>("puppi_value_map", edm::InputTag("puppi"));
desc.add<edm::InputTag>("vertex_associator", edm::InputTag("primaryVertexAssociation", "original"));
desc.add<bool>("use_scouting_features", false);
Expand Down
4 changes: 2 additions & 2 deletions RecoBTag/FeatureTools/plugins/DeepFlavourTagInfoProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ DeepFlavourTagInfoProducer::DeepFlavourTagInfoProducer(const edm::ParameterSet&
calib3d_token_ = esConsumes<TrackProbabilityCalibration, BTagTrackProbability3DRcd>();
}

const auto& unsubjet_map_tag = iConfig.getUntrackedParameter<edm::InputTag>("unsubjet_map", {});
const auto& unsubjet_map_tag = iConfig.getParameter<edm::InputTag>("unsubjet_map");
if (!unsubjet_map_tag.label().empty()) {
unsubjet_map_token_ = consumes<JetMatchMap>(unsubjet_map_tag);
use_unsubjet_map_ = true;
Expand All @@ -180,7 +180,7 @@ void DeepFlavourTagInfoProducer::fillDescriptions(edm::ConfigurationDescriptions
desc.add<edm::InputTag>("puppi_value_map", edm::InputTag("puppi"));
desc.add<edm::InputTag>("secondary_vertices", edm::InputTag("inclusiveCandidateSecondaryVertices"));
desc.add<edm::InputTag>("jets", edm::InputTag("ak4PFJetsCHS"));
desc.addUntracked<edm::InputTag>("unsubjet_map", {});
desc.add<edm::InputTag>("unsubjet_map", {});
desc.add<edm::InputTag>("candidates", edm::InputTag("packedPFCandidates"));
desc.add<edm::InputTag>("vertex_associator", edm::InputTag("primaryVertexAssociation", "original"));
desc.add<bool>("fallback_puppi_weight", false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ ParticleTransformerAK4TagInfoProducer::ParticleTransformerAK4TagInfoProducer(con
use_pvasq_value_map_ = true;
}

const auto& unsubjet_map_tag = iConfig.getUntrackedParameter<edm::InputTag>("unsubjet_map", {});
const auto& unsubjet_map_tag = iConfig.getParameter<edm::InputTag>("unsubjet_map");
if (!unsubjet_map_tag.label().empty()) {
unsubjet_map_token_ = consumes<JetMatchMap>(unsubjet_map_tag);
use_unsubjet_map_ = true;
Expand All @@ -154,7 +154,7 @@ void ParticleTransformerAK4TagInfoProducer::fillDescriptions(edm::ConfigurationD
desc.add<edm::InputTag>("puppi_value_map", edm::InputTag("puppi"));
desc.add<edm::InputTag>("secondary_vertices", edm::InputTag("inclusiveCandidateSecondaryVertices"));
desc.add<edm::InputTag>("jets", edm::InputTag("ak4PFJetsCHS"));
desc.addUntracked<edm::InputTag>("unsubjet_map", {});
desc.add<edm::InputTag>("unsubjet_map", {});
desc.add<edm::InputTag>("candidates", edm::InputTag("packedPFCandidates"));
desc.add<edm::InputTag>("vertex_associator", edm::InputTag("primaryVertexAssociation", "original"));
desc.add<bool>("fallback_puppi_weight", false);
Expand Down