Skip to content

Commit

Permalink
Introducing switch to run pruned DeepFlavour Tagger
Browse files Browse the repository at this point in the history
  • Loading branch information
rauser committed Apr 11, 2019
1 parent 17633d5 commit 4dcfb7d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 14 deletions.
6 changes: 4 additions & 2 deletions plugins/BTagAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ class BTagAnalyzerT : public edm::EDAnalyzer
bool runTagVariablesSubJets_;
bool runCSVTagVariables_;
bool runCSVTagTrackVariables_;
bool runPrunedDeepFlavourTaggers_;
bool runDeepFlavourTagVariables_;
bool runCSVTagVariablesSubJets_;
bool runDeepDoubleXTagVariables_;
Expand Down Expand Up @@ -580,6 +581,7 @@ BTagAnalyzerT<IPTI,VTX>::BTagAnalyzerT(const edm::ParameterSet& iConfig):
runTagVariablesSubJets_ = iConfig.getParameter<bool>("runTagVariablesSubJets");
runCSVTagVariables_ = iConfig.getParameter<bool>("runCSVTagVariables");
runCSVTagTrackVariables_ = iConfig.getParameter<bool>("runCSVTagTrackVariables");
runPrunedDeepFlavourTaggers_ = iConfig.getParameter<bool>("runPrunedDeepFlavourTaggers");
runDeepFlavourTagVariables_ = iConfig.getParameter<bool>("runDeepFlavourTagVariables");
runCSVTagVariablesSubJets_ = iConfig.getParameter<bool>("runCSVTagVariablesSubJets");
runDeepDoubleXTagVariables_ = iConfig.getParameter<bool>("runDeepDoubleXTagVariables");
Expand Down Expand Up @@ -2731,7 +2733,7 @@ void BTagAnalyzerT<IPTI,VTX>::processJets(const edm::Handle<PatJetCollection>& j
float DeepFlavourPrunedC = -10.;
float DeepFlavourPrunedUDS = -10.;
float DeepFlavourPrunedG = -10.;
if(deepFlavourPrunedJetTags_.size()) {
if(deepFlavourPrunedJetTags_.size() && runPrunedDeepFlavourTaggers_) {
DeepFlavourPrunedB = pjet->bDiscriminator((deepFlavourPrunedJetTags_+":probb" ).c_str());
DeepFlavourPrunedBB = pjet->bDiscriminator((deepFlavourPrunedJetTags_+":probbb" ).c_str());
DeepFlavourPrunedLepB = pjet->bDiscriminator((deepFlavourPrunedJetTags_+":problepb" ).c_str());
Expand All @@ -2747,7 +2749,7 @@ void BTagAnalyzerT<IPTI,VTX>::processJets(const edm::Handle<PatJetCollection>& j
float DeepFlavourPrunedCN = -10.;
float DeepFlavourPrunedUDSN = -10.;
float DeepFlavourPrunedGN = -10.;
if(deepFlavourPrunedNegJetTags_.size()) {
if(deepFlavourPrunedNegJetTags_.size() && runPrunedDeepFlavourTaggers_) {
DeepFlavourPrunedBN = pjet->bDiscriminator((deepFlavourPrunedNegJetTags_+":probb" ).c_str());
DeepFlavourPrunedBBN = pjet->bDiscriminator((deepFlavourPrunedNegJetTags_+":probbb" ).c_str());
DeepFlavourPrunedLepBN = pjet->bDiscriminator((deepFlavourPrunedNegJetTags_+":problepb" ).c_str());
Expand Down
1 change: 1 addition & 0 deletions python/bTagAnalyzerCommon_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
runTagVariablesSubJets = cms.bool(False),
runCSVTagVariables = cms.bool(False),
runCSVTagTrackVariables = cms.bool(False),
runPrunedDeepFlavourTaggers = cms.bool(False),
runDeepFlavourTagVariables = cms.bool(False),
runDeepDoubleXTagVariables = cms.bool(False),
runDeepBoostedJetTagVariables = cms.bool(False),
Expand Down
24 changes: 12 additions & 12 deletions python/variables_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1588,95 +1588,95 @@
mconly = cms.bool(False),
description = cms.string("Jet_DeepFlavourPrunedBDisc"),
requires = cms.vstring("nJet"),
runOptions = cms.vstring(),
runOptions = cms.vstring("runPrunedDeepFlavourTaggers"),
),
cms.PSet(
variable = cms.string("Jet_DeepFlavourPrunedCvsLDisc"),
store = cms.bool(False),
mconly = cms.bool(False),
description = cms.string("Jet_DeepFlavourPrunedCvsLDisc"),
requires = cms.vstring("nJet"),
runOptions = cms.vstring(),
runOptions = cms.vstring("runPrunedDeepFlavourTaggers"),
),
cms.PSet(
variable = cms.string("Jet_DeepFlavourPrunedCvsBDisc"),
store = cms.bool(False),
mconly = cms.bool(False),
description = cms.string("Jet_DeepFlavourPrunedCvsBDisc"),
requires = cms.vstring("nJet"),
runOptions = cms.vstring(),
runOptions = cms.vstring("runPrunedDeepFlavourTaggers"),
),
cms.PSet(
variable = cms.string("Jet_DeepFlavourPrunedB"),
store = cms.bool(False),
mconly = cms.bool(False),
description = cms.string("Jet_DeepFlavourPrunedB"),
requires = cms.vstring("nJet"),
runOptions = cms.vstring(),
runOptions = cms.vstring("runPrunedDeepFlavourTaggers"),
),
cms.PSet(
variable = cms.string("Jet_DeepFlavourPrunedBB"),
store = cms.bool(False),
mconly = cms.bool(False),
description = cms.string("Jet_DeepFlavourPrunedBB"),
requires = cms.vstring("nJet"),
runOptions = cms.vstring(),
runOptions = cms.vstring("runPrunedDeepFlavourTaggers"),
),
cms.PSet(
variable = cms.string("Jet_DeepFlavourPrunedLEPB"),
store = cms.bool(False),
mconly = cms.bool(False),
description = cms.string("Jet_DeepFlavourPrunedLEPB"),
requires = cms.vstring("nJet"),
runOptions = cms.vstring(),
runOptions = cms.vstring("runPrunedDeepFlavourTaggers"),
),
cms.PSet(
variable = cms.string("Jet_DeepFlavourPrunedC"),
store = cms.bool(False),
mconly = cms.bool(False),
description = cms.string("Jet_DeepFlavourPrunedC"),
requires = cms.vstring("nJet"),
runOptions = cms.vstring(),
runOptions = cms.vstring("runPrunedDeepFlavourTaggers"),
),
cms.PSet(
variable = cms.string("Jet_DeepFlavourPrunedUDS"),
store = cms.bool(False),
mconly = cms.bool(False),
description = cms.string("Jet_DeepFlavourPrunedUDS"),
requires = cms.vstring("nJet"),
runOptions = cms.vstring(),
runOptions = cms.vstring("runPrunedDeepFlavourTaggers"),
),
cms.PSet(
variable = cms.string("Jet_DeepFlavourPrunedG"),
store = cms.bool(False),
mconly = cms.bool(False),
description = cms.string("Jet_DeepFlavourPrunedG"),
requires = cms.vstring("nJet"),
runOptions = cms.vstring(),
runOptions = cms.vstring("runPrunedDeepFlavourTaggers"),
),
cms.PSet(
variable = cms.string("Jet_DeepFlavourPrunedBDiscN"),
store = cms.bool(False),
mconly = cms.bool(False),
description = cms.string("Jet_DeepFlavourPrunedBDiscN"),
requires = cms.vstring("nJet"),
runOptions = cms.vstring(),
runOptions = cms.vstring("runPrunedDeepFlavourTaggers"),
),
cms.PSet(
variable = cms.string("Jet_DeepFlavourPrunedCvsLDiscN"),
store = cms.bool(False),
mconly = cms.bool(False),
description = cms.string("Jet_DeepFlavourPrunedCvsLDiscN"),
requires = cms.vstring("nJet"),
runOptions = cms.vstring(),
runOptions = cms.vstring("runPrunedDeepFlavourTaggers"),
),
cms.PSet(
variable = cms.string("Jet_DeepFlavourPrunedCvsBDiscN"),
store = cms.bool(False),
mconly = cms.bool(False),
description = cms.string("Jet_DeepFlavourPrunedCvsBDiscN"),
requires = cms.vstring("nJet"),
runOptions = cms.vstring(),
runOptions = cms.vstring("runPrunedDeepFlavourTaggers"),
),
cms.PSet(
variable = cms.string("Jet_DeepCSVBDisc"),
Expand Down
5 changes: 5 additions & 0 deletions test/runBTagAnalyzer_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,10 @@
VarParsing.multiplicity.singleton,
VarParsing.varType.bool,
'True if you want to run CSV Tagging Track Variables')
options.register('runPrunedDeepFlavourTaggers', False,
VarParsing.multiplicity.singleton,
VarParsing.varType.bool,
'True if you want to run the prunedDeepFlavourTaggers')
options.register('runDeepFlavourTagVariables', False,
VarParsing.multiplicity.singleton,
VarParsing.varType.bool,
Expand Down Expand Up @@ -1557,6 +1561,7 @@
process.btagana.runTagVariables = options.runTagVariables ## True if you want to run TagInfo TaggingVariables
process.btagana.runCSVTagVariables = options.runCSVTagVariables ## True if you want to run CSV TaggingVariables
process.btagana.runCSVTagTrackVariables = options.runCSVTagTrackVariables ## True if you want to run CSV Tagging Track Variables
process.btagana.runPrunedDeepFlavourTaggers = options.runPrunedDeepFlavourTaggers
process.btagana.runDeepFlavourTagVariables = options.runDeepFlavourTagVariables
process.btagana.runDeepDoubleXTagVariables = options.runDeepDoubleXTagVariables
process.btagana.runDeepBoostedJetTagVariables = options.runDeepBoostedJetTagVariables
Expand Down

0 comments on commit 4dcfb7d

Please sign in to comment.