From bf0a4276bba032d6c810ac71f680f6ed1ea388b8 Mon Sep 17 00:00:00 2001 From: Ye Chen Date: Sun, 1 Nov 2015 19:58:32 +0100 Subject: [PATCH 01/66] Create JpsiMuMu_Pt8_forSTEAM_13TeV_TuneCUETP8M1_cfi.py --- ...uMu_Pt8_forSTEAM_13TeV_TuneCUETP8M1_cfi.py | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Configuration/Generator/python/JpsiMuMu_Pt8_forSTEAM_13TeV_TuneCUETP8M1_cfi.py diff --git a/Configuration/Generator/python/JpsiMuMu_Pt8_forSTEAM_13TeV_TuneCUETP8M1_cfi.py b/Configuration/Generator/python/JpsiMuMu_Pt8_forSTEAM_13TeV_TuneCUETP8M1_cfi.py new file mode 100644 index 0000000000000..710707e361f0f --- /dev/null +++ b/Configuration/Generator/python/JpsiMuMu_Pt8_forSTEAM_13TeV_TuneCUETP8M1_cfi.py @@ -0,0 +1,52 @@ +import FWCore.ParameterSet.Config as cms +from Configuration.Generator.Pythia8CommonSettings_cfi import * +from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * + +generator = cms.EDFilter("Pythia8GeneratorFilter", + pythiaPylistVerbosity = cms.untracked.int32(0), + filterEfficiency = cms.untracked.double(0.026), + pythiaHepMCVerbosity = cms.untracked.bool(False), + crossSection = cms.untracked.double(30560000.0), + comEnergy = cms.double(13000.0), + maxEventsToPrint = cms.untracked.int32(0), + PythiaParameters = cms.PSet( + pythia8CommonSettingsBlock, + pythia8CUEP8M1SettingsBlock, + processParameters = cms.vstring( + 'Charmonium:all = on', # Quarkonia, MSEL=61, including feed-down as well + '443:onMode = off', # Turn off J/psi decays + '443:onIfMatch = 13 -13', # just let J/psi -> mu+ mu- + 'PhaseSpace:pTHatMin = 2.' # be aware of this ckin(3) equivalent + ), + parameterSets = cms.vstring('pythia8CommonSettings', + 'pythia8CUEP8M1Settings', + 'processParameters', + ) + ) +) + +# Next two muon filter are derived from muon reconstruction +mumugenfilter = cms.EDFilter("MCParticlePairFilter", + Status = cms.untracked.vint32(1, 1), + MinPt = cms.untracked.vdouble(0.5, 0.5), + MinP = cms.untracked.vdouble(0., 0.), + MaxEta = cms.untracked.vdouble(2.5, 2.5), + MinEta = cms.untracked.vdouble(-2.5, -2.5), + MinInvMass = cms.untracked.double(2.0), + MaxInvMass = cms.untracked.double(4.0), + ParticleCharge = cms.untracked.int32(-1), + ParticleID1 = cms.untracked.vint32(13), + ParticleID2 = cms.untracked.vint32(13) +) + + + +oniafilter = cms.EDFilter("PythiaFilter", + Status = cms.untracked.int32(2), + MaxEta = cms.untracked.double(1000.0), + MinEta = cms.untracked.double(-1000.0), + MinPt = cms.untracked.double(8.0), + ParticleID = cms.untracked.int32(443) +) + +ProductionFilterSequence = cms.Sequence(generator*oniafilter*mumugenfilter) From a295d8ad6cea6ae91382620cd5442514dd5294fc Mon Sep 17 00:00:00 2001 From: Ye Chen Date: Sun, 1 Nov 2015 20:04:37 +0100 Subject: [PATCH 02/66] Rename JpsiMuMu_Pt8_forSTEAM_13TeV_TuneCUETP8M1_cfi.py to JpsiMuMu_Pt-8_forSTEAM_13TeV_TuneCUETP8M1_cfi.py --- ...M1_cfi.py => JpsiMuMu_Pt-8_forSTEAM_13TeV_TuneCUETP8M1_cfi.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Configuration/Generator/python/{JpsiMuMu_Pt8_forSTEAM_13TeV_TuneCUETP8M1_cfi.py => JpsiMuMu_Pt-8_forSTEAM_13TeV_TuneCUETP8M1_cfi.py} (100%) diff --git a/Configuration/Generator/python/JpsiMuMu_Pt8_forSTEAM_13TeV_TuneCUETP8M1_cfi.py b/Configuration/Generator/python/JpsiMuMu_Pt-8_forSTEAM_13TeV_TuneCUETP8M1_cfi.py similarity index 100% rename from Configuration/Generator/python/JpsiMuMu_Pt8_forSTEAM_13TeV_TuneCUETP8M1_cfi.py rename to Configuration/Generator/python/JpsiMuMu_Pt-8_forSTEAM_13TeV_TuneCUETP8M1_cfi.py From 0e71f30634112e7c6d32c4c7b4660bd5795fe5c7 Mon Sep 17 00:00:00 2001 From: Aruna Date: Tue, 3 Nov 2015 13:03:49 +0100 Subject: [PATCH 03/66] adding 13TeV MVA ID --- .../Configuration/python/HPSPFTaus_cff.py | 344 ++++++++++++++++-- .../loadRecoTauTagMVAsFromPrepDB_cfi.py | 115 +++++- .../interface/PFRecoTauClusterVariables.h | 165 +++++++++ .../PFRecoTauDiscriminationByMVAIsolation2.cc | 87 ++++- ...ecoTauDiscriminationByMVAIsolation2_cff.py | 4 +- 5 files changed, 667 insertions(+), 48 deletions(-) create mode 100644 RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h diff --git a/RecoTauTag/Configuration/python/HPSPFTaus_cff.py b/RecoTauTag/Configuration/python/HPSPFTaus_cff.py index 5718fc487c720..10e1c4ea001e5 100644 --- a/RecoTauTag/Configuration/python/HPSPFTaus_cff.py +++ b/RecoTauTag/Configuration/python/HPSPFTaus_cff.py @@ -639,7 +639,7 @@ PFTauTag = cms.InputTag("hpsPFTauProducer"), PFTauPVATag = cms.InputTag("hpsPFTauPrimaryVertexProducer"), PFTauSVATag = cms.InputTag("hpsPFTauSecondaryVertexProducer"), - useFullCalculation = cms.bool(False) + useFullCalculation = cms.bool(True) ) hpsPFTauVertexAndImpactParametersSeq = cms.Sequence( hpsPFTauPrimaryVertexProducer* @@ -703,6 +703,8 @@ srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum'), srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum'), srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum'), + srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalCone'), + srcPFTauFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrection'), verbosity = cms.int32(0) ) hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT = discriminationByIsolationMVA2VLoose.clone( @@ -814,6 +816,241 @@ hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff40") +#Define new Run2 MVA isolations +hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone( + mvaName = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1"), + mvaOpt = cms.string("DBoldDMwLT"), + verbosity = cms.int32(0) +) + +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT = discriminationByIsolationMVA2VLoose.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw.clone( + mvaName = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1"), + mvaOpt = cms.string("DBnewDMwLT"), + verbosity = cms.int32(0) +) + +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone( + mvaName = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1"), + mvaOpt = cms.string("PWoldDMwLT"), + srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeight'), + verbosity = cms.int32(0) +) + +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw.clone( + mvaName = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1"), + mvaOpt = cms.string("PWnewDMwLT"), + verbosity = cms.int32(0) +) + +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff40") + +hpsPFTauChargedIsoPtSumdR03 = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + ApplyDiscriminationByECALIsolation = cms.bool(False), + ApplyDiscriminationByTrackerIsolation = cms.bool(True), + applySumPtCut = cms.bool(False), + applyDeltaBetaCorrection = cms.bool(False), + storeRawSumPt = cms.bool(True), + storeRawPUsumPt = cms.bool(False), + customOuterCone = cms.double(0.3), + isoConeSizeForDeltaBeta = cms.double(0.8), + verbosity = cms.int32(0) +) +hpsPFTauNeutralIsoPtSumdR03 = hpsPFTauChargedIsoPtSumdR03.clone( + ApplyDiscriminationByECALIsolation = cms.bool(True), + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + verbosity = cms.int32(0) +) +hpsPFTauPUcorrPtSumdR03 = hpsPFTauChargedIsoPtSumdR03.clone( + ApplyDiscriminationByECALIsolation = cms.bool(False), + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + applyDeltaBetaCorrection = cms.bool(True), + storeRawSumPt = cms.bool(False), + storeRawPUsumPt = cms.bool(True), + verbosity = cms.int32(0) +) +hpsPFTauNeutralIsoPtSumWeightdR03 = hpsPFTauChargedIsoPtSumdR03.clone( + ApplyDiscriminationByWeightedECALIsolation = cms.bool(True), + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + UseAllPFCandsForWeights = cms.bool(True), + verbosity = cms.int32(0) +) +hpsPFTauFootprintCorrectiondR03 = hpsPFTauChargedIsoPtSumdR03.clone( + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + storeRawSumPt = cms.bool(False), + storeRawFootprintCorrection = cms.bool(True), + verbosity = cms.int32(0) +) +hpsPFTauPhotonPtSumOutsideSignalConedR03 = hpsPFTauChargedIsoPtSumdR03.clone( + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + storeRawSumPt = cms.bool(False), + storeRawPhotonSumPt_outsideSignalCone = cms.bool(True), + verbosity = cms.int32(0) +) + +hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone( + mvaName = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1"), + mvaOpt = cms.string("DBoldDMwLT"), + srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSumdR03'), + srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumdR03'), + srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSumdR03'), + srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalConedR03'), + srcPFTauFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrectiondR03'), + verbosity = cms.int32(0) +) +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT = discriminationByIsolationMVA2VLoose.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw.clone( + mvaName = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1"), + mvaOpt = cms.string("PWoldDMwLT"), + srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeightdR03'), + verbosity = cms.int32(0) +) +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff40") + hpsPFTauMVAIsolation2Seq = cms.Sequence( hpsPFTauChargedIsoPtSum + hpsPFTauNeutralIsoPtSum @@ -821,34 +1058,83 @@ + hpsPFTauNeutralIsoPtSumWeight + hpsPFTauFootprintCorrection + hpsPFTauPhotonPtSumOutsideSignalCone - + hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT - + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT - + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT - + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT - + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT - + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT - + hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT - + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT - + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT - + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT - + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT - + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT - + hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT - + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT - + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT - + hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT - + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT - + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT - + hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT - + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT - + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT - + hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT - + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT - + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT + #+ hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw + #+ hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT + #+ hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT + #+ hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT + #+ hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT + #+ hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT + #+ hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT + #+ hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw + #+ hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT + #+ hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT + #+ hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT + #+ hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT + #+ hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT + #+ hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT + #+ hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw + #+ hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT + #+ hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT + #+ hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT + #+ hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT + #+ hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT + #+ hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT + #+ hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw + #+ hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT + #+ hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT + #+ hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT + #+ hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT + #+ hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT + #+ hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT + # new MVA isolations for Run2 + + hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT + + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT + + hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT + + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT + + hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT + + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT + + hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT + + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT + + hpsPFTauChargedIsoPtSumdR03 + + hpsPFTauNeutralIsoPtSumdR03 + + hpsPFTauPUcorrPtSumdR03 + + hpsPFTauNeutralIsoPtSumWeightdR03 + + hpsPFTauFootprintCorrectiondR03 + + hpsPFTauPhotonPtSumOutsideSignalConedR03 + + hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT + + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT + + hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT + + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT ) produceHPSPFTaus = cms.Sequence( diff --git a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py index 345f6b8798c4d..27b9bc7736a2d 100644 --- a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py +++ b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py @@ -1,5 +1,3 @@ -import socket - '''Helper procedure that loads mva inputs from database''' from CondCore.DBCommon.CondDBSetup_cfi import * @@ -9,11 +7,17 @@ toGet = cms.VPSet(), # connect = cms.string("frontier://FrontierPrep/CMS_COND_PHYSICSTOOLS") # prep database connect = cms.string('frontier://FrontierProd/CMS_COND_PAT_000') # prod database - #connect = cms.string('sqlite_file:/home/dqmdevlocal/CMSSW_7_4_2_official/src/DQM/Integration/python/test/RecoTauTag_MVAs_2014Jul07.db') + #'sqlite_file:/afs/cern.ch/user/j/jez/public/tauID/RecoTauTag_MVAs_2014Oct22.db') ) -if socket.getfqdn().find('.cms') != -1: - loadRecoTauTagMVAsFromPrepDB.connect = cms.string('frontier://(proxyurl=http://localhost:3128)(serverurl=http://localhost:8000/FrontierOnProd)(serverurl=http://localhost:8000/FrontierOnProd)(retrieve-ziplevel=0)(failovertoserver=no)/CMS_COND_PAT_000') +loadRecoTauTagMVAsFromPrepDB2 = cms.ESSource("PoolDBESSource", + CondDBSetup, + DumpStat = cms.untracked.bool(False), + toGet = cms.VPSet(), + # connect = cms.string("frontier://FrontierPrep/CMS_COND_PHYSICSTOOLS") # prep database + connect = cms.string('frontier://FrontierProd/CMS_COND_PAT_000') # prod database + #connect = cms.string('sqlite_file:RecoTauTag/Configuration/data/RecoTauTag_MVAs_2015Oct21.db') +) # register tau ID (= isolation) discriminator MVA tauIdDiscrMVA_trainings = { @@ -22,6 +26,14 @@ 'tauIdMVAnewDMwoLT' : "tauIdMVAnewDMwoLT", 'tauIdMVAnewDMwLT' : "tauIdMVAnewDMwLT" } +tauIdDiscrMVA_trainings_run2 = { + 'tauIdMVADBoldDMwLT' : "tauIdMVADBoldDMwLT", + 'tauIdMVADBnewDMwLT' : "tauIdMVADBnewDMwLT", + 'tauIdMVAPWoldDMwLT' : "tauIdMVAPWoldDMwLT", + 'tauIdMVAPWnewDMwLT' : "tauIdMVAPWnewDMwLT", + 'tauIdMVADBdR03oldDMwLT' : "tauIdMVADBdR03oldDMwLT", + 'tauIdMVAPWdR03oldDMwLT' : "tauIdMVAPWdR03oldDMwLT" +} tauIdDiscrMVA_WPs = { 'tauIdMVAoldDMwoLT' : { 'Eff90' : "oldDMwoLTEff90", @@ -56,30 +68,111 @@ 'Eff40' : "newDMwLTEff40" } } +tauIdDiscrMVA_WPs_run2 = { + 'tauIdMVADBoldDMwLT' : { + 'Eff90' : "DBoldDMwLTEff90", + 'Eff80' : "DBoldDMwLTEff80", + 'Eff70' : "DBoldDMwLTEff70", + 'Eff60' : "DBoldDMwLTEff60", + 'Eff50' : "DBoldDMwLTEff50", + 'Eff40' : "DBoldDMwLTEff40" + }, + 'tauIdMVADBnewDMwLT' : { + 'Eff90' : "DBnewDMwLTEff90", + 'Eff80' : "DBnewDMwLTEff80", + 'Eff70' : "DBnewDMwLTEff70", + 'Eff60' : "DBnewDMwLTEff60", + 'Eff50' : "DBnewDMwLTEff50", + 'Eff40' : "DBnewDMwLTEff40" + }, + 'tauIdMVAPWoldDMwLT' : { + 'Eff90' : "PWoldDMwLTEff90", + 'Eff80' : "PWoldDMwLTEff80", + 'Eff70' : "PWoldDMwLTEff70", + 'Eff60' : "PWoldDMwLTEff60", + 'Eff50' : "PWoldDMwLTEff50", + 'Eff40' : "PWoldDMwLTEff40" + }, + 'tauIdMVAPWnewDMwLT' : { + 'Eff90' : "PWnewDMwLTEff90", + 'Eff80' : "PWnewDMwLTEff80", + 'Eff70' : "PWnewDMwLTEff70", + 'Eff60' : "PWnewDMwLTEff60", + 'Eff50' : "PWnewDMwLTEff50", + 'Eff40' : "PWnewDMwLTEff40" + }, + 'tauIdMVADBdR03oldDMwLT' : { + 'Eff90' : "DBdR03oldDMwLTEff90", + 'Eff80' : "DBdR03oldDMwLTEff80", + 'Eff70' : "DBdR03oldDMwLTEff70", + 'Eff60' : "DBdR03oldDMwLTEff60", + 'Eff50' : "DBdR03oldDMwLTEff50", + 'Eff40' : "DBdR03oldDMwLTEff40" + }, + 'tauIdMVAPWdR03oldDMwLT' : { + 'Eff90' : "PWdR03oldDMwLTEff90", + 'Eff80' : "PWdR03oldDMwLTEff80", + 'Eff70' : "PWdR03oldDMwLTEff70", + 'Eff60' : "PWdR03oldDMwLTEff60", + 'Eff50' : "PWdR03oldDMwLTEff50", + 'Eff40' : "PWdR03oldDMwLTEff40" + } +} tauIdDiscrMVA_mvaOutput_normalizations = { 'tauIdMVAoldDMwoLT' : "mvaOutput_normalization_oldDMwoLT", 'tauIdMVAoldDMwLT' : "mvaOutput_normalization_oldDMwLT", 'tauIdMVAnewDMwoLT' : "mvaOutput_normalization_newDMwoLT", - 'tauIdMVAnewDMwLT' : "mvaOutput_normalization_newDMwLT" + 'tauIdMVAnewDMwLT' : "mvaOutput_normalization_newDMwLT" +} +tauIdDiscrMVA_mvaOutput_normalizations_run2 = { + 'tauIdMVADBoldDMwLT' : "mvaOutput_normalization_DBoldDMwLT", + 'tauIdMVADBnewDMwLT' : "mvaOutput_normalization_DBnewDMwLT", + 'tauIdMVAPWoldDMwLT' : "mvaOutput_normalization_PWoldDMwLT", + 'tauIdMVAPWnewDMwLT' : "mvaOutput_normalization_PWnewDMwLT", + 'tauIdMVADBdR03oldDMwLT' : "mvaOutput_normalization_DBdR03oldDMwLT", + 'tauIdMVAPWdR03oldDMwLT' : "mvaOutput_normalization_PWdR03oldDMwLT" } tauIdDiscrMVA_version = "v1" -for training, gbrForestName in tauIdDiscrMVA_trainings.items(): - loadRecoTauTagMVAsFromPrepDB.toGet.append( +#for training, gbrForestName in tauIdDiscrMVA_trainings.items(): +# loadRecoTauTagMVAsFromPrepDB.toGet.append( +# cms.PSet( +# record = cms.string('GBRWrapperRcd'), +# tag = cms.string("RecoTauTag_%s%s" % (gbrForestName, tauIdDiscrMVA_version)), +# label = cms.untracked.string("RecoTauTag_%s%s" % (gbrForestName, tauIdDiscrMVA_version)) +# ) +# ) +# for WP in tauIdDiscrMVA_WPs[training].keys(): +# loadRecoTauTagMVAsFromPrepDB.toGet.append( +# cms.PSet( +# record = cms.string('PhysicsTGraphPayloadRcd'), +# tag = cms.string("RecoTauTag_%s%s_WP%s" % (gbrForestName, tauIdDiscrMVA_version, WP)), +# label = cms.untracked.string("RecoTauTag_%s%s_WP%s" % (gbrForestName, tauIdDiscrMVA_version, WP)) +# ) +# ) +# loadRecoTauTagMVAsFromPrepDB.toGet.append( +# cms.PSet( +# record = cms.string('PhysicsTFormulaPayloadRcd'), +# tag = cms.string("RecoTauTag_%s%s_mvaOutput_normalization" % (gbrForestName, tauIdDiscrMVA_version)), +# label = cms.untracked.string("RecoTauTag_%s%s_mvaOutput_normalization" % (gbrForestName, tauIdDiscrMVA_version)) +# ) +# ) +for training, gbrForestName in tauIdDiscrMVA_trainings_run2.items(): + loadRecoTauTagMVAsFromPrepDB2.toGet.append( cms.PSet( record = cms.string('GBRWrapperRcd'), tag = cms.string("RecoTauTag_%s%s" % (gbrForestName, tauIdDiscrMVA_version)), label = cms.untracked.string("RecoTauTag_%s%s" % (gbrForestName, tauIdDiscrMVA_version)) ) ) - for WP in tauIdDiscrMVA_WPs[training].keys(): - loadRecoTauTagMVAsFromPrepDB.toGet.append( + for WP in tauIdDiscrMVA_WPs_run2[training].keys(): + loadRecoTauTagMVAsFromPrepDB2.toGet.append( cms.PSet( record = cms.string('PhysicsTGraphPayloadRcd'), tag = cms.string("RecoTauTag_%s%s_WP%s" % (gbrForestName, tauIdDiscrMVA_version, WP)), label = cms.untracked.string("RecoTauTag_%s%s_WP%s" % (gbrForestName, tauIdDiscrMVA_version, WP)) ) ) - loadRecoTauTagMVAsFromPrepDB.toGet.append( + loadRecoTauTagMVAsFromPrepDB2.toGet.append( cms.PSet( record = cms.string('PhysicsTFormulaPayloadRcd'), tag = cms.string("RecoTauTag_%s%s_mvaOutput_normalization" % (gbrForestName, tauIdDiscrMVA_version)), diff --git a/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h b/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h new file mode 100644 index 0000000000000..4b3f44a881240 --- /dev/null +++ b/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h @@ -0,0 +1,165 @@ + +/** \class PFRecoTauClusterVariables + * + * Cluster variables to be used in MVA tau ID + * + * \author Aruna Nayak, DESY + * + */ + +#include "DataFormats/Candidate/interface/Candidate.h" +#include "DataFormats/TauReco/interface/PFTau.h" +#include "DataFormats/TauReco/interface/PFTauFwd.h" +#include "DataFormats/Math/interface/deltaR.h" +#include + +using namespace reco; + +namespace +{ + + const std::vector& getPFGammas(const reco::PFTau& tau, bool signal = true) { + if (signal) + return tau.signalPFGammaCands(); + return tau.isolationPFGammaCands(); + } + + bool isInside(float photon_pt, float deta, float dphi){ + + if(photon_pt==0){return false;} + + if( + (dphi < TMath::Min(0.3, TMath::Max(0.05, 0.352476*TMath::Power(photon_pt, -0.707716)))) && \ + (deta < TMath::Min(0.15, TMath::Max(0.05, 0.197077*TMath::Power(photon_pt, -0.658701)))) + ){ + return true; + } + + return false; + + } + + float tau_leadTrackChi2(const reco::PFTau& tau){ + + // leading charged hadron PFCand in signal cone + + Float_t LeadingTracknormalizedChi2 = 0; + + const reco::PFCandidatePtr& leadingPFCharged = tau.leadPFChargedHadrCand() ; + if ( leadingPFCharged.isNonnull() ) { + reco::TrackRef tref = leadingPFCharged -> trackRef(); + if ( tref.isNonnull() ) { + LeadingTracknormalizedChi2 = (float)(tref -> normalizedChi2()); + } + } + + return LeadingTracknormalizedChi2; + } + + float tau_Eratio(const reco::PFTau& tau){ + + std::vector constsignal = tau.signalPFCands(); + Float_t EcalEnInSignalPFCands = 0; + Float_t HcalEnInSignalPFCands = 0; + + typedef std::vector ::iterator constituents_iterator; + for(constituents_iterator it=constsignal.begin(); it != constsignal.end(); ++it) { + reco::PFCandidatePtr & icand = *it; + EcalEnInSignalPFCands += icand -> ecalEnergy(); + HcalEnInSignalPFCands += icand -> hcalEnergy(); + } + + Float_t total = EcalEnInSignalPFCands + HcalEnInSignalPFCands; + if(total==0) return -1; + else return EcalEnInSignalPFCands/total; + } + + float pt_weighted_dx(const reco::PFTau& tau, int mode = 0, int var = 0, int decaymode = -1){ + + float sum_pt = 0.; + float sum_dx_pt = 0.; + float signalrad = std::max(0.05, std::min(0.1, 3./tau.pt())); + int is3prong = (decaymode==10); + + auto& cands = getPFGammas(tau, mode < 2); + + for (auto& cand : cands) { + // only look at electrons/photons with pT > 0.5 + if (cand->pt() < 0.5) + continue; + + float dr = reco::deltaR(*cand, tau); + float deta = std::abs(cand->eta() - tau.eta()); + float dphi = std::abs(reco::deltaPhi(cand->phi(), tau.phi())); + float pt = cand->pt(); + + bool flag = isInside(pt, deta, dphi); + + if(is3prong==0){ + if (mode == 2 || (mode == 0 && dr < signalrad) || (mode == 1 && dr > signalrad)) { + sum_pt += pt; + if (var == 0) + sum_dx_pt += pt * dr; + else if (var == 1) + sum_dx_pt += pt * deta; + else if (var == 2) + sum_dx_pt += pt * dphi; + } + }else if(is3prong==1){ + + if( (mode==2 && flag==false) || (mode==1 && flag==true) || mode==0){ + sum_pt += pt; + + if (var == 0) + sum_dx_pt += pt * dr; + else if (var == 1) + sum_dx_pt += pt * deta; + else if (var == 2) + sum_dx_pt += pt * dphi; + } + } + } + + if (sum_pt > 0.) + return sum_dx_pt/sum_pt; + return 0.; + } + + float tau_pt_weighted_dr_signal(const reco::PFTau& tau, int dm) { + return pt_weighted_dx(tau, 0, 0, dm); + } + + float tau_pt_weighted_deta_strip(const reco::PFTau& tau, int dm) { + if(dm==10){ + return pt_weighted_dx(tau, 2, 1, dm); + }else{ + return pt_weighted_dx(tau, 1, 1, dm); + } + } + + float tau_pt_weighted_dphi_strip(const reco::PFTau& tau, int dm) { + if(dm==10){ + return pt_weighted_dx(tau, 2, 2, dm); + }else{ + return pt_weighted_dx(tau, 1, 2, dm); + } + } + + float tau_pt_weighted_dr_iso(const reco::PFTau& tau, int dm) { + return pt_weighted_dx(tau, 2, 0, dm); + } + + unsigned int tau_n_photons_total(const reco::PFTau& tau) { + unsigned int n_photons = 0; + for (auto& cand : tau.signalPFGammaCands()) { + if (cand->pt() > 0.5) + ++n_photons; + } + for (auto& cand : tau.isolationPFGammaCands()) { + if (cand->pt() > 0.5) + ++n_photons; + } + return n_photons; + } + +} diff --git a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolation2.cc b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolation2.cc index 50957f0a827fc..133d5a5d9f1f8 100644 --- a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolation2.cc +++ b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolation2.cc @@ -23,6 +23,7 @@ #include "DataFormats/TauReco/interface/PFTauDiscriminator.h" #include "DataFormats/TauReco/interface/PFTauTransverseImpactParameterAssociation.h" #include "DataFormats/Math/interface/deltaR.h" +#include "RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h" #include "CondFormats/EgammaObjects/interface/GBRForest.h" #include "CondFormats/DataRecord/interface/GBRWrapperRcd.h" @@ -84,11 +85,17 @@ class PFRecoTauDiscriminationByIsolationMVA2 : public PFTauDiscriminationProduce else if ( mvaOpt_string == "oldDMwLT" ) mvaOpt_ = kOldDMwLT; else if ( mvaOpt_string == "newDMwoLT" ) mvaOpt_ = kNewDMwoLT; else if ( mvaOpt_string == "newDMwLT" ) mvaOpt_ = kNewDMwLT; + else if ( mvaOpt_string == "DBoldDMwLT" ) mvaOpt_ = kDBoldDMwLT; + else if ( mvaOpt_string == "DBnewDMwLT" ) mvaOpt_ = kDBnewDMwLT; + else if ( mvaOpt_string == "PWoldDMwLT" ) mvaOpt_ = kPWoldDMwLT; + else if ( mvaOpt_string == "PWnewDMwLT" ) mvaOpt_ = kPWnewDMwLT; else throw cms::Exception("PFRecoTauDiscriminationByIsolationMVA2") << " Invalid Configuration Parameter 'mvaOpt' = " << mvaOpt_string << " !!\n"; if ( mvaOpt_ == kOldDMwoLT || mvaOpt_ == kNewDMwoLT ) mvaInput_ = new float[6]; else if ( mvaOpt_ == kOldDMwLT || mvaOpt_ == kNewDMwLT ) mvaInput_ = new float[12]; + else if ( mvaOpt_ == kDBoldDMwLT || mvaOpt_ == kDBnewDMwLT || + mvaOpt_ == kPWoldDMwLT || mvaOpt_ == kPWnewDMwLT) mvaInput_ = new float[23]; else assert(0); TauTransverseImpactParameters_token = consumes(cfg.getParameter("srcTauTransverseImpactParameters")); @@ -96,6 +103,8 @@ class PFRecoTauDiscriminationByIsolationMVA2 : public PFTauDiscriminationProduce ChargedIsoPtSum_token = consumes(cfg.getParameter("srcChargedIsoPtSum")); NeutralIsoPtSum_token = consumes(cfg.getParameter("srcNeutralIsoPtSum")); PUcorrPtSum_token = consumes(cfg.getParameter("srcPUcorrPtSum")); + PhotonPtSumOutsideSignalCone_token = consumes(cfg.getParameter("srcPhotonPtSumOutsideSignalCone")); + FootprintCorrection_token = consumes(cfg.getParameter("srcPFTauFootprintCorrection")); verbosity_ = ( cfg.exists("verbosity") ) ? cfg.getParameter("verbosity") : 0; @@ -127,10 +136,10 @@ class PFRecoTauDiscriminationByIsolationMVA2 : public PFTauDiscriminationProduce bool loadMVAfromDB_; edm::FileInPath inputFileName_; const GBRForest* mvaReader_; - enum { kOldDMwoLT, kOldDMwLT, kNewDMwoLT, kNewDMwLT }; + enum { kOldDMwoLT, kOldDMwLT, kNewDMwoLT, kNewDMwLT, kDBoldDMwLT, kDBnewDMwLT, kPWoldDMwLT, kPWnewDMwLT }; int mvaOpt_; float* mvaInput_; - + typedef edm::AssociationVector > PFTauTIPAssociationByRef; edm::EDGetTokenT TauTransverseImpactParameters_token; edm::Handle tauLifetimeInfos; @@ -141,6 +150,10 @@ class PFRecoTauDiscriminationByIsolationMVA2 : public PFTauDiscriminationProduce edm::Handle neutralIsoPtSums_; edm::EDGetTokenT PUcorrPtSum_token; edm::Handle puCorrPtSums_; + edm::EDGetTokenT PhotonPtSumOutsideSignalCone_token; + edm::Handle photonPtSumOutsideSignalCone_; + edm::EDGetTokenT FootprintCorrection_token; + edm::Handle footprintCorrection_; edm::Handle taus_; std::auto_ptr category_output_; @@ -165,7 +178,9 @@ void PFRecoTauDiscriminationByIsolationMVA2::beginEvent(const edm::Event& evt, c evt.getByToken(ChargedIsoPtSum_token, chargedIsoPtSums_); evt.getByToken(NeutralIsoPtSum_token, neutralIsoPtSums_); evt.getByToken(PUcorrPtSum_token, puCorrPtSums_); - + evt.getByToken(PhotonPtSumOutsideSignalCone_token, photonPtSumOutsideSignalCone_); + evt.getByToken(FootprintCorrection_token, footprintCorrection_); + evt.getByToken(Tau_token, taus_); category_output_.reset(new PFTauDiscriminator(TauRefProd(taus_))); } @@ -181,12 +196,14 @@ double PFRecoTauDiscriminationByIsolationMVA2::discriminate(const PFTauRef& tau) int tauDecayMode = tau->decayMode(); - if ( ((mvaOpt_ == kOldDMwoLT || mvaOpt_ == kOldDMwLT) && (tauDecayMode == 0 || tauDecayMode == 1 || tauDecayMode == 2 || tauDecayMode == 10)) || - ((mvaOpt_ == kNewDMwoLT || mvaOpt_ == kNewDMwLT) && (tauDecayMode == 0 || tauDecayMode == 1 || tauDecayMode == 2 || tauDecayMode == 5 || tauDecayMode == 6 || tauDecayMode == 10)) ) { + if ( ((mvaOpt_ == kOldDMwoLT || mvaOpt_ == kOldDMwLT || mvaOpt_ == kDBoldDMwLT || mvaOpt_ == kPWoldDMwLT) && (tauDecayMode == 0 || tauDecayMode == 1 || tauDecayMode == 2 || tauDecayMode == 10)) || + ((mvaOpt_ == kNewDMwoLT || mvaOpt_ == kNewDMwLT || mvaOpt_ == kDBnewDMwLT || mvaOpt_ == kPWnewDMwLT) && (tauDecayMode == 0 || tauDecayMode == 1 || tauDecayMode == 2 || tauDecayMode == 5 || tauDecayMode == 6 || tauDecayMode == 10)) ) { double chargedIsoPtSum = (*chargedIsoPtSums_)[tau]; double neutralIsoPtSum = (*neutralIsoPtSums_)[tau]; double puCorrPtSum = (*puCorrPtSums_)[tau]; + double photonPtSumOutsideSignalCone = (*photonPtSumOutsideSignalCone_)[tau]; + double footprintCorrection = (*footprintCorrection_)[tau]; const reco::PFTauTransverseImpactParameter& tauLifetimeInfo = *(*tauLifetimeInfos)[tau]; @@ -194,7 +211,15 @@ double PFRecoTauDiscriminationByIsolationMVA2::discriminate(const PFTauRef& tau) double decayDistY = tauLifetimeInfo.flightLength().y(); double decayDistZ = tauLifetimeInfo.flightLength().z(); double decayDistMag = TMath::Sqrt(decayDistX*decayDistX + decayDistY*decayDistY + decayDistZ*decayDistZ); - + + float nPhoton = tau_n_photons_total(*tau); + double ptWeightedDetaStrip = tau_pt_weighted_deta_strip(*tau, tauDecayMode); + double ptWeightedDphiStrip = tau_pt_weighted_dphi_strip(*tau, tauDecayMode); + double ptWeightedDrSignal = tau_pt_weighted_dr_signal(*tau, tauDecayMode); + double ptWeightedDrIsolation = tau_pt_weighted_dr_iso(*tau, tauDecayMode); + double leadingTrackChi2 = tau_leadTrackChi2(*tau); + double eRatio = tau_Eratio(*tau); + if ( mvaOpt_ == kOldDMwoLT || mvaOpt_ == kNewDMwoLT ) { mvaInput_[0] = TMath::Log(TMath::Max(1., Double_t(tau->pt()))); mvaInput_[1] = TMath::Abs(tau->eta()); @@ -215,8 +240,56 @@ double PFRecoTauDiscriminationByIsolationMVA2::discriminate(const PFTauRef& tau) mvaInput_[9] = ( tauLifetimeInfo.hasSecondaryVertex() ) ? 1. : 0.; mvaInput_[10] = TMath::Sqrt(decayDistMag); mvaInput_[11] = TMath::Min(10., tauLifetimeInfo.flightLengthSig()); + } else if ( mvaOpt_ == kDBoldDMwLT || mvaOpt_ == kDBnewDMwLT ) { + mvaInput_[0] = TMath::Log(TMath::Max(1., Double_t(tau->pt()))); + mvaInput_[1] = TMath::Abs(tau->eta()); + mvaInput_[2] = TMath::Log(TMath::Max(1.e-2, chargedIsoPtSum)); + mvaInput_[3] = TMath::Log(TMath::Max(1.e-2, neutralIsoPtSum)); + mvaInput_[4] = TMath::Log(TMath::Max(1.e-2, puCorrPtSum)); + mvaInput_[5] = TMath::Log(TMath::Max(1.e-2, photonPtSumOutsideSignalCone)); + mvaInput_[6] = tauDecayMode; + mvaInput_[7] = TMath::Min(30., nPhoton); + mvaInput_[8] = TMath::Min(0.5, ptWeightedDetaStrip); + mvaInput_[9] = TMath::Min(0.5, ptWeightedDphiStrip); + mvaInput_[10] = TMath::Min(0.5, ptWeightedDrSignal); + mvaInput_[11] = TMath::Min(0.5, ptWeightedDrIsolation); + mvaInput_[12] = TMath::Min(100., leadingTrackChi2); + mvaInput_[13] = TMath::Min(1., eRatio); + mvaInput_[14] = TMath::Sign(+1., tauLifetimeInfo.dxy()); + mvaInput_[15] = TMath::Sqrt(TMath::Abs(TMath::Min(1., TMath::Abs(tauLifetimeInfo.dxy())))); + mvaInput_[16] = TMath::Min(10., TMath::Abs(tauLifetimeInfo.dxy_Sig())); + mvaInput_[17] = TMath::Sign(+1., tauLifetimeInfo.ip3d()); + mvaInput_[18] = TMath::Sqrt(TMath::Abs(TMath::Min(1., TMath::Abs(tauLifetimeInfo.ip3d())))); + mvaInput_[19] = TMath::Min(10., TMath::Abs(tauLifetimeInfo.ip3d_Sig())); + mvaInput_[20] = ( tauLifetimeInfo.hasSecondaryVertex() ) ? 1. : 0.; + mvaInput_[21] = TMath::Sqrt(decayDistMag); + mvaInput_[22] = TMath::Min(10., tauLifetimeInfo.flightLengthSig()); + } else if ( mvaOpt_ == kPWoldDMwLT || mvaOpt_ == kPWnewDMwLT ) { + mvaInput_[0] = TMath::Log(TMath::Max(1., Double_t(tau->pt()))); + mvaInput_[1] = TMath::Abs(tau->eta()); + mvaInput_[2] = TMath::Log(TMath::Max(1.e-2, chargedIsoPtSum)); + mvaInput_[3] = TMath::Log(TMath::Max(1.e-2, neutralIsoPtSum)); + mvaInput_[4] = TMath::Log(TMath::Max(1.e-2, footprintCorrection)); + mvaInput_[5] = TMath::Log(TMath::Max(1.e-2, photonPtSumOutsideSignalCone)); + mvaInput_[6] = tauDecayMode; + mvaInput_[7] = TMath::Min(30., nPhoton); + mvaInput_[8] = TMath::Min(0.5, ptWeightedDetaStrip); + mvaInput_[9] = TMath::Min(0.5, ptWeightedDphiStrip); + mvaInput_[10] = TMath::Min(0.5, ptWeightedDrSignal); + mvaInput_[11] = TMath::Min(0.5, ptWeightedDrIsolation); + mvaInput_[12] = TMath::Min(100., leadingTrackChi2); + mvaInput_[13] = TMath::Min(1., eRatio); + mvaInput_[14] = TMath::Sign(+1., tauLifetimeInfo.dxy()); + mvaInput_[15] = TMath::Sqrt(TMath::Abs(TMath::Min(1., TMath::Abs(tauLifetimeInfo.dxy())))); + mvaInput_[16] = TMath::Min(10., TMath::Abs(tauLifetimeInfo.dxy_Sig())); + mvaInput_[17] = TMath::Sign(+1., tauLifetimeInfo.ip3d()); + mvaInput_[18] = TMath::Sqrt(TMath::Abs(TMath::Min(1., TMath::Abs(tauLifetimeInfo.ip3d())))); + mvaInput_[19] = TMath::Min(10., TMath::Abs(tauLifetimeInfo.ip3d_Sig())); + mvaInput_[20] = ( tauLifetimeInfo.hasSecondaryVertex() ) ? 1. : 0.; + mvaInput_[21] = TMath::Sqrt(decayDistMag); + mvaInput_[22] = TMath::Min(10., tauLifetimeInfo.flightLengthSig()); } - + double mvaValue = mvaReader_->GetClassifier(mvaInput_); if ( verbosity_ ) { edm::LogPrint("PFTauDiscByMVAIsol2") << ":"; diff --git a/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolation2_cff.py b/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolation2_cff.py index fb2aaecb3e0c8..884e63d205666 100644 --- a/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolation2_cff.py +++ b/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolation2_cff.py @@ -61,7 +61,9 @@ srcChargedIsoPtSum = cms.InputTag('chargedIsoPtSum'), srcNeutralIsoPtSum = cms.InputTag('neutralIsoPtSum'), - srcPUcorrPtSum = cms.InputTag('puCorrPtSum') + srcPUcorrPtSum = cms.InputTag('puCorrPtSum'), + srcPhotonPtSumOutsideSignalCone = cms.InputTag('photonPtSumOutsideSignalCone'), + srcFootprintCorrection = cms.InputTag('footprintCorrection') ) discriminationByIsolationMVA2VLoose = recoTauDiscriminantCutMultiplexer.clone( From 66d0088c40fe4dad7c949223f225e164c6890eca Mon Sep 17 00:00:00 2001 From: Aruna Date: Tue, 3 Nov 2015 14:01:01 +0100 Subject: [PATCH 04/66] adding 13TeV MVA ID --- .../python/producersLayer1/tauProducer_cfi.py | 106 ++++++++++++++--- .../PatAlgos/python/tools/tauTools.py | 110 +++++++++++++----- 2 files changed, 172 insertions(+), 44 deletions(-) diff --git a/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py b/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py index 8f5e1854a3286..c13a2d65ead63 100644 --- a/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py +++ b/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py @@ -64,6 +64,7 @@ # you can comment out those you don't want to save some # disk space decayModeFinding = cms.InputTag("hpsPFTauDiscriminationByDecayModeFinding"), + decayModeFindingOldDMs = cms.InputTag("hpsPFTauDiscriminationByDecayModeFindingOldDMs"), decayModeFindingNewDMs =cms.InputTag("hpsPFTauDiscriminationByDecayModeFindingNewDMs"), chargedIsoPtSum = cms.InputTag("hpsPFTauChargedIsoPtSum"), neutralIsoPtSum = cms.InputTag("hpsPFTauNeutralIsoPtSum"), @@ -71,22 +72,98 @@ neutralIsoPtSumWeight = cms.InputTag("hpsPFTauNeutralIsoPtSumWeight"), footprintCorrection = cms.InputTag("hpsPFTauFootprintCorrection"), photonPtSumOutsideSignalCone = cms.InputTag("hpsPFTauPhotonPtSumOutsideSignalCone"), - byIsolationMVA3oldDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw'), - byVLooseIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT'), - byLooseIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT'), - byMediumIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT'), - byTightIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT'), - byVTightIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT'), - byVVTightIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT'), - byIsolationMVA3newDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw'), - byVLooseIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT'), - byLooseIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT'), - byMediumIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT'), - byTightIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT'), - byVTightIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT'), - byVVTightIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT'), + ####byIsolationMVA3oldDMwoLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw'), + ####byVLooseIsolationMVA3oldDMwoLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT'), + ####byLooseIsolationMVA3oldDMwoLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT'), + ####byMediumIsolationMVA3oldDMwoLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT'), + ####byTightIsolationMVA3oldDMwoLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT'), + ####byVTightIsolationMVA3oldDMwoLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT'), + ####byVVTightIsolationMVA3oldDMwoLT = cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT'), + ##byIsolationMVA3oldDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw'), + ##byVLooseIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT'), + ##byLooseIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT'), + ##byMediumIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT'), + ##byTightIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT'), + ##byVTightIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT'), + ##byVVTightIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT'), + ####byIsolationMVA3newDMwoLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw'), + ####byVLooseIsolationMVA3newDMwoLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT'), + ####byLooseIsolationMVA3newDMwoLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT'), + ####byMediumIsolationMVA3newDMwoLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT'), + ####byTightIsolationMVA3newDMwoLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT'), + ####byVTightIsolationMVA3newDMwoLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT'), + ####byVVTightIsolationMVA3newDMwoLT = cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT'), + ##byIsolationMVA3newDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw'), + ##byVLooseIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT'), + ##byLooseIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT'), + ##byMediumIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT'), + ##byTightIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT'), + ##byVTightIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT'), + ##byVVTightIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT'), + #new Run2 MVA Isolation + byIsolationMVArun2v1DBoldDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw'), + byVLooseIsolationMVArun2v1DBoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT'), + byLooseIsolationMVArun2v1DBoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT'), + byMediumIsolationMVArun2v1DBoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT'), + byTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT'), + byVTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT'), + byVVTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT'), + byIsolationMVArun2v1DBnewDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw'), + byVLooseIsolationMVArun2v1DBnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT'), + byLooseIsolationMVArun2v1DBnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT'), + byMediumIsolationMVArun2v1DBnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT'), + byTightIsolationMVArun2v1DBnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT'), + byVTightIsolationMVArun2v1DBnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT'), + byVVTightIsolationMVArun2v1DBnewDMwLT= cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT'), + byIsolationMVArun2v1PWoldDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw'), + byVLooseIsolationMVArun2v1PWoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT'), + byLooseIsolationMVArun2v1PWoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT'), + byMediumIsolationMVArun2v1PWoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT'), + byTightIsolationMVArun2v1PWoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT'), + byVTightIsolationMVArun2v1PWoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT'), + byVVTightIsolationMVArun2v1PWoldDMwLT= cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT'), + byIsolationMVArun2v1PWnewDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw'), + byVLooseIsolationMVArun2v1PWnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT'), + byLooseIsolationMVArun2v1PWnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT'), + byMediumIsolationMVArun2v1PWnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT'), + byTightIsolationMVArun2v1PWnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT'), + byVTightIsolationMVArun2v1PWnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT'), + byVVTightIsolationMVArun2v1PWnewDMwLT= cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT'), + chargedIsoPtSumdR03 = cms.InputTag('hpsPFTauChargedIsoPtSumdR03'), + neutralIsoPtSumdR03 = cms.InputTag('hpsPFTauNeutralIsoPtSumdR03'), + puCorrPtSumdR03 = cms.InputTag('hpsPFTauPUcorrPtSumdR03'), + neutralIsoPtSumWeightdR03 = cms.InputTag('hpsPFTauNeutralIsoPtSumWeightdR03'), + footprintCorrectiondR03 = cms.InputTag('hpsPFTauFootprintCorrectiondR03'), + photonPtSumOutsideSignalConedR03 = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalConedR03'), + byIsolationMVArun2v1DBdR03oldDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw'), + byVLooseIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT'), + byLooseIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT'), + byMediumIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT'), + byTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT'), + byVTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT'), + byVVTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT'), + byIsolationMVArun2v1PWdR03oldDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw'), + byVLooseIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT'), + byLooseIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT'), + byMediumIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT'), + byTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT'), + byVTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT'), + byVVTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT'), + ##againstElectronLoose = cms.InputTag("hpsPFTauDiscriminationByLooseElectronRejection"), + ##againstElectronMedium = cms.InputTag("hpsPFTauDiscriminationByMediumElectronRejection"), + ##againstElectronTight = cms.InputTag("hpsPFTauDiscriminationByTightElectronRejection"), + ##againstMuonLoose = cms.InputTag("hpsPFTauDiscriminationByLooseMuonRejection"), + ##againstMuonMedium = cms.InputTag("hpsPFTauDiscriminationByMediumMuonRejection"), + ##againstMuonTight = cms.InputTag("hpsPFTauDiscriminationByTightMuonRejection"), + ##againstMuonLoose2 = cms.InputTag("hpsPFTauDiscriminationByLooseMuonRejection2"), + ##againstMuonMedium2 = cms.InputTag("hpsPFTauDiscriminationByMediumMuonRejection2"), + ##againstMuonTight2 = cms.InputTag("hpsPFTauDiscriminationByTightMuonRejection2"), againstMuonLoose3 = cms.InputTag("hpsPFTauDiscriminationByLooseMuonRejection3"), againstMuonTight3 = cms.InputTag("hpsPFTauDiscriminationByTightMuonRejection3"), + ##againstMuonMVAraw = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection'), + ##againstMuonLooseMVA = cms.InputTag('hpsPFTauDiscriminationByMVALooseMuonRejection'), + ##againstMuonMediumMVA = cms.InputTag('hpsPFTauDiscriminationByMVAMediumMuonRejection'), + ##againstMuonTightMVA = cms.InputTag('hpsPFTauDiscriminationByMVATightMuonRejection'), byLooseCombinedIsolationDeltaBetaCorr3Hits = cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"), byMediumCombinedIsolationDeltaBetaCorr3Hits = cms.InputTag("hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"), byTightCombinedIsolationDeltaBetaCorr3Hits = cms.InputTag("hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits"), @@ -103,6 +180,7 @@ againstElectronMediumMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5MediumElectronRejection"), againstElectronTightMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5TightElectronRejection"), againstElectronVTightMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5VTightElectronRejection"), + ##againstElectronDeadECAL = cms.InputTag("hpsPFTauDiscriminationByDeadECALElectronRejection"), ), # mc matching configurables diff --git a/PhysicsTools/PatAlgos/python/tools/tauTools.py b/PhysicsTools/PatAlgos/python/tools/tauTools.py index 6de2055df4d5f..345102a50c7b0 100644 --- a/PhysicsTools/PatAlgos/python/tools/tauTools.py +++ b/PhysicsTools/PatAlgos/python/tools/tauTools.py @@ -102,6 +102,7 @@ def _switchToPFTau(process, # Hadron-plus-strip(s) (HPS) Tau Discriminators hpsTauIDSources = [ ("decayModeFindingNewDMs", "DiscriminationByDecayModeFindingNewDMs"), + ("decayModeFindingOldDMs", "DiscriminationByDecayModeFindingOldDMs"), ("decayModeFinding", "DiscriminationByDecayModeFinding"), # CV: kept for backwards compatibility ("byLooseCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"), ("byMediumCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"), @@ -118,34 +119,83 @@ def _switchToPFTau(process, ("neutralIsoPtSumWeight", "NeutralIsoPtSumWeight"), ("footprintCorrection", "FootprintCorrection"), ("photonPtSumOutsideSignalCone", "PhotonPtSumOutsideSignalCone"), - ##("byIsolationMVA3oldDMwoLTraw", "DiscriminationByIsolationMVA3oldDMwoLTraw"), - ##("byVLooseIsolationMVA3oldDMwoLT", "DiscriminationByVLooseIsolationMVA3oldDMwoLT"), - ##("byLooseIsolationMVA3oldDMwoLT", "DiscriminationByLooseIsolationMVA3oldDMwoLT"), - ##("byMediumIsolationMVA3oldDMwoLT", "DiscriminationByMediumIsolationMVA3oldDMwoLT"), - ##("byTightIsolationMVA3oldDMwoLT", "DiscriminationByTightIsolationMVA3oldDMwoLT"), - ##("byVTightIsolationMVA3oldDMwoLT", "DiscriminationByVTightIsolationMVA3oldDMwoLT"), - ##("byVVTightIsolationMVA3oldDMwoLT", "DiscriminationByVVTightIsolationMVA3oldDMwoLT"), - ("byIsolationMVA3oldDMwLTraw", "DiscriminationByIsolationMVA3oldDMwLTraw"), - ("byVLooseIsolationMVA3oldDMwLT", "DiscriminationByVLooseIsolationMVA3oldDMwLT"), - ("byLooseIsolationMVA3oldDMwLT", "DiscriminationByLooseIsolationMVA3oldDMwLT"), - ("byMediumIsolationMVA3oldDMwLT", "DiscriminationByMediumIsolationMVA3oldDMwLT"), - ("byTightIsolationMVA3oldDMwLT", "DiscriminationByTightIsolationMVA3oldDMwLT"), - ("byVTightIsolationMVA3oldDMwLT", "DiscriminationByVTightIsolationMVA3oldDMwLT"), - ("byVVTightIsolationMVA3oldDMwLT", "DiscriminationByVVTightIsolationMVA3oldDMwLT"), - ("byIsolationMVA3newDMwoLTraw", "DiscriminationByIsolationMVA3newDMwoLTraw"), - ##("byVLooseIsolationMVA3newDMwoLT", "DiscriminationByVLooseIsolationMVA3newDMwoLT"), - ##("byLooseIsolationMVA3newDMwoLT", "DiscriminationByLooseIsolationMVA3newDMwoLT"), - ##("byMediumIsolationMVA3newDMwoLT", "DiscriminationByMediumIsolationMVA3newDMwoLT"), - ##("byTightIsolationMVA3newDMwoLT", "DiscriminationByTightIsolationMVA3newDMwoLT"), - ##("byVTightIsolationMVA3newDMwoLT", "DiscriminationByVTightIsolationMVA3newDMwoLT"), - ##("byVVTightIsolationMVA3newDMwoLT", "DiscriminationByVVTightIsolationMVA3newDMwoLT"), - ("byIsolationMVA3newDMwLTraw", "DiscriminationByIsolationMVA3newDMwLTraw"), - ("byVLooseIsolationMVA3newDMwLT", "DiscriminationByVLooseIsolationMVA3newDMwLT"), - ("byLooseIsolationMVA3newDMwLT", "DiscriminationByLooseIsolationMVA3newDMwLT"), - ("byMediumIsolationMVA3newDMwLT", "DiscriminationByMediumIsolationMVA3newDMwLT"), - ("byTightIsolationMVA3newDMwLT", "DiscriminationByTightIsolationMVA3newDMwLT"), - ("byVTightIsolationMVA3newDMwLT", "DiscriminationByVTightIsolationMVA3newDMwLT"), - ("byVVTightIsolationMVA3newDMwLT", "DiscriminationByVVTightIsolationMVA3newDMwLT"), + ####("byIsolationMVA3oldDMwoLTraw", "DiscriminationByIsolationMVA3oldDMwoLTraw"), + ####("byVLooseIsolationMVA3oldDMwoLT", "DiscriminationByVLooseIsolationMVA3oldDMwoLT"), + ####("byLooseIsolationMVA3oldDMwoLT", "DiscriminationByLooseIsolationMVA3oldDMwoLT"), + ####("byMediumIsolationMVA3oldDMwoLT", "DiscriminationByMediumIsolationMVA3oldDMwoLT"), + ####("byTightIsolationMVA3oldDMwoLT", "DiscriminationByTightIsolationMVA3oldDMwoLT"), + ####("byVTightIsolationMVA3oldDMwoLT", "DiscriminationByVTightIsolationMVA3oldDMwoLT"), + ####("byVVTightIsolationMVA3oldDMwoLT", "DiscriminationByVVTightIsolationMVA3oldDMwoLT"), + ##("byIsolationMVA3oldDMwLTraw", "DiscriminationByIsolationMVA3oldDMwLTraw"), + ##("byVLooseIsolationMVA3oldDMwLT", "DiscriminationByVLooseIsolationMVA3oldDMwLT"), + ##("byLooseIsolationMVA3oldDMwLT", "DiscriminationByLooseIsolationMVA3oldDMwLT"), + ##("byMediumIsolationMVA3oldDMwLT", "DiscriminationByMediumIsolationMVA3oldDMwLT"), + ##("byTightIsolationMVA3oldDMwLT", "DiscriminationByTightIsolationMVA3oldDMwLT"), + ##("byVTightIsolationMVA3oldDMwLT", "DiscriminationByVTightIsolationMVA3oldDMwLT"), + ##("byVVTightIsolationMVA3oldDMwLT", "DiscriminationByVVTightIsolationMVA3oldDMwLT"), + ##("byIsolationMVA3newDMwoLTraw", "DiscriminationByIsolationMVA3newDMwoLTraw"), + ####("byVLooseIsolationMVA3newDMwoLT", "DiscriminationByVLooseIsolationMVA3newDMwoLT"), + ####("byLooseIsolationMVA3newDMwoLT", "DiscriminationByLooseIsolationMVA3newDMwoLT"), + ####("byMediumIsolationMVA3newDMwoLT", "DiscriminationByMediumIsolationMVA3newDMwoLT"), + ####("byTightIsolationMVA3newDMwoLT", "DiscriminationByTightIsolationMVA3newDMwoLT"), + ####("byVTightIsolationMVA3newDMwoLT", "DiscriminationByVTightIsolationMVA3newDMwoLT"), + ####("byVVTightIsolationMVA3newDMwoLT", "DiscriminationByVVTightIsolationMVA3newDMwoLT"), + ##("byIsolationMVA3newDMwLTraw", "DiscriminationByIsolationMVA3newDMwLTraw"), + ##("byVLooseIsolationMVA3newDMwLT", "DiscriminationByVLooseIsolationMVA3newDMwLT"), + ##("byLooseIsolationMVA3newDMwLT", "DiscriminationByLooseIsolationMVA3newDMwLT"), + ##("byMediumIsolationMVA3newDMwLT", "DiscriminationByMediumIsolationMVA3newDMwLT"), + ##("byTightIsolationMVA3newDMwLT", "DiscriminationByTightIsolationMVA3newDMwLT"), + ##("byVTightIsolationMVA3newDMwLT", "DiscriminationByVTightIsolationMVA3newDMwLT"), + ##("byVVTightIsolationMVA3newDMwLT", "DiscriminationByVVTightIsolationMVA3newDMwLT"), + ##New Run2 MVA Isolation + ("byIsolationMVArun2v1DBoldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBoldDMwLTraw"), + ("byVLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT"), + ("byLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBoldDMwLT"), + ("byMediumIsolationMVArun2v1DBoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBoldDMwLT"), + ("byTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBoldDMwLT"), + ("byVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBoldDMwLT"), + ("byVVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT"), + ("byIsolationMVArun2v1DBnewDMwLTraw", "DiscriminationByIsolationMVArun2v1DBnewDMwLTraw"), + ("byVLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT"), + ("byLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBnewDMwLT"), + ("byMediumIsolationMVArun2v1DBnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBnewDMwLT"), + ("byTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByTightIsolationMVArun2v1DBnewDMwLT"), + ("byVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBnewDMwLT"), + ("byVVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT"), + ("byIsolationMVArun2v1PWoldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWoldDMwLTraw"), + ("byVLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT"), + ("byLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWoldDMwLT"), + ("byMediumIsolationMVArun2v1PWoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWoldDMwLT"), + ("byTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWoldDMwLT"), + ("byVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWoldDMwLT"), + ("byVVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT"), + ("byIsolationMVArun2v1PWnewDMwLTraw", "DiscriminationByIsolationMVArun2v1PWnewDMwLTraw"), + ("byVLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT"), + ("byLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWnewDMwLT"), + ("byMediumIsolationMVArun2v1PWnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWnewDMwLT"), + ("byTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByTightIsolationMVArun2v1PWnewDMwLT"), + ("byVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWnewDMwLT"), + ("byVVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT"), + ("chargedIsoPtSumdR03", "ChargedIsoPtSumdR03"), + ("neutralIsoPtSumdR03", "NeutralIsoPtSumdR03"), + ("puCorrPtSumdR03", "PUcorrPtSumdR03"), + ("neutralIsoPtSumWeightdR03", "NeutralIsoPtSumWeightdR03"), + ("footprintCorrectiondR03", "FootprintCorrectiondR03"), + ("photonPtSumOutsideSignalConedR03", "PhotonPtSumOutsideSignalConedR03"), + ("byIsolationMVArun2v1DBdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw"), + ("byVLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT"), + ("byLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT"), + ("byMediumIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT"), + ("byTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT"), + ("byVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT"), + ("byVVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT"), + ("byIsolationMVArun2v1PWdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw"), + ("byVLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT"), + ("byLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT"), + ("byMediumIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT"), + ("byTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT"), + ("byVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT"), + ("byVVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"), ##("againstElectronLoose", "DiscriminationByLooseElectronRejection"), ##("againstElectronMedium", "DiscriminationByMediumElectronRejection"), ##("againstElectronTight", "DiscriminationByTightElectronRejection"), @@ -209,8 +259,8 @@ def switchToPFTauHPS(process, ## adapt cleanPatTaus if hasattr(process, "cleanPatTaus" + patTauLabel + postfix): getattr(process, "cleanPatTaus" + patTauLabel + postfix).preselection = \ - 'pt > 18 & abs(eta) < 2.3 & tauID("decayModeFinding") > 0.5 & tauID("byLooseCombinedIsolationDeltaBetaCorr3Hits") > 0.5' \ - + ' & tauID("againstMuonTight3") > 0.5 & tauID("againstElectronVLooseMVA5") > 0.5' + 'pt > 20 & abs(eta) < 2.3 & tauID("decayModeFindingOldDMs") > 0.5 & tauID("byLooseCombinedIsolationDeltaBetaCorr3Hits") > 0.5' \ + + ' & tauID("againstMuonTight3") > 0.5 & tauID("againstElectronLooseMVA5") > 0.5' # Select switcher by string def switchToPFTauByType(process, From 7df020cdf9792aebbdac90309b1183ec9eb2e302 Mon Sep 17 00:00:00 2001 From: Aruna Date: Tue, 3 Nov 2015 14:12:12 +0100 Subject: [PATCH 05/66] small update --- PhysicsTools/PatAlgos/python/tools/tauTools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PhysicsTools/PatAlgos/python/tools/tauTools.py b/PhysicsTools/PatAlgos/python/tools/tauTools.py index 345102a50c7b0..caeb3b0628e99 100644 --- a/PhysicsTools/PatAlgos/python/tools/tauTools.py +++ b/PhysicsTools/PatAlgos/python/tools/tauTools.py @@ -259,7 +259,7 @@ def switchToPFTauHPS(process, ## adapt cleanPatTaus if hasattr(process, "cleanPatTaus" + patTauLabel + postfix): getattr(process, "cleanPatTaus" + patTauLabel + postfix).preselection = \ - 'pt > 20 & abs(eta) < 2.3 & tauID("decayModeFindingOldDMs") > 0.5 & tauID("byLooseCombinedIsolationDeltaBetaCorr3Hits") > 0.5' \ + 'pt > 18 & abs(eta) < 2.3 & tauID("decayModeFindingOldDMs") > 0.5 & tauID("byLooseCombinedIsolationDeltaBetaCorr3Hits") > 0.5' \ + ' & tauID("againstMuonTight3") > 0.5 & tauID("againstElectronLooseMVA5") > 0.5' # Select switcher by string From 9fc82d56e641c78959e65084e49bff1a710f4669 Mon Sep 17 00:00:00 2001 From: Aruna Date: Tue, 3 Nov 2015 14:17:43 +0100 Subject: [PATCH 06/66] remove old MVA ID --- .../loadRecoTauTagMVAsFromPrepDB_cfi.py | 109 ++++++++---------- 1 file changed, 50 insertions(+), 59 deletions(-) diff --git a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py index 27b9bc7736a2d..f4dab24cf8e3a 100644 --- a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py +++ b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py @@ -7,25 +7,16 @@ toGet = cms.VPSet(), # connect = cms.string("frontier://FrontierPrep/CMS_COND_PHYSICSTOOLS") # prep database connect = cms.string('frontier://FrontierProd/CMS_COND_PAT_000') # prod database - #'sqlite_file:/afs/cern.ch/user/j/jez/public/tauID/RecoTauTag_MVAs_2014Oct22.db') -) - -loadRecoTauTagMVAsFromPrepDB2 = cms.ESSource("PoolDBESSource", - CondDBSetup, - DumpStat = cms.untracked.bool(False), - toGet = cms.VPSet(), - # connect = cms.string("frontier://FrontierPrep/CMS_COND_PHYSICSTOOLS") # prep database - connect = cms.string('frontier://FrontierProd/CMS_COND_PAT_000') # prod database - #connect = cms.string('sqlite_file:RecoTauTag/Configuration/data/RecoTauTag_MVAs_2015Oct21.db') + #connect = cms.string('sqlite_file:RecoTauTag/Configuration/data/RecoTauTag_MVAs_2015Oct21.db') ) # register tau ID (= isolation) discriminator MVA -tauIdDiscrMVA_trainings = { - 'tauIdMVAoldDMwoLT' : "tauIdMVAoldDMwoLT", - 'tauIdMVAoldDMwLT' : "tauIdMVAoldDMwLT", - 'tauIdMVAnewDMwoLT' : "tauIdMVAnewDMwoLT", - 'tauIdMVAnewDMwLT' : "tauIdMVAnewDMwLT" -} +#tauIdDiscrMVA_trainings = { +# 'tauIdMVAoldDMwoLT' : "tauIdMVAoldDMwoLT", +# 'tauIdMVAoldDMwLT' : "tauIdMVAoldDMwLT", +# 'tauIdMVAnewDMwoLT' : "tauIdMVAnewDMwoLT", +# 'tauIdMVAnewDMwLT' : "tauIdMVAnewDMwLT" +#} tauIdDiscrMVA_trainings_run2 = { 'tauIdMVADBoldDMwLT' : "tauIdMVADBoldDMwLT", 'tauIdMVADBnewDMwLT' : "tauIdMVADBnewDMwLT", @@ -34,40 +25,40 @@ 'tauIdMVADBdR03oldDMwLT' : "tauIdMVADBdR03oldDMwLT", 'tauIdMVAPWdR03oldDMwLT' : "tauIdMVAPWdR03oldDMwLT" } -tauIdDiscrMVA_WPs = { - 'tauIdMVAoldDMwoLT' : { - 'Eff90' : "oldDMwoLTEff90", - 'Eff80' : "oldDMwoLTEff80", - 'Eff70' : "oldDMwoLTEff70", - 'Eff60' : "oldDMwoLTEff60", - 'Eff50' : "oldDMwoLTEff50", - 'Eff40' : "oldDMwoLTEff40" - }, - 'tauIdMVAoldDMwLT' : { - 'Eff90' : "oldDMwLTEff90", - 'Eff80' : "oldDMwLTEff80", - 'Eff70' : "oldDMwLTEff70", - 'Eff60' : "oldDMwLTEff60", - 'Eff50' : "oldDMwLTEff50", - 'Eff40' : "oldDMwLTEff40" - }, - 'tauIdMVAnewDMwoLT' : { - 'Eff90' : "newDMwoLTEff90", - 'Eff80' : "newDMwoLTEff80", - 'Eff70' : "newDMwoLTEff70", - 'Eff60' : "newDMwoLTEff60", - 'Eff50' : "newDMwoLTEff50", - 'Eff40' : "newDMwoLTEff40" - }, - 'tauIdMVAnewDMwLT' : { - 'Eff90' : "newDMwLTEff90", - 'Eff80' : "newDMwLTEff80", - 'Eff70' : "newDMwLTEff70", - 'Eff60' : "newDMwLTEff60", - 'Eff50' : "newDMwLTEff50", - 'Eff40' : "newDMwLTEff40" - } -} +#tauIdDiscrMVA_WPs = { +# 'tauIdMVAoldDMwoLT' : { +# 'Eff90' : "oldDMwoLTEff90", +# 'Eff80' : "oldDMwoLTEff80", +# 'Eff70' : "oldDMwoLTEff70", +# 'Eff60' : "oldDMwoLTEff60", +# 'Eff50' : "oldDMwoLTEff50", +# 'Eff40' : "oldDMwoLTEff40" +# }, +# 'tauIdMVAoldDMwLT' : { +# 'Eff90' : "oldDMwLTEff90", +# 'Eff80' : "oldDMwLTEff80", +# 'Eff70' : "oldDMwLTEff70", +# 'Eff60' : "oldDMwLTEff60", +# 'Eff50' : "oldDMwLTEff50", +# 'Eff40' : "oldDMwLTEff40" +# }, +# 'tauIdMVAnewDMwoLT' : { +# 'Eff90' : "newDMwoLTEff90", +# 'Eff80' : "newDMwoLTEff80", +# 'Eff70' : "newDMwoLTEff70", +# 'Eff60' : "newDMwoLTEff60", +# 'Eff50' : "newDMwoLTEff50", +# 'Eff40' : "newDMwoLTEff40" +# }, +# 'tauIdMVAnewDMwLT' : { +# 'Eff90' : "newDMwLTEff90", +# 'Eff80' : "newDMwLTEff80", +# 'Eff70' : "newDMwLTEff70", +# 'Eff60' : "newDMwLTEff60", +# 'Eff50' : "newDMwLTEff50", +# 'Eff40' : "newDMwLTEff40" +# } +#} tauIdDiscrMVA_WPs_run2 = { 'tauIdMVADBoldDMwLT' : { 'Eff90' : "DBoldDMwLTEff90", @@ -118,12 +109,12 @@ 'Eff40' : "PWdR03oldDMwLTEff40" } } -tauIdDiscrMVA_mvaOutput_normalizations = { - 'tauIdMVAoldDMwoLT' : "mvaOutput_normalization_oldDMwoLT", - 'tauIdMVAoldDMwLT' : "mvaOutput_normalization_oldDMwLT", - 'tauIdMVAnewDMwoLT' : "mvaOutput_normalization_newDMwoLT", - 'tauIdMVAnewDMwLT' : "mvaOutput_normalization_newDMwLT" -} +#tauIdDiscrMVA_mvaOutput_normalizations = { +# 'tauIdMVAoldDMwoLT' : "mvaOutput_normalization_oldDMwoLT", +# 'tauIdMVAoldDMwLT' : "mvaOutput_normalization_oldDMwLT", +# 'tauIdMVAnewDMwoLT' : "mvaOutput_normalization_newDMwoLT", +# 'tauIdMVAnewDMwLT' : "mvaOutput_normalization_newDMwLT" +#} tauIdDiscrMVA_mvaOutput_normalizations_run2 = { 'tauIdMVADBoldDMwLT' : "mvaOutput_normalization_DBoldDMwLT", 'tauIdMVADBnewDMwLT' : "mvaOutput_normalization_DBnewDMwLT", @@ -157,7 +148,7 @@ # ) # ) for training, gbrForestName in tauIdDiscrMVA_trainings_run2.items(): - loadRecoTauTagMVAsFromPrepDB2.toGet.append( + loadRecoTauTagMVAsFromPrepDB.toGet.append( cms.PSet( record = cms.string('GBRWrapperRcd'), tag = cms.string("RecoTauTag_%s%s" % (gbrForestName, tauIdDiscrMVA_version)), @@ -165,14 +156,14 @@ ) ) for WP in tauIdDiscrMVA_WPs_run2[training].keys(): - loadRecoTauTagMVAsFromPrepDB2.toGet.append( + loadRecoTauTagMVAsFromPrepDB.toGet.append( cms.PSet( record = cms.string('PhysicsTGraphPayloadRcd'), tag = cms.string("RecoTauTag_%s%s_WP%s" % (gbrForestName, tauIdDiscrMVA_version, WP)), label = cms.untracked.string("RecoTauTag_%s%s_WP%s" % (gbrForestName, tauIdDiscrMVA_version, WP)) ) ) - loadRecoTauTagMVAsFromPrepDB2.toGet.append( + loadRecoTauTagMVAsFromPrepDB.toGet.append( cms.PSet( record = cms.string('PhysicsTFormulaPayloadRcd'), tag = cms.string("RecoTauTag_%s%s_mvaOutput_normalization" % (gbrForestName, tauIdDiscrMVA_version)), From 76c13b5a9aa7776e9ce57e10e001839e89647ae2 Mon Sep 17 00:00:00 2001 From: Aruna Date: Tue, 3 Nov 2015 14:22:10 +0100 Subject: [PATCH 07/66] small update --- PhysicsTools/PatAlgos/python/tools/tauTools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PhysicsTools/PatAlgos/python/tools/tauTools.py b/PhysicsTools/PatAlgos/python/tools/tauTools.py index caeb3b0628e99..1abbb3c798f98 100644 --- a/PhysicsTools/PatAlgos/python/tools/tauTools.py +++ b/PhysicsTools/PatAlgos/python/tools/tauTools.py @@ -260,7 +260,7 @@ def switchToPFTauHPS(process, if hasattr(process, "cleanPatTaus" + patTauLabel + postfix): getattr(process, "cleanPatTaus" + patTauLabel + postfix).preselection = \ 'pt > 18 & abs(eta) < 2.3 & tauID("decayModeFindingOldDMs") > 0.5 & tauID("byLooseCombinedIsolationDeltaBetaCorr3Hits") > 0.5' \ - + ' & tauID("againstMuonTight3") > 0.5 & tauID("againstElectronLooseMVA5") > 0.5' + + ' & tauID("againstMuonTight3") > 0.5 & tauID("againstElectronVLooseMVA5") > 0.5' # Select switcher by string def switchToPFTauByType(process, From bd618445e0d323b93f445d19d467d0e3ce266391 Mon Sep 17 00:00:00 2001 From: vmariani Date: Tue, 3 Nov 2015 16:45:14 +0100 Subject: [PATCH 08/66] adding Dstar filter for enriched MC production --- .../ExternalDecays/data/Dstar_D0_K3pi.dec | 22 +++ .../ExternalDecays/data/Dstar_D0_Kpi.dec | 22 +++ .../GenFilters/interface/PythiaMomDauFilter.h | 74 ++++++++ .../GenFilters/src/PythiaMomDauFilter.cc | 161 ++++++++++++++++++ .../test/test_d0k2pi_ptdstarcut_gen_13TeV.py | 147 ++++++++++++++++ .../test/test_d0k4pi_ptdstarcut_gen_13TeV.py | 147 ++++++++++++++++ 6 files changed, 573 insertions(+) create mode 100644 GeneratorInterface/ExternalDecays/data/Dstar_D0_K3pi.dec create mode 100644 GeneratorInterface/ExternalDecays/data/Dstar_D0_Kpi.dec create mode 100644 GeneratorInterface/GenFilters/interface/PythiaMomDauFilter.h create mode 100644 GeneratorInterface/GenFilters/src/PythiaMomDauFilter.cc create mode 100644 GeneratorInterface/GenFilters/test/test_d0k2pi_ptdstarcut_gen_13TeV.py create mode 100644 GeneratorInterface/GenFilters/test/test_d0k4pi_ptdstarcut_gen_13TeV.py diff --git a/GeneratorInterface/ExternalDecays/data/Dstar_D0_K3pi.dec b/GeneratorInterface/ExternalDecays/data/Dstar_D0_K3pi.dec new file mode 100644 index 0000000000000..49730dee5dfac --- /dev/null +++ b/GeneratorInterface/ExternalDecays/data/Dstar_D0_K3pi.dec @@ -0,0 +1,22 @@ +# Dstar_D0_K3pi.dec +# +# This is the decay file for the decay D*+ -> D0(K-pi+pi+pi-) pi+ +# +Alias MyD0 D0 +Alias Myanti-D0 anti-D0 +ChargeConj Myanti-D0 MyD0 +Alias MyD*+ D*+ +Alias MyD*- D*- +ChargeConj MyD*- MyD*+ +# +Decay MyD*+ +1.000 MyD0 pi+ VSS; +Enddecay +CDecay MyD*- +# +Decay MyD0 +1.000 K- pi+ pi+ pi- PHSP; +Enddecay +CDecay Myanti-D0 +# +End diff --git a/GeneratorInterface/ExternalDecays/data/Dstar_D0_Kpi.dec b/GeneratorInterface/ExternalDecays/data/Dstar_D0_Kpi.dec new file mode 100644 index 0000000000000..c9d8e6df989b8 --- /dev/null +++ b/GeneratorInterface/ExternalDecays/data/Dstar_D0_Kpi.dec @@ -0,0 +1,22 @@ +# Dstar_D0_Kpi.dec +# +# This is the decay file for the decay D*+ -> D0(K-pi+) pi+ +# +Alias MyD0 D0 +Alias Myanti-D0 anti-D0 +ChargeConj Myanti-D0 MyD0 +Alias MyD*+ D*+ +Alias MyD*- D*- +ChargeConj MyD*- MyD*+ +# +Decay MyD*+ +1.000 MyD0 pi+ VSS; +Enddecay +CDecay MyD*- +# +Decay MyD0 +1.000 K- pi+ PHSP; +Enddecay +CDecay Myanti-D0 +# +End diff --git a/GeneratorInterface/GenFilters/interface/PythiaMomDauFilter.h b/GeneratorInterface/GenFilters/interface/PythiaMomDauFilter.h new file mode 100644 index 0000000000000..b4ee5a2fbde20 --- /dev/null +++ b/GeneratorInterface/GenFilters/interface/PythiaMomDauFilter.h @@ -0,0 +1,74 @@ +#ifndef PYTHIAMOMDAUFILTER_h +#define PYTHIAMOMDAUFILTER_h +// -*- C++ -*- +// +// Package: PythiaMomDauFilter +// Class: PythiaMomDauFilter +// +/**\class PythiaMomDauFilter PythiaMomDauFilter.cc + + Description: Filter events using MotherId and ChildrenIds infos + + Implementation: + +*/ +// +// Original Author: Daniele Pedrini +// Created: Oct 27 2015 +// $Id: PythiaMomDauFilter.h,v 1.1 2015/10/27 pedrini Exp $ +// +// + + +// system include files +#include + +// user include files +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/EDFilter.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/MakerMacros.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" + + +// +// class decleration +// + +class PythiaMomDauFilter : public edm::EDFilter { + public: + explicit PythiaMomDauFilter(const edm::ParameterSet&); + ~PythiaMomDauFilter(); + + + virtual bool filter(edm::Event&, const edm::EventSetup&); + private: + // ----------memeber function---------------------- + + // ----------member data --------------------------- + + std::string label_; + std::vector dauIDs; + std::vector desIDs; + int particleID; + int daughterID; + bool chargeconju; + int ndaughters; + int ndescendants; + double minptcut; + double maxptcut; + double minetacut; + double maxetacut; + double mom_minptcut; + double mom_maxptcut; + double mom_minetacut; + double mom_maxetacut; +}; +#define PYCOMP pycomp_ +extern "C" { + int PYCOMP(int& ip); +} +#endif +DEFINE_FWK_MODULE(PythiaMomDauFilter); diff --git a/GeneratorInterface/GenFilters/src/PythiaMomDauFilter.cc b/GeneratorInterface/GenFilters/src/PythiaMomDauFilter.cc new file mode 100644 index 0000000000000..a195e01b9910c --- /dev/null +++ b/GeneratorInterface/GenFilters/src/PythiaMomDauFilter.cc @@ -0,0 +1,161 @@ + +#include "GeneratorInterface/GenFilters/interface/PythiaMomDauFilter.h" + + +#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" +#include "HepMC/PythiaWrapper6_4.h" +#include + +using namespace edm; +using namespace std; + + +PythiaMomDauFilter::PythiaMomDauFilter(const edm::ParameterSet& iConfig) : +label_(iConfig.getUntrackedParameter("moduleLabel",std::string("generator"))), +particleID(iConfig.getUntrackedParameter("ParticleID", 0)), +daughterID(iConfig.getUntrackedParameter("DaughterID", 0)), +chargeconju(iConfig.getUntrackedParameter("ChargeConjugation", true)), +ndaughters(iConfig.getUntrackedParameter("NumberDaughters", 0)), +ndescendants(iConfig.getUntrackedParameter("NumberDescendants", 0)), +minptcut(iConfig.getUntrackedParameter("MinPt", 0.)), +maxptcut(iConfig.getUntrackedParameter("MaxPt", 14000.)), +minetacut(iConfig.getUntrackedParameter("MinEta", -10.)), +maxetacut(iConfig.getUntrackedParameter("MaxEta", 10.)), +mom_minptcut(iConfig.getUntrackedParameter("MomMinPt", 0.)), +mom_maxptcut(iConfig.getUntrackedParameter("MomMaxPt", 14000.)), +mom_minetacut(iConfig.getUntrackedParameter("MomMinEta", -10.)), +mom_maxetacut(iConfig.getUntrackedParameter("MomMaxEta", 10.)) +{ + //now do what ever initialization is needed + vector defdauID; + defdauID.push_back(0); + vector defdesID; + defdesID.push_back(0); + dauIDs = iConfig.getUntrackedParameter< vector >("DaughterIDs", defdauID); + desIDs = iConfig.getUntrackedParameter< vector >("DescendantsIDs", defdesID); +} + + +PythiaMomDauFilter::~PythiaMomDauFilter() +{ + + // do anything here that needs to be done at desctruction time + // (e.g. close files, deallocate resources etc.) + +} + + +// +// member functions +// + +// ------------ method called to produce the data ------------ +bool PythiaMomDauFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) +{ + using namespace edm; + bool accepted = false; + bool mom_accepted = false; + Handle evt; + iEvent.getByLabel(label_, evt); + + const HepMC::GenEvent * myGenEvent = evt->GetEvent(); + int ndauac = 0; + int ndau = 0; + int ndesac = 0; + int ndes = 0; + + for ( HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin(); p != myGenEvent->particles_end(); ++p ) { + + if( (*p)->pdg_id() != particleID ) continue ; + if( (*p)->momentum().perp() > mom_minptcut && (*p)->momentum().perp() < mom_maxptcut && (*p)->momentum().eta() > mom_minetacut && (*p)->momentum().eta() < mom_maxetacut ){ + mom_accepted = true; + ndauac = 0; + ndau = 0; + ndesac = 0; + ndes = 0; + if ( (*p)->end_vertex() ) { + for ( HepMC::GenVertex::particle_iterator dau =(*p)->end_vertex()->particles_begin(HepMC::children); dau != (*p)->end_vertex()->particles_end(HepMC::children); ++dau ) { + ++ndau; + for( unsigned int i=0; ipdg_id() != dauIDs[i] ) continue ; + ++ndauac; + break; + } + if((*dau)->pdg_id() == daughterID){ + for(HepMC::GenVertex::particle_iterator des = (*dau)->end_vertex()->particles_begin(HepMC::children); des != (*des)->end_vertex()->particles_end(HepMC::children); ++des ){ + ++ndes; + for( unsigned int i=0; ipdg_id() != desIDs[i] ) continue ; + if( (*des)->momentum().perp() > minptcut && (*des)->momentum().perp() < maxptcut && (*des)->momentum().eta() > minetacut && (*des)->momentum().eta() < maxetacut ) { + ++ndesac; + break; + } + } + } + } + } + } + } + if( ndau == ndaughters && ndauac == ndaughters && mom_accepted && ndes == ndescendants && ndesac == ndescendants ) { + accepted = true; + break; + } + + } + + + if( !accepted && chargeconju ) { + + mom_accepted = false; + for ( HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin(); p != myGenEvent->particles_end(); ++p ) { + + if( (*p)->pdg_id() != -particleID ) continue ; + if( (*p)->momentum().perp() > mom_minptcut && (*p)->momentum().perp() < mom_maxptcut && (*p)->momentum().eta() > mom_minetacut && (*p)->momentum().eta() < mom_maxetacut ){ + mom_accepted = true; + ndauac = 0; + ndau = 0; + ndesac = 0; + ndes = 0; + if ( (*p)->end_vertex() ) { + for ( HepMC::GenVertex::particle_iterator dau =(*p)->end_vertex()->particles_begin(HepMC::children); dau != (*p)->end_vertex()->particles_end(HepMC::children); ++dau ) { + ++ndau; + for( unsigned int i=0; ipdg_id() != IDanti ) continue ; + ++ndauac; + break; + } + if((*dau)->pdg_id() == -daughterID) { + for( HepMC::GenVertex::particle_iterator des = (*dau)->end_vertex()->particles_begin(HepMC::children); des != (*des)->end_vertex()->particles_end(HepMC::children); ++des ){ + ++ndes; + for( unsigned int i=0; ipdg_id() != IDanti ) continue ; + if( (*des)->momentum().perp() > minptcut && (*des)->momentum().perp() < maxptcut && (*des)->momentum().eta() > minetacut && (*des)->momentum().eta() < maxetacut ) { + ++ndesac; + break; + } + } + } + } + } + } + } + if( ndau == ndaughters && ndauac == ndaughters && mom_accepted && ndes == ndescendants && ndesac == ndescendants ) { + accepted = true; + break; + } + } + + } + + if (accepted){ + return true; } else {return false;} + +} diff --git a/GeneratorInterface/GenFilters/test/test_d0k2pi_ptdstarcut_gen_13TeV.py b/GeneratorInterface/GenFilters/test/test_d0k2pi_ptdstarcut_gen_13TeV.py new file mode 100644 index 0000000000000..9f4892163b098 --- /dev/null +++ b/GeneratorInterface/GenFilters/test/test_d0k2pi_ptdstarcut_gen_13TeV.py @@ -0,0 +1,147 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process('GEN') + +# import of standard configurations +process.load('Configuration.StandardSequences.Services_cff') +process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.EventContent.EventContent_cff') +process.load('SimGeneral.MixingModule.mixNoPU_cfi') +process.load('Configuration.StandardSequences.GeometryRecoDB_cff') +process.load('Configuration.Geometry.GeometrySimDB_cff') +process.load('Configuration.StandardSequences.MagneticField_38T_PostLS1_cff') +process.load('Configuration.StandardSequences.Generator_cff') +process.load('IOMC.EventVertexGenerators.VtxSmearedRealistic8TeVCollision_cfi') +process.load('GeneratorInterface.Core.genFilterSummary_cff') +process.load('Configuration.StandardSequences.SimIdeal_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(10000) +) + +# Input source +process.source = cms.Source("EmptySource") + +process.options = cms.untracked.PSet( + +) + +# Production Info +process.configurationMetadata = cms.untracked.PSet( + version = cms.untracked.string('$Revision: 1.1 $'), + annotation = cms.untracked.string('D*+ -> D0 pi+ -> (K-pi+) pi+ at 13TeV'), + name = cms.untracked.string('$Source: test_d0k2pi_ptdstarcut_gen_13TeV.py,v $') +) + +# Output definition + +process.RAWSIMoutput = cms.OutputModule("PoolOutputModule", + splitLevel = cms.untracked.int32(0), + eventAutoFlushCompressedSize = cms.untracked.int32(5242880), + outputCommands = process.RAWSIMEventContent.outputCommands, + fileName = cms.untracked.string('2pi_ptdstarcut_gen.root'), + dataset = cms.untracked.PSet( + filterName = cms.untracked.string(''), + dataTier = cms.untracked.string('GEN') + ), + SelectEvents = cms.untracked.PSet( + SelectEvents = cms.vstring('generation_step') + ) +) + + +# Additional output definition + +# Other statements +process.genstepfilter.triggerConditions=cms.vstring("generation_step") +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '') +#process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:startup', '') +#from Configuration.Generator.PythiaUESettings_cfi import * #for 8 TeV +from Configuration.Generator.PythiaUEZ2starSettings_cfi import * #for 13 TeV +################# +process.generator = cms.EDFilter("Pythia6GeneratorFilter", + pythiaPylistVerbosity = cms.untracked.int32(1), + filterEfficiency = cms.untracked.double(1.0), + pythiaHepMCVerbosity = cms.untracked.bool(False), + maxEventsToPrint = cms.untracked.int32(2), + comEnergy = cms.double(13000.0), + ExternalDecays = cms.PSet( + EvtGen = cms.untracked.PSet( + operates_on_particles = cms.vint32( 0 ), # 0 (zero) means default list (hardcoded) + # you can put here the list of particles (PDG IDs) + # that you want decayed by EvtGen + use_default_decay = cms.untracked.bool(False), + decay_table = cms.FileInPath('GeneratorInterface/ExternalDecays/data/DECAY_NOLONGLIFE.DEC'), + # decay_table = cms.FileInPath('GeneratorInterface/ExternalDecays/data/DECAY.DEC'), + particle_property_file = cms.FileInPath('GeneratorInterface/ExternalDecays/data/evt.pdl'), + user_decay_file = cms.FileInPath('GeneratorInterface/ExternalDecays/data/Dstar_D0_Kpi.dec'), + list_forced_decays = cms.vstring('MyD*+','MyD*-') + ), + parameterSets = cms.vstring('EvtGen') + ), + PythiaParameters = cms.PSet( + #process.pythiaUESettingsBlock, + pythiaUESettingsBlock, + ccbarSettings= cms.vstring('MSEL=4 ! ccbar '), + # This is a vector of ParameterSet names to be read, in this order + parameterSets = cms.vstring('pythiaUESettings','ccbarSettings') + ) +) + +#process.D0DecayFilter = cms.EDFilter("PythiaDauFilter", +# ParticleID = cms.untracked.int32(421), +# ChargeConjugation = cms.untracked.bool(True), +# MinEta = cms.untracked.double(-100.), +# MaxEta = cms.untracked.double(100.), +# DaughterIDs = cms.untracked.vint32(-321,211,211,-211), +# NumberDaughters = cms.untracked.int32(4) +#) + +process.DstarFilter = cms.EDFilter("PythiaMomDauFilter", + ParticleID = cms.untracked.int32(413), + DaughterID = cms.untracked.int32(421), + ChargeConjugation = cms.untracked.bool(True), + MinEta = cms.untracked.double(-100.), + MaxEta = cms.untracked.double(100.), + DaughterIDs = cms.untracked.vint32(421,211), + NumberDaughters = cms.untracked.int32(2), + MomMinPt = cms.untracked.double(3.9), + NumberDescendants = cms.untracked.int32(2), + DescendantsIDs = cms.untracked.vint32(-321,211) +) + +################# + +#process.ProductionFilterSequence = cms.Sequence(process.generator*process.DstarFilter*process.D0DecayFilter) +process.ProductionFilterSequence = cms.Sequence(process.generator*process.DstarFilter) + +# Path and EndPath definitions +process.generation_step = cms.Path(process.pgen) +#process.simulation_step = cms.Path(process.psim) +process.genfiltersummary_step = cms.EndPath(process.genFilterSummary) +process.endjob_step = cms.EndPath(process.endOfProcess) +process.RAWSIMoutput_step = cms.EndPath(process.RAWSIMoutput) + +# Schedule definition +#process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.endjob_step,process.RAWSIMoutput_step) +process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.endjob_step,process.RAWSIMoutput_step) +# filter all path with the production filter sequence +for path in process.paths: + getattr(process,path)._seq = process.ProductionFilterSequence * getattr(process,path)._seq + +# customisation of the process. + +# Automatic addition of the customisation function from SLHCUpgradeSimulations.Configuration.postLS1Customs +from SLHCUpgradeSimulations.Configuration.postLS1Customs import customisePostLS1 + +#call to customisation function customisePostLS1 imported from SLHCUpgradeSimulations.Configuration.postLS1Customs +process = customisePostLS1(process) + +# End of customisation functions + + + diff --git a/GeneratorInterface/GenFilters/test/test_d0k4pi_ptdstarcut_gen_13TeV.py b/GeneratorInterface/GenFilters/test/test_d0k4pi_ptdstarcut_gen_13TeV.py new file mode 100644 index 0000000000000..2e08290ba8e0c --- /dev/null +++ b/GeneratorInterface/GenFilters/test/test_d0k4pi_ptdstarcut_gen_13TeV.py @@ -0,0 +1,147 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process('GEN') + +# import of standard configurations +process.load('Configuration.StandardSequences.Services_cff') +process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.EventContent.EventContent_cff') +process.load('SimGeneral.MixingModule.mixNoPU_cfi') +process.load('Configuration.StandardSequences.GeometryRecoDB_cff') +process.load('Configuration.Geometry.GeometrySimDB_cff') +process.load('Configuration.StandardSequences.MagneticField_38T_PostLS1_cff') +process.load('Configuration.StandardSequences.Generator_cff') +process.load('IOMC.EventVertexGenerators.VtxSmearedRealistic8TeVCollision_cfi') +process.load('GeneratorInterface.Core.genFilterSummary_cff') +process.load('Configuration.StandardSequences.SimIdeal_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(10000) +) + +# Input source +process.source = cms.Source("EmptySource") + +process.options = cms.untracked.PSet( + +) + +# Production Info +process.configurationMetadata = cms.untracked.PSet( + version = cms.untracked.string('$Revision: 1.1 $'), + annotation = cms.untracked.string('D*+ -> D0 pi+ -> (K-pi+pi+pi-) pi+ at 13TeV'), + name = cms.untracked.string('$Source: test_d0k4pi_ptdstarcut_gen_13TeV.py,v $') +) + +# Output definition + +process.RAWSIMoutput = cms.OutputModule("PoolOutputModule", + splitLevel = cms.untracked.int32(0), + eventAutoFlushCompressedSize = cms.untracked.int32(5242880), + outputCommands = process.RAWSIMEventContent.outputCommands, + fileName = cms.untracked.string('4pi_ptdstarcut_gen.root'), + dataset = cms.untracked.PSet( + filterName = cms.untracked.string(''), + dataTier = cms.untracked.string('GEN') + ), + SelectEvents = cms.untracked.PSet( + SelectEvents = cms.vstring('generation_step') + ) +) + + +# Additional output definition + +# Other statements +process.genstepfilter.triggerConditions=cms.vstring("generation_step") +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '') +#process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:startup', '') +#from Configuration.Generator.PythiaUESettings_cfi import * #for 8 TeV +from Configuration.Generator.PythiaUEZ2starSettings_cfi import * #for 13 TeV +################# +process.generator = cms.EDFilter("Pythia6GeneratorFilter", + pythiaPylistVerbosity = cms.untracked.int32(1), + filterEfficiency = cms.untracked.double(1.0), + pythiaHepMCVerbosity = cms.untracked.bool(False), + maxEventsToPrint = cms.untracked.int32(2), + comEnergy = cms.double(13000.0), + ExternalDecays = cms.PSet( + EvtGen = cms.untracked.PSet( + operates_on_particles = cms.vint32( 0 ), # 0 (zero) means default list (hardcoded) + # you can put here the list of particles (PDG IDs) + # that you want decayed by EvtGen + use_default_decay = cms.untracked.bool(False), + decay_table = cms.FileInPath('GeneratorInterface/ExternalDecays/data/DECAY_NOLONGLIFE.DEC'), + # decay_table = cms.FileInPath('GeneratorInterface/ExternalDecays/data/DECAY.DEC'), + particle_property_file = cms.FileInPath('GeneratorInterface/ExternalDecays/data/evt.pdl'), + user_decay_file = cms.FileInPath('Dati13/TrackEfficiency/Dstar_D0_K3pi.dec'), + list_forced_decays = cms.vstring('MyD*+','MyD*-') + ), + parameterSets = cms.vstring('EvtGen') + ), + PythiaParameters = cms.PSet( + #process.pythiaUESettingsBlock, + pythiaUESettingsBlock, + ccbarSettings= cms.vstring('MSEL=4 ! ccbar '), + # This is a vector of ParameterSet names to be read, in this order + parameterSets = cms.vstring('pythiaUESettings','ccbarSettings') + ) +) + +#process.D0DecayFilter = cms.EDFilter("PythiaDauFilter", +# ParticleID = cms.untracked.int32(421), +# ChargeConjugation = cms.untracked.bool(True), +# MinEta = cms.untracked.double(-100.), +# MaxEta = cms.untracked.double(100.), +# DaughterIDs = cms.untracked.vint32(-321,211,211,-211), +# NumberDaughters = cms.untracked.int32(4) +#) + +process.DstarFilter = cms.EDFilter("PythiaMomDauFilter", + ParticleID = cms.untracked.int32(413), + DaughterID = cms.untracked.int32(421), + ChargeConjugation = cms.untracked.bool(True), + MinEta = cms.untracked.double(-100.), + MaxEta = cms.untracked.double(100.), + DaughterIDs = cms.untracked.vint32(421,211), + NumberDaughters = cms.untracked.int32(2), + MomMinPt = cms.untracked.double(3.9), + NumberDescendants = cms.untracked.int32(4), + DescendantsIDs = cms.untracked.vint32(-321,211,211,-211) +) + +################# + +#process.ProductionFilterSequence = cms.Sequence(process.generator*process.DstarFilter*process.D0DecayFilter) +process.ProductionFilterSequence = cms.Sequence(process.generator*process.DstarFilter) + +# Path and EndPath definitions +process.generation_step = cms.Path(process.pgen) +#process.simulation_step = cms.Path(process.psim) +process.genfiltersummary_step = cms.EndPath(process.genFilterSummary) +process.endjob_step = cms.EndPath(process.endOfProcess) +process.RAWSIMoutput_step = cms.EndPath(process.RAWSIMoutput) + +# Schedule definition +#process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.endjob_step,process.RAWSIMoutput_step) +process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.endjob_step,process.RAWSIMoutput_step) +# filter all path with the production filter sequence +for path in process.paths: + getattr(process,path)._seq = process.ProductionFilterSequence * getattr(process,path)._seq + +# customisation of the process. + +# Automatic addition of the customisation function from SLHCUpgradeSimulations.Configuration.postLS1Customs +from SLHCUpgradeSimulations.Configuration.postLS1Customs import customisePostLS1 + +#call to customisation function customisePostLS1 imported from SLHCUpgradeSimulations.Configuration.postLS1Customs +process = customisePostLS1(process) + +# End of customisation functions + + + From e64606095a2323b44b7fdfd6f3cbf3647dc0a687 Mon Sep 17 00:00:00 2001 From: Fabio Colombo Date: Tue, 3 Nov 2015 17:47:11 +0100 Subject: [PATCH 09/66] AntiElectronIDMVA6: classes and plugin --- .../RecoTau/interface/AntiElectronIDMVA6.h | 166 +++ ...ecoTauDiscriminationAgainstElectronMVA6.cc | 244 +++++ ...auDiscriminationAgainstElectronMVA6_cfi.py | 38 + RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc | 965 ++++++++++++++++++ 4 files changed, 1413 insertions(+) create mode 100644 RecoTauTag/RecoTau/interface/AntiElectronIDMVA6.h create mode 100644 RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationAgainstElectronMVA6.cc create mode 100644 RecoTauTag/RecoTau/python/PFRecoTauDiscriminationAgainstElectronMVA6_cfi.py create mode 100644 RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc diff --git a/RecoTauTag/RecoTau/interface/AntiElectronIDMVA6.h b/RecoTauTag/RecoTau/interface/AntiElectronIDMVA6.h new file mode 100644 index 0000000000000..29e20965030b9 --- /dev/null +++ b/RecoTauTag/RecoTau/interface/AntiElectronIDMVA6.h @@ -0,0 +1,166 @@ +//-------------------------------------------------------------------------------------------------- +// AntiElectronIDMVA6 +// +// Helper Class for applying MVA anti-electron discrimination +// +// Authors: F.Colombo, C.Veelken +//-------------------------------------------------------------------------------------------------- + +#ifndef RECOTAUTAG_RECOTAU_AntiElectronIDMVA6_H +#define RECOTAUTAG_RECOTAU_AntiElectronIDMVA6_H + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/FileInPath.h" + +#include "DataFormats/TauReco/interface/PFTau.h" +#include "DataFormats/TrackReco/interface/Track.h" +#include "DataFormats/TrackReco/interface/TrackFwd.h" +#include "DataFormats/GsfTrackReco/interface/GsfTrack.h" +#include "DataFormats/GsfTrackReco/interface/GsfTrackFwd.h" +#include "CondFormats/EgammaObjects/interface/GBRForest.h" + +#include "TMVA/Tools.h" +#include "TMVA/Reader.h" + +#include "DataFormats/Math/interface/deltaR.h" + +#include + +class AntiElectronIDMVA6 +{ + public: + + AntiElectronIDMVA6(const edm::ParameterSet&); + ~AntiElectronIDMVA6(); + + void beginEvent(const edm::Event&, const edm::EventSetup&); + + double MVAValue(Float_t TauPt, + Float_t TauEtaAtEcalEntrance, + Float_t TauPhi, + Float_t TauLeadChargedPFCandPt, + Float_t TauLeadChargedPFCandEtaAtEcalEntrance, + Float_t TauEmFraction, + Float_t TauLeadPFChargedHadrHoP, + Float_t TauLeadPFChargedHadrEoP, + Float_t TauVisMassIn, + Float_t TaudCrackEta, + Float_t TaudCrackPhi, + Float_t TauHasGsf, + Int_t TauSignalPFGammaCandsIn, + Int_t TauSignalPFGammaCandsOut, + const std::vector& GammasdEtaInSigCone, + const std::vector& GammasdPhiInSigCone, + const std::vector& GammasPtInSigCone, + const std::vector& GammasdEtaOutSigCone, + const std::vector& GammasdPhiOutSigCone, + const std::vector& GammasPtOutSigCone, + Float_t ElecEta, + Float_t ElecPhi, + Float_t ElecEtotOverPin, + Float_t ElecChi2NormGSF, + Float_t ElecChi2NormKF, + Int_t ElecGSFNumHits, + Int_t ElecKFNumHits, + Float_t ElecGSFTrackResol, + Float_t ElecGSFTracklnPt, + Float_t ElecPin, + Float_t ElecPout, + Float_t ElecEecal, + Float_t ElecDeltaEta, + Float_t ElecDeltaPhi, + Float_t ElecMvaInSigmaEtaEta, + Float_t ElecMvaInHadEnergy, + Float_t ElecMvaInDeltaEta + ); + + double MVAValue(Float_t TauPt, + Float_t TauEtaAtEcalEntrance, + Float_t TauPhi, + Float_t TauLeadChargedPFCandPt, + Float_t TauLeadChargedPFCandEtaAtEcalEntrance, + Float_t TauEmFraction, + Float_t TauLeadPFChargedHadrHoP, + Float_t TauLeadPFChargedHadrEoP, + Float_t TauVisMassIn, + Float_t TaudCrackEta, + Float_t TaudCrackPhi, + Float_t TauHasGsf, + Int_t TauSignalPFGammaCandsIn, + Int_t TauSignalPFGammaCandsOut, + Float_t TauGammaEtaMomIn, + Float_t TauGammaEtaMomOut, + Float_t TauGammaPhiMomIn, + Float_t TauGammaPhiMomOut, + Float_t TauGammaEnFracIn, + Float_t TauGammaEnFracOut, + Float_t ElecEta, + Float_t ElecPhi, + Float_t ElecEtotOverPin, + Float_t ElecChi2NormGSF, + Float_t ElecChi2NormKF, + Int_t ElecGSFNumHits, + Int_t ElecKFNumHits, + Float_t ElecGSFTrackResol, + Float_t ElecGSFTracklnPt, + Float_t ElecPin, + Float_t ElecPout, + Float_t ElecEecal, + Float_t ElecDeltaEta, + Float_t ElecDeltaPhi, + Float_t ElecMvaInSigmaEtaEta, + Float_t ElecMvaInHadEnergy, + Float_t ElecMvaInDeltaEta + ); + + // CV: this function can be called for all categories + double MVAValue(const reco::PFTau& thePFTau, + const reco::GsfElectron& theGsfEle); + // CV: this function can be called for category 1 only !! + double MVAValue(const reco::PFTau& thePFTau); + + private: + + double dCrackEta(double eta); + double minimum(double a,double b); + double dCrackPhi(double phi, double eta); + + bool isInitialized_; + bool loadMVAfromDB_; + edm::FileInPath inputFileName_; + + std::string mvaName_NoEleMatch_woGwoGSF_BL_; + std::string mvaName_NoEleMatch_wGwoGSF_BL_; + std::string mvaName_woGwGSF_BL_; + std::string mvaName_wGwGSF_BL_; + std::string mvaName_NoEleMatch_woGwoGSF_EC_; + std::string mvaName_NoEleMatch_wGwoGSF_EC_; + std::string mvaName_woGwGSF_EC_; + std::string mvaName_wGwGSF_EC_; + + Float_t* Var_NoEleMatch_woGwoGSF_Barrel_; + Float_t* Var_NoEleMatch_wGwoGSF_Barrel_; + Float_t* Var_woGwGSF_Barrel_; + Float_t* Var_wGwGSF_Barrel_; + Float_t* Var_NoEleMatch_woGwoGSF_Endcap_; + Float_t* Var_NoEleMatch_wGwoGSF_Endcap_; + Float_t* Var_woGwGSF_Endcap_; + Float_t* Var_wGwGSF_Endcap_; + + const GBRForest* mva_NoEleMatch_woGwoGSF_BL_; + const GBRForest* mva_NoEleMatch_wGwoGSF_BL_; + const GBRForest* mva_woGwGSF_BL_; + const GBRForest* mva_wGwGSF_BL_; + const GBRForest* mva_NoEleMatch_woGwoGSF_EC_; + const GBRForest* mva_NoEleMatch_wGwoGSF_EC_; + const GBRForest* mva_woGwGSF_EC_; + const GBRForest* mva_wGwGSF_EC_; + + std::vector inputFilesToDelete_; + + int verbosity_; +}; + +#endif diff --git a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationAgainstElectronMVA6.cc b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationAgainstElectronMVA6.cc new file mode 100644 index 0000000000000..45526c1518b41 --- /dev/null +++ b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationAgainstElectronMVA6.cc @@ -0,0 +1,244 @@ +/* class PFRecoTauDiscriminationAgainstElectronMVA6 + * created : Nov 2 2015, + * revised : , + * Authorss : Fabio Colombo (KIT) + */ + +#include "FWCore/Utilities/interface/Exception.h" +#include "FWCore/ParameterSet/interface/FileInPath.h" + +#include "RecoTauTag/RecoTau/interface/TauDiscriminationProducerBase.h" +#include "RecoTauTag/RecoTau/interface/AntiElectronIDMVA6.h" + +#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" +#include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h" +#include "DataFormats/TrackReco/interface/Track.h" +#include "DataFormats/GsfTrackReco/interface/GsfTrack.h" +#include "DataFormats/MuonReco/interface/Muon.h" +#include "DataFormats/TauReco/interface/PFTauDiscriminator.h" +#include "DataFormats/Math/interface/deltaR.h" + +#include + +#include +#include +#include + +using namespace reco; + +class PFRecoTauDiscriminationAgainstElectronMVA6 : public PFTauDiscriminationProducerBase +{ + public: + explicit PFRecoTauDiscriminationAgainstElectronMVA6(const edm::ParameterSet& cfg) + : PFTauDiscriminationProducerBase(cfg), + mva_(0), + category_output_(0) + { + mva_ = new AntiElectronIDMVA6(cfg); + + srcGsfElectrons_ = cfg.getParameter("srcGsfElectrons"); + GsfElectrons_token = consumes(srcGsfElectrons_); + + verbosity_ = ( cfg.exists("verbosity") ) ? + cfg.getParameter("verbosity") : 0; + + // add category index + produces("category"); + } + + void beginEvent(const edm::Event&, const edm::EventSetup&); + + double discriminate(const PFTauRef&) const; + + void endEvent(edm::Event&); + + ~PFRecoTauDiscriminationAgainstElectronMVA6() + { + delete mva_; + } + +private: + bool isInEcalCrack(double) const; + + std::string moduleLabel_; + + AntiElectronIDMVA6* mva_; + float* mvaInput_; + + edm::InputTag srcGsfElectrons_; + edm::EDGetTokenT GsfElectrons_token; + edm::Handle gsfElectrons_; + edm::Handle taus_; + + std::auto_ptr category_output_; + + int verbosity_; +}; + +void PFRecoTauDiscriminationAgainstElectronMVA6::beginEvent(const edm::Event& evt, const edm::EventSetup& es) +{ + mva_->beginEvent(evt, es); + + evt.getByToken(Tau_token, taus_); + category_output_.reset(new PFTauDiscriminator(TauRefProd(taus_))); + + evt.getByToken(GsfElectrons_token, gsfElectrons_); +} + +double PFRecoTauDiscriminationAgainstElectronMVA6::discriminate(const PFTauRef& thePFTauRef) const +{ + double mvaValue = 1.; + double category = -1.; + bool isGsfElectronMatched = false; + + float deltaRDummy = 9.9; + + float tauEtaAtEcalEntrance = -99.; + float sumEtaTimesEnergy = 0.; + float sumEnergy = 0.; + const std::vector& signalPFCands = thePFTauRef->signalPFCands(); + for ( std::vector::const_iterator pfCandidate = signalPFCands.begin(); + pfCandidate != signalPFCands.end(); ++pfCandidate ) { + sumEtaTimesEnergy += ((*pfCandidate)->positionAtECALEntrance().eta()*(*pfCandidate)->energy()); + sumEnergy += (*pfCandidate)->energy(); + } + if ( sumEnergy > 0. ) { + tauEtaAtEcalEntrance = sumEtaTimesEnergy/sumEnergy; + } + + float leadChargedPFCandEtaAtEcalEntrance = -99.; + float leadChargedPFCandPt = -99.; + for ( std::vector::const_iterator pfCandidate = signalPFCands.begin(); + pfCandidate != signalPFCands.end(); ++pfCandidate ) { + const reco::Track* track = 0; + if ( (*pfCandidate)->trackRef().isNonnull() ) track = (*pfCandidate)->trackRef().get(); + else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->innerTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->innerTrack().get(); + else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->globalTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->globalTrack().get(); + else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->outerTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->outerTrack().get(); + else if ( (*pfCandidate)->gsfTrackRef().isNonnull() ) track = (*pfCandidate)->gsfTrackRef().get(); + if ( track ) { + if ( track->pt() > leadChargedPFCandPt ) { + leadChargedPFCandEtaAtEcalEntrance = (*pfCandidate)->positionAtECALEntrance().eta(); + leadChargedPFCandPt = track->pt(); + } + } + } + + if( (*thePFTauRef).leadPFChargedHadrCand().isNonnull()) { + + int numSignalPFGammaCandsInSigCone = 0; + const std::vector& signalPFGammaCands = thePFTauRef->signalPFGammaCands(); + + for ( std::vector::const_iterator pfGamma = signalPFGammaCands.begin(); + pfGamma != signalPFGammaCands.end(); ++pfGamma ) { + + double dR = deltaR((*pfGamma)->p4(), thePFTauRef->leadPFChargedHadrCand()->p4()); + + // pfGammas inside the tau signal cone + if (dR < std::max(0.05, std::min(0.10, 3.0/thePFTauRef->pt()))) { + numSignalPFGammaCandsInSigCone += 1; + } + } + + // loop over the electrons + for ( reco::GsfElectronCollection::const_iterator theGsfElectron = gsfElectrons_->begin(); + theGsfElectron != gsfElectrons_->end(); ++theGsfElectron ) { + if ( theGsfElectron->pt() > 10. ) { // CV: only take electrons above some minimal energy/Pt into account... + double deltaREleTau = deltaR(theGsfElectron->p4(), thePFTauRef->p4()); + deltaRDummy = deltaREleTau; + if ( deltaREleTau < 0.3 ) { + double mva_match = mva_->MVAValue(*thePFTauRef, *theGsfElectron); + bool hasGsfTrack = thePFTauRef->leadPFChargedHadrCand()->gsfTrackRef().isNonnull(); + if ( !hasGsfTrack ) + hasGsfTrack = theGsfElectron->gsfTrack().isNonnull(); + + //// Veto taus that go to Ecal crack + if ( isInEcalCrack(tauEtaAtEcalEntrance) || isInEcalCrack(leadChargedPFCandEtaAtEcalEntrance) ) { + // add category index + category_output_->setValue(tauIndex_, category); + // return MVA output value + return -99; + } + //// Veto taus that go to Ecal crack + + if ( TMath::Abs(tauEtaAtEcalEntrance) < 1.479 ) { // Barrel + if ( numSignalPFGammaCandsInSigCone == 0 && hasGsfTrack ) { + category = 5.; + } + else if ( numSignalPFGammaCandsInSigCone >= 1 && hasGsfTrack ) { + category = 7.; + } + } else { // Endcap + if ( numSignalPFGammaCandsInSigCone == 0 && hasGsfTrack ) { + category = 13.; + } + else if ( numSignalPFGammaCandsInSigCone >= 1 && hasGsfTrack ) { + category = 15.; + } + } + + mvaValue = TMath::Min(mvaValue, mva_match); + isGsfElectronMatched = true; + } // deltaR < 0.3 + } // electron pt > 10 + } // end of loop over electrons + + if ( !isGsfElectronMatched ) { + mvaValue = mva_->MVAValue(*thePFTauRef); + bool hasGsfTrack = thePFTauRef->leadPFChargedHadrCand()->gsfTrackRef().isNonnull(); + + //// Veto taus that go to Ecal crack + if ( isInEcalCrack(tauEtaAtEcalEntrance) || isInEcalCrack(leadChargedPFCandEtaAtEcalEntrance) ) { + // add category index + category_output_->setValue(tauIndex_, category); + // return MVA output value + return -99; + } + //// Veto taus that go to Ecal crack + + if ( TMath::Abs(tauEtaAtEcalEntrance) < 1.479 ) { // Barrel + if ( numSignalPFGammaCandsInSigCone == 0 && !hasGsfTrack ) { + category = 0.; + } + else if ( numSignalPFGammaCandsInSigCone >= 1 && !hasGsfTrack ) { + category = 2.; + } + } else { // Endcap + if ( numSignalPFGammaCandsInSigCone == 0 && !hasGsfTrack ) { + category = 8.; + } + else if ( numSignalPFGammaCandsInSigCone >= 1 && !hasGsfTrack ) { + category = 10.; + } + } + } + } + + if ( verbosity_ ) { + edm::LogPrint("PFTauAgainstEleMVA6") << ":" ; + edm::LogPrint("PFTauAgainstEleMVA6") << " tau: Pt = " << thePFTauRef->pt() << ", eta = " << thePFTauRef->eta() << ", phi = " << thePFTauRef->phi(); + edm::LogPrint("PFTauAgainstEleMVA6") << " deltaREleTau = " << deltaRDummy << ", isGsfElectronMatched = " << isGsfElectronMatched; + edm::LogPrint("PFTauAgainstEleMVA6") << " #Prongs = " << thePFTauRef->signalPFChargedHadrCands().size(); + edm::LogPrint("PFTauAgainstEleMVA6") << " MVA = " << mvaValue << ", category = " << category; + } + + // add category index + category_output_->setValue(tauIndex_, category); + // return MVA output value + return mvaValue; +} + +void PFRecoTauDiscriminationAgainstElectronMVA6::endEvent(edm::Event& evt) +{ + // add all category indices to event + evt.put(category_output_, "category"); +} + +bool +PFRecoTauDiscriminationAgainstElectronMVA6::isInEcalCrack(double eta) const +{ + double absEta = fabs(eta); + return (absEta > 1.460 && absEta < 1.558); +} + +DEFINE_FWK_MODULE(PFRecoTauDiscriminationAgainstElectronMVA6); diff --git a/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationAgainstElectronMVA6_cfi.py b/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationAgainstElectronMVA6_cfi.py new file mode 100644 index 0000000000000..02a6d1300bb07 --- /dev/null +++ b/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationAgainstElectronMVA6_cfi.py @@ -0,0 +1,38 @@ +import FWCore.ParameterSet.Config as cms + +from RecoTauTag.RecoTau.TauDiscriminatorTools import requireLeadTrack + +pfRecoTauDiscriminationAgainstElectronMVA6 = cms.EDProducer("PFRecoTauDiscriminationAgainstElectronMVA6", + + # tau collection to discriminate + PFTauProducer = cms.InputTag('pfTauProducer'), + + # Require leading pion ensures that: + # 1) these is at least one track above threshold (0.5 GeV) in the signal cone + # 2) a track OR a pi-zero in the signal cone has pT > 5 GeV + Prediscriminants = requireLeadTrack, + + method = cms.string("BDTG"), + loadMVAfromDB = cms.bool(True), + returnMVA = cms.bool(True), + + mvaName_NoEleMatch_woGwoGSF_BL = cms.string("gbr_NoEleMatch_woGwoGSF_BL"), + mvaName_NoEleMatch_wGwoGSF_BL = cms.string("gbr_NoEleMatch_wGwoGSF_BL"), + mvaName_woGwGSF_BL = cms.string("gbr_woGwGSF_BL"), + mvaName_wGwGSF_BL = cms.string("gbr_wGwGSF_BL"), + mvaName_NoEleMatch_woGwoGSF_EC = cms.string("gbr_NoEleMatch_woGwoGSF_EC"), + mvaName_NoEleMatch_wGwoGSF_EC = cms.string("gbr_NoEleMatch_wGwoGSF_EC"), + mvaName_woGwGSF_EC = cms.string("gbr_woGwGSF_EC"), + mvaName_wGwGSF_EC = cms.string("gbr_wGwGSF_EC"), + + minMVANoEleMatchWOgWOgsfBL = cms.double(0.0), + minMVANoEleMatchWgWOgsfBL = cms.double(0.0), + minMVAWOgWgsfBL = cms.double(0.0), + minMVAWgWgsfBL = cms.double(0.0), + minMVANoEleMatchWOgWOgsfEC = cms.double(0.0), + minMVANoEleMatchWgWOgsfEC = cms.double(0.0), + minMVAWOgWgsfEC = cms.double(0.0), + minMVAWgWgsfEC = cms.double(0.0), + + srcGsfElectrons = cms.InputTag('gedGsfElectrons') +) diff --git a/RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc b/RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc new file mode 100644 index 0000000000000..177aa1293d6ae --- /dev/null +++ b/RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc @@ -0,0 +1,965 @@ +#include "RecoTauTag/RecoTau/interface/AntiElectronIDMVA6.h" + +#include "FWCore/Utilities/interface/Exception.h" + +#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" +#include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h" +#include "DataFormats/TrackReco/interface/Track.h" +#include "DataFormats/GsfTrackReco/interface/GsfTrack.h" +#include "DataFormats/MuonReco/interface/Muon.h" + +#include "CondFormats/DataRecord/interface/GBRWrapperRcd.h" +#include "FWCore/Framework/interface/ESHandle.h" + +#include + +AntiElectronIDMVA6::AntiElectronIDMVA6(const edm::ParameterSet& cfg) + : isInitialized_(false), + mva_NoEleMatch_woGwoGSF_BL_(0), + mva_NoEleMatch_wGwoGSF_BL_(0), + mva_woGwGSF_BL_(0), + mva_wGwGSF_BL_(0), + mva_NoEleMatch_woGwoGSF_EC_(0), + mva_NoEleMatch_wGwoGSF_EC_(0), + mva_woGwGSF_EC_(0), + mva_wGwGSF_EC_(0) +{ + loadMVAfromDB_ = cfg.exists("loadMVAfromDB") ? cfg.getParameter("loadMVAfromDB"): false; + if ( !loadMVAfromDB_ ) { + if(cfg.exists("inputFileName")){ + inputFileName_ = cfg.getParameter("inputFileName"); + }else throw cms::Exception("MVA input not defined") << "Requested to load tau MVA input from ROOT file but no file provided in cfg file"; + + } + + mvaName_NoEleMatch_woGwoGSF_BL_ = cfg.getParameter("mvaName_NoEleMatch_woGwoGSF_BL"); + mvaName_NoEleMatch_wGwoGSF_BL_ = cfg.getParameter("mvaName_NoEleMatch_wGwoGSF_BL"); + mvaName_woGwGSF_BL_ = cfg.getParameter("mvaName_woGwGSF_BL"); + mvaName_wGwGSF_BL_ = cfg.getParameter("mvaName_wGwGSF_BL"); + mvaName_NoEleMatch_woGwoGSF_EC_ = cfg.getParameter("mvaName_NoEleMatch_woGwoGSF_EC"); + mvaName_NoEleMatch_wGwoGSF_EC_ = cfg.getParameter("mvaName_NoEleMatch_wGwoGSF_EC"); + mvaName_woGwGSF_EC_ = cfg.getParameter("mvaName_woGwGSF_EC"); + mvaName_wGwGSF_EC_ = cfg.getParameter("mvaName_wGwGSF_EC"); + + Var_NoEleMatch_woGwoGSF_Barrel_ = new Float_t[10]; + Var_NoEleMatch_wGwoGSF_Barrel_ = new Float_t[18]; + Var_woGwGSF_Barrel_ = new Float_t[24]; + Var_wGwGSF_Barrel_ = new Float_t[32]; + Var_NoEleMatch_woGwoGSF_Endcap_ = new Float_t[9]; + Var_NoEleMatch_wGwoGSF_Endcap_ = new Float_t[17]; + Var_woGwGSF_Endcap_ = new Float_t[23]; + Var_wGwGSF_Endcap_ = new Float_t[31]; + + verbosity_ = 0; +} + +AntiElectronIDMVA6::~AntiElectronIDMVA6() +{ + delete [] Var_NoEleMatch_woGwoGSF_Barrel_; + delete [] Var_NoEleMatch_wGwoGSF_Barrel_; + delete [] Var_woGwGSF_Barrel_; + delete [] Var_wGwGSF_Barrel_; + delete [] Var_NoEleMatch_woGwoGSF_Endcap_; + delete [] Var_NoEleMatch_wGwoGSF_Endcap_; + delete [] Var_woGwGSF_Endcap_; + delete [] Var_wGwGSF_Endcap_; + + if ( !loadMVAfromDB_ ){ + delete mva_NoEleMatch_woGwoGSF_BL_; + delete mva_NoEleMatch_wGwoGSF_BL_; + delete mva_woGwGSF_BL_; + delete mva_wGwGSF_BL_; + delete mva_NoEleMatch_woGwoGSF_EC_; + delete mva_NoEleMatch_wGwoGSF_EC_; + delete mva_woGwGSF_EC_; + delete mva_wGwGSF_EC_; + } + + for ( std::vector::iterator it = inputFilesToDelete_.begin(); + it != inputFilesToDelete_.end(); ++it ) { + delete (*it); + } +} + +namespace +{ + const GBRForest* loadMVAfromFile(TFile* inputFile, const std::string& mvaName) + { + const GBRForest* mva = (GBRForest*)inputFile->Get(mvaName.data()); + if ( !mva ) + throw cms::Exception("PFRecoTauDiscriminationAgainstElectronMVA6::loadMVA") + << " Failed to load MVA = " << mvaName.data() << " from file " << " !!\n"; + + return mva; + } + + const GBRForest* loadMVAfromDB(const edm::EventSetup& es, const std::string& mvaName) + { + edm::ESHandle mva; + es.get().get(mvaName, mva); + return mva.product(); + } +} + +void AntiElectronIDMVA6::beginEvent(const edm::Event& evt, const edm::EventSetup& es) +{ + if ( !isInitialized_ ) { + if ( loadMVAfromDB_ ) { + mva_NoEleMatch_woGwoGSF_BL_ = loadMVAfromDB(es, mvaName_NoEleMatch_woGwoGSF_BL_); + mva_NoEleMatch_wGwoGSF_BL_ = loadMVAfromDB(es, mvaName_NoEleMatch_wGwoGSF_BL_); + mva_woGwGSF_BL_ = loadMVAfromDB(es, mvaName_woGwGSF_BL_); + mva_wGwGSF_BL_ = loadMVAfromDB(es, mvaName_wGwGSF_BL_); + mva_NoEleMatch_woGwoGSF_EC_ = loadMVAfromDB(es, mvaName_NoEleMatch_woGwoGSF_EC_); + mva_NoEleMatch_wGwoGSF_EC_ = loadMVAfromDB(es, mvaName_NoEleMatch_wGwoGSF_EC_); + mva_woGwGSF_EC_ = loadMVAfromDB(es, mvaName_woGwGSF_EC_); + mva_wGwGSF_EC_ = loadMVAfromDB(es, mvaName_wGwGSF_EC_); + } else { + if ( inputFileName_.location() == edm::FileInPath::Unknown ) throw cms::Exception("PFRecoTauDiscriminationAgainstElectronMVA6::loadMVA") + << " Failed to find File = " << inputFileName_ << " !!\n"; + TFile* inputFile = new TFile(inputFileName_.fullPath().data()); + + mva_NoEleMatch_woGwoGSF_BL_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_woGwoGSF_BL_); + mva_NoEleMatch_wGwoGSF_BL_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_wGwoGSF_BL_); + mva_woGwGSF_BL_ = loadMVAfromFile(inputFile, mvaName_woGwGSF_BL_); + mva_wGwGSF_BL_ = loadMVAfromFile(inputFile, mvaName_wGwGSF_BL_); + mva_NoEleMatch_woGwoGSF_EC_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_woGwoGSF_EC_); + mva_NoEleMatch_wGwoGSF_EC_ = loadMVAfromFile(inputFile, mvaName_NoEleMatch_wGwoGSF_EC_); + mva_woGwGSF_EC_ = loadMVAfromFile(inputFile, mvaName_woGwGSF_EC_); + mva_wGwGSF_EC_ = loadMVAfromFile(inputFile, mvaName_wGwGSF_EC_); + inputFilesToDelete_.push_back(inputFile); + } + isInitialized_ = true; + } +} + +double AntiElectronIDMVA6::MVAValue(Float_t TauPt, + Float_t TauEtaAtEcalEntrance, + Float_t TauPhi, + Float_t TauLeadChargedPFCandPt, + Float_t TauLeadChargedPFCandEtaAtEcalEntrance, + Float_t TauEmFraction, + Float_t TauLeadPFChargedHadrHoP, + Float_t TauLeadPFChargedHadrEoP, + Float_t TauVisMassIn, + Float_t TaudCrackEta, + Float_t TaudCrackPhi, + Float_t TauHasGsf, + Int_t TauSignalPFGammaCandsIn, + Int_t TauSignalPFGammaCandsOut, + const std::vector& GammasdEtaInSigCone, + const std::vector& GammasdPhiInSigCone, + const std::vector& GammasPtInSigCone, + const std::vector& GammasdEtaOutSigCone, + const std::vector& GammasdPhiOutSigCone, + const std::vector& GammasPtOutSigCone, + Float_t ElecEta, + Float_t ElecPhi, + Float_t ElecEtotOverPin, + Float_t ElecChi2NormGSF, + Float_t ElecChi2NormKF, + Int_t ElecGSFNumHits, + Int_t ElecKFNumHits, + Float_t ElecGSFTrackResol, + Float_t ElecGSFTracklnPt, + Float_t ElecPin, + Float_t ElecPout, + Float_t ElecEecal, + Float_t ElecDeltaEta, + Float_t ElecDeltaPhi, + Float_t ElecMvaInSigmaEtaEta, + Float_t ElecMvaInHadEnergy, + Float_t ElecMvaInDeltaEta) +{ + double sumPt = 0.; + double dEta = 0.; + double dEta2 = 0.; + double dPhi = 0.; + double dPhi2 = 0.; + double sumPt2 = 0.; + for ( unsigned int i = 0 ; i < GammasPtInSigCone.size() ; ++i ) { + double pt_i = GammasPtInSigCone[i]; + double phi_i = GammasdPhiInSigCone[i]; + if ( GammasdPhiInSigCone[i] > M_PI ) phi_i = GammasdPhiInSigCone[i] - 2*M_PI; + else if ( GammasdPhiInSigCone[i] < -M_PI ) phi_i = GammasdPhiInSigCone[i] + 2*M_PI; + double eta_i = GammasdEtaInSigCone[i]; + sumPt += pt_i; + sumPt2 += (pt_i*pt_i); + dEta += (pt_i*eta_i); + dEta2 += (pt_i*eta_i*eta_i); + dPhi += (pt_i*phi_i); + dPhi2 += (pt_i*phi_i*phi_i); + } + + Float_t TauGammaEnFracIn = sumPt/TauPt; + + if ( sumPt > 0. ) { + dEta /= sumPt; + dPhi /= sumPt; + dEta2 /= sumPt; + dPhi2 /= sumPt; + } + + Float_t TauGammaEtaMomIn = std::sqrt(dEta2)*std::sqrt(TauGammaEnFracIn)*TauPt; + Float_t TauGammaPhiMomIn = std::sqrt(dPhi2)*std::sqrt(TauGammaEnFracIn)*TauPt; + + sumPt = 0.; + dEta = 0.; + dEta2 = 0.; + dPhi = 0.; + dPhi2 = 0.; + sumPt2 = 0.; + for ( unsigned int i = 0 ; i < GammasPtOutSigCone.size() ; ++i ) { + double pt_i = GammasPtOutSigCone[i]; + double phi_i = GammasdPhiOutSigCone[i]; + if ( GammasdPhiOutSigCone[i] > M_PI ) phi_i = GammasdPhiOutSigCone[i] - 2*M_PI; + else if ( GammasdPhiOutSigCone[i] < -M_PI ) phi_i = GammasdPhiOutSigCone[i] + 2*M_PI; + double eta_i = GammasdEtaOutSigCone[i]; + sumPt += pt_i; + sumPt2 += (pt_i*pt_i); + dEta += (pt_i*eta_i); + dEta2 += (pt_i*eta_i*eta_i); + dPhi += (pt_i*phi_i); + dPhi2 += (pt_i*phi_i*phi_i); + } + + Float_t TauGammaEnFracOut = sumPt/TauPt; + + if ( sumPt > 0. ) { + dEta /= sumPt; + dPhi /= sumPt; + dEta2 /= sumPt; + dPhi2 /= sumPt; + } + + Float_t TauGammaEtaMomOut = std::sqrt(dEta2)*std::sqrt(TauGammaEnFracOut)*TauPt; + Float_t TauGammaPhiMomOut = std::sqrt(dPhi2)*std::sqrt(TauGammaEnFracOut)*TauPt; + + return MVAValue(TauPt, + TauEtaAtEcalEntrance, + TauPhi, + TauLeadChargedPFCandPt, + TauLeadChargedPFCandEtaAtEcalEntrance, + TauEmFraction, + TauLeadPFChargedHadrHoP, + TauLeadPFChargedHadrEoP, + TauVisMassIn, + TaudCrackEta, + TaudCrackPhi, + TauHasGsf, + TauSignalPFGammaCandsIn, + TauSignalPFGammaCandsOut, + TauGammaEtaMomIn, + TauGammaEtaMomOut, + TauGammaPhiMomIn, + TauGammaPhiMomOut, + TauGammaEnFracIn, + TauGammaEnFracOut, + ElecEta, + ElecPhi, + ElecEtotOverPin, + ElecChi2NormGSF, + ElecChi2NormKF, + ElecGSFNumHits, + ElecKFNumHits, + ElecGSFTrackResol, + ElecGSFTracklnPt, + ElecPin, + ElecPout, + ElecEecal, + ElecDeltaEta, + ElecDeltaPhi, + ElecMvaInSigmaEtaEta, + ElecMvaInHadEnergy, + ElecMvaInDeltaEta); +} + +double AntiElectronIDMVA6::MVAValue(Float_t TauPt, + Float_t TauEtaAtEcalEntrance, + Float_t TauPhi, + Float_t TauLeadChargedPFCandPt, + Float_t TauLeadChargedPFCandEtaAtEcalEntrance, + Float_t TauEmFraction, + Float_t TauLeadPFChargedHadrHoP, + Float_t TauLeadPFChargedHadrEoP, + Float_t TauVisMassIn, + Float_t TaudCrackEta, + Float_t TaudCrackPhi, + Float_t TauHasGsf, + Int_t TauSignalPFGammaCandsIn, + Int_t TauSignalPFGammaCandsOut, + Float_t TauGammaEtaMomIn, + Float_t TauGammaEtaMomOut, + Float_t TauGammaPhiMomIn, + Float_t TauGammaPhiMomOut, + Float_t TauGammaEnFracIn, + Float_t TauGammaEnFracOut, + Float_t ElecEta, + Float_t ElecPhi, + Float_t ElecEtotOverPin, + Float_t ElecChi2NormGSF, + Float_t ElecChi2NormKF, + Int_t ElecGSFNumHits, + Int_t ElecKFNumHits, + Float_t ElecGSFTrackResol, + Float_t ElecGSFTracklnPt, + Float_t ElecPin, + Float_t ElecPout, + Float_t ElecEecal, + Float_t ElecDeltaEta, + Float_t ElecDeltaPhi, + Float_t ElecMvaInSigmaEtaEta, + Float_t ElecMvaInHadEnergy, + Float_t ElecMvaInDeltaEta) +{ + + if ( !isInitialized_ ) { + throw cms::Exception("ClassNotInitialized") + << " AntiElectronMVA not properly initialized !!\n"; + } + + double mvaValue = -99.; + if ( deltaR(TauEtaAtEcalEntrance, TauPhi, ElecEta, ElecPhi) > 0.3 && TauSignalPFGammaCandsIn == 0 && TauHasGsf < 0.5) { + if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ){ + Var_NoEleMatch_woGwoGSF_Barrel_[0] = TauEtaAtEcalEntrance; + Var_NoEleMatch_woGwoGSF_Barrel_[1] = TauLeadChargedPFCandEtaAtEcalEntrance; + Var_NoEleMatch_woGwoGSF_Barrel_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt)); + Var_NoEleMatch_woGwoGSF_Barrel_[3] = std::log(std::max(float(1.), TauPt)); + Var_NoEleMatch_woGwoGSF_Barrel_[4] = TauEmFraction; + Var_NoEleMatch_woGwoGSF_Barrel_[5] = TauLeadPFChargedHadrHoP; + Var_NoEleMatch_woGwoGSF_Barrel_[6] = TauLeadPFChargedHadrEoP; + Var_NoEleMatch_woGwoGSF_Barrel_[7] = TauVisMassIn; + Var_NoEleMatch_woGwoGSF_Barrel_[8] = TaudCrackEta; + Var_NoEleMatch_woGwoGSF_Barrel_[9] = TaudCrackPhi; + mvaValue = mva_NoEleMatch_woGwoGSF_BL_->GetClassifier(Var_NoEleMatch_woGwoGSF_Barrel_); + } else { + Var_NoEleMatch_woGwoGSF_Endcap_[0] = TauEtaAtEcalEntrance; + Var_NoEleMatch_woGwoGSF_Endcap_[1] = TauLeadChargedPFCandEtaAtEcalEntrance; + Var_NoEleMatch_woGwoGSF_Endcap_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt)); + Var_NoEleMatch_woGwoGSF_Endcap_[3] = std::log(std::max(float(1.), TauPt)); + Var_NoEleMatch_woGwoGSF_Endcap_[4] = TauEmFraction; + Var_NoEleMatch_woGwoGSF_Endcap_[5] = TauLeadPFChargedHadrHoP; + Var_NoEleMatch_woGwoGSF_Endcap_[6] = TauLeadPFChargedHadrEoP; + Var_NoEleMatch_woGwoGSF_Endcap_[7] = TauVisMassIn; + Var_NoEleMatch_woGwoGSF_Endcap_[8] = TaudCrackEta; + mvaValue = mva_NoEleMatch_woGwoGSF_EC_->GetClassifier(Var_NoEleMatch_woGwoGSF_Endcap_); + } + } + else if ( deltaR(TauEtaAtEcalEntrance, TauPhi, ElecEta, ElecPhi) > 0.3 && TauSignalPFGammaCandsIn > 0 && TauHasGsf < 0.5 ) { + if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ){ + Var_NoEleMatch_wGwoGSF_Barrel_[0] = TauEtaAtEcalEntrance; + Var_NoEleMatch_wGwoGSF_Barrel_[1] = TauLeadChargedPFCandEtaAtEcalEntrance; + Var_NoEleMatch_wGwoGSF_Barrel_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt)); + Var_NoEleMatch_wGwoGSF_Barrel_[3] = std::log(std::max(float(1.), TauPt)); + Var_NoEleMatch_wGwoGSF_Barrel_[4] = TauEmFraction; + Var_NoEleMatch_wGwoGSF_Barrel_[5] = TauSignalPFGammaCandsIn; + Var_NoEleMatch_wGwoGSF_Barrel_[6] = TauSignalPFGammaCandsOut; + Var_NoEleMatch_wGwoGSF_Barrel_[7] = TauLeadPFChargedHadrHoP; + Var_NoEleMatch_wGwoGSF_Barrel_[8] = TauLeadPFChargedHadrEoP; + Var_NoEleMatch_wGwoGSF_Barrel_[9] = TauVisMassIn; + Var_NoEleMatch_wGwoGSF_Barrel_[10] = TauGammaEtaMomIn; + Var_NoEleMatch_wGwoGSF_Barrel_[11] = TauGammaEtaMomOut; + Var_NoEleMatch_wGwoGSF_Barrel_[12] = TauGammaPhiMomIn; + Var_NoEleMatch_wGwoGSF_Barrel_[13] = TauGammaPhiMomOut; + Var_NoEleMatch_wGwoGSF_Barrel_[14] = TauGammaEnFracIn; + Var_NoEleMatch_wGwoGSF_Barrel_[15] = TauGammaEnFracOut; + Var_NoEleMatch_wGwoGSF_Barrel_[16] = TaudCrackEta; + Var_NoEleMatch_wGwoGSF_Barrel_[17] = TaudCrackPhi; + mvaValue = mva_NoEleMatch_wGwoGSF_BL_->GetClassifier(Var_NoEleMatch_wGwoGSF_Barrel_); + } else { + Var_NoEleMatch_wGwoGSF_Endcap_[0] = TauEtaAtEcalEntrance; + Var_NoEleMatch_wGwoGSF_Endcap_[1] = TauLeadChargedPFCandEtaAtEcalEntrance; + Var_NoEleMatch_wGwoGSF_Endcap_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt)); + Var_NoEleMatch_wGwoGSF_Endcap_[3] = std::log(std::max(float(1.), TauPt)); + Var_NoEleMatch_wGwoGSF_Endcap_[4] = TauEmFraction; + Var_NoEleMatch_wGwoGSF_Endcap_[5] = TauSignalPFGammaCandsIn; + Var_NoEleMatch_wGwoGSF_Endcap_[6] = TauSignalPFGammaCandsOut; + Var_NoEleMatch_wGwoGSF_Endcap_[7] = TauLeadPFChargedHadrHoP; + Var_NoEleMatch_wGwoGSF_Endcap_[8] = TauLeadPFChargedHadrEoP; + Var_NoEleMatch_wGwoGSF_Endcap_[9] = TauVisMassIn; + Var_NoEleMatch_wGwoGSF_Endcap_[10] = TauGammaEtaMomIn; + Var_NoEleMatch_wGwoGSF_Endcap_[11] = TauGammaEtaMomOut; + Var_NoEleMatch_wGwoGSF_Endcap_[12] = TauGammaPhiMomIn; + Var_NoEleMatch_wGwoGSF_Endcap_[13] = TauGammaPhiMomOut; + Var_NoEleMatch_wGwoGSF_Endcap_[14] = TauGammaEnFracIn; + Var_NoEleMatch_wGwoGSF_Endcap_[15] = TauGammaEnFracOut; + Var_NoEleMatch_wGwoGSF_Endcap_[16] = TaudCrackEta; + mvaValue = mva_NoEleMatch_wGwoGSF_EC_->GetClassifier(Var_NoEleMatch_wGwoGSF_Endcap_); + } + } + else if ( TauSignalPFGammaCandsIn == 0 && TauHasGsf > 0.5 ) { + if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ) { + Var_woGwGSF_Barrel_[0] = std::max(float(-0.1), ElecEtotOverPin); + Var_woGwGSF_Barrel_[1] = std::log(ElecChi2NormGSF); + Var_woGwGSF_Barrel_[2] = ElecGSFNumHits; + Var_woGwGSF_Barrel_[3] = std::log(ElecGSFTrackResol); + Var_woGwGSF_Barrel_[4] = ElecGSFTracklnPt; + Var_woGwGSF_Barrel_[5] = ((ElecGSFNumHits - ElecKFNumHits)/(ElecGSFNumHits + ElecKFNumHits)); + Var_woGwGSF_Barrel_[6] = std::log(ElecChi2NormKF); + Var_woGwGSF_Barrel_[7] = std::min(std::abs(ElecPin - ElecPout)/ElecPin, float(1.)); + Var_woGwGSF_Barrel_[8] = std::min(ElecEecal/ElecPout, float(20.)); + Var_woGwGSF_Barrel_[9] = ElecDeltaEta; + Var_woGwGSF_Barrel_[10] = ElecDeltaPhi; + Var_woGwGSF_Barrel_[11] = std::min(ElecMvaInSigmaEtaEta, float(0.01)); + Var_woGwGSF_Barrel_[12] = std::min(ElecMvaInHadEnergy, float(20.)); + Var_woGwGSF_Barrel_[13] = std::min(ElecMvaInDeltaEta, float(0.1)); + Var_woGwGSF_Barrel_[14] = TauEtaAtEcalEntrance; + Var_woGwGSF_Barrel_[15] = TauLeadChargedPFCandEtaAtEcalEntrance; + Var_woGwGSF_Barrel_[16] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt)); + Var_woGwGSF_Barrel_[17] = std::log(std::max(float(1.), TauPt)); + Var_woGwGSF_Barrel_[18] = TauEmFraction; + Var_woGwGSF_Barrel_[19] = TauLeadPFChargedHadrHoP; + Var_woGwGSF_Barrel_[20] = TauLeadPFChargedHadrEoP; + Var_woGwGSF_Barrel_[21] = TauVisMassIn; + Var_woGwGSF_Barrel_[22] = TaudCrackEta; + Var_woGwGSF_Barrel_[23] = TaudCrackPhi; + mvaValue = mva_woGwGSF_BL_->GetClassifier(Var_woGwGSF_Barrel_); + } else { + Var_woGwGSF_Endcap_[0] = std::max(float(-0.1), ElecEtotOverPin); + Var_woGwGSF_Endcap_[1] = std::log(ElecChi2NormGSF); + Var_woGwGSF_Endcap_[2] = ElecGSFNumHits; + Var_woGwGSF_Endcap_[3] = std::log(ElecGSFTrackResol); + Var_woGwGSF_Endcap_[4] = ElecGSFTracklnPt; + Var_woGwGSF_Endcap_[5] = ((ElecGSFNumHits - ElecKFNumHits)/(ElecGSFNumHits + ElecKFNumHits)); + Var_woGwGSF_Endcap_[6] = std::log(ElecChi2NormKF); + Var_woGwGSF_Endcap_[7] = std::min(std::abs(ElecPin - ElecPout)/ElecPin, float(1.)); + Var_woGwGSF_Endcap_[8] = std::min(ElecEecal/ElecPout, float(20.)); + Var_woGwGSF_Endcap_[9] = ElecDeltaEta; + Var_woGwGSF_Endcap_[10] = ElecDeltaPhi; + Var_woGwGSF_Endcap_[11] = std::min(ElecMvaInSigmaEtaEta, float(0.01)); + Var_woGwGSF_Endcap_[12] = std::min(ElecMvaInHadEnergy, float(20.)); + Var_woGwGSF_Endcap_[13] = std::min(ElecMvaInDeltaEta, float(0.1)); + Var_woGwGSF_Endcap_[14] = TauEtaAtEcalEntrance; + Var_woGwGSF_Endcap_[15] = TauLeadChargedPFCandEtaAtEcalEntrance; + Var_woGwGSF_Endcap_[16] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt)); + Var_woGwGSF_Endcap_[17] = std::log(std::max(float(1.), TauPt)); + Var_woGwGSF_Endcap_[18] = TauEmFraction; + Var_woGwGSF_Endcap_[19] = TauLeadPFChargedHadrHoP; + Var_woGwGSF_Endcap_[20] = TauLeadPFChargedHadrEoP; + Var_woGwGSF_Endcap_[21] = TauVisMassIn; + Var_woGwGSF_Endcap_[22] = TaudCrackEta; + mvaValue = mva_woGwGSF_EC_->GetClassifier(Var_woGwGSF_Endcap_); + } + } + else if ( TauSignalPFGammaCandsIn > 0 && TauHasGsf > 0.5 ) { + if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ) { + Var_wGwGSF_Barrel_[0] = std::max(float(-0.1), ElecEtotOverPin); + Var_wGwGSF_Barrel_[1] = std::log(ElecChi2NormGSF); + Var_wGwGSF_Barrel_[2] = ElecGSFNumHits; + Var_wGwGSF_Barrel_[3] = std::log(ElecGSFTrackResol); + Var_wGwGSF_Barrel_[4] = ElecGSFTracklnPt; + Var_wGwGSF_Barrel_[5] = ((ElecGSFNumHits - ElecKFNumHits)/(ElecGSFNumHits + ElecKFNumHits)); + Var_wGwGSF_Barrel_[6] = std::log(ElecChi2NormKF); + Var_wGwGSF_Barrel_[7] = std::min(std::abs(ElecPin - ElecPout)/ElecPin, float(1.)); + Var_wGwGSF_Barrel_[8] = std::min(ElecEecal/ElecPout, float(20.)); + Var_wGwGSF_Barrel_[9] = ElecDeltaEta; + Var_wGwGSF_Barrel_[10] = ElecDeltaPhi; + Var_wGwGSF_Barrel_[11] = std::min(ElecMvaInSigmaEtaEta, float(0.01)); + Var_wGwGSF_Barrel_[12] = std::min(ElecMvaInHadEnergy, float(20.)); + Var_wGwGSF_Barrel_[13] = std::min(ElecMvaInDeltaEta, float(0.1)); + Var_wGwGSF_Barrel_[14] = TauEtaAtEcalEntrance; + Var_wGwGSF_Barrel_[15] = TauLeadChargedPFCandEtaAtEcalEntrance; + Var_wGwGSF_Barrel_[16] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt)); + Var_wGwGSF_Barrel_[17] = std::log(std::max(float(1.), TauPt)); + Var_wGwGSF_Barrel_[18] = TauEmFraction; + Var_wGwGSF_Barrel_[19] = TauSignalPFGammaCandsIn; + Var_wGwGSF_Barrel_[20] = TauSignalPFGammaCandsOut; + Var_wGwGSF_Barrel_[21] = TauLeadPFChargedHadrHoP; + Var_wGwGSF_Barrel_[22] = TauLeadPFChargedHadrEoP; + Var_wGwGSF_Barrel_[23] = TauVisMassIn; + Var_wGwGSF_Barrel_[24] = TauGammaEtaMomIn; + Var_wGwGSF_Barrel_[25] = TauGammaEtaMomOut; + Var_wGwGSF_Barrel_[26] = TauGammaPhiMomIn; + Var_wGwGSF_Barrel_[27] = TauGammaPhiMomOut; + Var_wGwGSF_Barrel_[28] = TauGammaEnFracIn; + Var_wGwGSF_Barrel_[29] = TauGammaEnFracOut; + Var_wGwGSF_Barrel_[30] = TaudCrackEta; + Var_wGwGSF_Barrel_[31] = TaudCrackPhi; + mvaValue = mva_wGwGSF_BL_->GetClassifier(Var_wGwGSF_Barrel_); + } else { + Var_wGwGSF_Endcap_[0] = std::max(float(-0.1), ElecEtotOverPin); + Var_wGwGSF_Endcap_[1] = std::log(ElecChi2NormGSF); + Var_wGwGSF_Endcap_[2] = ElecGSFNumHits; + Var_wGwGSF_Endcap_[3] = std::log(ElecGSFTrackResol); + Var_wGwGSF_Endcap_[4] = ElecGSFTracklnPt; + Var_wGwGSF_Endcap_[5] = ((ElecGSFNumHits - ElecKFNumHits)/(ElecGSFNumHits + ElecKFNumHits)); + Var_wGwGSF_Endcap_[6] = std::log(ElecChi2NormKF); + Var_wGwGSF_Endcap_[7] = std::min(std::abs(ElecPin - ElecPout)/ElecPin, float(1.)); + Var_wGwGSF_Endcap_[8] = std::min(ElecEecal/ElecPout, float(20.)); + Var_wGwGSF_Endcap_[9] = ElecDeltaEta; + Var_wGwGSF_Endcap_[10] = ElecDeltaPhi; + Var_wGwGSF_Endcap_[11] = std::min(ElecMvaInSigmaEtaEta, float(0.01)); + Var_wGwGSF_Endcap_[12] = std::min(ElecMvaInHadEnergy, float(20.)); + Var_wGwGSF_Endcap_[13] = std::min(ElecMvaInDeltaEta, float(0.1)); + Var_wGwGSF_Endcap_[14] = TauEtaAtEcalEntrance; + Var_wGwGSF_Endcap_[15] = TauLeadChargedPFCandEtaAtEcalEntrance; + Var_wGwGSF_Endcap_[16] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt)); + Var_wGwGSF_Endcap_[17] = std::log(std::max(float(1.), TauPt)); + Var_wGwGSF_Endcap_[18] = TauEmFraction; + Var_wGwGSF_Endcap_[19] = TauSignalPFGammaCandsIn; + Var_wGwGSF_Endcap_[20] = TauSignalPFGammaCandsOut; + Var_wGwGSF_Endcap_[21] = TauLeadPFChargedHadrHoP; + Var_wGwGSF_Endcap_[22] = TauLeadPFChargedHadrEoP; + Var_wGwGSF_Endcap_[23] = TauVisMassIn; + Var_wGwGSF_Endcap_[24] = TauGammaEtaMomIn; + Var_wGwGSF_Endcap_[25] = TauGammaEtaMomOut; + Var_wGwGSF_Endcap_[26] = TauGammaPhiMomIn; + Var_wGwGSF_Endcap_[27] = TauGammaPhiMomOut; + Var_wGwGSF_Endcap_[28] = TauGammaEnFracIn; + Var_wGwGSF_Endcap_[29] = TauGammaEnFracOut; + Var_wGwGSF_Endcap_[30] = TaudCrackEta; + mvaValue = mva_wGwGSF_EC_->GetClassifier(Var_wGwGSF_Endcap_); + } + } + return mvaValue; +} + +double AntiElectronIDMVA6::MVAValue(const reco::PFTau& thePFTau, + const reco::GsfElectron& theGsfEle) + +{ + // === tau variables === + Float_t TauEtaAtEcalEntrance = -99.; + float sumEtaTimesEnergy = 0.; + float sumEnergy = 0.; + const std::vector& signalPFCands = thePFTau.signalPFCands(); + for ( std::vector::const_iterator pfCandidate = signalPFCands.begin(); + pfCandidate != signalPFCands.end(); ++pfCandidate ) { + sumEtaTimesEnergy += (*pfCandidate)->positionAtECALEntrance().eta()*(*pfCandidate)->energy(); + sumEnergy += (*pfCandidate)->energy(); + } + if ( sumEnergy > 0. ) { + TauEtaAtEcalEntrance = sumEtaTimesEnergy/sumEnergy; + } + + float TauLeadChargedPFCandEtaAtEcalEntrance = -99.; + float TauLeadChargedPFCandPt = -99.; + for ( std::vector::const_iterator pfCandidate = signalPFCands.begin(); + pfCandidate != signalPFCands.end(); ++pfCandidate ) { + const reco::Track* track = 0; + if ( (*pfCandidate)->trackRef().isNonnull() ) track = (*pfCandidate)->trackRef().get(); + else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->innerTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->innerTrack().get(); + else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->globalTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->globalTrack().get(); + else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->outerTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->outerTrack().get(); + else if ( (*pfCandidate)->gsfTrackRef().isNonnull() ) track = (*pfCandidate)->gsfTrackRef().get(); + if ( track ) { + if ( track->pt() > TauLeadChargedPFCandPt ) { + TauLeadChargedPFCandEtaAtEcalEntrance = (*pfCandidate)->positionAtECALEntrance().eta(); + TauLeadChargedPFCandPt = track->pt(); + } + } + } + + Float_t TauPt = thePFTau.pt(); + Float_t TauEmFraction = std::max(thePFTau.emFraction(), (Float_t)0.); + Float_t TauLeadPFChargedHadrHoP = 0.; + Float_t TauLeadPFChargedHadrEoP = 0.; + if ( thePFTau.leadPFChargedHadrCand()->p() > 0. ) { + TauLeadPFChargedHadrHoP = thePFTau.leadPFChargedHadrCand()->hcalEnergy()/thePFTau.leadPFChargedHadrCand()->p(); + TauLeadPFChargedHadrEoP = thePFTau.leadPFChargedHadrCand()->ecalEnergy()/thePFTau.leadPFChargedHadrCand()->p(); + } + + std::vector GammasdEtaInSigCone; + std::vector GammasdPhiInSigCone; + std::vector GammasPtInSigCone; + std::vector GammasdEtaOutSigCone; + std::vector GammasdPhiOutSigCone; + std::vector GammasPtOutSigCone; + reco::Candidate::LorentzVector pfGammaSum(0,0,0,0); + reco::Candidate::LorentzVector pfChargedSum(0,0,0,0); + + for ( unsigned i = 0 ; i < thePFTau.signalPFGammaCands().size(); ++i ) { + reco::PFCandidatePtr gamma = thePFTau.signalPFGammaCands().at(i); + float dR = deltaR(gamma->p4(), thePFTau.leadPFChargedHadrCand()->p4()); + + // pfGammas inside the tau signal cone + if (dR < std::max(0.05, std::min(0.10, 3.0/thePFTau.pt()))) { + if ( thePFTau.leadPFChargedHadrCand().isNonnull() ) { + GammasdEtaInSigCone.push_back(gamma->eta() - thePFTau.leadPFChargedHadrCand()->eta()); + GammasdPhiInSigCone.push_back(gamma->phi() - thePFTau.leadPFChargedHadrCand()->phi()); + } + else { + GammasdEtaInSigCone.push_back(gamma->eta() - thePFTau.eta()); + GammasdPhiInSigCone.push_back(gamma->phi() - thePFTau.phi()); + } + GammasPtInSigCone.push_back(gamma->pt()); + pfGammaSum += gamma->p4(); + } + // pfGammas outside the tau signal cone + else { + if ( thePFTau.leadPFChargedHadrCand().isNonnull() ) { + GammasdEtaOutSigCone.push_back(gamma->eta() - thePFTau.leadPFChargedHadrCand()->eta()); + GammasdPhiOutSigCone.push_back(gamma->phi() - thePFTau.leadPFChargedHadrCand()->phi()); + } + else { + GammasdEtaOutSigCone.push_back(gamma->eta() - thePFTau.eta()); + GammasdPhiOutSigCone.push_back(gamma->phi() - thePFTau.phi()); + } + GammasPtOutSigCone.push_back(gamma->pt()); + } + } + + for ( unsigned i = 0 ; i < thePFTau.signalPFChargedHadrCands().size(); ++i ) { + reco::PFCandidatePtr charged = thePFTau.signalPFChargedHadrCands().at(i); + float dR = deltaR(charged->p4(), thePFTau.leadPFChargedHadrCand()->p4()); + + // charged particles inside the tau signal cone + if (dR < std::max(0.05, std::min(0.10, 3.0/thePFTau.pt()))) { + pfChargedSum += charged->p4(); + } + } + + Int_t TauSignalPFGammaCandsIn = GammasPtInSigCone.size(); + Int_t TauSignalPFGammaCandsOut = GammasPtOutSigCone.size(); + Float_t TauVisMassIn = (pfGammaSum + pfChargedSum).mass(); + + Float_t TauPhi = thePFTau.phi(); + float sumPhiTimesEnergy = 0.; + float sumEnergyPhi = 0.; + for ( std::vector::const_iterator pfCandidate = signalPFCands.begin(); + pfCandidate != signalPFCands.end(); ++pfCandidate ) { + sumPhiTimesEnergy += (*pfCandidate)->positionAtECALEntrance().phi()*(*pfCandidate)->energy(); + sumEnergyPhi += (*pfCandidate)->energy(); + } + if ( sumEnergyPhi > 0. ) { + TauPhi = sumPhiTimesEnergy/sumEnergyPhi; + } + Float_t TaudCrackPhi = dCrackPhi(TauPhi, TauEtaAtEcalEntrance); + Float_t TaudCrackEta = dCrackEta(TauEtaAtEcalEntrance); + Float_t TauHasGsf = thePFTau.leadPFChargedHadrCand()->gsfTrackRef().isNonnull(); + + + // === electron variables === + Float_t ElecEta = theGsfEle.eta(); + Float_t ElecPhi = theGsfEle.phi(); + + //Variables related to the electron Cluster + Float_t ElecEe = 0.; + Float_t ElecEgamma = 0.; + reco::SuperClusterRef pfSuperCluster = theGsfEle.parentSuperCluster(); + if ( pfSuperCluster.isNonnull() && pfSuperCluster.isAvailable() ) { + for ( reco::CaloCluster_iterator pfCluster = pfSuperCluster->clustersBegin(); + pfCluster != pfSuperCluster->clustersEnd(); ++pfCluster ) { + double pfClusterEn = (*pfCluster)->energy(); + if ( pfCluster == pfSuperCluster->clustersBegin() ) ElecEe += pfClusterEn; + else ElecEgamma += pfClusterEn; + } + } + + Float_t ElecPin = std::sqrt(theGsfEle.trackMomentumAtVtx().Mag2()); + Float_t ElecPout = std::sqrt(theGsfEle.trackMomentumOut().Mag2()); + Float_t ElecEtotOverPin = (ElecEe + ElecEgamma)/ElecPin; + Float_t ElecEecal = theGsfEle.ecalEnergy(); + Float_t ElecDeltaEta = theGsfEle.deltaEtaSeedClusterTrackAtCalo(); + Float_t ElecDeltaPhi = theGsfEle.deltaPhiSeedClusterTrackAtCalo(); + Float_t ElecMvaInSigmaEtaEta = (theGsfEle).mvaInput().sigmaEtaEta; + Float_t ElecMvaInHadEnergy = (theGsfEle).mvaInput().hadEnergy; + Float_t ElecMvaInDeltaEta = (theGsfEle).mvaInput().deltaEta; + + //Variables related to the GsfTrack + Float_t ElecChi2NormGSF = -99.; + Float_t ElecGSFNumHits = -99.; + Float_t ElecGSFTrackResol = -99.; + Float_t ElecGSFTracklnPt = -99.; + if ( theGsfEle.gsfTrack().isNonnull() ) { + ElecChi2NormGSF = (theGsfEle).gsfTrack()->normalizedChi2(); + ElecGSFNumHits = (theGsfEle).gsfTrack()->numberOfValidHits(); + if ( theGsfEle.gsfTrack()->pt() > 0. ) { + ElecGSFTrackResol = theGsfEle.gsfTrack()->ptError()/theGsfEle.gsfTrack()->pt(); + ElecGSFTracklnPt = log(theGsfEle.gsfTrack()->pt())*M_LN10; + } + } + + //Variables related to the CtfTrack + Float_t ElecChi2NormKF = -99.; + Float_t ElecKFNumHits = -99.; + if ( theGsfEle.closestCtfTrackRef().isNonnull() ) { + ElecChi2NormKF = (theGsfEle).closestCtfTrackRef()->normalizedChi2(); + ElecKFNumHits = (theGsfEle).closestCtfTrackRef()->numberOfValidHits(); + } + + return MVAValue(TauPt, + TauEtaAtEcalEntrance, + TauPhi, + TauLeadChargedPFCandPt, + TauLeadChargedPFCandEtaAtEcalEntrance, + TauEmFraction, + TauLeadPFChargedHadrHoP, + TauLeadPFChargedHadrEoP, + TauVisMassIn, + TaudCrackEta, + TaudCrackPhi, + TauHasGsf, + TauSignalPFGammaCandsIn, + TauSignalPFGammaCandsOut, + GammasdEtaInSigCone, + GammasdPhiInSigCone, + GammasPtInSigCone, + GammasdEtaOutSigCone, + GammasdPhiOutSigCone, + GammasPtOutSigCone, + ElecEta, + ElecPhi, + ElecEtotOverPin, + ElecChi2NormGSF, + ElecChi2NormKF, + ElecGSFNumHits, + ElecKFNumHits, + ElecGSFTrackResol, + ElecGSFTracklnPt, + ElecPin, + ElecPout, + ElecEecal, + ElecDeltaEta, + ElecDeltaPhi, + ElecMvaInSigmaEtaEta, + ElecMvaInHadEnergy, + ElecMvaInDeltaEta); +} + +double AntiElectronIDMVA6::MVAValue(const reco::PFTau& thePFTau) +{ + // === tau variables === + Float_t TauEtaAtEcalEntrance = -99.; + float sumEtaTimesEnergy = 0.; + float sumEnergy = 0.; + const std::vector& signalPFCands = thePFTau.signalPFCands(); + for ( std::vector::const_iterator pfCandidate = signalPFCands.begin(); + pfCandidate != signalPFCands.end(); ++pfCandidate ) { + sumEtaTimesEnergy += (*pfCandidate)->positionAtECALEntrance().eta()*(*pfCandidate)->energy(); + sumEnergy += (*pfCandidate)->energy(); + } + if ( sumEnergy > 0. ) { + TauEtaAtEcalEntrance = sumEtaTimesEnergy/sumEnergy; + } + + float TauLeadChargedPFCandEtaAtEcalEntrance = -99.; + float TauLeadChargedPFCandPt = -99.; + for ( std::vector::const_iterator pfCandidate = signalPFCands.begin(); + pfCandidate != signalPFCands.end(); ++pfCandidate ) { + const reco::Track* track = 0; + if ( (*pfCandidate)->trackRef().isNonnull() ) track = (*pfCandidate)->trackRef().get(); + else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->innerTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->innerTrack().get(); + else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->globalTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->globalTrack().get(); + else if ( (*pfCandidate)->muonRef().isNonnull() && (*pfCandidate)->muonRef()->outerTrack().isNonnull() ) track = (*pfCandidate)->muonRef()->outerTrack().get(); + else if ( (*pfCandidate)->gsfTrackRef().isNonnull() ) track = (*pfCandidate)->gsfTrackRef().get(); + if ( track ) { + if ( track->pt() > TauLeadChargedPFCandPt ) { + TauLeadChargedPFCandEtaAtEcalEntrance = (*pfCandidate)->positionAtECALEntrance().eta(); + TauLeadChargedPFCandPt = track->pt(); + } + } + } + + Float_t TauPt = thePFTau.pt(); + Float_t TauEmFraction = std::max(thePFTau.emFraction(), (Float_t)0.); + Float_t TauLeadPFChargedHadrHoP = 0.; + Float_t TauLeadPFChargedHadrEoP = 0.; + if ( thePFTau.leadPFChargedHadrCand()->p() > 0. ) { + TauLeadPFChargedHadrHoP = thePFTau.leadPFChargedHadrCand()->hcalEnergy()/thePFTau.leadPFChargedHadrCand()->p(); + TauLeadPFChargedHadrEoP = thePFTau.leadPFChargedHadrCand()->ecalEnergy()/thePFTau.leadPFChargedHadrCand()->p(); + } + + std::vector GammasdEtaInSigCone; + std::vector GammasdPhiInSigCone; + std::vector GammasPtInSigCone; + std::vector GammasdEtaOutSigCone; + std::vector GammasdPhiOutSigCone; + std::vector GammasPtOutSigCone; + reco::Candidate::LorentzVector pfGammaSum(0,0,0,0); + reco::Candidate::LorentzVector pfChargedSum(0,0,0,0); + + for ( unsigned i = 0 ; i < thePFTau.signalPFGammaCands().size(); ++i ) { + reco::PFCandidatePtr gamma = thePFTau.signalPFGammaCands().at(i); + float dR = deltaR(gamma->p4(), thePFTau.leadPFChargedHadrCand()->p4()); + + // pfGammas inside the tau signal cone + if (dR < std::max(0.05, std::min(0.10, 3.0/thePFTau.pt()))) { + if ( thePFTau.leadPFChargedHadrCand().isNonnull() ) { + GammasdEtaInSigCone.push_back(gamma->eta() - thePFTau.leadPFChargedHadrCand()->eta()); + GammasdPhiInSigCone.push_back(gamma->phi() - thePFTau.leadPFChargedHadrCand()->phi()); + } + else { + GammasdEtaInSigCone.push_back(gamma->eta() - thePFTau.eta()); + GammasdPhiInSigCone.push_back(gamma->phi() - thePFTau.phi()); + } + GammasPtInSigCone.push_back(gamma->pt()); + pfGammaSum += gamma->p4(); + } + // pfGammas outside the tau signal cone + else { + if ( thePFTau.leadPFChargedHadrCand().isNonnull() ) { + GammasdEtaOutSigCone.push_back(gamma->eta() - thePFTau.leadPFChargedHadrCand()->eta()); + GammasdPhiOutSigCone.push_back(gamma->phi() - thePFTau.leadPFChargedHadrCand()->phi()); + } + else { + GammasdEtaOutSigCone.push_back(gamma->eta() - thePFTau.eta()); + GammasdPhiOutSigCone.push_back(gamma->phi() - thePFTau.phi()); + } + GammasPtOutSigCone.push_back(gamma->pt()); + } + } + + for ( unsigned i = 0 ; i < thePFTau.signalPFChargedHadrCands().size(); ++i ) { + reco::PFCandidatePtr charged = thePFTau.signalPFChargedHadrCands().at(i); + float dR = deltaR(charged->p4(), thePFTau.leadPFChargedHadrCand()->p4()); + + // charged particles inside the tau signal cone + if (dR < std::max(0.05, std::min(0.10, 3.0/thePFTau.pt()))) { + pfChargedSum += charged->p4(); + } + } + + Int_t TauSignalPFGammaCandsIn = GammasPtInSigCone.size(); + Int_t TauSignalPFGammaCandsOut = GammasPtOutSigCone.size(); + Float_t TauVisMassIn = (pfGammaSum + pfChargedSum).mass(); + + Float_t TauPhi = thePFTau.phi(); + float sumPhiTimesEnergy = 0.; + float sumEnergyPhi = 0.; + for ( std::vector::const_iterator pfCandidate = signalPFCands.begin(); + pfCandidate != signalPFCands.end(); ++pfCandidate ) { + sumPhiTimesEnergy += (*pfCandidate)->positionAtECALEntrance().phi()*(*pfCandidate)->energy(); + sumEnergyPhi += (*pfCandidate)->energy(); + } + if ( sumEnergyPhi > 0. ) { + TauPhi = sumPhiTimesEnergy/sumEnergyPhi; + } + Float_t TaudCrackPhi = dCrackPhi(TauPhi, TauEtaAtEcalEntrance); + Float_t TaudCrackEta = dCrackEta(TauEtaAtEcalEntrance); + Float_t TauHasGsf = thePFTau.leadPFChargedHadrCand()->gsfTrackRef().isNonnull(); + + + // === electron variables === + Float_t dummyElecEta = 9.9; + + return MVAValue(TauPt, + TauEtaAtEcalEntrance, + TauPhi, + TauLeadChargedPFCandPt, + TauLeadChargedPFCandEtaAtEcalEntrance, + TauEmFraction, + TauLeadPFChargedHadrHoP, + TauLeadPFChargedHadrEoP, + TauVisMassIn, + TaudCrackEta, + TaudCrackPhi, + TauHasGsf, + TauSignalPFGammaCandsIn, + TauSignalPFGammaCandsOut, + GammasdEtaInSigCone, + GammasdPhiInSigCone, + GammasPtInSigCone, + GammasdEtaOutSigCone, + GammasdPhiOutSigCone, + GammasPtOutSigCone, + dummyElecEta, + 0., + 0., + 0., + 0., + 0., + 0., + 0., + 0., + 0., + 0., + 0., + 0., + 0., + 0., + 0., + 0.); +} + +double AntiElectronIDMVA6::minimum(double a, double b) +{ + if ( std::abs(b) < std::abs(a) ) return b; + else return a; +} + + +#include +namespace { + + // IN: define locations of the 18 phi-cracks + std::array fill_cPhi() { + constexpr double pi = M_PI; // 3.14159265358979323846; + std::array cPhi; + // IN: define locations of the 18 phi-cracks + cPhi[0] = 2.97025; + for ( unsigned iCrack = 1; iCrack <= 17; ++iCrack ) + cPhi[iCrack] = cPhi[0] - 2.*iCrack*pi/18; + return cPhi; + } + + static const std::array cPhi = fill_cPhi(); + +} + +double AntiElectronIDMVA6::dCrackPhi(double phi, double eta) +{ +//--- compute the (unsigned) distance to the closest phi-crack in the ECAL barrel + + constexpr double pi = M_PI; // 3.14159265358979323846; + + // IN: shift of this location if eta < 0 + constexpr double delta_cPhi = 0.00638; + + double retVal = 99.; + + if ( eta >= -1.47464 && eta <= 1.47464 ) { + + // the location is shifted + if ( eta < 0. ) phi += delta_cPhi; + + // CV: need to bring-back phi into interval [-pi,+pi] + if ( phi > pi ) phi -= 2.*pi; + if ( phi < -pi ) phi += 2.*pi; + + if ( phi >= -pi && phi <= pi ) { + + // the problem of the extrema: + if ( phi < cPhi[17] || phi >= cPhi[0] ) { + if ( phi < 0. ) phi += 2.*pi; + retVal = minimum(phi - cPhi[0], phi - cPhi[17] - 2.*pi); + } else { + // between these extrema... + bool OK = false; + unsigned iCrack = 16; + while( !OK ) { + if ( phi < cPhi[iCrack] ) { + retVal = minimum(phi - cPhi[iCrack + 1], phi - cPhi[iCrack]); + OK = true; + } else { + iCrack -= 1; + } + } + } + } else { + retVal = 0.; // IN: if there is a problem, we assume that we are in a crack + } + } else { + return -99.; + } + + return std::abs(retVal); +} + +double AntiElectronIDMVA6::dCrackEta(double eta) +{ +//--- compute the (unsigned) distance to the closest eta-crack in the ECAL barrel + + // IN: define locations of the eta-cracks + double cracks[5] = { 0., 4.44747e-01, 7.92824e-01, 1.14090e+00, 1.47464e+00 }; + + double retVal = 99.; + + for ( int iCrack = 0; iCrack < 5 ; ++iCrack ) { + double d = minimum(eta - cracks[iCrack], eta + cracks[iCrack]); + if ( std::abs(d) < std::abs(retVal) ) { + retVal = d; + } + } + + return std::abs(retVal); +} From 0a901a100e14aa626c4842bbba7a4f4611e35112 Mon Sep 17 00:00:00 2001 From: Fabio Colombo Date: Tue, 3 Nov 2015 17:58:39 +0100 Subject: [PATCH 10/66] AntiElectronIDMVA6: configs updated --- .../python/producersLayer1/tauProducer_cfi.py | 7 ++ .../PatAlgos/python/tools/tauTools.py | 7 ++ .../Configuration/python/HPSPFTaus_cff.py | 112 ++++++++++++++++++ .../loadRecoTauTagMVAsFromPrepDB_cfi.py | 47 ++++++-- .../Configuration/python/switchMVAtoDB_cfi.py | 69 ++++++++++- 5 files changed, 232 insertions(+), 10 deletions(-) diff --git a/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py b/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py index c13a2d65ead63..405c22e0a866a 100644 --- a/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py +++ b/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py @@ -180,6 +180,13 @@ againstElectronMediumMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5MediumElectronRejection"), againstElectronTightMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5TightElectronRejection"), againstElectronVTightMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5VTightElectronRejection"), + againstElectronMVA6raw = cms.InputTag("hpsPFTauDiscriminationByMVA6rawElectronRejection"), + againstElectronMVA6category = cms.InputTag("hpsPFTauDiscriminationByMVA6rawElectronRejection:category"), + againstElectronVLooseMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6VLooseElectronRejection"), + againstElectronLooseMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6LooseElectronRejection"), + againstElectronMediumMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6MediumElectronRejection"), + againstElectronTightMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6TightElectronRejection"), + againstElectronVTightMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6VTightElectronRejection"), ##againstElectronDeadECAL = cms.InputTag("hpsPFTauDiscriminationByDeadECALElectronRejection"), ), diff --git a/PhysicsTools/PatAlgos/python/tools/tauTools.py b/PhysicsTools/PatAlgos/python/tools/tauTools.py index 1abbb3c798f98..30b99ae5a29c4 100644 --- a/PhysicsTools/PatAlgos/python/tools/tauTools.py +++ b/PhysicsTools/PatAlgos/python/tools/tauTools.py @@ -206,6 +206,13 @@ def _switchToPFTau(process, ("againstElectronMediumMVA5", "DiscriminationByMVA5MediumElectronRejection"), ("againstElectronTightMVA5", "DiscriminationByMVA5TightElectronRejection"), ("againstElectronVTightMVA5", "DiscriminationByMVA5VTightElectronRejection"), + ("againstElectronMVA6raw", "DiscriminationByMVA6rawElectronRejection"), + ("againstElectronMVA6category", "DiscriminationByMVA6rawElectronRejection:category"), + ("againstElectronVLooseMVA6", "DiscriminationByMVA6VLooseElectronRejection"), + ("againstElectronLooseMVA6", "DiscriminationByMVA6LooseElectronRejection"), + ("againstElectronMediumMVA6", "DiscriminationByMVA6MediumElectronRejection"), + ("againstElectronTightMVA6", "DiscriminationByMVA6TightElectronRejection"), + ("againstElectronVTightMVA6", "DiscriminationByMVA6VTightElectronRejection"), ##("againstElectronDeadECAL", "DiscriminationByDeadECALElectronRejection"), ##("againstMuonLoose", "DiscriminationByLooseMuonRejection"), ##("againstMuonMedium", "DiscriminationByMediumMuonRejection"), diff --git a/RecoTauTag/Configuration/python/HPSPFTaus_cff.py b/RecoTauTag/Configuration/python/HPSPFTaus_cff.py index 10e1c4ea001e5..78609ef39363a 100644 --- a/RecoTauTag/Configuration/python/HPSPFTaus_cff.py +++ b/RecoTauTag/Configuration/python/HPSPFTaus_cff.py @@ -12,6 +12,7 @@ from RecoTauTag.RecoTau.PFRecoTauDiscriminationByLeadingTrackFinding_cfi import * from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectron_cfi import * from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectronMVA5_cfi import * +from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectronMVA6_cfi import * from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi import * from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstMuon_cfi import * from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstMuon2_cfi import * @@ -523,6 +524,111 @@ hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff79") hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff79") + +hpsPFTauDiscriminationByMVA6rawElectronRejection = pfRecoTauDiscriminationAgainstElectronMVA6.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + loadMVAfromDB = cms.bool(True), + mvaName_NoEleMatch_woGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL"), + mvaName_NoEleMatch_wGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL"), + mvaName_woGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL"), + mvaName_wGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL"), + mvaName_NoEleMatch_woGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC"), + mvaName_NoEleMatch_wGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC"), + mvaName_woGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC"), + mvaName_wGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC") +) + +hpsPFTauDiscriminationByMVA6VLooseElectronRejection = recoTauDiscriminantCutMultiplexer.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection'), + key = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection:category'), + loadMVAfromDB = cms.bool(True), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), # minMVANoEleMatchWOgWOgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(2), # minMVANoEleMatchWgWOgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(5), # minMVAWOgWgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(7), # minMVAWgWgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(8), # minMVANoEleMatchWOgWOgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(10), # minMVANoEleMatchWgWOgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(13), # minMVAWOgWgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(15), # minMVAWgWgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff99"), + variable = cms.string("pt") + ) + ) +) + +hpsPFTauDiscriminationByMVA6LooseElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff96") + +hpsPFTauDiscriminationByMVA6MediumElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff91") + +hpsPFTauDiscriminationByMVA6TightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff85") + +hpsPFTauDiscriminationByMVA6VTightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff79") + hpsPFTauDiscriminationByDeadECALElectronRejection = pfRecoTauDiscriminationAgainstElectronDeadECAL.clone( PFTauProducer = cms.InputTag('hpsPFTauProducer'), Prediscriminants = requireDecayMode.clone() @@ -1175,6 +1281,12 @@ hpsPFTauDiscriminationByMVA5MediumElectronRejection* hpsPFTauDiscriminationByMVA5TightElectronRejection* hpsPFTauDiscriminationByMVA5VTightElectronRejection* + hpsPFTauDiscriminationByMVA6rawElectronRejection* + hpsPFTauDiscriminationByMVA6VLooseElectronRejection* + hpsPFTauDiscriminationByMVA6LooseElectronRejection* + hpsPFTauDiscriminationByMVA6MediumElectronRejection* + hpsPFTauDiscriminationByMVA6TightElectronRejection* + hpsPFTauDiscriminationByMVA6VTightElectronRejection* hpsPFTauDiscriminationByDeadECALElectronRejection* hpsPFTauDiscriminationByLooseMuonRejection* hpsPFTauDiscriminationByMediumMuonRejection* diff --git a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py index f4dab24cf8e3a..00ea188c05d77 100644 --- a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py +++ b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py @@ -172,7 +172,7 @@ ) # register anti-electron discriminator MVA -antiElectronDiscrMVA_categories = { +antiElectronDiscrMVA5_categories = { '0' : "gbr_NoEleMatch_woGwoGSF_BL", '1' : "gbr_NoEleMatch_woGwGSF_BL", '2' : "gbr_NoEleMatch_wGwoGSF_BL", @@ -190,22 +190,51 @@ '14' : "gbr_wGwoGSF_EC", '15' : "gbr_wGwGSF_EC" } -antiElectronDiscrMVA_WPs = [ "eff99", "eff96", "eff91", "eff85", "eff79" ] -antiElectronDiscrMVA_version = "v1" -for category, gbrForestName in antiElectronDiscrMVA_categories.items(): +antiElectronDiscrMVA5_WPs = [ "eff99", "eff96", "eff91", "eff85", "eff79" ] +antiElectronDiscrMVA5_version = "v1" +for category, gbrForestName in antiElectronDiscrMVA5_categories.items(): loadRecoTauTagMVAsFromPrepDB.toGet.append( cms.PSet( record = cms.string('GBRWrapperRcd'), - tag = cms.string("RecoTauTag_antiElectronMVA5%s_%s" % (antiElectronDiscrMVA_version, gbrForestName)), - label = cms.untracked.string("RecoTauTag_antiElectronMVA5%s_%s" % (antiElectronDiscrMVA_version, gbrForestName)) + tag = cms.string("RecoTauTag_antiElectronMVA5%s_%s" % (antiElectronDiscrMVA5_version, gbrForestName)), + label = cms.untracked.string("RecoTauTag_antiElectronMVA5%s_%s" % (antiElectronDiscrMVA5_version, gbrForestName)) ) ) - for WP in antiElectronDiscrMVA_WPs: + for WP in antiElectronDiscrMVA5_WPs: loadRecoTauTagMVAsFromPrepDB.toGet.append( cms.PSet( record = cms.string('PhysicsTGraphPayloadRcd'), - tag = cms.string("RecoTauTag_antiElectronMVA5%s_%s_WP%s" % (antiElectronDiscrMVA_version, gbrForestName, WP)), - label = cms.untracked.string("RecoTauTag_antiElectronMVA5%s_%s_WP%s" % (antiElectronDiscrMVA_version, gbrForestName, WP)) + tag = cms.string("RecoTauTag_antiElectronMVA5%s_%s_WP%s" % (antiElectronDiscrMVA5_version, gbrForestName, WP)), + label = cms.untracked.string("RecoTauTag_antiElectronMVA5%s_%s_WP%s" % (antiElectronDiscrMVA5_version, gbrForestName, WP)) + ) + ) + +antiElectronDiscrMVA6_categories = { + '0' : "gbr_NoEleMatch_woGwoGSF_BL", + '2' : "gbr_NoEleMatch_wGwoGSF_BL", + '5' : "gbr_woGwGSF_BL", + '7' : "gbr_wGwGSF_BL", + '8' : "gbr_NoEleMatch_woGwoGSF_EC", + '10' : "gbr_NoEleMatch_wGwoGSF_EC", + '13' : "gbr_woGwGSF_EC", + '15' : "gbr_wGwGSF_EC" +} +antiElectronDiscrMVA6_WPs = [ "Eff99", "Eff96", "Eff91", "Eff85", "Eff79" ] +antiElectronDiscrMVA6_version = "v1" +for category, gbrForestName in antiElectronDiscrMVA6_categories.items(): + loadRecoTauTagMVAsFromPrepDB.toGet.append( + cms.PSet( + record = cms.string('GBRWrapperRcd'), + tag = cms.string("RecoTauTag_antiElectronMVA6%s_%s" % (antiElectronDiscrMVA6_version, gbrForestName)), + label = cms.untracked.string("RecoTauTag_antiElectronMVA6%s_%s" % (antiElectronDiscrMVA6_version, gbrForestName)) + ) + ) + for WP in antiElectronDiscrMVA6_WPs: + loadRecoTauTagMVAsFromPrepDB.toGet.append( + cms.PSet( + record = cms.string('PhysicsTGraphPayloadRcd'), + tag = cms.string("RecoTauTag_antiElectronMVA6%s_%s_WP%s" % (antiElectronDiscrMVA6_version, gbrForestName, WP)), + label = cms.untracked.string("RecoTauTag_antiElectronMVA6%s_%s_WP%s" % (antiElectronDiscrMVA6_version, gbrForestName, WP)) ) ) diff --git a/RecoTauTag/Configuration/python/switchMVAtoDB_cfi.py b/RecoTauTag/Configuration/python/switchMVAtoDB_cfi.py index c3f0221adf4ca..e3f89f141304b 100644 --- a/RecoTauTag/Configuration/python/switchMVAtoDB_cfi.py +++ b/RecoTauTag/Configuration/python/switchMVAtoDB_cfi.py @@ -29,7 +29,7 @@ def switchMVAtoDB(process): process.hpsPFTauDiscriminationByMVAMediumMuonRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByMVAMuonRejection.root') process.hpsPFTauDiscriminationByMVATightMuonRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByMVAMuonRejection.root') - #electron discriminators + #electron discriminators (MVA5) process.hpsPFTauDiscriminationByMVA5rawElectronRejection.mvaName_woGwoGSF_EC = cms.string('gbr_woGwoGSF_EC') process.hpsPFTauDiscriminationByMVA5rawElectronRejection.mvaName_woGwGSF_EC = cms.string('gbr_woGwGSF_EC') process.hpsPFTauDiscriminationByMVA5rawElectronRejection.mvaName_wGwoGSF_EC = cms.string('gbr_wGwoGSF_EC') @@ -145,6 +145,73 @@ def switchMVAtoDB(process): process.hpsPFTauDiscriminationByMVA5VTightElectronRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationAgainstElectronMVA5.root') + #electron discriminators (MVA6) + process.hpsPFTauDiscriminationByMVA6rawElectronRejection.mvaName_woGwGSF_EC = cms.string('gbr_woGwGSF_EC') + process.hpsPFTauDiscriminationByMVA6rawElectronRejection.mvaName_wGwGSF_EC = cms.string('gbr_wGwGSF_EC') + process.hpsPFTauDiscriminationByMVA6rawElectronRejection.mvaName_woGwGSF_BL = cms.string('gbr_woGwGSF_BL') + process.hpsPFTauDiscriminationByMVA6rawElectronRejection.mvaName_wGwGSF_BL = cms.string('gbr_wGwGSF_BL') + process.hpsPFTauDiscriminationByMVA6rawElectronRejection.mvaName_NoEleMatch_woGwoGSF_EC = cms.string('gbr_NoEleMatch_woGwoGSF_EC') + process.hpsPFTauDiscriminationByMVA6rawElectronRejection.mvaName_NoEleMatch_wGwoGSF_EC = cms.string('gbr_NoEleMatch_wGwoGSF_EC') + process.hpsPFTauDiscriminationByMVA6rawElectronRejection.mvaName_NoEleMatch_woGwoGSF_BL = cms.string('gbr_NoEleMatch_woGwoGSF_BL') + process.hpsPFTauDiscriminationByMVA6rawElectronRejection.mvaName_NoEleMatch_wGwoGSF_BL = cms.string('gbr_NoEleMatch_wGwoGSF_BL') + + process.hpsPFTauDiscriminationByMVA6rawElectronRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/gbrDiscriminationAgainstElectronMVA6.root') + + process.hpsPFTauDiscriminationByMVA6VLooseElectronRejection.mapping[0].cut = cms.string("eff99cat0") + process.hpsPFTauDiscriminationByMVA6VLooseElectronRejection.mapping[1].cut = cms.string("eff99cat2") + process.hpsPFTauDiscriminationByMVA6VLooseElectronRejection.mapping[2].cut = cms.string("eff99cat5") + process.hpsPFTauDiscriminationByMVA6VLooseElectronRejection.mapping[3].cut = cms.string("eff99cat7") + process.hpsPFTauDiscriminationByMVA6VLooseElectronRejection.mapping[4].cut = cms.string("eff99cat8") + process.hpsPFTauDiscriminationByMVA6VLooseElectronRejection.mapping[5].cut = cms.string("eff99cat10") + process.hpsPFTauDiscriminationByMVA6VLooseElectronRejection.mapping[6].cut = cms.string("eff99cat13") + process.hpsPFTauDiscriminationByMVA6VLooseElectronRejection.mapping[7].cut = cms.string("eff99cat15") + + process.hpsPFTauDiscriminationByMVA6VLooseElectronRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationAgainstElectronMVA6.root') + + process.hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[0].cut = cms.string("eff96cat0") + process.hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[1].cut = cms.string("eff96cat2") + process.hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[2].cut = cms.string("eff96cat5") + process.hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[3].cut = cms.string("eff96cat7") + process.hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[4].cut = cms.string("eff96cat8") + process.hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[5].cut = cms.string("eff96cat10") + process.hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[6].cut = cms.string("eff96cat13") + process.hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[7].cut = cms.string("eff96cat15") + + process.hpsPFTauDiscriminationByMVA6LooseElectronRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationAgainstElectronMVA6.root') + + process.hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[0].cut = cms.string("eff91cat0") + process.hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[1].cut = cms.string("eff91cat2") + process.hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[2].cut = cms.string("eff91cat5") + process.hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[3].cut = cms.string("eff91cat7") + process.hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[4].cut = cms.string("eff91cat8") + process.hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[5].cut = cms.string("eff91cat10") + process.hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[6].cut = cms.string("eff91cat13") + process.hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[7].cut = cms.string("eff91cat15") + + process.hpsPFTauDiscriminationByMVA6MediumElectronRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationAgainstElectronMVA6.root') + + process.hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[0].cut = cms.string("eff85cat0") + process.hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[1].cut = cms.string("eff85cat2") + process.hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[2].cut = cms.string("eff85cat5") + process.hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[3].cut = cms.string("eff85cat7") + process.hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[4].cut = cms.string("eff85cat8") + process.hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[5].cut = cms.string("eff85cat10") + process.hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[6].cut = cms.string("eff85cat13") + process.hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[7].cut = cms.string("eff85cat15") + + process.hpsPFTauDiscriminationByMVA6TightElectronRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationAgainstElectronMVA6.root') + + process.hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[0].cut = cms.string("eff79cat0") + process.hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[1].cut = cms.string("eff79cat2") + process.hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[2].cut = cms.string("eff79cat5") + process.hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[3].cut = cms.string("eff79cat7") + process.hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[4].cut = cms.string("eff79cat8") + process.hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[5].cut = cms.string("eff79cat10") + process.hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[6].cut = cms.string("eff79cat13") + process.hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[7].cut = cms.string("eff79cat15") + + process.hpsPFTauDiscriminationByMVA6VTightElectronRejection.inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationAgainstElectronMVA6.root') + #isolation process.hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.mvaName = cms.string("tauIdMVAoldDMwoLT") massSearchReplaceParam(getattr(process,"produceAndDiscriminateHPSPFTaus"),"mvaOutput_normalization", cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_mvaOutput_normalization"), cms.string("mvaOutput_normalization_oldDMwoLT")) From cc822417a843f74dcd0cbf69c705fe59e5a9b9c7 Mon Sep 17 00:00:00 2001 From: Fabio Colombo Date: Tue, 3 Nov 2015 18:26:39 +0100 Subject: [PATCH 11/66] AntiElectronIDMVA6: comment out old MVA5 discriminator --- .../python/producersLayer1/tauProducer_cfi.py | 14 ++-- .../PatAlgos/python/tools/tauTools.py | 14 ++-- .../Configuration/python/HPSPFTaus_cff.py | 12 ++-- .../loadRecoTauTagMVAsFromPrepDB_cfi.py | 72 +++++++++---------- 4 files changed, 56 insertions(+), 56 deletions(-) diff --git a/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py b/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py index 405c22e0a866a..e9d6a4ec33101 100644 --- a/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py +++ b/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py @@ -173,13 +173,13 @@ byTightPileupWeightedIsolation3Hits = cms.InputTag("hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits"), byPhotonPtSumOutsideSignalCone = cms.InputTag("hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone"), byPileupWeightedIsolationRaw3Hits = cms.InputTag("hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits"), - againstElectronMVA5raw = cms.InputTag("hpsPFTauDiscriminationByMVA5rawElectronRejection"), - againstElectronMVA5category = cms.InputTag("hpsPFTauDiscriminationByMVA5rawElectronRejection:category"), - againstElectronVLooseMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5VLooseElectronRejection"), - againstElectronLooseMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5LooseElectronRejection"), - againstElectronMediumMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5MediumElectronRejection"), - againstElectronTightMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5TightElectronRejection"), - againstElectronVTightMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5VTightElectronRejection"), + ##againstElectronMVA5raw = cms.InputTag("hpsPFTauDiscriminationByMVA5rawElectronRejection"), + ##againstElectronMVA5category = cms.InputTag("hpsPFTauDiscriminationByMVA5rawElectronRejection:category"), + ##againstElectronVLooseMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5VLooseElectronRejection"), + ##againstElectronLooseMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5LooseElectronRejection"), + ##againstElectronMediumMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5MediumElectronRejection"), + ##againstElectronTightMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5TightElectronRejection"), + ##againstElectronVTightMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5VTightElectronRejection"), againstElectronMVA6raw = cms.InputTag("hpsPFTauDiscriminationByMVA6rawElectronRejection"), againstElectronMVA6category = cms.InputTag("hpsPFTauDiscriminationByMVA6rawElectronRejection:category"), againstElectronVLooseMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6VLooseElectronRejection"), diff --git a/PhysicsTools/PatAlgos/python/tools/tauTools.py b/PhysicsTools/PatAlgos/python/tools/tauTools.py index 30b99ae5a29c4..c5a2425b02666 100644 --- a/PhysicsTools/PatAlgos/python/tools/tauTools.py +++ b/PhysicsTools/PatAlgos/python/tools/tauTools.py @@ -199,13 +199,13 @@ def _switchToPFTau(process, ##("againstElectronLoose", "DiscriminationByLooseElectronRejection"), ##("againstElectronMedium", "DiscriminationByMediumElectronRejection"), ##("againstElectronTight", "DiscriminationByTightElectronRejection"), - ("againstElectronMVA5raw", "DiscriminationByMVA5rawElectronRejection"), - ("againstElectronMVA5category", "DiscriminationByMVA5rawElectronRejection:category"), - ("againstElectronVLooseMVA5", "DiscriminationByMVA5VLooseElectronRejection"), - ("againstElectronLooseMVA5", "DiscriminationByMVA5LooseElectronRejection"), - ("againstElectronMediumMVA5", "DiscriminationByMVA5MediumElectronRejection"), - ("againstElectronTightMVA5", "DiscriminationByMVA5TightElectronRejection"), - ("againstElectronVTightMVA5", "DiscriminationByMVA5VTightElectronRejection"), + ##("againstElectronMVA5raw", "DiscriminationByMVA5rawElectronRejection"), + ##("againstElectronMVA5category", "DiscriminationByMVA5rawElectronRejection:category"), + ##("againstElectronVLooseMVA5", "DiscriminationByMVA5VLooseElectronRejection"), + ##("againstElectronLooseMVA5", "DiscriminationByMVA5LooseElectronRejection"), + ##("againstElectronMediumMVA5", "DiscriminationByMVA5MediumElectronRejection"), + ##("againstElectronTightMVA5", "DiscriminationByMVA5TightElectronRejection"), + ##("againstElectronVTightMVA5", "DiscriminationByMVA5VTightElectronRejection"), ("againstElectronMVA6raw", "DiscriminationByMVA6rawElectronRejection"), ("againstElectronMVA6category", "DiscriminationByMVA6rawElectronRejection:category"), ("againstElectronVLooseMVA6", "DiscriminationByMVA6VLooseElectronRejection"), diff --git a/RecoTauTag/Configuration/python/HPSPFTaus_cff.py b/RecoTauTag/Configuration/python/HPSPFTaus_cff.py index 78609ef39363a..e7b68e5596c66 100644 --- a/RecoTauTag/Configuration/python/HPSPFTaus_cff.py +++ b/RecoTauTag/Configuration/python/HPSPFTaus_cff.py @@ -1275,12 +1275,12 @@ hpsPFTauDiscriminationByLooseElectronRejection* hpsPFTauDiscriminationByMediumElectronRejection* hpsPFTauDiscriminationByTightElectronRejection* - hpsPFTauDiscriminationByMVA5rawElectronRejection* - hpsPFTauDiscriminationByMVA5VLooseElectronRejection* - hpsPFTauDiscriminationByMVA5LooseElectronRejection* - hpsPFTauDiscriminationByMVA5MediumElectronRejection* - hpsPFTauDiscriminationByMVA5TightElectronRejection* - hpsPFTauDiscriminationByMVA5VTightElectronRejection* + #hpsPFTauDiscriminationByMVA5rawElectronRejection* + #hpsPFTauDiscriminationByMVA5VLooseElectronRejection* + #hpsPFTauDiscriminationByMVA5LooseElectronRejection* + #hpsPFTauDiscriminationByMVA5MediumElectronRejection* + #hpsPFTauDiscriminationByMVA5TightElectronRejection* + #hpsPFTauDiscriminationByMVA5VTightElectronRejection* hpsPFTauDiscriminationByMVA6rawElectronRejection* hpsPFTauDiscriminationByMVA6VLooseElectronRejection* hpsPFTauDiscriminationByMVA6LooseElectronRejection* diff --git a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py index 00ea188c05d77..600842549a7f4 100644 --- a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py +++ b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py @@ -172,42 +172,42 @@ ) # register anti-electron discriminator MVA -antiElectronDiscrMVA5_categories = { - '0' : "gbr_NoEleMatch_woGwoGSF_BL", - '1' : "gbr_NoEleMatch_woGwGSF_BL", - '2' : "gbr_NoEleMatch_wGwoGSF_BL", - '3' : "gbr_NoEleMatch_wGwGSF_BL", - '4' : "gbr_woGwoGSF_BL", - '5' : "gbr_woGwGSF_BL", - '6' : "gbr_wGwoGSF_BL", - '7' : "gbr_wGwGSF_BL", - '8' : "gbr_NoEleMatch_woGwoGSF_EC", - '9' : "gbr_NoEleMatch_woGwGSF_EC", - '10' : "gbr_NoEleMatch_wGwoGSF_EC", - '11' : "gbr_NoEleMatch_wGwGSF_EC", - '12' : "gbr_woGwoGSF_EC", - '13' : "gbr_woGwGSF_EC", - '14' : "gbr_wGwoGSF_EC", - '15' : "gbr_wGwGSF_EC" -} -antiElectronDiscrMVA5_WPs = [ "eff99", "eff96", "eff91", "eff85", "eff79" ] -antiElectronDiscrMVA5_version = "v1" -for category, gbrForestName in antiElectronDiscrMVA5_categories.items(): - loadRecoTauTagMVAsFromPrepDB.toGet.append( - cms.PSet( - record = cms.string('GBRWrapperRcd'), - tag = cms.string("RecoTauTag_antiElectronMVA5%s_%s" % (antiElectronDiscrMVA5_version, gbrForestName)), - label = cms.untracked.string("RecoTauTag_antiElectronMVA5%s_%s" % (antiElectronDiscrMVA5_version, gbrForestName)) - ) - ) - for WP in antiElectronDiscrMVA5_WPs: - loadRecoTauTagMVAsFromPrepDB.toGet.append( - cms.PSet( - record = cms.string('PhysicsTGraphPayloadRcd'), - tag = cms.string("RecoTauTag_antiElectronMVA5%s_%s_WP%s" % (antiElectronDiscrMVA5_version, gbrForestName, WP)), - label = cms.untracked.string("RecoTauTag_antiElectronMVA5%s_%s_WP%s" % (antiElectronDiscrMVA5_version, gbrForestName, WP)) - ) - ) +#antiElectronDiscrMVA5_categories = { + #'0' : "gbr_NoEleMatch_woGwoGSF_BL", + #'1' : "gbr_NoEleMatch_woGwGSF_BL", + #'2' : "gbr_NoEleMatch_wGwoGSF_BL", + #'3' : "gbr_NoEleMatch_wGwGSF_BL", + #'4' : "gbr_woGwoGSF_BL", + #'5' : "gbr_woGwGSF_BL", + #'6' : "gbr_wGwoGSF_BL", + #'7' : "gbr_wGwGSF_BL", + #'8' : "gbr_NoEleMatch_woGwoGSF_EC", + #'9' : "gbr_NoEleMatch_woGwGSF_EC", + #'10' : "gbr_NoEleMatch_wGwoGSF_EC", + #'11' : "gbr_NoEleMatch_wGwGSF_EC", + #'12' : "gbr_woGwoGSF_EC", + #'13' : "gbr_woGwGSF_EC", + #'14' : "gbr_wGwoGSF_EC", + #'15' : "gbr_wGwGSF_EC" +#} +#antiElectronDiscrMVA5_WPs = [ "eff99", "eff96", "eff91", "eff85", "eff79" ] +#antiElectronDiscrMVA5_version = "v1" +#for category, gbrForestName in antiElectronDiscrMVA5_categories.items(): + #loadRecoTauTagMVAsFromPrepDB.toGet.append( + #cms.PSet( + #record = cms.string('GBRWrapperRcd'), + #tag = cms.string("RecoTauTag_antiElectronMVA5%s_%s" % (antiElectronDiscrMVA5_version, gbrForestName)), + #label = cms.untracked.string("RecoTauTag_antiElectronMVA5%s_%s" % (antiElectronDiscrMVA5_version, gbrForestName)) + #) + #) + #for WP in antiElectronDiscrMVA5_WPs: + #loadRecoTauTagMVAsFromPrepDB.toGet.append( + #cms.PSet( + #record = cms.string('PhysicsTGraphPayloadRcd'), + #tag = cms.string("RecoTauTag_antiElectronMVA5%s_%s_WP%s" % (antiElectronDiscrMVA5_version, gbrForestName, WP)), + #label = cms.untracked.string("RecoTauTag_antiElectronMVA5%s_%s_WP%s" % (antiElectronDiscrMVA5_version, gbrForestName, WP)) + #) + #) antiElectronDiscrMVA6_categories = { '0' : "gbr_NoEleMatch_woGwoGSF_BL", From 8ad0ea49d045d148065445bcd7d3d1ef45d0bf63 Mon Sep 17 00:00:00 2001 From: Fabio Colombo Date: Wed, 4 Nov 2015 08:55:09 +0100 Subject: [PATCH 12/66] AntiElectronIDMVA6: replace MVA5 with MVA6 --- PhysicsTools/PatAlgos/python/cleaningLayer1/tauCleaner_cfi.py | 2 +- PhysicsTools/PatAlgos/python/tools/tauTools.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PhysicsTools/PatAlgos/python/cleaningLayer1/tauCleaner_cfi.py b/PhysicsTools/PatAlgos/python/cleaningLayer1/tauCleaner_cfi.py index bd961ba20904e..fc8a01546d5d3 100644 --- a/PhysicsTools/PatAlgos/python/cleaningLayer1/tauCleaner_cfi.py +++ b/PhysicsTools/PatAlgos/python/cleaningLayer1/tauCleaner_cfi.py @@ -8,7 +8,7 @@ 'tauID("decayModeFinding") > 0.5 &' ' tauID("byLooseCombinedIsolationDeltaBetaCorr3Hits") > 0.5 &' ' tauID("againstMuonTight3") > 0.5 &' - ' tauID("againstElectronVLooseMVA5") > 0.5' + ' tauID("againstElectronVLooseMVA6") > 0.5' ), # overlap checking configurables diff --git a/PhysicsTools/PatAlgos/python/tools/tauTools.py b/PhysicsTools/PatAlgos/python/tools/tauTools.py index c5a2425b02666..11dae4884c9b8 100644 --- a/PhysicsTools/PatAlgos/python/tools/tauTools.py +++ b/PhysicsTools/PatAlgos/python/tools/tauTools.py @@ -267,7 +267,7 @@ def switchToPFTauHPS(process, if hasattr(process, "cleanPatTaus" + patTauLabel + postfix): getattr(process, "cleanPatTaus" + patTauLabel + postfix).preselection = \ 'pt > 18 & abs(eta) < 2.3 & tauID("decayModeFindingOldDMs") > 0.5 & tauID("byLooseCombinedIsolationDeltaBetaCorr3Hits") > 0.5' \ - + ' & tauID("againstMuonTight3") > 0.5 & tauID("againstElectronVLooseMVA5") > 0.5' + + ' & tauID("againstMuonTight3") > 0.5 & tauID("againstElectronVLooseMVA6") > 0.5' # Select switcher by string def switchToPFTauByType(process, From f4588d39600974601456a51546e4c5ccae64a4f7 Mon Sep 17 00:00:00 2001 From: Fabio Colombo Date: Wed, 4 Nov 2015 10:00:03 +0100 Subject: [PATCH 13/66] AntiElectronIDMVA6: fix --- RecoTauTag/RecoTau/interface/AntiElectronIDMVA6.h | 8 ++++---- RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/RecoTauTag/RecoTau/interface/AntiElectronIDMVA6.h b/RecoTauTag/RecoTau/interface/AntiElectronIDMVA6.h index 29e20965030b9..ef1c3c933746e 100644 --- a/RecoTauTag/RecoTau/interface/AntiElectronIDMVA6.h +++ b/RecoTauTag/RecoTau/interface/AntiElectronIDMVA6.h @@ -62,8 +62,8 @@ class AntiElectronIDMVA6 Float_t ElecEtotOverPin, Float_t ElecChi2NormGSF, Float_t ElecChi2NormKF, - Int_t ElecGSFNumHits, - Int_t ElecKFNumHits, + Float_t ElecGSFNumHits, + Float_t ElecKFNumHits, Float_t ElecGSFTrackResol, Float_t ElecGSFTracklnPt, Float_t ElecPin, @@ -101,8 +101,8 @@ class AntiElectronIDMVA6 Float_t ElecEtotOverPin, Float_t ElecChi2NormGSF, Float_t ElecChi2NormKF, - Int_t ElecGSFNumHits, - Int_t ElecKFNumHits, + Float_t ElecGSFNumHits, + Float_t ElecKFNumHits, Float_t ElecGSFTrackResol, Float_t ElecGSFTracklnPt, Float_t ElecPin, diff --git a/RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc b/RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc index 177aa1293d6ae..18611563f1863 100644 --- a/RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc +++ b/RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc @@ -157,8 +157,8 @@ double AntiElectronIDMVA6::MVAValue(Float_t TauPt, Float_t ElecEtotOverPin, Float_t ElecChi2NormGSF, Float_t ElecChi2NormKF, - Int_t ElecGSFNumHits, - Int_t ElecKFNumHits, + Float_t ElecGSFNumHits, + Float_t ElecKFNumHits, Float_t ElecGSFTrackResol, Float_t ElecGSFTracklnPt, Float_t ElecPin, @@ -298,8 +298,8 @@ double AntiElectronIDMVA6::MVAValue(Float_t TauPt, Float_t ElecEtotOverPin, Float_t ElecChi2NormGSF, Float_t ElecChi2NormKF, - Int_t ElecGSFNumHits, - Int_t ElecKFNumHits, + Float_t ElecGSFNumHits, + Float_t ElecKFNumHits, Float_t ElecGSFTrackResol, Float_t ElecGSFTracklnPt, Float_t ElecPin, From b2f9557090e2995417cb6d58473b15d884aabf66 Mon Sep 17 00:00:00 2001 From: Aruna Date: Thu, 5 Nov 2015 11:29:12 +0100 Subject: [PATCH 14/66] bugfix --- RecoTauTag/Configuration/python/HPSPFTaus_cff.py | 4 ++-- .../RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolation2.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RecoTauTag/Configuration/python/HPSPFTaus_cff.py b/RecoTauTag/Configuration/python/HPSPFTaus_cff.py index e7b68e5596c66..d933ac315d181 100644 --- a/RecoTauTag/Configuration/python/HPSPFTaus_cff.py +++ b/RecoTauTag/Configuration/python/HPSPFTaus_cff.py @@ -810,7 +810,7 @@ srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum'), srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum'), srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalCone'), - srcPFTauFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrection'), + srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrection'), verbosity = cms.int32(0) ) hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT = discriminationByIsolationMVA2VLoose.clone( @@ -1098,7 +1098,7 @@ srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumdR03'), srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSumdR03'), srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalConedR03'), - srcPFTauFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrectiondR03'), + srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrectiondR03'), verbosity = cms.int32(0) ) hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT = discriminationByIsolationMVA2VLoose.clone( diff --git a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolation2.cc b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolation2.cc index 133d5a5d9f1f8..fac7c0b95a1a2 100644 --- a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolation2.cc +++ b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolation2.cc @@ -104,7 +104,7 @@ class PFRecoTauDiscriminationByIsolationMVA2 : public PFTauDiscriminationProduce NeutralIsoPtSum_token = consumes(cfg.getParameter("srcNeutralIsoPtSum")); PUcorrPtSum_token = consumes(cfg.getParameter("srcPUcorrPtSum")); PhotonPtSumOutsideSignalCone_token = consumes(cfg.getParameter("srcPhotonPtSumOutsideSignalCone")); - FootprintCorrection_token = consumes(cfg.getParameter("srcPFTauFootprintCorrection")); + FootprintCorrection_token = consumes(cfg.getParameter("srcFootprintCorrection")); verbosity_ = ( cfg.exists("verbosity") ) ? cfg.getParameter("verbosity") : 0; @@ -212,7 +212,7 @@ double PFRecoTauDiscriminationByIsolationMVA2::discriminate(const PFTauRef& tau) double decayDistZ = tauLifetimeInfo.flightLength().z(); double decayDistMag = TMath::Sqrt(decayDistX*decayDistX + decayDistY*decayDistY + decayDistZ*decayDistZ); - float nPhoton = tau_n_photons_total(*tau); + double nPhoton = double(tau_n_photons_total(*tau)); double ptWeightedDetaStrip = tau_pt_weighted_deta_strip(*tau, tauDecayMode); double ptWeightedDphiStrip = tau_pt_weighted_dphi_strip(*tau, tauDecayMode); double ptWeightedDrSignal = tau_pt_weighted_dr_signal(*tau, tauDecayMode); From 9869c21367a9ae0f7cab4b32e04aafc72c31fb16 Mon Sep 17 00:00:00 2001 From: Aruna Date: Thu, 5 Nov 2015 14:36:10 +0100 Subject: [PATCH 15/66] add new discriminators to event content --- .../python/RecoTauTag_EventContent_cff.py | 266 +++++++++++++----- 1 file changed, 190 insertions(+), 76 deletions(-) diff --git a/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py b/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py index 3190443c817cd..ceadc8e593633 100644 --- a/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py +++ b/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py @@ -22,29 +22,47 @@ 'keep *_hpsPFTauDiscriminationByDecayModeFinding_*_*', 'keep *_hpsPFTauDiscriminationByDecayModeFindingNewDMs_*_*', 'keep *_hpsPFTauDiscriminationByDecayModeFindingOldDMs_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw_*_*', + #'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw_*_*', + #'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw_*_*', + #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw_*_*', + #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw_*_*', 'keep *_hpsPFTauDiscriminationByLooseChargedIsolation_*_*', 'keep *_hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr_*_*', 'keep *_hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits_*_*', 'keep *_hpsPFTauDiscriminationByLooseElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByLooseIsolation_*_*', 'keep *_hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT_*_*', + #'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT_*_*', + #'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT_*_*', 'keep *_hpsPFTauDiscriminationByLooseMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByLooseMuonRejection2_*_*', 'keep *_hpsPFTauDiscriminationByLooseMuonRejection3_*_*', - 'keep *_hpsPFTauDiscriminationByMVA5LooseElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA5MediumElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA5TightElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA5VLooseElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA5VTightElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA5rawElectronRejection_*_*', + #'keep *_hpsPFTauDiscriminationByMVA5LooseElectronRejection_*_*', + #'keep *_hpsPFTauDiscriminationByMVA5MediumElectronRejection_*_*', + #'keep *_hpsPFTauDiscriminationByMVA5TightElectronRejection_*_*', + #'keep *_hpsPFTauDiscriminationByMVA5VLooseElectronRejection_*_*', + #'keep *_hpsPFTauDiscriminationByMVA5VTightElectronRejection_*_*', + #'keep *_hpsPFTauDiscriminationByMVA5rawElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6VLooseElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6LooseElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6MediumElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6TightElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6VTightElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6rawElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVALooseMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVAMediumMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVATightMuonRejection_*_*', @@ -55,10 +73,16 @@ 'keep *_hpsPFTauDiscriminationByMediumElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMediumIsolation_*_*', 'keep *_hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr_*_*', - 'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT_*_*', + #'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT_*_*', + #'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT_*_*', 'keep *_hpsPFTauDiscriminationByMediumMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByMediumMuonRejection2_*_*', 'keep *_hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr_*_*', @@ -71,10 +95,16 @@ 'keep *_hpsPFTauDiscriminationByTightElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByTightIsolation_*_*', 'keep *_hpsPFTauDiscriminationByTightIsolationDBSumPtCorr_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT_*_*', + #'keep *_hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT_*_*', + #'keep *_hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT_*_*', 'keep *_hpsPFTauDiscriminationByTightMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByTightMuonRejection2_*_*', 'keep *_hpsPFTauDiscriminationByTightMuonRejection3_*_*', @@ -82,22 +112,40 @@ 'keep *_hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr_*_*', 'keep *_hpsPFTauDiscriminationByVLooseIsolation_*_*', 'keep *_hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw_*_*', + #'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT_*_*', + #'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT_*_*', + #'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT_*_*', + #'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw_*_*', + #'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw_*_*', + #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw_*_*', + #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw_*_*', 'keep *_hpsPFTauDiscriminationByMVA5rawElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVArawMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits_*_*', @@ -108,6 +156,15 @@ 'keep *_hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits_*_*', 'keep *_hpsPFTauPUcorrPtSum_*_*', 'keep *_hpsPFTauChargedIsoPtSum_*_*', + 'keep *_hpsPFTauNeutralIsoPtSumWeight_*_*', + 'keep *_hpsPFTauFootprintCorrection_*_*', + 'keep *_hpsPFTauPhotonPtSumOutsideSignalCone_*_*', + 'keep *_hpsPFTauChargedIsoPtSumdR03_*_*', + 'keep *_hpsPFTauNeutralIsoPtSumdR03_*_*', + 'keep *_hpsPFTauPUcorrPtSumdR03_*_*', + 'keep *_hpsPFTauNeutralIsoPtSumWeightdR03_*_*', + 'keep *_hpsPFTauFootprintCorrectiondR03_*_*', + 'keep *_hpsPFTauPhotonPtSumOutsideSignalConedR03_*_*', #'keep *_hpsPFTau*PtSum_*_*', 'keep *_hpsPFTauMVA3IsolationChargedIsoPtSum_*_*', 'keep *_hpsPFTauMVA3IsolationNeutralIsoPtSum_*_*', @@ -127,29 +184,47 @@ 'keep *_hpsPFTauDiscriminationByDecayModeFinding_*_*', 'keep *_hpsPFTauDiscriminationByDecayModeFindingNewDMs_*_*', 'keep *_hpsPFTauDiscriminationByDecayModeFindingOldDMs_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw_*_*', + #'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw_*_*', + #'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw_*_*', + #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw_*_*', + #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw_*_*', 'keep *_hpsPFTauDiscriminationByLooseChargedIsolation_*_*', 'keep *_hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr_*_*', 'keep *_hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits_*_*', 'keep *_hpsPFTauDiscriminationByLooseElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByLooseIsolation_*_*', 'keep *_hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT_*_*', + #'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT_*_*', + #'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT_*_*', 'keep *_hpsPFTauDiscriminationByLooseMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByLooseMuonRejection2_*_*', 'keep *_hpsPFTauDiscriminationByLooseMuonRejection3_*_*', - 'keep *_hpsPFTauDiscriminationByMVA5LooseElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA5MediumElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA5TightElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA5VLooseElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA5VTightElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA5rawElectronRejection_*_*', + #'keep *_hpsPFTauDiscriminationByMVA5LooseElectronRejection_*_*', + #'keep *_hpsPFTauDiscriminationByMVA5MediumElectronRejection_*_*', + #'keep *_hpsPFTauDiscriminationByMVA5TightElectronRejection_*_*', + #'keep *_hpsPFTauDiscriminationByMVA5VLooseElectronRejection_*_*', + #'keep *_hpsPFTauDiscriminationByMVA5VTightElectronRejection_*_*', + #'keep *_hpsPFTauDiscriminationByMVA5rawElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6VLooseElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6LooseElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6MediumElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6TightElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6VTightElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6rawElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVALooseMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVAMediumMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVATightMuonRejection_*_*', @@ -160,10 +235,16 @@ 'keep *_hpsPFTauDiscriminationByMediumElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMediumIsolation_*_*', 'keep *_hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr_*_*', - 'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT_*_*', + #'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT_*_*', + #'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT_*_*', 'keep *_hpsPFTauDiscriminationByMediumMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByMediumMuonRejection2_*_*', 'keep *_hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr_*_*', @@ -176,10 +257,16 @@ 'keep *_hpsPFTauDiscriminationByTightElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByTightIsolation_*_*', 'keep *_hpsPFTauDiscriminationByTightIsolationDBSumPtCorr_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT_*_*', + #'keep *_hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT_*_*', + #'keep *_hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT_*_*', 'keep *_hpsPFTauDiscriminationByTightMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByTightMuonRejection2_*_*', 'keep *_hpsPFTauDiscriminationByTightMuonRejection3_*_*', @@ -187,22 +274,40 @@ 'keep *_hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr_*_*', 'keep *_hpsPFTauDiscriminationByVLooseIsolation_*_*', 'keep *_hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw_*_*', + #'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT_*_*', + #'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT_*_*', + #'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT_*_*', + #'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT_*_*', + #'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw_*_*', + #'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw_*_*', + #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw_*_*', + #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw_*_*', 'keep *_hpsPFTauDiscriminationByMVA5rawElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVArawMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits_*_*', @@ -213,6 +318,15 @@ 'keep *_hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits_*_*', 'keep *_hpsPFTauPUcorrPtSum_*_*', 'keep *_hpsPFTauChargedIsoPtSum_*_*', + 'keep *_hpsPFTauNeutralIsoPtSumWeight_*_*', + 'keep *_hpsPFTauFootprintCorrection_*_*', + 'keep *_hpsPFTauPhotonPtSumOutsideSignalCone_*_*', + 'keep *_hpsPFTauChargedIsoPtSumdR03_*_*', + 'keep *_hpsPFTauNeutralIsoPtSumdR03_*_*', + 'keep *_hpsPFTauPUcorrPtSumdR03_*_*', + 'keep *_hpsPFTauNeutralIsoPtSumWeightdR03_*_*', + 'keep *_hpsPFTauFootprintCorrectiondR03_*_*', + 'keep *_hpsPFTauPhotonPtSumOutsideSignalConedR03_*_*', #'keep *_hpsPFTau*PtSum_*_*', 'keep *_hpsPFTauMVA3IsolationChargedIsoPtSum_*_*', 'keep *_hpsPFTauMVA3IsolationNeutralIsoPtSum_*_*', From 6aee0f79b93682e978d3953acccd4ef6e8fc30f8 Mon Sep 17 00:00:00 2001 From: AJ Johnson Date: Fri, 6 Nov 2015 21:02:39 +0100 Subject: [PATCH 16/66] Removed dependencies on obsolete discriminators (upgraded anti-electron from MVA5 to MVA6) and changed db from CMS_COND_PAT_000 to CMS_CONDITIONS --- .../python/analyzers/objects/TauAnalyzer.py | 4 +- .../python/analyzers/objects/autophobj.py | 2 +- .../loadRecoTauTagMVAsFromPrepDB_cfi.py | 2 +- ...ecoTauDiscriminationByMVAIsolation2_cff.py | 16 +++ .../RecoTau/python/RecoTauValidation_cfi.py | 108 +++++++++++++----- 5 files changed, 99 insertions(+), 33 deletions(-) diff --git a/PhysicsTools/Heppy/python/analyzers/objects/TauAnalyzer.py b/PhysicsTools/Heppy/python/analyzers/objects/TauAnalyzer.py index 67d60a2c44bfb..8ed0d85de4c01 100644 --- a/PhysicsTools/Heppy/python/analyzers/objects/TauAnalyzer.py +++ b/PhysicsTools/Heppy/python/analyzers/objects/TauAnalyzer.py @@ -84,7 +84,7 @@ def id6(tau,X): tau.idMVANewDM = id6(tau, "by%sIsolationMVA3newDMwLT") tau.idCI3hit = id3(tau, "by%sCombinedIsolationDeltaBetaCorr3Hits") tau.idAntiMu = tau.tauID("againstMuonLoose") + tau.tauID("againstMuonTight") - tau.idAntiE = id5(tau, "againstElectron%sMVA5") + tau.idAntiE = id5(tau, "againstElectron%sMVA6") #print "Tau pt %5.1f: idMVA2 %d, idCI3hit %d, %s, %s" % (tau.pt(), tau.idMVA2, tau.idCI3hit, tau.tauID(self.cfg_ana.tauID), tau.tauID(self.cfg_ana.tauLooseID)) if tau.tauID(self.cfg_ana.tauID): event.selectedTaus.append(tau) @@ -137,7 +137,7 @@ def process(self, event): tauID = "byLooseCombinedIsolationDeltaBetaCorr3Hits", vetoLeptonsPOG = False, # If True, the following two IDs are required tauAntiMuonID = "againstMuonLoose3", - tauAntiElectronID = "againstElectronLooseMVA5", + tauAntiElectronID = "againstElectronLooseMVA6", tauLooseID = "decayModeFinding", ) ) diff --git a/PhysicsTools/Heppy/python/analyzers/objects/autophobj.py b/PhysicsTools/Heppy/python/analyzers/objects/autophobj.py index d9103da0662cd..0e4547213335a 100644 --- a/PhysicsTools/Heppy/python/analyzers/objects/autophobj.py +++ b/PhysicsTools/Heppy/python/analyzers/objects/autophobj.py @@ -114,7 +114,7 @@ NTupleVariable("idMVANewDM", lambda x : x.idMVANewDM, int, help="1,2,3,4,5,6 if the tau passes the very loose to very very tight WP of the MVA3newDMwLT discriminator"), NTupleVariable("idCI3hit", lambda x : x.idCI3hit, int, help="1,2,3 if the tau passes the loose, medium, tight WP of the ByCombinedIsolationDBSumPtCorr3Hits discriminator"), NTupleVariable("idAntiMu", lambda x : x.idAntiMu, int, help="1,2 if the tau passes the loose/tight WP of the againstMuon3 discriminator"), - NTupleVariable("idAntiE", lambda x : x.idAntiE, int, help="1,2,3,4,5 if the tau passes the v loose, loose, medium, tight, v tight WP of the againstElectronMVA5 discriminator"), + NTupleVariable("idAntiE", lambda x : x.idAntiE, int, help="1,2,3,4,5 if the tau passes the v loose, loose, medium, tight, v tight WP of the againstElectronMVA6 discriminator"), NTupleVariable("isoCI3hit", lambda x : x.tauID("byCombinedIsolationDeltaBetaCorrRaw3Hits"), help="byCombinedIsolationDeltaBetaCorrRaw3Hits raw output discriminator"), # MC-match info NTupleVariable("mcMatchId", lambda x : x.mcMatchId, int, mcOnly=True, help="Match to source from hard scatter (pdgId of heaviest particle in chain, 25 for H, 6 for t, 23/24 for W/Z), zero if non-prompt or fake"), diff --git a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py index 600842549a7f4..5d1eed99bf2ce 100644 --- a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py +++ b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py @@ -6,7 +6,7 @@ DumpStat = cms.untracked.bool(False), toGet = cms.VPSet(), # connect = cms.string("frontier://FrontierPrep/CMS_COND_PHYSICSTOOLS") # prep database - connect = cms.string('frontier://FrontierProd/CMS_COND_PAT_000') # prod database + connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') # prod database #connect = cms.string('sqlite_file:RecoTauTag/Configuration/data/RecoTauTag_MVAs_2015Oct21.db') ) diff --git a/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolation2_cff.py b/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolation2_cff.py index 884e63d205666..2a282b953aedd 100644 --- a/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolation2_cff.py +++ b/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolation2_cff.py @@ -43,6 +43,20 @@ verbosity = cms.int32(0) ) +photonPtSumOutsideSignalCone = chargedIsoPtSum.clone( + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + storeRawSumPt = cms.bool(False), + storeRawPhotonSumPt_outsideSignalCone = cms.bool(True), + verbosity = cms.int32(0) +) + +footprintCorrection = chargedIsoPtSum.clone( + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + storeRawSumPt = cms.bool(False), + storeRawFootprintCorrection = cms.bool(True), + verbosity = cms.int32(0) +) + discriminationByIsolationMVA2raw = cms.EDProducer("PFRecoTauDiscriminationByIsolationMVA2", # tau collection to discriminate @@ -93,6 +107,8 @@ chargedIsoPtSum + neutralIsoPtSum + puCorrPtSum + + photonPtSumOutsideSignalCone + + footprintCorrection + discriminationByIsolationMVA2raw + discriminationByIsolationMVA2VLoose + discriminationByIsolationMVA2Loose diff --git a/Validation/RecoTau/python/RecoTauValidation_cfi.py b/Validation/RecoTau/python/RecoTauValidation_cfi.py index 808029ce3f80d..cba31f2e7b27a 100644 --- a/Validation/RecoTau/python/RecoTauValidation_cfi.py +++ b/Validation/RecoTau/python/RecoTauValidation_cfi.py @@ -140,38 +140,38 @@ cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA5VLooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA5LooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA5MediumElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA5TightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA5VTightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA6VLooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA6LooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA6MediumElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA6TightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA6VTightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), @@ -183,6 +183,56 @@ cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVALooseMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVAMediumMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVATightMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauChargedIsoPtSumdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauNeutralIsoPtSumdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauPUcorrPtSumdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauNeutralIsoPtSumWeightdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauFootprintCorrectiondR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauPhotonPtSumOutsideSignalConedR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + ) proc.TauValNumeratorAndDenominator = cms.Sequence( From 4c9f6a40d8d23fbecb124cf625bc0b68c706ebd9 Mon Sep 17 00:00:00 2001 From: AJ Johnson Date: Fri, 6 Nov 2015 21:02:39 +0100 Subject: [PATCH 17/66] Removed dependencies on obsolete discriminators (upgraded anti-electron from MVA5 to MVA6) and changed db from CMS_COND_PAT_000 to CMS_CONDITIONS From 5765c00bb5cad9b18390dd89898a4d4bd27303b6 Mon Sep 17 00:00:00 2001 From: AJ Johnson Date: Sat, 7 Nov 2015 00:48:59 +0100 Subject: [PATCH 18/66] Fixed merge conflict by adding missing statement to RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py --- .../Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py index 5d1eed99bf2ce..6597d91a96e24 100644 --- a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py +++ b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py @@ -10,6 +10,11 @@ #connect = cms.string('sqlite_file:RecoTauTag/Configuration/data/RecoTauTag_MVAs_2015Oct21.db') ) + +if socket.getfqdn().find('.cms') != -1: + loadRecoTauTagMVAsFromPrepDB.connect = cms.string('frontier://(proxyurl=http://localhost:3128)(serverurl=http://localhost:8000/FrontierOnProd)(serverurl=http://localhost:8000/FrontierOnProd)(retrieve-ziplevel=0)(failovertoserver=no)/CMS_CONDITIONS') + + # register tau ID (= isolation) discriminator MVA #tauIdDiscrMVA_trainings = { # 'tauIdMVAoldDMwoLT' : "tauIdMVAoldDMwoLT", From 3f813a77c9739d0a18287731b098cdb538fb2719 Mon Sep 17 00:00:00 2001 From: AJ Johnson Date: Mon, 9 Nov 2015 20:39:49 +0100 Subject: [PATCH 19/66] Fixed accidentally-omitted import socket statement on line 1 of RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py --- .../Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py | 1 + 1 file changed, 1 insertion(+) diff --git a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py index 6597d91a96e24..9cc395ef8b32c 100644 --- a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py +++ b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py @@ -1,3 +1,4 @@ +import socket '''Helper procedure that loads mva inputs from database''' from CondCore.DBCommon.CondDBSetup_cfi import * From 83f2a6fdd84f33271446af60c15aa8ba08ea609f Mon Sep 17 00:00:00 2001 From: Fabio Colombo Date: Tue, 10 Nov 2015 11:20:51 +0100 Subject: [PATCH 20/66] RecoTauTag_EventContent_cff: remove two extra MVA5 outputs --- RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py b/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py index ceadc8e593633..9f4901d89c480 100644 --- a/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py +++ b/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py @@ -146,7 +146,6 @@ #'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw_*_*', #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw_*_*', #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByMVA5rawElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVArawMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits_*_*', 'keep *_hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone_*_*', @@ -308,7 +307,6 @@ #'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw_*_*', #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw_*_*', #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByMVA5rawElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVArawMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits_*_*', 'keep *_hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone_*_*', From 5fcdc642fead557acbf182e916d6440a5f7d28fd Mon Sep 17 00:00:00 2001 From: Dinko Ferencek Date: Fri, 16 Oct 2015 23:18:23 -0500 Subject: [PATCH 21/66] updated version of the double-b tagger --- .../python/recoLayer0/bTagging_cff.py | 18 +- .../PatAlgos/python/tools/jetTools.py | 8 - RecoBTag/SecondaryVertex/BuildFile.xml | 1 + ...dateBoostedDoubleSecondaryVertexComputer.h | 19 +- ...tedDoubleSecondaryVertexAK8Computer_cfi.py | 9 +- ...edDoubleSecondaryVertexCA15Computer_cfi.py | 9 +- ...tedDoubleSecondaryVertexAK8BJetTags_cfi.py | 4 +- ...edDoubleSecondaryVertexCA15BJetTags_cfi.py | 4 +- ...ateBoostedDoubleSecondaryVertexComputer.cc | 579 +++++++++++++++--- RecoBTag/SoftLepton/python/softLepton_cff.py | 4 - .../python/softPFElectronTagInfosAK8_cfi.py | 8 - .../python/softPFElectronTagInfosCA15_cfi.py | 8 - .../python/softPFMuonTagInfosAK8_cfi.py | 7 - .../python/softPFMuonTagInfosCA15_cfi.py | 7 - RecoBTau/JetTagComputer/BuildFile.xml | 1 + .../interface/JetTagComputerRecord.h | 3 +- 16 files changed, 551 insertions(+), 138 deletions(-) delete mode 100644 RecoBTag/SoftLepton/python/softPFElectronTagInfosAK8_cfi.py delete mode 100644 RecoBTag/SoftLepton/python/softPFElectronTagInfosCA15_cfi.py delete mode 100644 RecoBTag/SoftLepton/python/softPFMuonTagInfosAK8_cfi.py delete mode 100644 RecoBTag/SoftLepton/python/softPFMuonTagInfosCA15_cfi.py diff --git a/PhysicsTools/PatAlgos/python/recoLayer0/bTagging_cff.py b/PhysicsTools/PatAlgos/python/recoLayer0/bTagging_cff.py index 0291775995823..159a4040dec10 100644 --- a/PhysicsTools/PatAlgos/python/recoLayer0/bTagging_cff.py +++ b/PhysicsTools/PatAlgos/python/recoLayer0/bTagging_cff.py @@ -21,14 +21,10 @@ , 'pfInclusiveSecondaryVertexFinderTagInfosCA15' , 'pfInclusiveSecondaryVertexFinderNegativeTagInfos' , 'softPFMuonsTagInfos' - , 'softPFMuonsTagInfosAK8' - , 'softPFMuonsTagInfosCA15' , 'softPFElectronsTagInfos' - , 'softPFElectronsTagInfosAK8' - , 'softPFElectronsTagInfosCA15' - #C-Tagging tag infos + # C-Tagging tag infos , 'pfInclusiveSecondaryVertexFinderCvsLTagInfos' - # TopTagInfos (unrelated to b tagging) + # TopTagInfos (unrelated to b tagging) , 'caTopTagInfos' ] # extend for "internal use" in PAT/MINIAOD (renaming) @@ -130,9 +126,9 @@ , 'pfCombinedMVAV2BJetTags' : ['pfImpactParameterTagInfos', 'pfSecondaryVertexTagInfos', 'pfInclusiveSecondaryVertexFinderTagInfos', 'softPFMuonsTagInfos', 'softPFElectronsTagInfos'] , 'pfCombinedSecondaryVertexSoftLeptonBJetTags' : ['pfImpactParameterTagInfos', 'pfInclusiveSecondaryVertexFinderTagInfos', 'softPFMuonsTagInfos', 'softPFElectronsTagInfos'] , 'pfNegativeCombinedSecondaryVertexSoftLeptonBJetTags' : ['pfImpactParameterTagInfos', 'pfInclusiveSecondaryVertexFinderNegativeTagInfos', 'softPFMuonsTagInfos', 'softPFElectronsTagInfos'] - , 'pfBoostedDoubleSecondaryVertexAK8BJetTags' : ['pfImpactParameterTagInfosAK8', 'pfInclusiveSecondaryVertexFinderTagInfosAK8', 'softPFMuonsTagInfosAK8', 'softPFElectronsTagInfosAK8'] - , 'pfBoostedDoubleSecondaryVertexCA15BJetTags' : ['pfImpactParameterTagInfosCA15', 'pfInclusiveSecondaryVertexFinderTagInfosCA15', 'softPFMuonsTagInfosCA15', 'softPFElectronsTagInfosCA15'] - #C-Tagging - , 'pfCombinedCvsLJetTags' : ["pfImpactParameterTagInfos", "pfInclusiveSecondaryVertexFinderCvsLTagInfos", "softPFMuonsTagInfos", "softPFElectronsTagInfos"] - , 'pfCombinedCvsBJetTags' : ["pfImpactParameterTagInfos", "pfInclusiveSecondaryVertexFinderCvsLTagInfos", "softPFMuonsTagInfos", "softPFElectronsTagInfos"] + , 'pfBoostedDoubleSecondaryVertexAK8BJetTags' : ['pfImpactParameterTagInfosAK8', 'pfInclusiveSecondaryVertexFinderTagInfosAK8'] + , 'pfBoostedDoubleSecondaryVertexCA15BJetTags' : ['pfImpactParameterTagInfosCA15', 'pfInclusiveSecondaryVertexFinderTagInfosCA15'] + # C-Tagging + , 'pfCombinedCvsLJetTags' : ["pfImpactParameterTagInfos", "pfInclusiveSecondaryVertexFinderCvsLTagInfos", "softPFMuonsTagInfos", "softPFElectronsTagInfos"] + , 'pfCombinedCvsBJetTags' : ["pfImpactParameterTagInfos", "pfInclusiveSecondaryVertexFinderCvsLTagInfos", "softPFMuonsTagInfos", "softPFElectronsTagInfos"] } diff --git a/PhysicsTools/PatAlgos/python/tools/jetTools.py b/PhysicsTools/PatAlgos/python/tools/jetTools.py index d19a8eb2afa6b..61a4775a6c3bf 100644 --- a/PhysicsTools/PatAlgos/python/tools/jetTools.py +++ b/PhysicsTools/PatAlgos/python/tools/jetTools.py @@ -488,16 +488,8 @@ def toolCode(self, process): setattr(process, btagInfo+_labelName+postfix, btag.softMuonTagInfos.clone(jets = jetSource, primaryVertex=pvSource)) if btagInfo == 'softPFMuonsTagInfos': setattr(process, btagInfo+_labelName+postfix, btag.softPFMuonsTagInfos.clone(jets = jetSource, primaryVertex=pvSource, muons=muSource)) - if btagInfo == 'softPFMuonsTagInfosAK8': - setattr(process, btagInfo+_labelName+postfix, btag.softPFMuonsTagInfosAK8.clone(jets = jetSource, primaryVertex=pvSource, muons=muSource)) - if btagInfo == 'softPFMuonsTagInfosCA15': - setattr(process, btagInfo+_labelName+postfix, btag.softPFMuonsTagInfosCA15.clone(jets = jetSource, primaryVertex=pvSource, muons=muSource)) if btagInfo == 'softPFElectronsTagInfos': setattr(process, btagInfo+_labelName+postfix, btag.softPFElectronsTagInfos.clone(jets = jetSource, primaryVertex=pvSource, electrons=elSource)) - if btagInfo == 'softPFElectronsTagInfosAK8': - setattr(process, btagInfo+_labelName+postfix, btag.softPFElectronsTagInfosAK8.clone(jets = jetSource, primaryVertex=pvSource, electrons=elSource)) - if btagInfo == 'softPFElectronsTagInfosCA15': - setattr(process, btagInfo+_labelName+postfix, btag.softPFElectronsTagInfosCA15.clone(jets = jetSource, primaryVertex=pvSource, electrons=elSource)) acceptedTagInfos.append(btagInfo) elif hasattr(toptag, btagInfo) : acceptedTagInfos.append(btagInfo) diff --git a/RecoBTag/SecondaryVertex/BuildFile.xml b/RecoBTag/SecondaryVertex/BuildFile.xml index 66f245b372fed..ca3a97ed868ad 100644 --- a/RecoBTag/SecondaryVertex/BuildFile.xml +++ b/RecoBTag/SecondaryVertex/BuildFile.xml @@ -8,6 +8,7 @@ + diff --git a/RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h b/RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h index 22276c98c5fd8..e877e507a5e49 100644 --- a/RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h +++ b/RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h @@ -2,6 +2,7 @@ #define RecoBTag_SecondaryVertex_CandidateBoostedDoubleSecondaryVertexComputer_h #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Framework/interface/ESHandle.h" #include "CommonTools/Utils/interface/TMVAEvaluator.h" #include "RecoBTau/JetTagComputer/interface/JetTagComputer.h" #include "DataFormats/JetReco/interface/JetCollection.h" @@ -9,6 +10,9 @@ #include "DataFormats/VertexReco/interface/VertexFwd.h" #include "DataFormats/Candidate/interface/VertexCompositePtrCandidate.h" #include "RecoBTag/SecondaryVertex/interface/TrackKinematics.h" +#include "RecoBTag/SecondaryVertex/interface/V0Filter.h" +#include "RecoBTag/SecondaryVertex/interface/TrackSelector.h" +#include "TrackingTools/TransientTrack/interface/TransientTrackBuilder.h" #include "fastjet/PseudoJet.hh" #include "fastjet/contrib/Njettiness.hh" @@ -18,6 +22,7 @@ class CandidateBoostedDoubleSecondaryVertexComputer : public JetTagComputer { public: CandidateBoostedDoubleSecondaryVertexComputer(const edm::ParameterSet & parameters); + void initialize(const JetTagComputerRecord &) override; float discriminator(const TagInfoHelper & tagInfos) const override; private: @@ -25,15 +30,25 @@ class CandidateBoostedDoubleSecondaryVertexComputer : public JetTagComputer { void setTracksPVBase(const reco::TrackRef & trackRef, const reco::VertexRef & vertexRef, float & PVweight) const; void setTracksPV(const reco::CandidatePtr & trackRef, const reco::VertexRef & vertexRef, float & PVweight) const; void vertexKinematics(const reco::VertexCompositePtrCandidate & vertex, reco::TrackKinematics & vertexKinematics) const; + void etaRelToTauAxis(const reco::VertexCompositePtrCandidate & vertex, fastjet::PseudoJet & tauAxis, std::vector & tau_trackEtaRel) const; - const double beta_ ; + const double beta_; const double R0_; // N-subjettiness calculator fastjet::contrib::Njettiness njettiness_; const double maxSVDeltaRToJet_; - + const bool useCondDB_; + const std::string gbrForestLabel_; const edm::FileInPath weightFile_; + const bool useGBRForest_; + const bool useAdaBoost_; + const bool maxDistToAxis_; + const bool maxDecayLen_; + reco::V0Filter trackPairV0Filter; + reco::TrackSelector trackSelector; + + edm::ESHandle trackBuilder; std::unique_ptr mvaID; }; diff --git a/RecoBTag/SecondaryVertex/python/candidateBoostedDoubleSecondaryVertexAK8Computer_cfi.py b/RecoBTag/SecondaryVertex/python/candidateBoostedDoubleSecondaryVertexAK8Computer_cfi.py index ef47d34c92e38..d4956374d5ede 100644 --- a/RecoBTag/SecondaryVertex/python/candidateBoostedDoubleSecondaryVertexAK8Computer_cfi.py +++ b/RecoBTag/SecondaryVertex/python/candidateBoostedDoubleSecondaryVertexAK8Computer_cfi.py @@ -1,8 +1,15 @@ import FWCore.ParameterSet.Config as cms +from RecoBTag.SecondaryVertex.trackSelection_cff import * + candidateBoostedDoubleSecondaryVertexAK8Computer = cms.ESProducer("CandidateBoostedDoubleSecondaryVertexESProducer", + trackSelectionBlock, beta = cms.double(1.0), R0 = cms.double(0.8), maxSVDeltaRToJet = cms.double(0.7), - weightFile = cms.FileInPath('RecoBTag/SecondaryVertex/data/BoostedDoubleSV_AK8_BDT.weights.xml.gz') + useCondDB = cms.bool(False), + weightFile = cms.FileInPath('RecoBTag/SecondaryVertex/data/BoostedDoubleSV_AK8_BDT_v2.weights.xml.gz'), + useGBRForest = cms.bool(True), + useAdaBoost = cms.bool(False), + trackPairV0Filter = cms.PSet(k0sMassWindow = cms.double(0.03)) ) diff --git a/RecoBTag/SecondaryVertex/python/candidateBoostedDoubleSecondaryVertexCA15Computer_cfi.py b/RecoBTag/SecondaryVertex/python/candidateBoostedDoubleSecondaryVertexCA15Computer_cfi.py index 9008fa0aaccc7..d91b153c9288d 100644 --- a/RecoBTag/SecondaryVertex/python/candidateBoostedDoubleSecondaryVertexCA15Computer_cfi.py +++ b/RecoBTag/SecondaryVertex/python/candidateBoostedDoubleSecondaryVertexCA15Computer_cfi.py @@ -1,8 +1,15 @@ import FWCore.ParameterSet.Config as cms +from RecoBTag.SecondaryVertex.trackSelection_cff import * + candidateBoostedDoubleSecondaryVertexCA15Computer = cms.ESProducer("CandidateBoostedDoubleSecondaryVertexESProducer", + trackSelectionBlock, beta = cms.double(1.0), R0 = cms.double(1.5), maxSVDeltaRToJet = cms.double(1.3), - weightFile = cms.FileInPath('RecoBTag/SecondaryVertex/data/BoostedDoubleSV_CA15_BDT.weights.xml.gz') + useCondDB = cms.bool(False), + weightFile = cms.FileInPath('RecoBTag/SecondaryVertex/data/BoostedDoubleSV_CA15_BDT_v2.weights.xml.gz'), + useGBRForest = cms.bool(True), + useAdaBoost = cms.bool(False), + trackPairV0Filter = cms.PSet(k0sMassWindow = cms.double(0.03)) ) diff --git a/RecoBTag/SecondaryVertex/python/pfBoostedDoubleSecondaryVertexAK8BJetTags_cfi.py b/RecoBTag/SecondaryVertex/python/pfBoostedDoubleSecondaryVertexAK8BJetTags_cfi.py index 5a98bcf736695..21cb9bbb8ae42 100644 --- a/RecoBTag/SecondaryVertex/python/pfBoostedDoubleSecondaryVertexAK8BJetTags_cfi.py +++ b/RecoBTag/SecondaryVertex/python/pfBoostedDoubleSecondaryVertexAK8BJetTags_cfi.py @@ -3,7 +3,5 @@ pfBoostedDoubleSecondaryVertexAK8BJetTags = cms.EDProducer("JetTagProducer", jetTagComputer = cms.string('candidateBoostedDoubleSecondaryVertexAK8Computer'), tagInfos = cms.VInputTag(cms.InputTag("pfImpactParameterTagInfosAK8"), - cms.InputTag("pfInclusiveSecondaryVertexFinderTagInfosAK8"), - cms.InputTag("softPFMuonsTagInfosAK8"), - cms.InputTag("softPFElectronsTagInfosAK8")) + cms.InputTag("pfInclusiveSecondaryVertexFinderTagInfosAK8")) ) diff --git a/RecoBTag/SecondaryVertex/python/pfBoostedDoubleSecondaryVertexCA15BJetTags_cfi.py b/RecoBTag/SecondaryVertex/python/pfBoostedDoubleSecondaryVertexCA15BJetTags_cfi.py index 40869cc1e55b9..85a93ac5443bf 100644 --- a/RecoBTag/SecondaryVertex/python/pfBoostedDoubleSecondaryVertexCA15BJetTags_cfi.py +++ b/RecoBTag/SecondaryVertex/python/pfBoostedDoubleSecondaryVertexCA15BJetTags_cfi.py @@ -3,7 +3,5 @@ pfBoostedDoubleSecondaryVertexCA15BJetTags = cms.EDProducer("JetTagProducer", jetTagComputer = cms.string('candidateBoostedDoubleSecondaryVertexCA15Computer'), tagInfos = cms.VInputTag(cms.InputTag("pfImpactParameterTagInfosCA15"), - cms.InputTag("pfInclusiveSecondaryVertexFinderTagInfosCA15"), - cms.InputTag("softPFMuonsTagInfosCA15"), - cms.InputTag("softPFElectronsTagInfosCA15")) + cms.InputTag("pfInclusiveSecondaryVertexFinderTagInfosCA15")) ) diff --git a/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc b/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc index 3544d1beedbaa..181a38e9926d6 100644 --- a/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc +++ b/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc @@ -1,11 +1,18 @@ #include "RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" + +#include "CondFormats/DataRecord/interface/BTauGenericMVAJetTagComputerRcd.h" +#include "CondFormats/DataRecord/interface/GBRWrapperRcd.h" +#include "TrackingTools/Records/interface/TransientTrackRecord.h" +#include "RecoBTau/JetTagComputer/interface/JetTagComputerRecord.h" #include "DataFormats/BTauReco/interface/CandIPTagInfo.h" #include "DataFormats/BTauReco/interface/CandSecondaryVertexTagInfo.h" -#include "DataFormats/BTauReco/interface/CandSoftLeptonTagInfo.h" #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" #include "DataFormats/PatCandidates/interface/PackedCandidate.h" +#include "RecoVertex/VertexPrimitives/interface/ConvertToFromReco.h" +#include "RecoBTau/JetTagComputer/interface/JetTagComputer.h" +#include "TrackingTools/IPTools/interface/IPTools.h" CandidateBoostedDoubleSecondaryVertexComputer::CandidateBoostedDoubleSecondaryVertexComputer(const edm::ParameterSet & parameters) : @@ -13,39 +20,73 @@ CandidateBoostedDoubleSecondaryVertexComputer::CandidateBoostedDoubleSecondaryVe R0_(parameters.getParameter("R0")), njettiness_(fastjet::contrib::OnePass_KT_Axes(), fastjet::contrib::NormalizedMeasure(beta_,R0_)), maxSVDeltaRToJet_(parameters.getParameter("maxSVDeltaRToJet")), - weightFile_(parameters.getParameter("weightFile")) + useCondDB_(parameters.getParameter("useCondDB")), + gbrForestLabel_(parameters.existsAs("gbrForestLabel") ? parameters.getParameter("gbrForestLabel") : ""), + weightFile_(parameters.existsAs("weightFile") ? parameters.getParameter("weightFile") : edm::FileInPath()), + useGBRForest_(parameters.existsAs("useGBRForest") ? parameters.getParameter("useGBRForest") : false), + useAdaBoost_(parameters.existsAs("useAdaBoost") ? parameters.getParameter("useAdaBoost") : false), + maxDistToAxis_(parameters.getParameter("trackSelection").getParameter("maxDistToAxis")), + maxDecayLen_(parameters.getParameter("trackSelection").getParameter("maxDecayLen")), + trackPairV0Filter(parameters.getParameter("trackPairV0Filter")), + trackSelector(parameters.getParameter("trackSelection")) { uses(0, "ipTagInfos"); uses(1, "svTagInfos"); - uses(2, "muonTagInfos"); - uses(3, "elecTagInfos"); mvaID.reset(new TMVAEvaluator()); +} - // variable order needs to be the same as in the training - std::vector variables({"PFLepton_ptrel", "z_ratio1", "tau_dot", "SV_mass_0", "SV_vtx_EnergyRatio_0", - "SV_vtx_EnergyRatio_1","PFLepton_IP2D", "tau2/tau1", "nSL", "jetNTracksEtaRel"}); - std::vector spectators({"massGroomed", "flavour", "nbHadrons", "ptGroomed", "etaGroomed"}); +void CandidateBoostedDoubleSecondaryVertexComputer::initialize(const JetTagComputerRecord & record) +{ + // variable names and order need to be the same as in the training + std::vector variables({"z_ratio", + "trackSipdSig_3","trackSipdSig_2","trackSipdSig_1","trackSipdSig_0", + "trackSipdSig_1_0","trackSipdSig_0_0","trackSipdSig_1_1","trackSipdSig_0_1", + "trackSip2dSigAboveCharm_0","trackSip2dSigAboveBottom_0","trackSip2dSigAboveBottom_1", + "tau0_trackEtaRel_0","tau0_trackEtaRel_1","tau0_trackEtaRel_2", + "tau1_trackEtaRel_0","tau1_trackEtaRel_1","tau1_trackEtaRel_2", + "tau_vertexMass_0","tau_vertexEnergyRatio_0","tau_vertexDeltaR_0","tau_flightDistance2dSig_0", + "tau_vertexMass_1","tau_vertexEnergyRatio_1","tau_flightDistance2dSig_1", + "jetNTracks","nSV"}); + // book TMVA readers + std::vector spectators({"massPruned", "flavour", "nbHadrons", "ptPruned", "etaPruned"}); + + if (useCondDB_) + { + const GBRWrapperRcd & gbrWrapperRecord = record.getRecord(); - mvaID->initialize("Color:Silent:Error", "BDTG", weightFile_.fullPath(), variables, spectators,true,false); -} + edm::ESHandle gbrForestHandle; + gbrWrapperRecord.get(gbrForestLabel_.c_str(), gbrForestHandle); + mvaID->initializeGBRForest(gbrForestHandle.product(), variables, spectators, useAdaBoost_); + } + else + mvaID->initialize("Color:Silent:Error", "BDT", weightFile_.fullPath(), variables, spectators, useGBRForest_, useAdaBoost_); + + // get TransientTrackBuilder + const TransientTrackRecord & transientTrackRcd = record.getRecord(); + transientTrackRcd.get("TransientTrackBuilder", trackBuilder); +} float CandidateBoostedDoubleSecondaryVertexComputer::discriminator(const TagInfoHelper & tagInfo) const { // get TagInfos const reco::CandIPTagInfo & ipTagInfo = tagInfo.get(0); const reco::CandSecondaryVertexTagInfo & svTagInfo = tagInfo.get(1); - const reco::CandSoftLeptonTagInfo & muonTagInfo = tagInfo.get(2); - const reco::CandSoftLeptonTagInfo & elecTagInfo = tagInfo.get(3); // default discriminator value float value = -10.; // default variable values - float z_ratio = -1. , tau_dot = -1., SV_pt_0 = -1., SV_mass_0 = -1., SV_EnergyRatio_0 = -1., SV_EnergyRatio_1 = -1., tau21 = -1.; - int contSV = 0, vertexNTracks = 0; - int nSL = 0, nSM = 0, nSE = 0; + float z_ratio = -3.; + float trackSip3dSig_3 = -50., trackSip3dSig_2 = -50., trackSip3dSig_1 = -50., trackSip3dSig_0 = -50.; + float tau2_trackSip3dSig_0 = -50., tau1_trackSip3dSig_0 = -50., tau2_trackSip3dSig_1 = -50., tau1_trackSip3dSig_1 = -50.; + float trackSip2dSigAboveCharm_0 = -19., trackSip2dSigAboveBottom_0 = -19., trackSip2dSigAboveBottom_1 = -19.; + float tau1_trackEtaRel_0 = -1., tau1_trackEtaRel_1 = -1., tau1_trackEtaRel_2 = -1.; + float tau2_trackEtaRel_0 = -1., tau2_trackEtaRel_1 = -1., tau2_trackEtaRel_2 = -1.; + float tau1_vertexMass = -1., tau1_vertexEnergyRatio = -1., tau1_vertexDeltaR = -1., tau1_flightDistance2dSig = -1.; + float tau2_vertexMass = -1., tau2_vertexEnergyRatio = -1., tau2_vertexDeltaR = -1., tau2_flightDistance2dSig = -1.; + float jetNTracks = 0, nSV = 0, tau1_nSecondaryVertices = 0, tau2_nSecondaryVertices = 0; // get the jet reference const reco::JetBaseRef jet = svTagInfo.jet(); @@ -54,111 +95,490 @@ float CandidateBoostedDoubleSecondaryVertexComputer::discriminator(const TagInfo float tau2, tau1; // calculate N-subjettiness calcNsubjettiness(jet, tau1, tau2, currentAxes); - if (tau1 != 0.) tau21 = tau2/tau1; - const std::vector & selectedTracks( ipTagInfo.selectedTracks() ); - size_t trackSize = selectedTracks.size(); const reco::VertexRef & vertexRef = ipTagInfo.primaryVertex(); + GlobalPoint pv(0.,0.,0.); + if ( ipTagInfo.primaryVertex().isNonnull() ) + pv = GlobalPoint(vertexRef->x(),vertexRef->y(),vertexRef->z()); + + const std::vector & selectedTracks = ipTagInfo.selectedTracks(); + const std::vector & ipData = ipTagInfo.impactParameterData(); + size_t trackSize = selectedTracks.size(); + + reco::TrackKinematics allKinematics; + std::vector IP3Ds, IP3Ds_1, IP3Ds_2; + int contTrk=0; + // loop over tracks associated to the jet for (size_t itt=0; itt < trackSize; ++itt) { - const reco::Track & ptrack = *(reco::btag::toTrack(selectedTracks[itt])); const reco::CandidatePtr ptrackRef = selectedTracks[itt]; + const reco::Track * ptrackPtr = reco::btag::toTrack(ptrackRef); + const reco::Track & ptrack = *ptrackPtr; float track_PVweight = 0.; setTracksPV(ptrackRef, vertexRef, track_PVweight); - if (track_PVweight>0.) { allKinematics.add(ptrack, track_PVweight); } + if (track_PVweight>0.5) allKinematics.add(ptrack, track_PVweight); + + const reco::btag::TrackIPData &data = ipData[itt]; + if (trackSelector(ptrack, data, *jet, pv)) jetNTracks += 1.; + + // check if the track is from V0 + bool isfromV0 = false; + const reco::Track * trackPairV0Test[2]; + + trackPairV0Test[0] = ptrackPtr; + + for (size_t jtt=0; jtt < trackSize; ++jtt) + { + if (itt == jtt) continue; + + const reco::CandidatePtr pairTrackRef = selectedTracks[jtt]; + const reco::Track * pairTrackPtr = reco::btag::toTrack(pairTrackRef); + + trackPairV0Test[1] = pairTrackPtr; + + if (!trackPairV0Filter(trackPairV0Test, 2)) + { + isfromV0 = true; + break; + } + } + + reco::TransientTrack transientTrack = trackBuilder->build(ptrack); + GlobalVector direction(jet->px(), jet->py(), jet->pz()); + + if (currentAxes.size() > 1) + { + if (reco::deltaR2(ptrack,currentAxes[1]) < reco::deltaR2(ptrack,currentAxes[0])) + direction = GlobalVector(currentAxes[1].px(), currentAxes[1].py(), currentAxes[1].pz()); + else + direction = GlobalVector(currentAxes[0].px(), currentAxes[0].py(), currentAxes[0].pz()); + } + else if (currentAxes.size() > 0) + direction = GlobalVector(currentAxes[0].px(), currentAxes[0].py(), currentAxes[0].pz()); + + // decay distance and track distance wrt to the closest tau axis + float decayLengthTau=-1; + float distTauAxis=-1; + + TrajectoryStateOnSurface closest = IPTools::closestApproachToJet(transientTrack.impactPointState(), *vertexRef , direction, transientTrack.field()); + if (closest.isValid()) + decayLengthTau = (closest.globalPosition() - RecoVertex::convertPos(vertexRef->position())).mag(); + + distTauAxis = std::abs(IPTools::jetTrackDistance(transientTrack, direction, *vertexRef ).second.value()); + + float IP3Dsig = ipTagInfo.impactParameterData()[itt].ip3d.significance(); + + if( !isfromV0 && decayLengthTau 1) + { + if (reco::deltaR2(ptrack,currentAxes[0]) < reco::deltaR2(ptrack,currentAxes[1])) + IP3Ds_1.push_back( IP3Dsig<-50. ? -50. : IP3Dsig ); + else + IP3Ds_2.push_back( IP3Dsig<-50. ? -50. : IP3Dsig ); + } + else + IP3Ds_1.push_back( IP3Dsig<-50. ? -50. : IP3Dsig ); + } + } + + std::vector indices = ipTagInfo.sortedIndexes(reco::btag::IP2DSig); + bool charmThreshSet = false; + + reco::TrackKinematics kin; + for (size_t i=0; i 1.5 // charm cut + && !charmThreshSet ) + { + trackSip2dSigAboveCharm_0 = data.ip2d.significance(); + + charmThreshSet = true; + } + + if ( kin.vectorSum().M() > 5.2 ) // bottom cut + { + trackSip2dSigAboveBottom_0 = data.ip2d.significance(); + if ( (i+1)() ); + std::sort( IP3Ds_1.begin(),IP3Ds_1.end(),std::greater() ); + std::sort( IP3Ds_2.begin(),IP3Ds_2.end(),std::greater() ); + int num_1 = IP3Ds_1.size(); + int num_2 = IP3Ds_2.size(); + + switch(contTrk){ + case 0: + + trackSip3dSig_0 = dummyTrack; + trackSip3dSig_1 = dummyTrack; + trackSip3dSig_2 = dummyTrack; + trackSip3dSig_3 = dummyTrack; + + break; + + case 1: + + trackSip3dSig_0 = IP3Ds.at(0); + trackSip3dSig_1 = dummyTrack; + trackSip3dSig_2 = dummyTrack; + trackSip3dSig_3 = dummyTrack; + + break; + + case 2: + + trackSip3dSig_0 = IP3Ds.at(0); + trackSip3dSig_1 = IP3Ds.at(1); + trackSip3dSig_2 = dummyTrack; + trackSip3dSig_3 = dummyTrack; + + break; + + case 3: + + trackSip3dSig_0 = IP3Ds.at(0); + trackSip3dSig_1 = IP3Ds.at(1); + trackSip3dSig_2 = IP3Ds.at(2); + trackSip3dSig_3 = dummyTrack; + + break; + + default: + + trackSip3dSig_0 = IP3Ds.at(0); + trackSip3dSig_1 = IP3Ds.at(1); + trackSip3dSig_2 = IP3Ds.at(2); + trackSip3dSig_3 = IP3Ds.at(3); + + } + + switch(num_1){ + case 0: + + tau1_trackSip3dSig_0 = dummyTrack; + tau1_trackSip3dSig_1 = dummyTrack; + + break; + + case 1: + + tau1_trackSip3dSig_0 = IP3Ds_1.at(0); + tau1_trackSip3dSig_1 = dummyTrack; + + break; + + case 2: + + tau1_trackSip3dSig_0 = IP3Ds_1.at(0); + tau1_trackSip3dSig_1 = IP3Ds_1.at(1); + + break; + + case 3: + + tau1_trackSip3dSig_0 = IP3Ds_1.at(0); + tau1_trackSip3dSig_1 = IP3Ds_1.at(1); + + break; + + default: + + tau1_trackSip3dSig_0 = IP3Ds_1.at(0); + tau1_trackSip3dSig_1 = IP3Ds_1.at(1); + + } + + switch(num_2){ + case 0: + + tau2_trackSip3dSig_0 = dummyTrack; + tau2_trackSip3dSig_1 = dummyTrack; + + break; + + case 1: + tau2_trackSip3dSig_0 = IP3Ds_2.at(0); + tau2_trackSip3dSig_1 = dummyTrack; + + break; + + case 2: + tau2_trackSip3dSig_0 = IP3Ds_2.at(0); + tau2_trackSip3dSig_1 = IP3Ds_2.at(1); + + break; + + case 3: + tau2_trackSip3dSig_0 = IP3Ds_2.at(0); + tau2_trackSip3dSig_1 = IP3Ds_2.at(1); + break; + + default: + + tau2_trackSip3dSig_0 = IP3Ds_2.at(0); + tau2_trackSip3dSig_1 = IP3Ds_2.at(1); + } math::XYZVector jetDir = jet->momentum().Unit(); + reco::TrackKinematics tau1Kinematics; + reco::TrackKinematics tau2Kinematics; + std::vector tau1_trackEtaRels, tau2_trackEtaRels; - std::map VTXmass; + std::map VTXmap; for (size_t vtx = 0; vtx < svTagInfo.nVertices(); ++vtx) { - vertexNTracks += (svTagInfo.secondaryVertex(vtx)).numberOfSourceCandidatePtrs(); - GlobalVector flightDir = svTagInfo.flightDirection(vtx); - if (reco::deltaR2(flightDir, jetDir)<(maxSVDeltaRToJet_*maxSVDeltaRToJet_)) + reco::TrackKinematics vertexKinematic; + + // get the vertex kinematics + const reco::VertexCompositePtrCandidate vertex = svTagInfo.secondaryVertex(vtx); + vertexKinematics(vertex, vertexKinematic); + + if (currentAxes.size() > 1) { - ++contSV; - VTXmass[svTagInfo.secondaryVertex(vtx).p4().mass()]=vtx; + if (reco::deltaR2(svTagInfo.flightDirection(vtx),currentAxes[1]) < reco::deltaR2(svTagInfo.flightDirection(vtx),currentAxes[0])) + { + tau2Kinematics = tau2Kinematics + vertexKinematic; + if( tau2_flightDistance2dSig < 0 ) + { + tau2_flightDistance2dSig = svTagInfo.flightDistance(vtx,true).significance(); + tau2_vertexDeltaR = reco::deltaR(svTagInfo.flightDirection(vtx),currentAxes[1]); + } + etaRelToTauAxis(vertex, currentAxes[1], tau2_trackEtaRels); + tau2_nSecondaryVertices += 1.; + } + else + { + tau1Kinematics = tau1Kinematics + vertexKinematic; + if( tau1_flightDistance2dSig < 0 ) + { + tau1_flightDistance2dSig =svTagInfo.flightDistance(vtx,true).significance(); + tau1_vertexDeltaR = reco::deltaR(svTagInfo.flightDirection(vtx),currentAxes[0]); + } + etaRelToTauAxis(vertex, currentAxes[0], tau1_trackEtaRels); + tau1_nSecondaryVertices += 1.; + } + + } + else if (currentAxes.size() > 0) + { + tau1Kinematics = tau1Kinematics + vertexKinematic; + if( tau1_flightDistance2dSig < 0 ) + { + tau1_flightDistance2dSig =svTagInfo.flightDistance(vtx,true).significance(); + tau1_vertexDeltaR = reco::deltaR(svTagInfo.flightDirection(vtx),currentAxes[0]); + } + etaRelToTauAxis(vertex, currentAxes[1], tau1_trackEtaRels); + tau1_nSecondaryVertices += 1.; } + + GlobalVector flightDir = svTagInfo.flightDirection(vtx); + if (reco::deltaR2(flightDir, jetDir)<(maxSVDeltaRToJet_*maxSVDeltaRToJet_)) + VTXmap[svTagInfo.flightDistance(vtx).error()]=vtx; + } + nSV = VTXmap.size(); + + + math::XYZTLorentzVector allSum = allKinematics.weightedVectorSum() ; + if ( tau1_nSecondaryVertices > 0. ) + { + math::XYZTLorentzVector tau1_vertexSum = tau1Kinematics.weightedVectorSum(); + tau1_vertexEnergyRatio = tau1_vertexSum.E() / allSum.E(); + if ( tau1_vertexEnergyRatio > 50. ) tau1_vertexEnergyRatio = 50.; + + tau1_vertexMass = tau1_vertexSum.M(); + } + + if ( tau2_nSecondaryVertices > 0. ) + { + math::XYZTLorentzVector tau2_vertexSum = tau2Kinematics.weightedVectorSum(); + tau2_vertexEnergyRatio = tau2_vertexSum.E() / allSum.E(); + if ( tau2_vertexEnergyRatio > 50. ) tau2_vertexEnergyRatio = 50.; + + tau2_vertexMass= tau2_vertexSum.M(); + } + + + float dummyEtaRel = -1.; + + std::sort( tau1_trackEtaRels.begin(),tau1_trackEtaRels.end() ); + std::sort( tau2_trackEtaRels.begin(),tau2_trackEtaRels.end() ); + + switch(tau2_trackEtaRels.size()){ + case 0: + + tau2_trackEtaRel_0 = dummyEtaRel; + tau2_trackEtaRel_1 = dummyEtaRel; + tau2_trackEtaRel_2 = dummyEtaRel; + + break; + + case 1: + + tau2_trackEtaRel_0 = tau2_trackEtaRels.at(0); + tau2_trackEtaRel_1 = dummyEtaRel; + tau2_trackEtaRel_2 = dummyEtaRel; + + break; + + case 2: + + tau2_trackEtaRel_0 = tau2_trackEtaRels.at(0); + tau2_trackEtaRel_1 = tau2_trackEtaRels.at(1); + tau2_trackEtaRel_2 = dummyEtaRel; + + break; + + default: + + tau2_trackEtaRel_0 = tau2_trackEtaRels.at(0); + tau2_trackEtaRel_1 = tau2_trackEtaRels.at(1); + tau2_trackEtaRel_2 = tau2_trackEtaRels.at(2); + + } + + switch(tau1_trackEtaRels.size()){ + case 0: + + tau1_trackEtaRel_0 = dummyEtaRel; + tau1_trackEtaRel_1 = dummyEtaRel; + tau1_trackEtaRel_2 = dummyEtaRel; + + break; + + case 1: + + tau1_trackEtaRel_0 = tau1_trackEtaRels.at(0); + tau1_trackEtaRel_1 = dummyEtaRel; + tau1_trackEtaRel_2 = dummyEtaRel; + + break; + + case 2: + + tau1_trackEtaRel_0 = tau1_trackEtaRels.at(0); + tau1_trackEtaRel_1 = tau1_trackEtaRels.at(1); + tau1_trackEtaRel_2 = dummyEtaRel; + + break; + + default: + + tau1_trackEtaRel_0 = tau1_trackEtaRels.at(0); + tau1_trackEtaRel_1 = tau1_trackEtaRels.at(1); + tau1_trackEtaRel_2 = tau1_trackEtaRels.at(2); + } int cont=0; GlobalVector flightDir_0, flightDir_1; reco::Candidate::LorentzVector SV_p4_0 , SV_p4_1; - for ( std::map::reverse_iterator iVtx=VTXmass.rbegin(); iVtx!=VTXmass.rend(); ++iVtx) + + for ( std::map::iterator iVtx=VTXmap.begin(); iVtx!=VTXmap.end(); ++iVtx) { ++cont; const reco::VertexCompositePtrCandidate &vertex = svTagInfo.secondaryVertex(iVtx->second); - reco::TrackKinematics vtxKinematics; - vertexKinematics(vertex, vtxKinematics); - math::XYZTLorentzVector allSum = allKinematics.weightedVectorSum(); - math::XYZTLorentzVector vertexSum = vtxKinematics.weightedVectorSum(); if (cont==1) { - SV_mass_0 = vertex.p4().mass() ; - SV_EnergyRatio_0 = vertexSum.E() / allSum.E(); - SV_pt_0 = vertex.p4().pt(); flightDir_0 = svTagInfo.flightDirection(iVtx->second); SV_p4_0 = vertex.p4(); - if (reco::deltaR2(flightDir_0,currentAxes[1])second); SV_p4_1 = vertex.p4(); - z_ratio = reco::deltaR(flightDir_0,flightDir_1)*SV_pt_0/(SV_p4_0+SV_p4_1).mass(); + + z_ratio = reco::deltaR(flightDir_0,flightDir_1)*SV_p4_1.pt()/(SV_p4_1+SV_p4_0).mass(); + break; } } - nSM = muonTagInfo.leptons(); - nSE = elecTagInfo.leptons(); - nSL = nSM + nSE; + // when only one tau axis has SVs assigned, they are all assigned to the 1st tau axis + // in the special case below need to swap values + if( (tau1_vertexMass<0 && tau2_vertexMass>0) ) + { + float temp = tau1_trackEtaRel_0; + tau1_trackEtaRel_0= tau2_trackEtaRel_0; + tau2_trackEtaRel_0= temp; - float PFLepton_ptrel = -1., PFLepton_IP2D = -1.; + temp = tau1_trackEtaRel_1; + tau1_trackEtaRel_1= tau2_trackEtaRel_1; + tau2_trackEtaRel_1= temp; - // PFMuon information - for (size_t leptIdx = 0; leptIdx < muonTagInfo.leptons() ; ++leptIdx) - { - float PFMuon_ptrel = (muonTagInfo.properties(leptIdx).ptRel); - if (PFMuon_ptrel > PFLepton_ptrel ) - { - PFLepton_ptrel = PFMuon_ptrel; - PFLepton_IP2D = (muonTagInfo.properties(leptIdx).sip2d); - } - } + temp = tau1_trackEtaRel_2; + tau1_trackEtaRel_2= tau2_trackEtaRel_2; + tau2_trackEtaRel_2= temp; - // PFElectron information - for (size_t leptIdx = 0; leptIdx < elecTagInfo.leptons() ; ++leptIdx) - { - float PFElectron_ptrel = (elecTagInfo.properties(leptIdx).ptRel); - if (PFElectron_ptrel > PFLepton_ptrel ) - { - PFLepton_ptrel = PFElectron_ptrel; - PFLepton_IP2D = (elecTagInfo.properties(leptIdx).sip2d); - } + temp = tau1_flightDistance2dSig; + tau1_flightDistance2dSig= tau2_flightDistance2dSig; + tau2_flightDistance2dSig= temp; + + temp = tau1_vertexDeltaR; + tau1_vertexDeltaR= tau2_vertexDeltaR; + tau2_vertexDeltaR= temp; + + temp = tau1_vertexEnergyRatio; + tau1_vertexEnergyRatio= tau2_vertexEnergyRatio; + tau2_vertexEnergyRatio= temp; + + temp = tau1_vertexMass; + tau1_vertexMass= tau2_vertexMass; + tau2_vertexMass= temp; } + std::map inputs; - inputs["z_ratio1"] = z_ratio; - inputs["tau_dot"] = tau_dot; - inputs["SV_mass_0"] = SV_mass_0; - inputs["SV_vtx_EnergyRatio_0"] = SV_EnergyRatio_0; - inputs["SV_vtx_EnergyRatio_1"] = SV_EnergyRatio_1; - inputs["jetNTracksEtaRel"] = vertexNTracks; - inputs["PFLepton_ptrel"] = PFLepton_ptrel; - inputs["PFLepton_IP2D"] = PFLepton_IP2D; - inputs["nSL"] = nSL; - inputs["tau2/tau1"] = tau21; - + inputs["z_ratio"] = z_ratio; + inputs["trackSipdSig_3"] = trackSip3dSig_3; + inputs["trackSipdSig_2"] = trackSip3dSig_2; + inputs["trackSipdSig_1"] = trackSip3dSig_1; + inputs["trackSipdSig_0"] = trackSip3dSig_0; + inputs["trackSipdSig_1_0"] = tau2_trackSip3dSig_0; + inputs["trackSipdSig_0_0"] = tau1_trackSip3dSig_0; + inputs["trackSipdSig_1_1"] = tau2_trackSip3dSig_1; + inputs["trackSipdSig_0_1"] = tau1_trackSip3dSig_1; + inputs["trackSip2dSigAboveCharm_0"] = trackSip2dSigAboveCharm_0; + inputs["trackSip2dSigAboveBottom_0"] = trackSip2dSigAboveBottom_0; + inputs["trackSip2dSigAboveBottom_1"] = trackSip2dSigAboveBottom_1; + inputs["tau1_trackEtaRel_0"] = tau2_trackEtaRel_0; + inputs["tau1_trackEtaRel_1"] = tau2_trackEtaRel_1; + inputs["tau1_trackEtaRel_2"] = tau2_trackEtaRel_2; + inputs["tau0_trackEtaRel_0"] = tau1_trackEtaRel_0; + inputs["tau0_trackEtaRel_1"] = tau1_trackEtaRel_1; + inputs["tau0_trackEtaRel_2"] = tau1_trackEtaRel_2; + inputs["tau_vertexMass_0"] = tau1_vertexMass; + inputs["tau_vertexEnergyRatio_0"] = tau1_vertexEnergyRatio; + inputs["tau_vertexDeltaR_0"] = tau1_vertexDeltaR; + inputs["tau_flightDistance2dSig_0"] = tau1_flightDistance2dSig; + inputs["tau_vertexMass_1"] = tau2_vertexMass; + inputs["tau_vertexEnergyRatio_1"] = tau2_vertexEnergyRatio; + inputs["tau_flightDistance2dSig_1"] = tau2_flightDistance2dSig; + inputs["jetNTracks"] = jetNTracks; + inputs["nSV"] = nSV; + // evaluate the MVA value = mvaID->evaluate(inputs); @@ -241,3 +661,14 @@ void CandidateBoostedDoubleSecondaryVertexComputer::vertexKinematics(const reco: vtxKinematics.add(mytrack, 1.0); } } + + +void CandidateBoostedDoubleSecondaryVertexComputer::etaRelToTauAxis(const reco::VertexCompositePtrCandidate & vertex, + fastjet::PseudoJet & tauAxis, std::vector & tau_trackEtaRel) const +{ + math::XYZVector direction(tauAxis.px(), tauAxis.py(), tauAxis.pz()); + const std::vector & tracks = vertex.daughterPtrVector(); + + for(std::vector::const_iterator track = tracks.begin(); track != tracks.end(); ++track) + tau_trackEtaRel.push_back(std::abs(reco::btau::etaRel(direction.Unit(), (*track)->momentum()))); +} diff --git a/RecoBTag/SoftLepton/python/softLepton_cff.py b/RecoBTag/SoftLepton/python/softLepton_cff.py index a680466ad343d..77859d666477f 100644 --- a/RecoBTag/SoftLepton/python/softLepton_cff.py +++ b/RecoBTag/SoftLepton/python/softLepton_cff.py @@ -4,11 +4,7 @@ from RecoBTau.JetTagComputer.jetTagRecord_cfi import * from RecoBTag.SoftLepton.softMuonTagInfos_cfi import * from RecoBTag.SoftLepton.softPFElectronTagInfos_cfi import * -from RecoBTag.SoftLepton.softPFElectronTagInfosAK8_cfi import * -from RecoBTag.SoftLepton.softPFElectronTagInfosCA15_cfi import * from RecoBTag.SoftLepton.softPFMuonTagInfos_cfi import * -from RecoBTag.SoftLepton.softPFMuonTagInfosAK8_cfi import * -from RecoBTag.SoftLepton.softPFMuonTagInfosCA15_cfi import * from RecoBTag.SoftLepton.SoftLeptonByMVA_cff import * from RecoBTag.SoftLepton.SoftLeptonByPt_cff import * from RecoBTag.SoftLepton.SoftLeptonByIP3d_cff import * diff --git a/RecoBTag/SoftLepton/python/softPFElectronTagInfosAK8_cfi.py b/RecoBTag/SoftLepton/python/softPFElectronTagInfosAK8_cfi.py deleted file mode 100644 index 6e79c59064a19..0000000000000 --- a/RecoBTag/SoftLepton/python/softPFElectronTagInfosAK8_cfi.py +++ /dev/null @@ -1,8 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -from RecoBTag.SoftLepton.softPFElectronTagInfos_cfi import * - -softPFElectronsTagInfosAK8 = softPFElectronsTagInfos.clone( - jets = cms.InputTag("ak8PFJetsCHS"), - DeltaRElectronJet=cms.double(0.8) -) diff --git a/RecoBTag/SoftLepton/python/softPFElectronTagInfosCA15_cfi.py b/RecoBTag/SoftLepton/python/softPFElectronTagInfosCA15_cfi.py deleted file mode 100644 index 9ecd224acec31..0000000000000 --- a/RecoBTag/SoftLepton/python/softPFElectronTagInfosCA15_cfi.py +++ /dev/null @@ -1,8 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -from RecoBTag.SoftLepton.softPFElectronTagInfos_cfi import * - -softPFElectronsTagInfosCA15 = softPFElectronsTagInfos.clone( - jets = cms.InputTag("ca15PFJetsCHS"), - DeltaRElectronJet=cms.double(1.5) -) diff --git a/RecoBTag/SoftLepton/python/softPFMuonTagInfosAK8_cfi.py b/RecoBTag/SoftLepton/python/softPFMuonTagInfosAK8_cfi.py deleted file mode 100644 index 2d8f7d156790a..0000000000000 --- a/RecoBTag/SoftLepton/python/softPFMuonTagInfosAK8_cfi.py +++ /dev/null @@ -1,7 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -from RecoBTag.SoftLepton.softPFMuonTagInfos_cfi import * - -softPFMuonsTagInfosAK8 = softPFMuonsTagInfos.clone( - jets = cms.InputTag("ak8PFJetsCHS") -) diff --git a/RecoBTag/SoftLepton/python/softPFMuonTagInfosCA15_cfi.py b/RecoBTag/SoftLepton/python/softPFMuonTagInfosCA15_cfi.py deleted file mode 100644 index 82c434f8ba2b2..0000000000000 --- a/RecoBTag/SoftLepton/python/softPFMuonTagInfosCA15_cfi.py +++ /dev/null @@ -1,7 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -from RecoBTag.SoftLepton.softPFMuonTagInfos_cfi import * - -softPFMuonsTagInfosCA15 = softPFMuonsTagInfos.clone( - jets = cms.InputTag("ca15PFJetsCHS") -) diff --git a/RecoBTau/JetTagComputer/BuildFile.xml b/RecoBTau/JetTagComputer/BuildFile.xml index ec376d66938d2..ebb3b963bfa51 100644 --- a/RecoBTau/JetTagComputer/BuildFile.xml +++ b/RecoBTau/JetTagComputer/BuildFile.xml @@ -8,6 +8,7 @@ + diff --git a/RecoBTau/JetTagComputer/interface/JetTagComputerRecord.h b/RecoBTau/JetTagComputer/interface/JetTagComputerRecord.h index 9472ceba48444..eeb2e029f50f9 100644 --- a/RecoBTau/JetTagComputer/interface/JetTagComputerRecord.h +++ b/RecoBTau/JetTagComputer/interface/JetTagComputerRecord.h @@ -6,10 +6,11 @@ class BTauGenericMVAJetTagComputerRcd; class GBRWrapperRcd; +class TransientTrackRecord; class JetTagComputerRecord : public edm::eventsetup::DependentRecordImplementation< JetTagComputerRecord, - boost::mpl::vector > {}; + boost::mpl::vector > {}; #endif From 0750ac965219e10b65816f6e5bb5ae3fcedf5bc5 Mon Sep 17 00:00:00 2001 From: Dinko Ferencek Date: Wed, 21 Oct 2015 10:53:09 -0500 Subject: [PATCH 22/66] updated track counting --- .../src/CandidateBoostedDoubleSecondaryVertexComputer.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc b/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc index 181a38e9926d6..bf95c2e53f93a 100644 --- a/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc +++ b/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc @@ -122,7 +122,8 @@ float CandidateBoostedDoubleSecondaryVertexComputer::discriminator(const TagInfo if (track_PVweight>0.5) allKinematics.add(ptrack, track_PVweight); const reco::btag::TrackIPData &data = ipData[itt]; - if (trackSelector(ptrack, data, *jet, pv)) jetNTracks += 1.; + bool isSelected = false; + if (trackSelector(ptrack, data, *jet, pv)) isSelected = true; // check if the track is from V0 bool isfromV0 = false; @@ -146,6 +147,8 @@ float CandidateBoostedDoubleSecondaryVertexComputer::discriminator(const TagInfo } } + if( isSelected && !isfromV0 ) jetNTracks += 1.; + reco::TransientTrack transientTrack = trackBuilder->build(ptrack); GlobalVector direction(jet->px(), jet->py(), jet->pz()); From fcd8271513b33e4c6928a6a18a22fb81e170042d Mon Sep 17 00:00:00 2001 From: Dinko Ferencek Date: Wed, 21 Oct 2015 14:13:40 -0500 Subject: [PATCH 23/66] updated track selection DeltaR cut --- .../candidateBoostedDoubleSecondaryVertexAK8Computer_cfi.py | 2 ++ .../candidateBoostedDoubleSecondaryVertexCA15Computer_cfi.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/RecoBTag/SecondaryVertex/python/candidateBoostedDoubleSecondaryVertexAK8Computer_cfi.py b/RecoBTag/SecondaryVertex/python/candidateBoostedDoubleSecondaryVertexAK8Computer_cfi.py index d4956374d5ede..52ebdbc64a4fb 100644 --- a/RecoBTag/SecondaryVertex/python/candidateBoostedDoubleSecondaryVertexAK8Computer_cfi.py +++ b/RecoBTag/SecondaryVertex/python/candidateBoostedDoubleSecondaryVertexAK8Computer_cfi.py @@ -13,3 +13,5 @@ useAdaBoost = cms.bool(False), trackPairV0Filter = cms.PSet(k0sMassWindow = cms.double(0.03)) ) + +candidateBoostedDoubleSecondaryVertexAK8Computer.trackSelection.jetDeltaRMax = cms.double(0.8) diff --git a/RecoBTag/SecondaryVertex/python/candidateBoostedDoubleSecondaryVertexCA15Computer_cfi.py b/RecoBTag/SecondaryVertex/python/candidateBoostedDoubleSecondaryVertexCA15Computer_cfi.py index d91b153c9288d..90eefd406fdea 100644 --- a/RecoBTag/SecondaryVertex/python/candidateBoostedDoubleSecondaryVertexCA15Computer_cfi.py +++ b/RecoBTag/SecondaryVertex/python/candidateBoostedDoubleSecondaryVertexCA15Computer_cfi.py @@ -13,3 +13,5 @@ useAdaBoost = cms.bool(False), trackPairV0Filter = cms.PSet(k0sMassWindow = cms.double(0.03)) ) + +candidateBoostedDoubleSecondaryVertexCA15Computer.trackSelection.jetDeltaRMax = cms.double(1.5) From 8c63660b2525628663dbe2ae570de7ced35251de Mon Sep 17 00:00:00 2001 From: Dinko Ferencek Date: Wed, 21 Oct 2015 16:12:13 -0500 Subject: [PATCH 24/66] fixed incorrect variable type, removed redundant switch cases --- ...dateBoostedDoubleSecondaryVertexComputer.h | 4 +-- ...ateBoostedDoubleSecondaryVertexComputer.cc | 29 ++----------------- 2 files changed, 4 insertions(+), 29 deletions(-) diff --git a/RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h b/RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h index e877e507a5e49..a1dcd24a93069 100644 --- a/RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h +++ b/RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h @@ -43,8 +43,8 @@ class CandidateBoostedDoubleSecondaryVertexComputer : public JetTagComputer { const edm::FileInPath weightFile_; const bool useGBRForest_; const bool useAdaBoost_; - const bool maxDistToAxis_; - const bool maxDecayLen_; + const double maxDistToAxis_; + const double maxDecayLen_; reco::V0Filter trackPairV0Filter; reco::TrackSelector trackSelector; diff --git a/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc b/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc index bf95c2e53f93a..2f900fccc4120 100644 --- a/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc +++ b/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc @@ -290,20 +290,6 @@ float CandidateBoostedDoubleSecondaryVertexComputer::discriminator(const TagInfo break; - case 2: - - tau1_trackSip3dSig_0 = IP3Ds_1.at(0); - tau1_trackSip3dSig_1 = IP3Ds_1.at(1); - - break; - - case 3: - - tau1_trackSip3dSig_0 = IP3Ds_1.at(0); - tau1_trackSip3dSig_1 = IP3Ds_1.at(1); - - break; - default: tau1_trackSip3dSig_0 = IP3Ds_1.at(0); @@ -319,24 +305,13 @@ float CandidateBoostedDoubleSecondaryVertexComputer::discriminator(const TagInfo break; - case 1: + case 1: tau2_trackSip3dSig_0 = IP3Ds_2.at(0); tau2_trackSip3dSig_1 = dummyTrack; break; - case 2: - tau2_trackSip3dSig_0 = IP3Ds_2.at(0); - tau2_trackSip3dSig_1 = IP3Ds_2.at(1); - - break; - - case 3: - tau2_trackSip3dSig_0 = IP3Ds_2.at(0); - tau2_trackSip3dSig_1 = IP3Ds_2.at(1); - break; - - default: + default: tau2_trackSip3dSig_0 = IP3Ds_2.at(0); tau2_trackSip3dSig_1 = IP3Ds_2.at(1); From 40f990ddd7d6da8a0e528966a180efe06e25de80 Mon Sep 17 00:00:00 2001 From: Dinko Ferencek Date: Wed, 21 Oct 2015 18:19:47 -0500 Subject: [PATCH 25/66] further updates to track counting --- ...CandidateBoostedDoubleSecondaryVertexComputer.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc b/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc index 2f900fccc4120..d549cfcaeb5d5 100644 --- a/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc +++ b/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc @@ -126,7 +126,7 @@ float CandidateBoostedDoubleSecondaryVertexComputer::discriminator(const TagInfo if (trackSelector(ptrack, data, *jet, pv)) isSelected = true; // check if the track is from V0 - bool isfromV0 = false; + bool isfromV0 = false, isfromV0Tight = false; const reco::Track * trackPairV0Test[2]; trackPairV0Test[0] = ptrackPtr; @@ -135,19 +135,26 @@ float CandidateBoostedDoubleSecondaryVertexComputer::discriminator(const TagInfo { if (itt == jtt) continue; + const reco::btag::TrackIPData & pairTrackData = ipData[jtt]; const reco::CandidatePtr pairTrackRef = selectedTracks[jtt]; const reco::Track * pairTrackPtr = reco::btag::toTrack(pairTrackRef); + const reco::Track & pairTrack = *pairTrackPtr; trackPairV0Test[1] = pairTrackPtr; if (!trackPairV0Filter(trackPairV0Test, 2)) { isfromV0 = true; - break; + + if ( trackSelector(pairTrack, pairTrackData, *jet, pv) ) + isfromV0Tight = true; } + + if (isfromV0 && isfromV0Tight) + break; } - if( isSelected && !isfromV0 ) jetNTracks += 1.; + if( isSelected && !isfromV0Tight ) jetNTracks += 1.; reco::TransientTrack transientTrack = trackBuilder->build(ptrack); GlobalVector direction(jet->px(), jet->py(), jet->pz()); From 4512d354711e2f997142f6824037597b923b6734 Mon Sep 17 00:00:00 2001 From: Dinko Ferencek Date: Wed, 18 Nov 2015 15:25:01 -0600 Subject: [PATCH 26/66] implemented Carl's suggestions --- ...dateBoostedDoubleSecondaryVertexComputer.h | 4 +++ ...ateBoostedDoubleSecondaryVertexComputer.cc | 27 +++++++++---------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h b/RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h index a1dcd24a93069..3043fcea8b0ff 100644 --- a/RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h +++ b/RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h @@ -50,6 +50,10 @@ class CandidateBoostedDoubleSecondaryVertexComputer : public JetTagComputer { edm::ESHandle trackBuilder; std::unique_ptr mvaID; + + // static variables + static constexpr float charmThreshold = 1.5f; + static constexpr float bottomThreshold = 5.2f; }; #endif // RecoBTag_SecondaryVertex_CandidateBoostedDoubleSecondaryVertexComputer_h diff --git a/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc b/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc index d549cfcaeb5d5..102e52196a52a 100644 --- a/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc +++ b/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc @@ -159,15 +159,10 @@ float CandidateBoostedDoubleSecondaryVertexComputer::discriminator(const TagInfo reco::TransientTrack transientTrack = trackBuilder->build(ptrack); GlobalVector direction(jet->px(), jet->py(), jet->pz()); - if (currentAxes.size() > 1) - { - if (reco::deltaR2(ptrack,currentAxes[1]) < reco::deltaR2(ptrack,currentAxes[0])) - direction = GlobalVector(currentAxes[1].px(), currentAxes[1].py(), currentAxes[1].pz()); - else - direction = GlobalVector(currentAxes[0].px(), currentAxes[0].py(), currentAxes[0].pz()); - } - else if (currentAxes.size() > 0) - direction = GlobalVector(currentAxes[0].px(), currentAxes[0].py(), currentAxes[0].pz()); + int index = 0; + if (currentAxes.size() > 1 && reco::deltaR2(ptrack,currentAxes[1]) < reco::deltaR2(ptrack,currentAxes[0])) + index = 1; + direction = GlobalVector(currentAxes[index].px(), currentAxes[index].py(), currentAxes[index].pz()); // decay distance and track distance wrt to the closest tau axis float decayLengthTau=-1; @@ -211,7 +206,7 @@ float CandidateBoostedDoubleSecondaryVertexComputer::discriminator(const TagInfo kin.add(track); - if ( kin.vectorSum().M() > 1.5 // charm cut + if ( kin.vectorSum().M() > charmThreshold // charm cut && !charmThreshSet ) { trackSip2dSigAboveCharm_0 = data.ip2d.significance(); @@ -219,7 +214,7 @@ float CandidateBoostedDoubleSecondaryVertexComputer::discriminator(const TagInfo charmThreshSet = true; } - if ( kin.vectorSum().M() > 5.2 ) // bottom cut + if ( kin.vectorSum().M() > bottomThreshold ) // bottom cut { trackSip2dSigAboveBottom_0 = data.ip2d.significance(); if ( (i+1)::iterator iVtx=VTXmap.begin(); iVtx!=VTXmap.end(); ++iVtx) { @@ -487,15 +483,19 @@ float CandidateBoostedDoubleSecondaryVertexComputer::discriminator(const TagInfo { flightDir_0 = svTagInfo.flightDirection(iVtx->second); SV_p4_0 = vertex.p4(); + vtxMass = SV_p4_0.mass(); - z_ratio = reco::deltaR(currentAxes[1],currentAxes[0])*SV_p4_0.pt()/SV_p4_0.mass(); + if(vtxMass > 0.) + z_ratio = reco::deltaR(currentAxes[1],currentAxes[0])*SV_p4_0.pt()/vtxMass; } if (cont==2) { flightDir_1 = svTagInfo.flightDirection(iVtx->second); SV_p4_1 = vertex.p4(); + vtxMass = (SV_p4_1+SV_p4_0).mass(); - z_ratio = reco::deltaR(flightDir_0,flightDir_1)*SV_p4_1.pt()/(SV_p4_1+SV_p4_0).mass(); + if(vtxMass > 0.) + z_ratio = reco::deltaR(flightDir_0,flightDir_1)*SV_p4_1.pt()/vtxMass; break; } @@ -523,7 +523,6 @@ float CandidateBoostedDoubleSecondaryVertexComputer::discriminator(const TagInfo temp = tau1_vertexDeltaR; tau1_vertexDeltaR= tau2_vertexDeltaR; - tau2_vertexDeltaR= temp; temp = tau1_vertexEnergyRatio; tau1_vertexEnergyRatio= tau2_vertexEnergyRatio; From 70591d5e3c6ee41a626d6382d7177a6b3740e856 Mon Sep 17 00:00:00 2001 From: Clemens Lange Date: Fri, 20 Nov 2015 12:33:14 +0100 Subject: [PATCH 27/66] filters for charged hadrons and muons that have bad track quality causing very high-pT jets and MET tails --- .../plugins/ChargedHadronMuonRefFilter.cc | 123 +++++++++++++++++ .../METFilters/plugins/MuonBadTrackFilter.cc | 127 ++++++++++++++++++ .../python/chargedHadronMuonRefFilter_cfi.py | 10 ++ RecoMET/METFilters/python/metFilters_cff.py | 10 +- .../python/muonBadTrackFilter_cfi.py | 11 ++ 5 files changed, 280 insertions(+), 1 deletion(-) create mode 100644 RecoMET/METFilters/plugins/ChargedHadronMuonRefFilter.cc create mode 100644 RecoMET/METFilters/plugins/MuonBadTrackFilter.cc create mode 100644 RecoMET/METFilters/python/chargedHadronMuonRefFilter_cfi.py create mode 100644 RecoMET/METFilters/python/muonBadTrackFilter_cfi.py diff --git a/RecoMET/METFilters/plugins/ChargedHadronMuonRefFilter.cc b/RecoMET/METFilters/plugins/ChargedHadronMuonRefFilter.cc new file mode 100644 index 0000000000000..3358cfdfe53a2 --- /dev/null +++ b/RecoMET/METFilters/plugins/ChargedHadronMuonRefFilter.cc @@ -0,0 +1,123 @@ + + + +// system include files +#include +#include + +// user include files +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/EDFilter.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/MakerMacros.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "DataFormats/MuonReco/interface/Muon.h" +#include "DataFormats/MuonReco/interface/MuonFwd.h" +#include "DataFormats/TrackReco/interface/Track.h" +#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" +#include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h" + +// +// class declaration +// + +class ChargedHadronMuonRefFilter : public edm::EDFilter { +public: + explicit ChargedHadronMuonRefFilter(const edm::ParameterSet&); + ~ChargedHadronMuonRefFilter(); + +private: + virtual bool filter(edm::Event&, const edm::EventSetup&) override; + + // ----------member data --------------------------- + + edm::EDGetTokenT tokenPFCandidates_; + const bool taggingMode_; + const double ptMin_; + const bool debug_; + +}; + +// +// constants, enums and typedefs +// + +// +// static data member definitions +// + +// +// constructors and destructor +// +ChargedHadronMuonRefFilter::ChargedHadronMuonRefFilter(const edm::ParameterSet& iConfig) + : tokenPFCandidates_ ( consumes(iConfig.getParameter ("PFCandidates") )) + , taggingMode_ ( iConfig.getParameter ("taggingMode") ) + , ptMin_ ( iConfig.getParameter ("ptMin") ) + , debug_ ( iConfig.getParameter ("debug") ) +{ + produces(); +} + +ChargedHadronMuonRefFilter::~ChargedHadronMuonRefFilter() { } + + +// +// member functions +// + +// ------------ method called on each new Event ------------ +bool +ChargedHadronMuonRefFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) +{ + using namespace std; + using namespace edm; + + Handle pfCandidates; + iEvent.getByToken(tokenPFCandidates_,pfCandidates); + + bool foundBadTrack = false; + // if ( debug_ ) cout << "starting loop over pfCandidates" << endl; + + for ( unsigned i=0; isize(); ++i ) { + + const reco::PFCandidate & cand = (*pfCandidates)[i]; + + if (!(( fabs(cand.pdgId()) == 211 ) || ( fabs(cand.pdgId()) == 13 ))) continue; + // if ( debug_ ) cout << "Found charged hadron or muon candidate" << std::endl; + + if (cand.trackRef().isNull()) continue; + // if ( debug_ ) cout << "Found valid TrackRef" << std::endl; + const reco::TrackRef trackref = cand.trackRef(); + const double Pt = trackref->pt(); + if (Pt < ptMin_) continue; + // if ( debug_ ) cout << "track pT > " << ptMin_ << " GeV - algorithm: " << trackref->algo() << std::endl; + + const double P = trackref->p(); + const double DPt = trackref->ptError(); + const unsigned int LostHits = trackref->numberOfLostHits(); + + if ((DPt/Pt) > (5 * sqrt(1.20*1.20/P+0.06*0.06) / (1.+LostHits))) { + + foundBadTrack = true; + + if ( debug_ ) { + cout << cand << endl; + cout << "\t" << "track pT = " << Pt << " +/- " << DPt; + cout << endl; + } + } + + } // end loop over PF candidates + + bool pass = !foundBadTrack; + + iEvent.put( std::auto_ptr(new bool(pass)) ); + + return taggingMode_ || pass; +} + +//define this as a plug-in +DEFINE_FWK_MODULE(ChargedHadronMuonRefFilter); diff --git a/RecoMET/METFilters/plugins/MuonBadTrackFilter.cc b/RecoMET/METFilters/plugins/MuonBadTrackFilter.cc new file mode 100644 index 0000000000000..4661d0182dfeb --- /dev/null +++ b/RecoMET/METFilters/plugins/MuonBadTrackFilter.cc @@ -0,0 +1,127 @@ + + + +// system include files +#include +#include + +// user include files +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/EDFilter.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/MakerMacros.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "DataFormats/MuonReco/interface/Muon.h" +#include "DataFormats/MuonReco/interface/MuonFwd.h" +#include "DataFormats/TrackReco/interface/Track.h" +#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" +#include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h" +#include "DataFormats/MuonReco/interface/Muon.h" +#include "DataFormats/MuonReco/interface/MuonFwd.h" + +// +// class declaration +// + +class MuonBadTrackFilter : public edm::EDFilter { +public: + explicit MuonBadTrackFilter(const edm::ParameterSet&); + ~MuonBadTrackFilter(); + +private: + virtual bool filter(edm::Event&, const edm::EventSetup&) override; + + // ----------member data --------------------------- + + edm::EDGetTokenT tokenPFCandidates_; + const bool taggingMode_; + const double ptMin_; + const double chi2Min_; + const bool debug_; + +}; + +// +// constants, enums and typedefs +// + +// +// static data member definitions +// + +// +// constructors and destructor +// +MuonBadTrackFilter::MuonBadTrackFilter(const edm::ParameterSet& iConfig) + : tokenPFCandidates_ ( consumes(iConfig.getParameter ("PFCandidates") )) + , taggingMode_ ( iConfig.getParameter ("taggingMode") ) + , ptMin_ ( iConfig.getParameter ("ptMin") ) + , chi2Min_ ( iConfig.getParameter ("chi2Min") ) + , debug_ ( iConfig.getParameter ("debug") ) +{ + produces(); +} + +MuonBadTrackFilter::~MuonBadTrackFilter() { } + + +// +// member functions +// + +// ------------ method called on each new Event ------------ +bool +MuonBadTrackFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) +{ + using namespace std; + using namespace edm; + + Handle pfCandidates; + iEvent.getByToken(tokenPFCandidates_,pfCandidates); + + bool foundBadTrack = false; + // if ( debug_ ) cout << "starting loop over pfCandidates" << endl; + + for ( unsigned i=0; isize(); ++i ) { + + const reco::PFCandidate & cand = (*pfCandidates)[i]; + + if ( fabs(cand.pdgId()) != 13 ) continue; + // if ( debug_ ) cout << "Found muon" << std::endl; + + if (cand.pt() < ptMin_) continue; + + if (cand.muonRef().isNull()) continue; + // if ( debug_ ) cout << "Found valid MuonRef" << std::endl; + + const reco::MuonRef muon = cand.muonRef(); + + if (muon->muonBestTrack()->hitPattern().numberOfValidMuonHits() != 0) continue; + + if (muon->globalTrack()->normalizedChi2() > chi2Min_) { + foundBadTrack = true; + if ( debug_ ) cout << "globalTrack numberOfValidMuonHits: " << muon->globalTrack()->hitPattern().numberOfValidMuonHits() << + " numberOfValidMuonCSCHits: " << muon->globalTrack()->hitPattern().numberOfValidMuonCSCHits() << + " numberOfValidMuonDTHits: " << muon->globalTrack()->hitPattern().numberOfValidMuonDTHits() << + " normalizedChi2: " << muon->globalTrack()->normalizedChi2() << endl; + if ( debug_ ) cout << "muonBestTrack numberOfValidMuonHits: " << muon->muonBestTrack()->hitPattern().numberOfValidMuonHits() << + " numberOfValidMuonCSCHits: " << muon->muonBestTrack()->hitPattern().numberOfValidMuonCSCHits() << + " numberOfValidMuonDTHits: " << muon->muonBestTrack()->hitPattern().numberOfValidMuonDTHits() << + " normalizedChi2: " << muon->muonBestTrack()->normalizedChi2() << endl; + } + + } // end loop over PF candidates + + + bool pass = !foundBadTrack; + + iEvent.put( std::auto_ptr(new bool(pass)) ); + + return taggingMode_ || pass; +} + +//define this as a plug-in +DEFINE_FWK_MODULE(MuonBadTrackFilter); diff --git a/RecoMET/METFilters/python/chargedHadronMuonRefFilter_cfi.py b/RecoMET/METFilters/python/chargedHadronMuonRefFilter_cfi.py new file mode 100644 index 0000000000000..a2fd6eff3a4eb --- /dev/null +++ b/RecoMET/METFilters/python/chargedHadronMuonRefFilter_cfi.py @@ -0,0 +1,10 @@ +import FWCore.ParameterSet.Config as cms + +chargedHadronMuonRefFilter = cms.EDFilter( + "ChargedHadronMuonRefFilter", + PFCandidates = cms.InputTag("particleFlow"), # Collection to test + taggingMode = cms.bool(False), + ptMin = cms.double(100.), # Tracks with pT below this are ignored (will not be checked) + verbose = cms.untracked.bool(False), + debug = cms.bool(False), +) diff --git a/RecoMET/METFilters/python/metFilters_cff.py b/RecoMET/METFilters/python/metFilters_cff.py index f745f4a15db8b..55abf5920b86e 100644 --- a/RecoMET/METFilters/python/metFilters_cff.py +++ b/RecoMET/METFilters/python/metFilters_cff.py @@ -61,6 +61,12 @@ ## have for other filters, i.e., true means rejected bad events while false means ## good events. +## The charged hadron muonref filter _________________________________________|| +from RecoMET.METFilters.chargedHadronMuonRefFilter_cfi import * + +## The muon bad track filter _________________________________________|| +from RecoMET.METFilters.muonBadTrackFilter_cfi import * + metFilters = cms.Sequence( HBHENoiseFilterResultProducer * HBHENoiseFilter * @@ -73,7 +79,9 @@ # CSCTightHalo2015Filter * EcalDeadCellTriggerPrimitiveFilter* # *goodVertices * trackingFailureFilter * - eeBadScFilter + eeBadScFilter* # ecalLaserCorrFilter * # trkPOGFilters + chargedHadronMuonRefFilter * + muonBadTrackFilter ) diff --git a/RecoMET/METFilters/python/muonBadTrackFilter_cfi.py b/RecoMET/METFilters/python/muonBadTrackFilter_cfi.py new file mode 100644 index 0000000000000..1e59087b0cb82 --- /dev/null +++ b/RecoMET/METFilters/python/muonBadTrackFilter_cfi.py @@ -0,0 +1,11 @@ +import FWCore.ParameterSet.Config as cms + +muonBadTrackFilter = cms.EDFilter( + "MuonBadTrackFilter", + PFCandidates = cms.InputTag("particleFlow"), # Collection to test + taggingMode = cms.bool(False), + ptMin = cms.double(100.), # Tracks with pT below this are ignored (will not be checked) + chi2Min = cms.double(100.), # global Tracks with normalizeChi2 below this are ignored (will not be checked) + verbose = cms.untracked.bool(False), + debug = cms.bool(False), +) From 776867c293621ae351657fb3796ccb3eb128857e Mon Sep 17 00:00:00 2001 From: Clemens Lange Date: Fri, 20 Nov 2015 16:48:40 +0100 Subject: [PATCH 28/66] check availability of muon tracks --- RecoMET/METFilters/plugins/MuonBadTrackFilter.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RecoMET/METFilters/plugins/MuonBadTrackFilter.cc b/RecoMET/METFilters/plugins/MuonBadTrackFilter.cc index 4661d0182dfeb..9308940c655d7 100644 --- a/RecoMET/METFilters/plugins/MuonBadTrackFilter.cc +++ b/RecoMET/METFilters/plugins/MuonBadTrackFilter.cc @@ -99,8 +99,10 @@ MuonBadTrackFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) const reco::MuonRef muon = cand.muonRef(); + if (muon->muonBestTrack().isAvailable()) continue; if (muon->muonBestTrack()->hitPattern().numberOfValidMuonHits() != 0) continue; + if (muon->globalTrack().isAvailable()) continue; if (muon->globalTrack()->normalizedChi2() > chi2Min_) { foundBadTrack = true; if ( debug_ ) cout << "globalTrack numberOfValidMuonHits: " << muon->globalTrack()->hitPattern().numberOfValidMuonHits() << From 590aa0d9c72f49b8a01da2c29868eaab469d336c Mon Sep 17 00:00:00 2001 From: clelange Date: Mon, 23 Nov 2015 10:57:12 +0100 Subject: [PATCH 29/66] continue if track NOT available --- RecoMET/METFilters/plugins/MuonBadTrackFilter.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RecoMET/METFilters/plugins/MuonBadTrackFilter.cc b/RecoMET/METFilters/plugins/MuonBadTrackFilter.cc index 9308940c655d7..a2986a2cbf72d 100644 --- a/RecoMET/METFilters/plugins/MuonBadTrackFilter.cc +++ b/RecoMET/METFilters/plugins/MuonBadTrackFilter.cc @@ -99,10 +99,10 @@ MuonBadTrackFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) const reco::MuonRef muon = cand.muonRef(); - if (muon->muonBestTrack().isAvailable()) continue; + if (!muon->muonBestTrack().isAvailable()) continue; if (muon->muonBestTrack()->hitPattern().numberOfValidMuonHits() != 0) continue; - if (muon->globalTrack().isAvailable()) continue; + if (!muon->globalTrack().isAvailable()) continue; if (muon->globalTrack()->normalizedChi2() > chi2Min_) { foundBadTrack = true; if ( debug_ ) cout << "globalTrack numberOfValidMuonHits: " << muon->globalTrack()->hitPattern().numberOfValidMuonHits() << From 0cd3d70b12e33a97476b1f47597c823c2bc3bf4d Mon Sep 17 00:00:00 2001 From: Fabio Colombo Date: Mon, 23 Nov 2015 14:25:28 +0100 Subject: [PATCH 30/66] Fix: switch from parentSuperCluster to superCluster --- RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc b/RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc index 18611563f1863..80434061d47dd 100644 --- a/RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc +++ b/RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc @@ -635,7 +635,7 @@ double AntiElectronIDMVA6::MVAValue(const reco::PFTau& thePFTau, //Variables related to the electron Cluster Float_t ElecEe = 0.; Float_t ElecEgamma = 0.; - reco::SuperClusterRef pfSuperCluster = theGsfEle.parentSuperCluster(); + reco::SuperClusterRef pfSuperCluster = theGsfEle.superCluster(); if ( pfSuperCluster.isNonnull() && pfSuperCluster.isAvailable() ) { for ( reco::CaloCluster_iterator pfCluster = pfSuperCluster->clustersBegin(); pfCluster != pfSuperCluster->clustersEnd(); ++pfCluster ) { From 9b2406f65bb76b3d16fe2222a4512725dc849869 Mon Sep 17 00:00:00 2001 From: Ken Call Date: Tue, 24 Nov 2015 17:12:23 -0600 Subject: [PATCH 31/66] Changes the energy threshold on the EcalDeadCellTriggerPrimitiveFilter to 127.49 instead of 127.5. This fixes a subtle rounding issue. --- .../METFilters/python/EcalDeadCellTriggerPrimitiveFilter_cfi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RecoMET/METFilters/python/EcalDeadCellTriggerPrimitiveFilter_cfi.py b/RecoMET/METFilters/python/EcalDeadCellTriggerPrimitiveFilter_cfi.py index 188d93496d0b3..87ea6c1886226 100644 --- a/RecoMET/METFilters/python/EcalDeadCellTriggerPrimitiveFilter_cfi.py +++ b/RecoMET/METFilters/python/EcalDeadCellTriggerPrimitiveFilter_cfi.py @@ -12,7 +12,7 @@ verbose = cms.int32( 1 ), tpDigiCollection = cms.InputTag("ecalTPSkimNA"), - etValToBeFlagged = cms.double(127.5), + etValToBeFlagged = cms.double(127.49), ebReducedRecHitCollection = cms.InputTag("reducedEcalRecHitsEB"), eeReducedRecHitCollection = cms.InputTag("reducedEcalRecHitsEE"), From 7214f4402c1eecf1c089b1e6e8f75a2a21f5df39 Mon Sep 17 00:00:00 2001 From: Aruna Date: Wed, 25 Nov 2015 12:39:38 +0100 Subject: [PATCH 32/66] updates for reMiniAOD --- .../python/analyzers/objects/TauAnalyzer.py | 4 +- .../python/analyzers/objects/autophobj.py | 2 +- .../python/cleaningLayer1/tauCleaner_cfi.py | 2 +- .../python/producersLayer1/tauProducer_cfi.py | 127 +- .../PatAlgos/python/tools/tauTools.py | 131 +- .../Configuration/python/HPSPFTaus_cff.py | 468 +----- .../python/HPSPFTaus_reminiAOD_cff.py | 1315 +++++++++++++++++ .../python/RecoTauTag_EventContent_cff.py | 268 +--- .../loadRecoTauTagMVAsFromPrepDB_cfi.py | 210 +-- .../PFRecoTauDiscriminationByMVAIsolation2.cc | 87 +- ...RecoTauDiscriminationByMVAIsolationRun2.cc | 316 ++++ ...ecoTauDiscriminationByMVAIsolation2_cff.py | 20 +- ...TauDiscriminationByMVAIsolationRun2_cff.py | 119 ++ .../RecoTau/python/RecoTauValidation_cfi.py | 108 +- 14 files changed, 2067 insertions(+), 1110 deletions(-) create mode 100644 RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py create mode 100644 RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolationRun2.cc create mode 100644 RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolationRun2_cff.py diff --git a/PhysicsTools/Heppy/python/analyzers/objects/TauAnalyzer.py b/PhysicsTools/Heppy/python/analyzers/objects/TauAnalyzer.py index 8ed0d85de4c01..67d60a2c44bfb 100644 --- a/PhysicsTools/Heppy/python/analyzers/objects/TauAnalyzer.py +++ b/PhysicsTools/Heppy/python/analyzers/objects/TauAnalyzer.py @@ -84,7 +84,7 @@ def id6(tau,X): tau.idMVANewDM = id6(tau, "by%sIsolationMVA3newDMwLT") tau.idCI3hit = id3(tau, "by%sCombinedIsolationDeltaBetaCorr3Hits") tau.idAntiMu = tau.tauID("againstMuonLoose") + tau.tauID("againstMuonTight") - tau.idAntiE = id5(tau, "againstElectron%sMVA6") + tau.idAntiE = id5(tau, "againstElectron%sMVA5") #print "Tau pt %5.1f: idMVA2 %d, idCI3hit %d, %s, %s" % (tau.pt(), tau.idMVA2, tau.idCI3hit, tau.tauID(self.cfg_ana.tauID), tau.tauID(self.cfg_ana.tauLooseID)) if tau.tauID(self.cfg_ana.tauID): event.selectedTaus.append(tau) @@ -137,7 +137,7 @@ def process(self, event): tauID = "byLooseCombinedIsolationDeltaBetaCorr3Hits", vetoLeptonsPOG = False, # If True, the following two IDs are required tauAntiMuonID = "againstMuonLoose3", - tauAntiElectronID = "againstElectronLooseMVA6", + tauAntiElectronID = "againstElectronLooseMVA5", tauLooseID = "decayModeFinding", ) ) diff --git a/PhysicsTools/Heppy/python/analyzers/objects/autophobj.py b/PhysicsTools/Heppy/python/analyzers/objects/autophobj.py index 0e4547213335a..d9103da0662cd 100644 --- a/PhysicsTools/Heppy/python/analyzers/objects/autophobj.py +++ b/PhysicsTools/Heppy/python/analyzers/objects/autophobj.py @@ -114,7 +114,7 @@ NTupleVariable("idMVANewDM", lambda x : x.idMVANewDM, int, help="1,2,3,4,5,6 if the tau passes the very loose to very very tight WP of the MVA3newDMwLT discriminator"), NTupleVariable("idCI3hit", lambda x : x.idCI3hit, int, help="1,2,3 if the tau passes the loose, medium, tight WP of the ByCombinedIsolationDBSumPtCorr3Hits discriminator"), NTupleVariable("idAntiMu", lambda x : x.idAntiMu, int, help="1,2 if the tau passes the loose/tight WP of the againstMuon3 discriminator"), - NTupleVariable("idAntiE", lambda x : x.idAntiE, int, help="1,2,3,4,5 if the tau passes the v loose, loose, medium, tight, v tight WP of the againstElectronMVA6 discriminator"), + NTupleVariable("idAntiE", lambda x : x.idAntiE, int, help="1,2,3,4,5 if the tau passes the v loose, loose, medium, tight, v tight WP of the againstElectronMVA5 discriminator"), NTupleVariable("isoCI3hit", lambda x : x.tauID("byCombinedIsolationDeltaBetaCorrRaw3Hits"), help="byCombinedIsolationDeltaBetaCorrRaw3Hits raw output discriminator"), # MC-match info NTupleVariable("mcMatchId", lambda x : x.mcMatchId, int, mcOnly=True, help="Match to source from hard scatter (pdgId of heaviest particle in chain, 25 for H, 6 for t, 23/24 for W/Z), zero if non-prompt or fake"), diff --git a/PhysicsTools/PatAlgos/python/cleaningLayer1/tauCleaner_cfi.py b/PhysicsTools/PatAlgos/python/cleaningLayer1/tauCleaner_cfi.py index fc8a01546d5d3..bd961ba20904e 100644 --- a/PhysicsTools/PatAlgos/python/cleaningLayer1/tauCleaner_cfi.py +++ b/PhysicsTools/PatAlgos/python/cleaningLayer1/tauCleaner_cfi.py @@ -8,7 +8,7 @@ 'tauID("decayModeFinding") > 0.5 &' ' tauID("byLooseCombinedIsolationDeltaBetaCorr3Hits") > 0.5 &' ' tauID("againstMuonTight3") > 0.5 &' - ' tauID("againstElectronVLooseMVA6") > 0.5' + ' tauID("againstElectronVLooseMVA5") > 0.5' ), # overlap checking configurables diff --git a/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py b/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py index e9d6a4ec33101..8f5e1854a3286 100644 --- a/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py +++ b/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py @@ -64,7 +64,6 @@ # you can comment out those you don't want to save some # disk space decayModeFinding = cms.InputTag("hpsPFTauDiscriminationByDecayModeFinding"), - decayModeFindingOldDMs = cms.InputTag("hpsPFTauDiscriminationByDecayModeFindingOldDMs"), decayModeFindingNewDMs =cms.InputTag("hpsPFTauDiscriminationByDecayModeFindingNewDMs"), chargedIsoPtSum = cms.InputTag("hpsPFTauChargedIsoPtSum"), neutralIsoPtSum = cms.InputTag("hpsPFTauNeutralIsoPtSum"), @@ -72,98 +71,22 @@ neutralIsoPtSumWeight = cms.InputTag("hpsPFTauNeutralIsoPtSumWeight"), footprintCorrection = cms.InputTag("hpsPFTauFootprintCorrection"), photonPtSumOutsideSignalCone = cms.InputTag("hpsPFTauPhotonPtSumOutsideSignalCone"), - ####byIsolationMVA3oldDMwoLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw'), - ####byVLooseIsolationMVA3oldDMwoLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT'), - ####byLooseIsolationMVA3oldDMwoLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT'), - ####byMediumIsolationMVA3oldDMwoLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT'), - ####byTightIsolationMVA3oldDMwoLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT'), - ####byVTightIsolationMVA3oldDMwoLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT'), - ####byVVTightIsolationMVA3oldDMwoLT = cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT'), - ##byIsolationMVA3oldDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw'), - ##byVLooseIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT'), - ##byLooseIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT'), - ##byMediumIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT'), - ##byTightIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT'), - ##byVTightIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT'), - ##byVVTightIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT'), - ####byIsolationMVA3newDMwoLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw'), - ####byVLooseIsolationMVA3newDMwoLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT'), - ####byLooseIsolationMVA3newDMwoLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT'), - ####byMediumIsolationMVA3newDMwoLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT'), - ####byTightIsolationMVA3newDMwoLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT'), - ####byVTightIsolationMVA3newDMwoLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT'), - ####byVVTightIsolationMVA3newDMwoLT = cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT'), - ##byIsolationMVA3newDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw'), - ##byVLooseIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT'), - ##byLooseIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT'), - ##byMediumIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT'), - ##byTightIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT'), - ##byVTightIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT'), - ##byVVTightIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT'), - #new Run2 MVA Isolation - byIsolationMVArun2v1DBoldDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw'), - byVLooseIsolationMVArun2v1DBoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT'), - byLooseIsolationMVArun2v1DBoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT'), - byMediumIsolationMVArun2v1DBoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT'), - byTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT'), - byVTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT'), - byVVTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT'), - byIsolationMVArun2v1DBnewDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw'), - byVLooseIsolationMVArun2v1DBnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT'), - byLooseIsolationMVArun2v1DBnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT'), - byMediumIsolationMVArun2v1DBnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT'), - byTightIsolationMVArun2v1DBnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT'), - byVTightIsolationMVArun2v1DBnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT'), - byVVTightIsolationMVArun2v1DBnewDMwLT= cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT'), - byIsolationMVArun2v1PWoldDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw'), - byVLooseIsolationMVArun2v1PWoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT'), - byLooseIsolationMVArun2v1PWoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT'), - byMediumIsolationMVArun2v1PWoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT'), - byTightIsolationMVArun2v1PWoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT'), - byVTightIsolationMVArun2v1PWoldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT'), - byVVTightIsolationMVArun2v1PWoldDMwLT= cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT'), - byIsolationMVArun2v1PWnewDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw'), - byVLooseIsolationMVArun2v1PWnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT'), - byLooseIsolationMVArun2v1PWnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT'), - byMediumIsolationMVArun2v1PWnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT'), - byTightIsolationMVArun2v1PWnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT'), - byVTightIsolationMVArun2v1PWnewDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT'), - byVVTightIsolationMVArun2v1PWnewDMwLT= cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT'), - chargedIsoPtSumdR03 = cms.InputTag('hpsPFTauChargedIsoPtSumdR03'), - neutralIsoPtSumdR03 = cms.InputTag('hpsPFTauNeutralIsoPtSumdR03'), - puCorrPtSumdR03 = cms.InputTag('hpsPFTauPUcorrPtSumdR03'), - neutralIsoPtSumWeightdR03 = cms.InputTag('hpsPFTauNeutralIsoPtSumWeightdR03'), - footprintCorrectiondR03 = cms.InputTag('hpsPFTauFootprintCorrectiondR03'), - photonPtSumOutsideSignalConedR03 = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalConedR03'), - byIsolationMVArun2v1DBdR03oldDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw'), - byVLooseIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT'), - byLooseIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT'), - byMediumIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT'), - byTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT'), - byVTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT'), - byVVTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT'), - byIsolationMVArun2v1PWdR03oldDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw'), - byVLooseIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT'), - byLooseIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT'), - byMediumIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT'), - byTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT'), - byVTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT'), - byVVTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT'), - ##againstElectronLoose = cms.InputTag("hpsPFTauDiscriminationByLooseElectronRejection"), - ##againstElectronMedium = cms.InputTag("hpsPFTauDiscriminationByMediumElectronRejection"), - ##againstElectronTight = cms.InputTag("hpsPFTauDiscriminationByTightElectronRejection"), - ##againstMuonLoose = cms.InputTag("hpsPFTauDiscriminationByLooseMuonRejection"), - ##againstMuonMedium = cms.InputTag("hpsPFTauDiscriminationByMediumMuonRejection"), - ##againstMuonTight = cms.InputTag("hpsPFTauDiscriminationByTightMuonRejection"), - ##againstMuonLoose2 = cms.InputTag("hpsPFTauDiscriminationByLooseMuonRejection2"), - ##againstMuonMedium2 = cms.InputTag("hpsPFTauDiscriminationByMediumMuonRejection2"), - ##againstMuonTight2 = cms.InputTag("hpsPFTauDiscriminationByTightMuonRejection2"), + byIsolationMVA3oldDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw'), + byVLooseIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT'), + byLooseIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT'), + byMediumIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT'), + byTightIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT'), + byVTightIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT'), + byVVTightIsolationMVA3oldDMwLT = cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT'), + byIsolationMVA3newDMwLTraw = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw'), + byVLooseIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT'), + byLooseIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT'), + byMediumIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT'), + byTightIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT'), + byVTightIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT'), + byVVTightIsolationMVA3newDMwLT = cms.InputTag('hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT'), againstMuonLoose3 = cms.InputTag("hpsPFTauDiscriminationByLooseMuonRejection3"), againstMuonTight3 = cms.InputTag("hpsPFTauDiscriminationByTightMuonRejection3"), - ##againstMuonMVAraw = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection'), - ##againstMuonLooseMVA = cms.InputTag('hpsPFTauDiscriminationByMVALooseMuonRejection'), - ##againstMuonMediumMVA = cms.InputTag('hpsPFTauDiscriminationByMVAMediumMuonRejection'), - ##againstMuonTightMVA = cms.InputTag('hpsPFTauDiscriminationByMVATightMuonRejection'), byLooseCombinedIsolationDeltaBetaCorr3Hits = cms.InputTag("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"), byMediumCombinedIsolationDeltaBetaCorr3Hits = cms.InputTag("hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"), byTightCombinedIsolationDeltaBetaCorr3Hits = cms.InputTag("hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits"), @@ -173,21 +96,13 @@ byTightPileupWeightedIsolation3Hits = cms.InputTag("hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits"), byPhotonPtSumOutsideSignalCone = cms.InputTag("hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone"), byPileupWeightedIsolationRaw3Hits = cms.InputTag("hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits"), - ##againstElectronMVA5raw = cms.InputTag("hpsPFTauDiscriminationByMVA5rawElectronRejection"), - ##againstElectronMVA5category = cms.InputTag("hpsPFTauDiscriminationByMVA5rawElectronRejection:category"), - ##againstElectronVLooseMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5VLooseElectronRejection"), - ##againstElectronLooseMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5LooseElectronRejection"), - ##againstElectronMediumMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5MediumElectronRejection"), - ##againstElectronTightMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5TightElectronRejection"), - ##againstElectronVTightMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5VTightElectronRejection"), - againstElectronMVA6raw = cms.InputTag("hpsPFTauDiscriminationByMVA6rawElectronRejection"), - againstElectronMVA6category = cms.InputTag("hpsPFTauDiscriminationByMVA6rawElectronRejection:category"), - againstElectronVLooseMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6VLooseElectronRejection"), - againstElectronLooseMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6LooseElectronRejection"), - againstElectronMediumMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6MediumElectronRejection"), - againstElectronTightMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6TightElectronRejection"), - againstElectronVTightMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6VTightElectronRejection"), - ##againstElectronDeadECAL = cms.InputTag("hpsPFTauDiscriminationByDeadECALElectronRejection"), + againstElectronMVA5raw = cms.InputTag("hpsPFTauDiscriminationByMVA5rawElectronRejection"), + againstElectronMVA5category = cms.InputTag("hpsPFTauDiscriminationByMVA5rawElectronRejection:category"), + againstElectronVLooseMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5VLooseElectronRejection"), + againstElectronLooseMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5LooseElectronRejection"), + againstElectronMediumMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5MediumElectronRejection"), + againstElectronTightMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5TightElectronRejection"), + againstElectronVTightMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5VTightElectronRejection"), ), # mc matching configurables diff --git a/PhysicsTools/PatAlgos/python/tools/tauTools.py b/PhysicsTools/PatAlgos/python/tools/tauTools.py index 11dae4884c9b8..6de2055df4d5f 100644 --- a/PhysicsTools/PatAlgos/python/tools/tauTools.py +++ b/PhysicsTools/PatAlgos/python/tools/tauTools.py @@ -102,7 +102,6 @@ def _switchToPFTau(process, # Hadron-plus-strip(s) (HPS) Tau Discriminators hpsTauIDSources = [ ("decayModeFindingNewDMs", "DiscriminationByDecayModeFindingNewDMs"), - ("decayModeFindingOldDMs", "DiscriminationByDecayModeFindingOldDMs"), ("decayModeFinding", "DiscriminationByDecayModeFinding"), # CV: kept for backwards compatibility ("byLooseCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"), ("byMediumCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"), @@ -119,100 +118,44 @@ def _switchToPFTau(process, ("neutralIsoPtSumWeight", "NeutralIsoPtSumWeight"), ("footprintCorrection", "FootprintCorrection"), ("photonPtSumOutsideSignalCone", "PhotonPtSumOutsideSignalCone"), - ####("byIsolationMVA3oldDMwoLTraw", "DiscriminationByIsolationMVA3oldDMwoLTraw"), - ####("byVLooseIsolationMVA3oldDMwoLT", "DiscriminationByVLooseIsolationMVA3oldDMwoLT"), - ####("byLooseIsolationMVA3oldDMwoLT", "DiscriminationByLooseIsolationMVA3oldDMwoLT"), - ####("byMediumIsolationMVA3oldDMwoLT", "DiscriminationByMediumIsolationMVA3oldDMwoLT"), - ####("byTightIsolationMVA3oldDMwoLT", "DiscriminationByTightIsolationMVA3oldDMwoLT"), - ####("byVTightIsolationMVA3oldDMwoLT", "DiscriminationByVTightIsolationMVA3oldDMwoLT"), - ####("byVVTightIsolationMVA3oldDMwoLT", "DiscriminationByVVTightIsolationMVA3oldDMwoLT"), - ##("byIsolationMVA3oldDMwLTraw", "DiscriminationByIsolationMVA3oldDMwLTraw"), - ##("byVLooseIsolationMVA3oldDMwLT", "DiscriminationByVLooseIsolationMVA3oldDMwLT"), - ##("byLooseIsolationMVA3oldDMwLT", "DiscriminationByLooseIsolationMVA3oldDMwLT"), - ##("byMediumIsolationMVA3oldDMwLT", "DiscriminationByMediumIsolationMVA3oldDMwLT"), - ##("byTightIsolationMVA3oldDMwLT", "DiscriminationByTightIsolationMVA3oldDMwLT"), - ##("byVTightIsolationMVA3oldDMwLT", "DiscriminationByVTightIsolationMVA3oldDMwLT"), - ##("byVVTightIsolationMVA3oldDMwLT", "DiscriminationByVVTightIsolationMVA3oldDMwLT"), - ##("byIsolationMVA3newDMwoLTraw", "DiscriminationByIsolationMVA3newDMwoLTraw"), - ####("byVLooseIsolationMVA3newDMwoLT", "DiscriminationByVLooseIsolationMVA3newDMwoLT"), - ####("byLooseIsolationMVA3newDMwoLT", "DiscriminationByLooseIsolationMVA3newDMwoLT"), - ####("byMediumIsolationMVA3newDMwoLT", "DiscriminationByMediumIsolationMVA3newDMwoLT"), - ####("byTightIsolationMVA3newDMwoLT", "DiscriminationByTightIsolationMVA3newDMwoLT"), - ####("byVTightIsolationMVA3newDMwoLT", "DiscriminationByVTightIsolationMVA3newDMwoLT"), - ####("byVVTightIsolationMVA3newDMwoLT", "DiscriminationByVVTightIsolationMVA3newDMwoLT"), - ##("byIsolationMVA3newDMwLTraw", "DiscriminationByIsolationMVA3newDMwLTraw"), - ##("byVLooseIsolationMVA3newDMwLT", "DiscriminationByVLooseIsolationMVA3newDMwLT"), - ##("byLooseIsolationMVA3newDMwLT", "DiscriminationByLooseIsolationMVA3newDMwLT"), - ##("byMediumIsolationMVA3newDMwLT", "DiscriminationByMediumIsolationMVA3newDMwLT"), - ##("byTightIsolationMVA3newDMwLT", "DiscriminationByTightIsolationMVA3newDMwLT"), - ##("byVTightIsolationMVA3newDMwLT", "DiscriminationByVTightIsolationMVA3newDMwLT"), - ##("byVVTightIsolationMVA3newDMwLT", "DiscriminationByVVTightIsolationMVA3newDMwLT"), - ##New Run2 MVA Isolation - ("byIsolationMVArun2v1DBoldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBoldDMwLTraw"), - ("byVLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT"), - ("byLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBoldDMwLT"), - ("byMediumIsolationMVArun2v1DBoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBoldDMwLT"), - ("byTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBoldDMwLT"), - ("byVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBoldDMwLT"), - ("byVVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT"), - ("byIsolationMVArun2v1DBnewDMwLTraw", "DiscriminationByIsolationMVArun2v1DBnewDMwLTraw"), - ("byVLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT"), - ("byLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBnewDMwLT"), - ("byMediumIsolationMVArun2v1DBnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBnewDMwLT"), - ("byTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByTightIsolationMVArun2v1DBnewDMwLT"), - ("byVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBnewDMwLT"), - ("byVVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT"), - ("byIsolationMVArun2v1PWoldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWoldDMwLTraw"), - ("byVLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT"), - ("byLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWoldDMwLT"), - ("byMediumIsolationMVArun2v1PWoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWoldDMwLT"), - ("byTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWoldDMwLT"), - ("byVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWoldDMwLT"), - ("byVVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT"), - ("byIsolationMVArun2v1PWnewDMwLTraw", "DiscriminationByIsolationMVArun2v1PWnewDMwLTraw"), - ("byVLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT"), - ("byLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWnewDMwLT"), - ("byMediumIsolationMVArun2v1PWnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWnewDMwLT"), - ("byTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByTightIsolationMVArun2v1PWnewDMwLT"), - ("byVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWnewDMwLT"), - ("byVVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT"), - ("chargedIsoPtSumdR03", "ChargedIsoPtSumdR03"), - ("neutralIsoPtSumdR03", "NeutralIsoPtSumdR03"), - ("puCorrPtSumdR03", "PUcorrPtSumdR03"), - ("neutralIsoPtSumWeightdR03", "NeutralIsoPtSumWeightdR03"), - ("footprintCorrectiondR03", "FootprintCorrectiondR03"), - ("photonPtSumOutsideSignalConedR03", "PhotonPtSumOutsideSignalConedR03"), - ("byIsolationMVArun2v1DBdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw"), - ("byVLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT"), - ("byLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT"), - ("byMediumIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT"), - ("byTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT"), - ("byVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT"), - ("byVVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT"), - ("byIsolationMVArun2v1PWdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw"), - ("byVLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT"), - ("byLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT"), - ("byMediumIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT"), - ("byTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT"), - ("byVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT"), - ("byVVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"), + ##("byIsolationMVA3oldDMwoLTraw", "DiscriminationByIsolationMVA3oldDMwoLTraw"), + ##("byVLooseIsolationMVA3oldDMwoLT", "DiscriminationByVLooseIsolationMVA3oldDMwoLT"), + ##("byLooseIsolationMVA3oldDMwoLT", "DiscriminationByLooseIsolationMVA3oldDMwoLT"), + ##("byMediumIsolationMVA3oldDMwoLT", "DiscriminationByMediumIsolationMVA3oldDMwoLT"), + ##("byTightIsolationMVA3oldDMwoLT", "DiscriminationByTightIsolationMVA3oldDMwoLT"), + ##("byVTightIsolationMVA3oldDMwoLT", "DiscriminationByVTightIsolationMVA3oldDMwoLT"), + ##("byVVTightIsolationMVA3oldDMwoLT", "DiscriminationByVVTightIsolationMVA3oldDMwoLT"), + ("byIsolationMVA3oldDMwLTraw", "DiscriminationByIsolationMVA3oldDMwLTraw"), + ("byVLooseIsolationMVA3oldDMwLT", "DiscriminationByVLooseIsolationMVA3oldDMwLT"), + ("byLooseIsolationMVA3oldDMwLT", "DiscriminationByLooseIsolationMVA3oldDMwLT"), + ("byMediumIsolationMVA3oldDMwLT", "DiscriminationByMediumIsolationMVA3oldDMwLT"), + ("byTightIsolationMVA3oldDMwLT", "DiscriminationByTightIsolationMVA3oldDMwLT"), + ("byVTightIsolationMVA3oldDMwLT", "DiscriminationByVTightIsolationMVA3oldDMwLT"), + ("byVVTightIsolationMVA3oldDMwLT", "DiscriminationByVVTightIsolationMVA3oldDMwLT"), + ("byIsolationMVA3newDMwoLTraw", "DiscriminationByIsolationMVA3newDMwoLTraw"), + ##("byVLooseIsolationMVA3newDMwoLT", "DiscriminationByVLooseIsolationMVA3newDMwoLT"), + ##("byLooseIsolationMVA3newDMwoLT", "DiscriminationByLooseIsolationMVA3newDMwoLT"), + ##("byMediumIsolationMVA3newDMwoLT", "DiscriminationByMediumIsolationMVA3newDMwoLT"), + ##("byTightIsolationMVA3newDMwoLT", "DiscriminationByTightIsolationMVA3newDMwoLT"), + ##("byVTightIsolationMVA3newDMwoLT", "DiscriminationByVTightIsolationMVA3newDMwoLT"), + ##("byVVTightIsolationMVA3newDMwoLT", "DiscriminationByVVTightIsolationMVA3newDMwoLT"), + ("byIsolationMVA3newDMwLTraw", "DiscriminationByIsolationMVA3newDMwLTraw"), + ("byVLooseIsolationMVA3newDMwLT", "DiscriminationByVLooseIsolationMVA3newDMwLT"), + ("byLooseIsolationMVA3newDMwLT", "DiscriminationByLooseIsolationMVA3newDMwLT"), + ("byMediumIsolationMVA3newDMwLT", "DiscriminationByMediumIsolationMVA3newDMwLT"), + ("byTightIsolationMVA3newDMwLT", "DiscriminationByTightIsolationMVA3newDMwLT"), + ("byVTightIsolationMVA3newDMwLT", "DiscriminationByVTightIsolationMVA3newDMwLT"), + ("byVVTightIsolationMVA3newDMwLT", "DiscriminationByVVTightIsolationMVA3newDMwLT"), ##("againstElectronLoose", "DiscriminationByLooseElectronRejection"), ##("againstElectronMedium", "DiscriminationByMediumElectronRejection"), ##("againstElectronTight", "DiscriminationByTightElectronRejection"), - ##("againstElectronMVA5raw", "DiscriminationByMVA5rawElectronRejection"), - ##("againstElectronMVA5category", "DiscriminationByMVA5rawElectronRejection:category"), - ##("againstElectronVLooseMVA5", "DiscriminationByMVA5VLooseElectronRejection"), - ##("againstElectronLooseMVA5", "DiscriminationByMVA5LooseElectronRejection"), - ##("againstElectronMediumMVA5", "DiscriminationByMVA5MediumElectronRejection"), - ##("againstElectronTightMVA5", "DiscriminationByMVA5TightElectronRejection"), - ##("againstElectronVTightMVA5", "DiscriminationByMVA5VTightElectronRejection"), - ("againstElectronMVA6raw", "DiscriminationByMVA6rawElectronRejection"), - ("againstElectronMVA6category", "DiscriminationByMVA6rawElectronRejection:category"), - ("againstElectronVLooseMVA6", "DiscriminationByMVA6VLooseElectronRejection"), - ("againstElectronLooseMVA6", "DiscriminationByMVA6LooseElectronRejection"), - ("againstElectronMediumMVA6", "DiscriminationByMVA6MediumElectronRejection"), - ("againstElectronTightMVA6", "DiscriminationByMVA6TightElectronRejection"), - ("againstElectronVTightMVA6", "DiscriminationByMVA6VTightElectronRejection"), + ("againstElectronMVA5raw", "DiscriminationByMVA5rawElectronRejection"), + ("againstElectronMVA5category", "DiscriminationByMVA5rawElectronRejection:category"), + ("againstElectronVLooseMVA5", "DiscriminationByMVA5VLooseElectronRejection"), + ("againstElectronLooseMVA5", "DiscriminationByMVA5LooseElectronRejection"), + ("againstElectronMediumMVA5", "DiscriminationByMVA5MediumElectronRejection"), + ("againstElectronTightMVA5", "DiscriminationByMVA5TightElectronRejection"), + ("againstElectronVTightMVA5", "DiscriminationByMVA5VTightElectronRejection"), ##("againstElectronDeadECAL", "DiscriminationByDeadECALElectronRejection"), ##("againstMuonLoose", "DiscriminationByLooseMuonRejection"), ##("againstMuonMedium", "DiscriminationByMediumMuonRejection"), @@ -266,8 +209,8 @@ def switchToPFTauHPS(process, ## adapt cleanPatTaus if hasattr(process, "cleanPatTaus" + patTauLabel + postfix): getattr(process, "cleanPatTaus" + patTauLabel + postfix).preselection = \ - 'pt > 18 & abs(eta) < 2.3 & tauID("decayModeFindingOldDMs") > 0.5 & tauID("byLooseCombinedIsolationDeltaBetaCorr3Hits") > 0.5' \ - + ' & tauID("againstMuonTight3") > 0.5 & tauID("againstElectronVLooseMVA6") > 0.5' + 'pt > 18 & abs(eta) < 2.3 & tauID("decayModeFinding") > 0.5 & tauID("byLooseCombinedIsolationDeltaBetaCorr3Hits") > 0.5' \ + + ' & tauID("againstMuonTight3") > 0.5 & tauID("againstElectronVLooseMVA5") > 0.5' # Select switcher by string def switchToPFTauByType(process, diff --git a/RecoTauTag/Configuration/python/HPSPFTaus_cff.py b/RecoTauTag/Configuration/python/HPSPFTaus_cff.py index d933ac315d181..5718fc487c720 100644 --- a/RecoTauTag/Configuration/python/HPSPFTaus_cff.py +++ b/RecoTauTag/Configuration/python/HPSPFTaus_cff.py @@ -12,7 +12,6 @@ from RecoTauTag.RecoTau.PFRecoTauDiscriminationByLeadingTrackFinding_cfi import * from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectron_cfi import * from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectronMVA5_cfi import * -from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectronMVA6_cfi import * from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi import * from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstMuon_cfi import * from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstMuon2_cfi import * @@ -524,111 +523,6 @@ hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff79") hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff79") - -hpsPFTauDiscriminationByMVA6rawElectronRejection = pfRecoTauDiscriminationAgainstElectronMVA6.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), - loadMVAfromDB = cms.bool(True), - mvaName_NoEleMatch_woGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL"), - mvaName_NoEleMatch_wGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL"), - mvaName_woGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL"), - mvaName_wGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL"), - mvaName_NoEleMatch_woGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC"), - mvaName_NoEleMatch_wGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC"), - mvaName_woGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC"), - mvaName_wGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC") -) - -hpsPFTauDiscriminationByMVA6VLooseElectronRejection = recoTauDiscriminantCutMultiplexer.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection'), - key = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection:category'), - loadMVAfromDB = cms.bool(True), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), # minMVANoEleMatchWOgWOgsfBL - cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(2), # minMVANoEleMatchWgWOgsfBL - cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(5), # minMVAWOgWgsfBL - cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(7), # minMVAWgWgsfBL - cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(8), # minMVANoEleMatchWOgWOgsfEC - cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(10), # minMVANoEleMatchWgWOgsfEC - cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(13), # minMVAWOgWgsfEC - cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(15), # minMVAWgWgsfEC - cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff99"), - variable = cms.string("pt") - ) - ) -) - -hpsPFTauDiscriminationByMVA6LooseElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) -hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff96") - -hpsPFTauDiscriminationByMVA6MediumElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) -hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff91") - -hpsPFTauDiscriminationByMVA6TightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) -hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff85") - -hpsPFTauDiscriminationByMVA6VTightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) -hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff79") - hpsPFTauDiscriminationByDeadECALElectronRejection = pfRecoTauDiscriminationAgainstElectronDeadECAL.clone( PFTauProducer = cms.InputTag('hpsPFTauProducer'), Prediscriminants = requireDecayMode.clone() @@ -745,7 +639,7 @@ PFTauTag = cms.InputTag("hpsPFTauProducer"), PFTauPVATag = cms.InputTag("hpsPFTauPrimaryVertexProducer"), PFTauSVATag = cms.InputTag("hpsPFTauSecondaryVertexProducer"), - useFullCalculation = cms.bool(True) + useFullCalculation = cms.bool(False) ) hpsPFTauVertexAndImpactParametersSeq = cms.Sequence( hpsPFTauPrimaryVertexProducer* @@ -809,8 +703,6 @@ srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum'), srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum'), srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum'), - srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalCone'), - srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrection'), verbosity = cms.int32(0) ) hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT = discriminationByIsolationMVA2VLoose.clone( @@ -922,241 +814,6 @@ hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff40") -#Define new Run2 MVA isolations -hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone( - mvaName = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1"), - mvaOpt = cms.string("DBoldDMwLT"), - verbosity = cms.int32(0) -) - -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT = discriminationByIsolationMVA2VLoose.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw:category'), - loadMVAfromDB = cms.bool(True), - mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_mvaOutput_normalization"), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), - cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff90"), - variable = cms.string("pt") - ) - ) -) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff40") - -hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw.clone( - mvaName = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1"), - mvaOpt = cms.string("DBnewDMwLT"), - verbosity = cms.int32(0) -) - -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw:category'), - loadMVAfromDB = cms.bool(True), - mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_mvaOutput_normalization"), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), - cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff90"), - variable = cms.string("pt") - ) - ) -) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff40") - -hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone( - mvaName = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1"), - mvaOpt = cms.string("PWoldDMwLT"), - srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeight'), - verbosity = cms.int32(0) -) - -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw:category'), - loadMVAfromDB = cms.bool(True), - mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_mvaOutput_normalization"), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), - cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff90"), - variable = cms.string("pt") - ) - ) -) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff40") - -hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw.clone( - mvaName = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1"), - mvaOpt = cms.string("PWnewDMwLT"), - verbosity = cms.int32(0) -) - -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw:category'), - loadMVAfromDB = cms.bool(True), - mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_mvaOutput_normalization"), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), - cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff90"), - variable = cms.string("pt") - ) - ) -) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff40") - -hpsPFTauChargedIsoPtSumdR03 = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), - ApplyDiscriminationByECALIsolation = cms.bool(False), - ApplyDiscriminationByTrackerIsolation = cms.bool(True), - applySumPtCut = cms.bool(False), - applyDeltaBetaCorrection = cms.bool(False), - storeRawSumPt = cms.bool(True), - storeRawPUsumPt = cms.bool(False), - customOuterCone = cms.double(0.3), - isoConeSizeForDeltaBeta = cms.double(0.8), - verbosity = cms.int32(0) -) -hpsPFTauNeutralIsoPtSumdR03 = hpsPFTauChargedIsoPtSumdR03.clone( - ApplyDiscriminationByECALIsolation = cms.bool(True), - ApplyDiscriminationByTrackerIsolation = cms.bool(False), - verbosity = cms.int32(0) -) -hpsPFTauPUcorrPtSumdR03 = hpsPFTauChargedIsoPtSumdR03.clone( - ApplyDiscriminationByECALIsolation = cms.bool(False), - ApplyDiscriminationByTrackerIsolation = cms.bool(False), - applyDeltaBetaCorrection = cms.bool(True), - storeRawSumPt = cms.bool(False), - storeRawPUsumPt = cms.bool(True), - verbosity = cms.int32(0) -) -hpsPFTauNeutralIsoPtSumWeightdR03 = hpsPFTauChargedIsoPtSumdR03.clone( - ApplyDiscriminationByWeightedECALIsolation = cms.bool(True), - ApplyDiscriminationByTrackerIsolation = cms.bool(False), - UseAllPFCandsForWeights = cms.bool(True), - verbosity = cms.int32(0) -) -hpsPFTauFootprintCorrectiondR03 = hpsPFTauChargedIsoPtSumdR03.clone( - ApplyDiscriminationByTrackerIsolation = cms.bool(False), - storeRawSumPt = cms.bool(False), - storeRawFootprintCorrection = cms.bool(True), - verbosity = cms.int32(0) -) -hpsPFTauPhotonPtSumOutsideSignalConedR03 = hpsPFTauChargedIsoPtSumdR03.clone( - ApplyDiscriminationByTrackerIsolation = cms.bool(False), - storeRawSumPt = cms.bool(False), - storeRawPhotonSumPt_outsideSignalCone = cms.bool(True), - verbosity = cms.int32(0) -) - -hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone( - mvaName = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1"), - mvaOpt = cms.string("DBoldDMwLT"), - srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSumdR03'), - srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumdR03'), - srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSumdR03'), - srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalConedR03'), - srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrectiondR03'), - verbosity = cms.int32(0) -) -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT = discriminationByIsolationMVA2VLoose.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw:category'), - loadMVAfromDB = cms.bool(True), - mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_mvaOutput_normalization"), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), - cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff90"), - variable = cms.string("pt") - ) - ) -) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff40") - -hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw.clone( - mvaName = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1"), - mvaOpt = cms.string("PWoldDMwLT"), - srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeightdR03'), - verbosity = cms.int32(0) -) -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw:category'), - loadMVAfromDB = cms.bool(True), - mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_mvaOutput_normalization"), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), - cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff90"), - variable = cms.string("pt") - ) - ) -) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff40") - hpsPFTauMVAIsolation2Seq = cms.Sequence( hpsPFTauChargedIsoPtSum + hpsPFTauNeutralIsoPtSum @@ -1164,83 +821,34 @@ + hpsPFTauNeutralIsoPtSumWeight + hpsPFTauFootprintCorrection + hpsPFTauPhotonPtSumOutsideSignalCone - #+ hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw - #+ hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT - #+ hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT - #+ hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT - #+ hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT - #+ hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT - #+ hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT - #+ hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw - #+ hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT - #+ hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT - #+ hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT - #+ hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT - #+ hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT - #+ hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT - #+ hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw - #+ hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT - #+ hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT - #+ hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT - #+ hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT - #+ hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT - #+ hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT - #+ hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw - #+ hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT - #+ hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT - #+ hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT - #+ hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT - #+ hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT - #+ hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT - # new MVA isolations for Run2 - + hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT - + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT - + hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT - + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT - + hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT - + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT - + hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT - + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT - + hpsPFTauChargedIsoPtSumdR03 - + hpsPFTauNeutralIsoPtSumdR03 - + hpsPFTauPUcorrPtSumdR03 - + hpsPFTauNeutralIsoPtSumWeightdR03 - + hpsPFTauFootprintCorrectiondR03 - + hpsPFTauPhotonPtSumOutsideSignalConedR03 - + hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT - + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT - + hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT - + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT + + hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT + + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT + + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT + + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT + + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT + + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT + + hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT + + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT + + hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT + + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT + + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT + + hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT + + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT + + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT + + hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT + + hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT ) produceHPSPFTaus = cms.Sequence( @@ -1275,18 +883,12 @@ hpsPFTauDiscriminationByLooseElectronRejection* hpsPFTauDiscriminationByMediumElectronRejection* hpsPFTauDiscriminationByTightElectronRejection* - #hpsPFTauDiscriminationByMVA5rawElectronRejection* - #hpsPFTauDiscriminationByMVA5VLooseElectronRejection* - #hpsPFTauDiscriminationByMVA5LooseElectronRejection* - #hpsPFTauDiscriminationByMVA5MediumElectronRejection* - #hpsPFTauDiscriminationByMVA5TightElectronRejection* - #hpsPFTauDiscriminationByMVA5VTightElectronRejection* - hpsPFTauDiscriminationByMVA6rawElectronRejection* - hpsPFTauDiscriminationByMVA6VLooseElectronRejection* - hpsPFTauDiscriminationByMVA6LooseElectronRejection* - hpsPFTauDiscriminationByMVA6MediumElectronRejection* - hpsPFTauDiscriminationByMVA6TightElectronRejection* - hpsPFTauDiscriminationByMVA6VTightElectronRejection* + hpsPFTauDiscriminationByMVA5rawElectronRejection* + hpsPFTauDiscriminationByMVA5VLooseElectronRejection* + hpsPFTauDiscriminationByMVA5LooseElectronRejection* + hpsPFTauDiscriminationByMVA5MediumElectronRejection* + hpsPFTauDiscriminationByMVA5TightElectronRejection* + hpsPFTauDiscriminationByMVA5VTightElectronRejection* hpsPFTauDiscriminationByDeadECALElectronRejection* hpsPFTauDiscriminationByLooseMuonRejection* hpsPFTauDiscriminationByMediumMuonRejection* diff --git a/RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py b/RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py new file mode 100644 index 0000000000000..4d858ac24f449 --- /dev/null +++ b/RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py @@ -0,0 +1,1315 @@ +import FWCore.ParameterSet.Config as cms +import copy + +''' + +Sequences for HPS taus + +''' + +# Define the discriminators for this tau +from RecoTauTag.RecoTau.PFRecoTauDiscriminationByIsolation_cfi import * +from RecoTauTag.RecoTau.PFRecoTauDiscriminationByLeadingTrackFinding_cfi import * +from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectron_cfi import * +from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectronMVA5_cfi import * +from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectronMVA6_cfi import * +from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi import * +from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstMuon_cfi import * +from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstMuon2_cfi import * +from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstMuonMVA_cfi import * + +from RecoTauTag.RecoTau.RecoTauDiscriminantCutMultiplexer_cfi import * + +# Load helper functions to change the source of the discriminants +from RecoTauTag.RecoTau.TauDiscriminatorTools import * + +# Load PFjet input parameters +from RecoTauTag.RecoTau.PFRecoTauPFJetInputs_cfi import PFRecoTauPFJetInputs + +# deltaBeta correction factor +ak4dBetaCorrection=0.20 + +# Load MVAs from SQLlite file/prep. DB +from RecoTauTag.Configuration.loadRecoTauTagMVAsFromPrepDB_cfi import * + +# Select those taus that pass the HPS selections +# - pt > 15, mass cuts, tauCone cut +from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import hpsSelectionDiscriminator, decayMode_1Prong0Pi0, decayMode_1Prong1Pi0, decayMode_1Prong2Pi0, decayMode_3Prong0Pi0 +hpsPFTauDiscriminationByDecayModeFindingNewDMs = hpsSelectionDiscriminator.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer') +) +hpsPFTauDiscriminationByDecayModeFindingOldDMs = hpsSelectionDiscriminator.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + decayModes = cms.VPSet( + decayMode_1Prong0Pi0, + decayMode_1Prong1Pi0, + decayMode_1Prong2Pi0, + decayMode_3Prong0Pi0 + ), + requireTauChargedHadronsToBeChargedPFCands = cms.bool(True) +) +hpsPFTauDiscriminationByDecayModeFinding = hpsPFTauDiscriminationByDecayModeFindingOldDMs.clone() # CV: kept for backwards compatibility + +# Define decay mode prediscriminant +requireDecayMode = cms.PSet( + BooleanOperator = cms.string("and"), + decayMode = cms.PSet( + Producer = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs'), + cut = cms.double(0.5) + ) +) + +#Building the prototype for the Discriminator by Isolation +hpsPFTauDiscriminationByLooseIsolation = pfRecoTauDiscriminationByIsolation.clone( + PFTauProducer = cms.InputTag("hpsPFTauProducer"), + Prediscriminants = requireDecayMode.clone(), + ApplyDiscriminationByTrackerIsolation = False, + ApplyDiscriminationByECALIsolation = True, + applyOccupancyCut = True +) +hpsPFTauDiscriminationByLooseIsolation.Prediscriminants.preIso = cms.PSet( + Producer = cms.InputTag("hpsPFTauDiscriminationByLooseChargedIsolation"), + cut = cms.double(0.5)) + +# Make an even looser discriminator +hpsPFTauDiscriminationByVLooseIsolation = hpsPFTauDiscriminationByLooseIsolation.clone( + customOuterCone = cms.double(0.3), + isoConeSizeForDeltaBeta = cms.double(0.3), +) +hpsPFTauDiscriminationByVLooseIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 1.5 +hpsPFTauDiscriminationByVLooseIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 2.0 +hpsPFTauDiscriminationByVLooseIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByVLooseChargedIsolation") + +hpsPFTauDiscriminationByMediumIsolation = hpsPFTauDiscriminationByLooseIsolation.clone() +hpsPFTauDiscriminationByMediumIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 0.8 +hpsPFTauDiscriminationByMediumIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 0.8 +hpsPFTauDiscriminationByMediumIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByMediumChargedIsolation") + +hpsPFTauDiscriminationByTightIsolation = hpsPFTauDiscriminationByLooseIsolation.clone() +hpsPFTauDiscriminationByTightIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByTightIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 +hpsPFTauDiscriminationByTightIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByTightChargedIsolation") + +hpsPFTauDiscriminationByIsolationSeq = cms.Sequence( + hpsPFTauDiscriminationByVLooseIsolation* + hpsPFTauDiscriminationByLooseIsolation* + hpsPFTauDiscriminationByMediumIsolation* + hpsPFTauDiscriminationByTightIsolation +) + +_isolation_types = ['VLoose', 'Loose', 'Medium', 'Tight'] +# Now build the sequences that apply PU corrections + +# Make Delta Beta corrections (on SumPt quantity) +hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr = hpsPFTauDiscriminationByVLooseIsolation.clone( + deltaBetaPUTrackPtCutOverride = cms.double(0.5), + applyDeltaBetaCorrection = True, + isoConeSizeForDeltaBeta = 0.8, + deltaBetaFactor = "%0.4f"%(0.0123/0.1687), + applyOccupancyCut = False, + applySumPtCut = True, +) +hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr.maximumSumPtCut = hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt + +hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseIsolation.clone( + deltaBetaPUTrackPtCutOverride = cms.double(0.5), + applyDeltaBetaCorrection = True, + isoConeSizeForDeltaBeta = 0.8, + deltaBetaFactor = "%0.4f"%(0.0123/0.1687), + applyOccupancyCut = False, + applySumPtCut = True, +) +hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.maximumSumPtCut = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt + +hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr = hpsPFTauDiscriminationByMediumIsolation.clone( + deltaBetaPUTrackPtCutOverride = cms.double(0.5), + applyDeltaBetaCorrection = True, + isoConeSizeForDeltaBeta = 0.8, + deltaBetaFactor = "%0.4f"%(0.0462/0.1687), + applyOccupancyCut = False, + applySumPtCut = True, +) +hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.maximumSumPtCut = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt + +hpsPFTauDiscriminationByTightIsolationDBSumPtCorr = hpsPFTauDiscriminationByTightIsolation.clone( + deltaBetaPUTrackPtCutOverride = cms.double(0.5), + applyDeltaBetaCorrection = True, + isoConeSizeForDeltaBeta = 0.8, + deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection), + applyOccupancyCut = False, + applySumPtCut = True, +) +hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.maximumSumPtCut = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt + +hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr = cms.Sequence( + hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr* + hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr* + hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr* + hpsPFTauDiscriminationByTightIsolationDBSumPtCorr +) + +hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr.clone( + ApplyDiscriminationByTrackerIsolation = True, + ApplyDiscriminationByECALIsolation = True, + deltaBetaFactor = "%0.4f"%((0.09/0.25)*(ak4dBetaCorrection)), + applyOccupancyCut = False, + applySumPtCut = True, + maximumSumPtCut = 3.5, + Prediscriminants = requireDecayMode.clone() +) +hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 + +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.clone( + ApplyDiscriminationByTrackerIsolation = True, + ApplyDiscriminationByECALIsolation = True, + deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection), + applyOccupancyCut = False, + applySumPtCut = True, + maximumSumPtCut = 2.5, + Prediscriminants = requireDecayMode.clone() +) +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 + +hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone( + applySumPtCut = False, + storeRawSumPt = cms.bool(True) +) + +hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone( + applySumPtCut = False, + ApplyDiscriminationByECALIsolation = False, + storeRawSumPt = cms.bool(True) +) + +hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone( + applySumPtCut = False, + ApplyDiscriminationByTrackerIsolation = False, + storeRawSumPt = cms.bool(True) +) + +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.clone( + ApplyDiscriminationByTrackerIsolation = True, + ApplyDiscriminationByECALIsolation = True, + deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection), + applyOccupancyCut = False, + applySumPtCut = True, + maximumSumPtCut = 1.5, + Prediscriminants = requireDecayMode.clone() +) +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 + +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.clone( + ApplyDiscriminationByTrackerIsolation = True, + ApplyDiscriminationByECALIsolation = True, + deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection), + applyOccupancyCut = False, + applySumPtCut = True, + maximumSumPtCut = 0.8, + Prediscriminants = requireDecayMode.clone() +) +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 + +hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr = cms.Sequence( + hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr* + hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr* + hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr* + hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr +) + +#Charge isolation based on combined isolation +hpsPFTauDiscriminationByVLooseChargedIsolation = hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr.clone( + ApplyDiscriminationByECALIsolation = False +) + +hpsPFTauDiscriminationByLooseChargedIsolation = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone( + ApplyDiscriminationByECALIsolation = False +) + +hpsPFTauDiscriminationByMediumChargedIsolation = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.clone( + ApplyDiscriminationByECALIsolation = False +) +hpsPFTauDiscriminationByTightChargedIsolation = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.clone( + ApplyDiscriminationByECALIsolation = False +) + +hpsPFTauDiscriminationByChargedIsolationSeq = cms.Sequence( + hpsPFTauDiscriminationByVLooseChargedIsolation* + hpsPFTauDiscriminationByLooseChargedIsolation* + hpsPFTauDiscriminationByMediumChargedIsolation* + hpsPFTauDiscriminationByTightChargedIsolation +) + +#copying discriminator against electrons and muons +hpsPFTauDiscriminationByLooseElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = noPrediscriminants, + PFElectronMVA_maxValue = cms.double(0.6) +) +hpsPFTauDiscriminationByMediumElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = noPrediscriminants, + ApplyCut_EcalCrackCut = cms.bool(True) +) +hpsPFTauDiscriminationByTightElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = noPrediscriminants, + ApplyCut_EcalCrackCut = cms.bool(True), + ApplyCut_BremCombined = cms.bool(True) +) + +hpsPFTauDiscriminationByLooseMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = noPrediscriminants +) +hpsPFTauDiscriminationByMediumMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = noPrediscriminants, + discriminatorOption = cms.string('noAllArbitrated') +) +hpsPFTauDiscriminationByTightMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = noPrediscriminants, + discriminatorOption = cms.string('noAllArbitratedWithHOP') +) + +hpsPFTauDiscriminationByLooseMuonRejection2 = pfRecoTauDiscriminationAgainstMuon2.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = noPrediscriminants +) +hpsPFTauDiscriminationByMediumMuonRejection2 = pfRecoTauDiscriminationAgainstMuon2.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = noPrediscriminants, + discriminatorOption = cms.string('medium') +) +hpsPFTauDiscriminationByTightMuonRejection2 = pfRecoTauDiscriminationAgainstMuon2.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = noPrediscriminants, + discriminatorOption = cms.string('tight') +) + +hpsPFTauDiscriminationByLooseMuonRejection3 = pfRecoTauDiscriminationAgainstMuon2.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = noPrediscriminants, + discriminatorOption = cms.string('custom'), + maxNumberOfMatches = cms.int32(1), + doCaloMuonVeto = cms.bool(True), + maxNumberOfHitsLast2Stations = cms.int32(-1) +) +hpsPFTauDiscriminationByTightMuonRejection3 = hpsPFTauDiscriminationByLooseMuonRejection3.clone( + maxNumberOfHitsLast2Stations = cms.int32(0) +) + +hpsPFTauDiscriminationByMVArawMuonRejection = pfRecoTauDiscriminationAgainstMuonMVA.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + loadMVAfromDB = cms.bool(True), + returnMVA = cms.bool(True), + mvaName = cms.string("RecoTauTag_againstMuonMVAv1") +) +##hpsPFTauDiscriminationByMVALooseMuonRejection = hpsPFTauDiscriminationByMVArawMuonRejection.clone( +## returnMVA = cms.bool(False), +## mvaMin = cms.double(0.75) +##) +##hpsPFTauDiscriminationByMVAMediumMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone( +## mvaMin = cms.double(0.950) +##) +##hpsPFTauDiscriminationByMVATightMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone( +## mvaMin = cms.double(0.975) +##) +hpsPFTauDiscriminationByMVALooseMuonRejection = recoTauDiscriminantCutMultiplexer.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection'), + key = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_againstMuonMVAv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff99_5"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByMVAMediumMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone() +hpsPFTauDiscriminationByMVAMediumMuonRejection.mapping[0].cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff99_0") +hpsPFTauDiscriminationByMVATightMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone() +hpsPFTauDiscriminationByMVATightMuonRejection.mapping[0].cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff98_0") + +hpsPFTauDiscriminationByMVA5rawElectronRejection = pfRecoTauDiscriminationAgainstElectronMVA5.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + loadMVAfromDB = cms.bool(True), + mvaName_NoEleMatch_woGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL"), + mvaName_NoEleMatch_woGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL"), + mvaName_NoEleMatch_wGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL"), + mvaName_NoEleMatch_wGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL"), + mvaName_woGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL"), + mvaName_woGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL"), + mvaName_wGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL"), + mvaName_wGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL"), + mvaName_NoEleMatch_woGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC"), + mvaName_NoEleMatch_woGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC"), + mvaName_NoEleMatch_wGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC"), + mvaName_NoEleMatch_wGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC"), + mvaName_woGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC"), + mvaName_woGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC"), + mvaName_wGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC"), + mvaName_wGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC") +) + +hpsPFTauDiscriminationByMVA5VLooseElectronRejection = recoTauDiscriminantCutMultiplexer.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection'), + key = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection:category'), + loadMVAfromDB = cms.bool(True), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), # minMVANoEleMatchWOgWOgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(1), # minMVANoEleMatchWOgWgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(2), # minMVANoEleMatchWgWOgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(3), # minMVANoEleMatchWgWgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(4), # minMVAWOgWOgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(5), # minMVAWOgWgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(6), # minMVAWgWOgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(7), # minMVAWgWgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(8), # minMVANoEleMatchWOgWOgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(9), # minMVANoEleMatchWOgWgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(10), # minMVANoEleMatchWgWOgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(11), # minMVANoEleMatchWgWgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(12), # minMVAWOgWOgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(13), # minMVAWOgWgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(14), # minMVAWgWOgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(15), # minMVAWgWgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff99"), + variable = cms.string("pt") + ) + ) +) + +hpsPFTauDiscriminationByMVA5LooseElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection) +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff96") + +hpsPFTauDiscriminationByMVA5MediumElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection) +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff91") + +hpsPFTauDiscriminationByMVA5TightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection) +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff85") + +hpsPFTauDiscriminationByMVA5VTightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection) +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff79") + + +hpsPFTauDiscriminationByMVA6rawElectronRejection = pfRecoTauDiscriminationAgainstElectronMVA6.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + loadMVAfromDB = cms.bool(True), + mvaName_NoEleMatch_woGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL"), + mvaName_NoEleMatch_wGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL"), + mvaName_woGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL"), + mvaName_wGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL"), + mvaName_NoEleMatch_woGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC"), + mvaName_NoEleMatch_wGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC"), + mvaName_woGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC"), + mvaName_wGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC") +) + +hpsPFTauDiscriminationByMVA6VLooseElectronRejection = recoTauDiscriminantCutMultiplexer.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection'), + key = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection:category'), + loadMVAfromDB = cms.bool(True), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), # minMVANoEleMatchWOgWOgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(2), # minMVANoEleMatchWgWOgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(5), # minMVAWOgWgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(7), # minMVAWgWgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(8), # minMVANoEleMatchWOgWOgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(10), # minMVANoEleMatchWgWOgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(13), # minMVAWOgWgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(15), # minMVAWgWgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff99"), + variable = cms.string("pt") + ) + ) +) + +hpsPFTauDiscriminationByMVA6LooseElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff96") + +hpsPFTauDiscriminationByMVA6MediumElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff91") + +hpsPFTauDiscriminationByMVA6TightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff85") + +hpsPFTauDiscriminationByMVA6VTightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff79") + +hpsPFTauDiscriminationByDeadECALElectronRejection = pfRecoTauDiscriminationAgainstElectronDeadECAL.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone() +) + +#Define new sequence that is using smaller number on hits cut +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone() +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.clone() +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.clone() + +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) + +hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone( + applySumPtCut = False, + storeRawSumPt = cms.bool(True) +) + +hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits = cms.Sequence( + hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits* + hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits* + hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits* + hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits +) + +hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone( + ApplyDiscriminationByECALIsolation = cms.bool(False), + applyDeltaBetaCorrection = cms.bool(False), + ApplyDiscriminationByWeightedECALIsolation = cms.bool(True), + UseAllPFCandsForWeights = cms.bool(True), + applyFootprintCorrection = cms.bool(True), + applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) +) + +hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone( + maximumSumPtCut = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.maximumSumPtCut +) + +hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone( + maximumSumPtCut = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.maximumSumPtCut +) + +hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone( + applySumPtCut = cms.bool(False) +) + +hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone( + Prediscriminants = cms.PSet( + BooleanOperator = cms.string("and"), + decayMode = cms.PSet( + Producer = cms.InputTag('hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone'), + cut = cms.double(0.5) + ) + ), + applySumPtCut = cms.bool(False), + storeRawSumPt = cms.bool(True) +) + +hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits = cms.Sequence( + hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits* + hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits* + hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits* + hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone* + hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits +) + +# Define the HPS selection discriminator used in cleaning +hpsSelectionDiscriminator.PFTauProducer = cms.InputTag("combinatoricRecoTaus") + +from RecoTauTag.RecoTau.RecoTauCleaner_cfi import RecoTauCleaner +hpsPFTauProducerSansRefs = RecoTauCleaner.clone( + src = cms.InputTag("combinatoricRecoTaus") +) + + +from RecoTauTag.RecoTau.RecoTauPiZeroUnembedder_cfi import RecoTauPiZeroUnembedder +hpsPFTauProducer = RecoTauPiZeroUnembedder.clone( + src = cms.InputTag("hpsPFTauProducerSansRefs") +) + + +from RecoTauTag.RecoTau.PFTauPrimaryVertexProducer_cfi import * +from RecoTauTag.RecoTau.PFTauSecondaryVertexProducer_cfi import * +from RecoTauTag.RecoTau.PFTauTransverseImpactParameters_cfi import * +hpsPFTauPrimaryVertexProducer = PFTauPrimaryVertexProducer.clone( + PFTauTag = cms.InputTag("hpsPFTauProducer"), + ElectronTag = cms.InputTag(""), + MuonTag = cms.InputTag(""), + PVTag = cms.InputTag("offlinePrimaryVertices"), + beamSpot = cms.InputTag("offlineBeamSpot"), + TrackCollectionTag = cms.InputTag("generalTracks"), + Algorithm = cms.int32(1), + useBeamSpot = cms.bool(True), + RemoveMuonTracks = cms.bool(False), + RemoveElectronTracks = cms.bool(False), + useSelectedTaus = cms.bool(False), + discriminators = cms.VPSet( + cms.PSet( + discriminator = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs'), + selectionCut = cms.double(0.5) + ) + ), + cut = cms.string("pt > 18.0 & abs(eta) < 2.4") +) + +hpsPFTauSecondaryVertexProducer = PFTauSecondaryVertexProducer.clone( + PFTauTag = cms.InputTag("hpsPFTauProducer") +) +hpsPFTauTransverseImpactParameters = PFTauTransverseImpactParameters.clone( + PFTauTag = cms.InputTag("hpsPFTauProducer"), + PFTauPVATag = cms.InputTag("hpsPFTauPrimaryVertexProducer"), + PFTauSVATag = cms.InputTag("hpsPFTauSecondaryVertexProducer"), + useFullCalculation = cms.bool(True) +) +hpsPFTauVertexAndImpactParametersSeq = cms.Sequence( + hpsPFTauPrimaryVertexProducer* + hpsPFTauSecondaryVertexProducer* + hpsPFTauTransverseImpactParameters +) + +from RecoTauTag.RecoTau.PFRecoTauDiscriminationByMVAIsolation2_cff import * +hpsPFTauChargedIsoPtSum = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + ApplyDiscriminationByECALIsolation = cms.bool(False), + ApplyDiscriminationByTrackerIsolation = cms.bool(True), + applySumPtCut = cms.bool(False), + applyDeltaBetaCorrection = cms.bool(False), + storeRawSumPt = cms.bool(True), + storeRawPUsumPt = cms.bool(False), + customOuterCone = PFRecoTauPFJetInputs.isolationConeSize, + isoConeSizeForDeltaBeta = cms.double(0.8), + verbosity = cms.int32(0) +) +hpsPFTauNeutralIsoPtSum = hpsPFTauChargedIsoPtSum.clone( + ApplyDiscriminationByECALIsolation = cms.bool(True), + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + verbosity = cms.int32(0) +) +hpsPFTauPUcorrPtSum = hpsPFTauChargedIsoPtSum.clone( + ApplyDiscriminationByECALIsolation = cms.bool(False), + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + applyDeltaBetaCorrection = cms.bool(True), + storeRawSumPt = cms.bool(False), + storeRawPUsumPt = cms.bool(True), + verbosity = cms.int32(0) +) +hpsPFTauNeutralIsoPtSumWeight = hpsPFTauChargedIsoPtSum.clone( + ApplyDiscriminationByWeightedECALIsolation = cms.bool(True), + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + UseAllPFCandsForWeights = cms.bool(True), + verbosity = cms.int32(0) +) +hpsPFTauFootprintCorrection = hpsPFTauChargedIsoPtSum.clone( + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + storeRawSumPt = cms.bool(False), + storeRawFootprintCorrection = cms.bool(True), + verbosity = cms.int32(0) +) +hpsPFTauPhotonPtSumOutsideSignalCone = hpsPFTauChargedIsoPtSum.clone( + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + storeRawSumPt = cms.bool(False), + storeRawPhotonSumPt_outsideSignalCone = cms.bool(True), + verbosity = cms.int32(0) +) + +hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw = discriminationByIsolationMVA2raw.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + loadMVAfromDB = cms.bool(True), + mvaName = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1"), + mvaOpt = cms.string("oldDMwoLT"), + srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters'), + srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum'), + srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum'), + srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum'), + verbosity = cms.int32(0) +) +hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT = discriminationByIsolationMVA2VLoose.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() +hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff40") +hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone( + mvaName = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1"), + mvaOpt = cms.string("oldDMwLT"), + verbosity = cms.int32(0) +) +hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw:category'), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff40") +hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone( + mvaName = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1"), + mvaOpt = cms.string("newDMwoLT"), + verbosity = cms.int32(0) +) +hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw:category'), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff90"), + variable = cms.string("pt") + ) + ), + verbosity = cms.int32(0) +) +hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff80") +##hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT.verbosity = cms.int32(1) +hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() +hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff40") +hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone( + mvaName = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1"), + mvaOpt = cms.string("newDMwLT"), + verbosity = cms.int32(0) +) +hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw:category'), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff40") + +#Define new Run2 MVA isolations +from RecoTauTag.RecoTau.PFRecoTauDiscriminationByMVAIsolationRun2_cff import * +hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw = discriminationByIsolationMVArun2v1raw.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + loadMVAfromDB = cms.bool(True), + mvaName = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1"), + mvaOpt = cms.string("DBoldDMwLT"), + srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters'), + srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum'), + srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum'), + srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum'), + srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalCone'), + srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrection'), + verbosity = cms.int32(0) +) + +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT = discriminationByIsolationMVArun2v1VLoose.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw.clone( + mvaName = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1"), + mvaOpt = cms.string("DBnewDMwLT"), + verbosity = cms.int32(0) +) + +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw.clone( + mvaName = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1"), + mvaOpt = cms.string("PWoldDMwLT"), + srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeight'), + verbosity = cms.int32(0) +) + +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw.clone( + mvaName = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1"), + mvaOpt = cms.string("PWnewDMwLT"), + verbosity = cms.int32(0) +) + +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff40") + +hpsPFTauChargedIsoPtSumdR03 = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + ApplyDiscriminationByECALIsolation = cms.bool(False), + ApplyDiscriminationByTrackerIsolation = cms.bool(True), + applySumPtCut = cms.bool(False), + applyDeltaBetaCorrection = cms.bool(False), + storeRawSumPt = cms.bool(True), + storeRawPUsumPt = cms.bool(False), + customOuterCone = cms.double(0.3), + isoConeSizeForDeltaBeta = cms.double(0.8), + verbosity = cms.int32(0) +) +hpsPFTauNeutralIsoPtSumdR03 = hpsPFTauChargedIsoPtSumdR03.clone( + ApplyDiscriminationByECALIsolation = cms.bool(True), + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + verbosity = cms.int32(0) +) +hpsPFTauPUcorrPtSumdR03 = hpsPFTauChargedIsoPtSumdR03.clone( + ApplyDiscriminationByECALIsolation = cms.bool(False), + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + applyDeltaBetaCorrection = cms.bool(True), + storeRawSumPt = cms.bool(False), + storeRawPUsumPt = cms.bool(True), + verbosity = cms.int32(0) +) +hpsPFTauNeutralIsoPtSumWeightdR03 = hpsPFTauChargedIsoPtSumdR03.clone( + ApplyDiscriminationByWeightedECALIsolation = cms.bool(True), + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + UseAllPFCandsForWeights = cms.bool(True), + verbosity = cms.int32(0) +) +hpsPFTauFootprintCorrectiondR03 = hpsPFTauChargedIsoPtSumdR03.clone( + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + storeRawSumPt = cms.bool(False), + storeRawFootprintCorrection = cms.bool(True), + verbosity = cms.int32(0) +) +hpsPFTauPhotonPtSumOutsideSignalConedR03 = hpsPFTauChargedIsoPtSumdR03.clone( + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + storeRawSumPt = cms.bool(False), + storeRawPhotonSumPt_outsideSignalCone = cms.bool(True), + verbosity = cms.int32(0) +) + +hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw.clone( + mvaName = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1"), + mvaOpt = cms.string("DBoldDMwLT"), + srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSumdR03'), + srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumdR03'), + srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSumdR03'), + srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalConedR03'), + srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrectiondR03'), + verbosity = cms.int32(0) +) +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw.clone( + mvaName = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1"), + mvaOpt = cms.string("PWoldDMwLT"), + srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeightdR03'), + verbosity = cms.int32(0) +) +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff40") + +hpsPFTauMVAIsolation2Seq = cms.Sequence( + hpsPFTauChargedIsoPtSum + + hpsPFTauNeutralIsoPtSum + + hpsPFTauPUcorrPtSum + + hpsPFTauNeutralIsoPtSumWeight + + hpsPFTauFootprintCorrection + + hpsPFTauPhotonPtSumOutsideSignalCone + #+ hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw + #+ hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT + #+ hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT + #+ hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT + #+ hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT + #+ hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT + #+ hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT + #+ hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw + #+ hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT + #+ hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT + #+ hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT + #+ hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT + #+ hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT + #+ hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT + #+ hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw + #+ hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT + #+ hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT + #+ hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT + #+ hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT + #+ hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT + #+ hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT + #+ hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw + #+ hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT + #+ hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT + #+ hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT + #+ hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT + #+ hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT + #+ hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT + # new MVA isolations for Run2 + + hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT + + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT + + hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT + + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT + + hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT + + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT + + hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT + + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT + + hpsPFTauChargedIsoPtSumdR03 + + hpsPFTauNeutralIsoPtSumdR03 + + hpsPFTauPUcorrPtSumdR03 + + hpsPFTauNeutralIsoPtSumWeightdR03 + + hpsPFTauFootprintCorrectiondR03 + + hpsPFTauPhotonPtSumOutsideSignalConedR03 + + hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT + + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT + + hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT + + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT +) + +produceHPSPFTaus = cms.Sequence( + hpsSelectionDiscriminator + #*hpsTightIsolationCleaner + #*hpsMediumIsolationCleaner + #*hpsLooseIsolationCleaner + #*hpsVLooseIsolationCleaner + *hpsPFTauProducerSansRefs + *hpsPFTauProducer +) + +produceAndDiscriminateHPSPFTaus = cms.Sequence( + produceHPSPFTaus* + hpsPFTauDiscriminationByDecayModeFindingNewDMs* + hpsPFTauDiscriminationByDecayModeFindingOldDMs* + hpsPFTauDiscriminationByDecayModeFinding* # CV: kept for backwards compatibility + hpsPFTauDiscriminationByChargedIsolationSeq* + hpsPFTauDiscriminationByIsolationSeq* + #hpsPFTauDiscriminationByIsolationSeqRhoCorr* + #hpsPFTauDiscriminationByIsolationSeqCustomRhoCorr* + hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr* + + hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr* + hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr* + hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr* + + hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr* + hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits* + hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits* + + hpsPFTauDiscriminationByLooseElectronRejection* + hpsPFTauDiscriminationByMediumElectronRejection* + hpsPFTauDiscriminationByTightElectronRejection* + #hpsPFTauDiscriminationByMVA5rawElectronRejection* + #hpsPFTauDiscriminationByMVA5VLooseElectronRejection* + #hpsPFTauDiscriminationByMVA5LooseElectronRejection* + #hpsPFTauDiscriminationByMVA5MediumElectronRejection* + #hpsPFTauDiscriminationByMVA5TightElectronRejection* + #hpsPFTauDiscriminationByMVA5VTightElectronRejection* + hpsPFTauDiscriminationByMVA6rawElectronRejection* + hpsPFTauDiscriminationByMVA6VLooseElectronRejection* + hpsPFTauDiscriminationByMVA6LooseElectronRejection* + hpsPFTauDiscriminationByMVA6MediumElectronRejection* + hpsPFTauDiscriminationByMVA6TightElectronRejection* + hpsPFTauDiscriminationByMVA6VTightElectronRejection* + hpsPFTauDiscriminationByDeadECALElectronRejection* + hpsPFTauDiscriminationByLooseMuonRejection* + hpsPFTauDiscriminationByMediumMuonRejection* + hpsPFTauDiscriminationByTightMuonRejection* + hpsPFTauDiscriminationByLooseMuonRejection2* + hpsPFTauDiscriminationByMediumMuonRejection2* + hpsPFTauDiscriminationByTightMuonRejection2* + hpsPFTauDiscriminationByLooseMuonRejection3* + hpsPFTauDiscriminationByTightMuonRejection3* + hpsPFTauDiscriminationByMVArawMuonRejection* + hpsPFTauDiscriminationByMVALooseMuonRejection* + hpsPFTauDiscriminationByMVAMediumMuonRejection* + hpsPFTauDiscriminationByMVATightMuonRejection* + + hpsPFTauVertexAndImpactParametersSeq* + + hpsPFTauMVAIsolation2Seq +) diff --git a/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py b/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py index 9f4901d89c480..3190443c817cd 100644 --- a/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py +++ b/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py @@ -22,47 +22,29 @@ 'keep *_hpsPFTauDiscriminationByDecayModeFinding_*_*', 'keep *_hpsPFTauDiscriminationByDecayModeFindingNewDMs_*_*', 'keep *_hpsPFTauDiscriminationByDecayModeFindingOldDMs_*_*', - #'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw_*_*', - #'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw_*_*', - #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw_*_*', - #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw_*_*', 'keep *_hpsPFTauDiscriminationByLooseChargedIsolation_*_*', 'keep *_hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr_*_*', 'keep *_hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits_*_*', 'keep *_hpsPFTauDiscriminationByLooseElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByLooseIsolation_*_*', 'keep *_hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr_*_*', - #'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT_*_*', - #'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT_*_*', 'keep *_hpsPFTauDiscriminationByLooseMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByLooseMuonRejection2_*_*', 'keep *_hpsPFTauDiscriminationByLooseMuonRejection3_*_*', - #'keep *_hpsPFTauDiscriminationByMVA5LooseElectronRejection_*_*', - #'keep *_hpsPFTauDiscriminationByMVA5MediumElectronRejection_*_*', - #'keep *_hpsPFTauDiscriminationByMVA5TightElectronRejection_*_*', - #'keep *_hpsPFTauDiscriminationByMVA5VLooseElectronRejection_*_*', - #'keep *_hpsPFTauDiscriminationByMVA5VTightElectronRejection_*_*', - #'keep *_hpsPFTauDiscriminationByMVA5rawElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA6VLooseElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA6LooseElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA6MediumElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA6TightElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA6VTightElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA6rawElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA5LooseElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA5MediumElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA5TightElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA5VLooseElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA5VTightElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA5rawElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVALooseMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVAMediumMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVATightMuonRejection_*_*', @@ -73,16 +55,10 @@ 'keep *_hpsPFTauDiscriminationByMediumElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMediumIsolation_*_*', 'keep *_hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr_*_*', - #'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT_*_*', - #'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT_*_*', 'keep *_hpsPFTauDiscriminationByMediumMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByMediumMuonRejection2_*_*', 'keep *_hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr_*_*', @@ -95,16 +71,10 @@ 'keep *_hpsPFTauDiscriminationByTightElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByTightIsolation_*_*', 'keep *_hpsPFTauDiscriminationByTightIsolationDBSumPtCorr_*_*', - #'keep *_hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT_*_*', - #'keep *_hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT_*_*', 'keep *_hpsPFTauDiscriminationByTightMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByTightMuonRejection2_*_*', 'keep *_hpsPFTauDiscriminationByTightMuonRejection3_*_*', @@ -112,40 +82,23 @@ 'keep *_hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr_*_*', 'keep *_hpsPFTauDiscriminationByVLooseIsolation_*_*', 'keep *_hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr_*_*', - #'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT_*_*', - #'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT_*_*', - #'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT_*_*', - #'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw_*_*', - #'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw_*_*', - #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw_*_*', - #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByMVA5rawElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVArawMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits_*_*', 'keep *_hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone_*_*', @@ -155,15 +108,6 @@ 'keep *_hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits_*_*', 'keep *_hpsPFTauPUcorrPtSum_*_*', 'keep *_hpsPFTauChargedIsoPtSum_*_*', - 'keep *_hpsPFTauNeutralIsoPtSumWeight_*_*', - 'keep *_hpsPFTauFootprintCorrection_*_*', - 'keep *_hpsPFTauPhotonPtSumOutsideSignalCone_*_*', - 'keep *_hpsPFTauChargedIsoPtSumdR03_*_*', - 'keep *_hpsPFTauNeutralIsoPtSumdR03_*_*', - 'keep *_hpsPFTauPUcorrPtSumdR03_*_*', - 'keep *_hpsPFTauNeutralIsoPtSumWeightdR03_*_*', - 'keep *_hpsPFTauFootprintCorrectiondR03_*_*', - 'keep *_hpsPFTauPhotonPtSumOutsideSignalConedR03_*_*', #'keep *_hpsPFTau*PtSum_*_*', 'keep *_hpsPFTauMVA3IsolationChargedIsoPtSum_*_*', 'keep *_hpsPFTauMVA3IsolationNeutralIsoPtSum_*_*', @@ -183,47 +127,29 @@ 'keep *_hpsPFTauDiscriminationByDecayModeFinding_*_*', 'keep *_hpsPFTauDiscriminationByDecayModeFindingNewDMs_*_*', 'keep *_hpsPFTauDiscriminationByDecayModeFindingOldDMs_*_*', - #'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw_*_*', - #'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw_*_*', - #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw_*_*', - #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw_*_*', - 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw_*_*', 'keep *_hpsPFTauDiscriminationByLooseChargedIsolation_*_*', 'keep *_hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr_*_*', 'keep *_hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits_*_*', 'keep *_hpsPFTauDiscriminationByLooseElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByLooseIsolation_*_*', 'keep *_hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr_*_*', - #'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT_*_*', - #'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT_*_*', 'keep *_hpsPFTauDiscriminationByLooseMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByLooseMuonRejection2_*_*', 'keep *_hpsPFTauDiscriminationByLooseMuonRejection3_*_*', - #'keep *_hpsPFTauDiscriminationByMVA5LooseElectronRejection_*_*', - #'keep *_hpsPFTauDiscriminationByMVA5MediumElectronRejection_*_*', - #'keep *_hpsPFTauDiscriminationByMVA5TightElectronRejection_*_*', - #'keep *_hpsPFTauDiscriminationByMVA5VLooseElectronRejection_*_*', - #'keep *_hpsPFTauDiscriminationByMVA5VTightElectronRejection_*_*', - #'keep *_hpsPFTauDiscriminationByMVA5rawElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA6VLooseElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA6LooseElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA6MediumElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA6TightElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA6VTightElectronRejection_*_*', - 'keep *_hpsPFTauDiscriminationByMVA6rawElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA5LooseElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA5MediumElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA5TightElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA5VLooseElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA5VTightElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA5rawElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVALooseMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVAMediumMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVATightMuonRejection_*_*', @@ -234,16 +160,10 @@ 'keep *_hpsPFTauDiscriminationByMediumElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMediumIsolation_*_*', 'keep *_hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr_*_*', - #'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT_*_*', - #'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT_*_*', 'keep *_hpsPFTauDiscriminationByMediumMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByMediumMuonRejection2_*_*', 'keep *_hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr_*_*', @@ -256,16 +176,10 @@ 'keep *_hpsPFTauDiscriminationByTightElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByTightIsolation_*_*', 'keep *_hpsPFTauDiscriminationByTightIsolationDBSumPtCorr_*_*', - #'keep *_hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT_*_*', - #'keep *_hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT_*_*', 'keep *_hpsPFTauDiscriminationByTightMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByTightMuonRejection2_*_*', 'keep *_hpsPFTauDiscriminationByTightMuonRejection3_*_*', @@ -273,40 +187,23 @@ 'keep *_hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr_*_*', 'keep *_hpsPFTauDiscriminationByVLooseIsolation_*_*', 'keep *_hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr_*_*', - #'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT_*_*', - #'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT_*_*', - #'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT_*_*', - #'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT_*_*', - 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT_*_*', - #'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw_*_*', - #'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw_*_*', - #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw_*_*', - #'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByMVA5rawElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVArawMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits_*_*', 'keep *_hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone_*_*', @@ -316,15 +213,6 @@ 'keep *_hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits_*_*', 'keep *_hpsPFTauPUcorrPtSum_*_*', 'keep *_hpsPFTauChargedIsoPtSum_*_*', - 'keep *_hpsPFTauNeutralIsoPtSumWeight_*_*', - 'keep *_hpsPFTauFootprintCorrection_*_*', - 'keep *_hpsPFTauPhotonPtSumOutsideSignalCone_*_*', - 'keep *_hpsPFTauChargedIsoPtSumdR03_*_*', - 'keep *_hpsPFTauNeutralIsoPtSumdR03_*_*', - 'keep *_hpsPFTauPUcorrPtSumdR03_*_*', - 'keep *_hpsPFTauNeutralIsoPtSumWeightdR03_*_*', - 'keep *_hpsPFTauFootprintCorrectiondR03_*_*', - 'keep *_hpsPFTauPhotonPtSumOutsideSignalConedR03_*_*', #'keep *_hpsPFTau*PtSum_*_*', 'keep *_hpsPFTauMVA3IsolationChargedIsoPtSum_*_*', 'keep *_hpsPFTauMVA3IsolationNeutralIsoPtSum_*_*', diff --git a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py index f5254ee34e540..07074167ddf85 100644 --- a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py +++ b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py @@ -15,12 +15,12 @@ loadRecoTauTagMVAsFromPrepDB.connect = cms.string('frontier://(proxyurl=http://localhost:3128)(serverurl=http://localhost:8000/FrontierOnProd)(serverurl=http://localhost:8000/FrontierOnProd)(retrieve-ziplevel=0)(failovertoserver=no)/CMS_CONDITIONS') # register tau ID (= isolation) discriminator MVA -#tauIdDiscrMVA_trainings = { -# 'tauIdMVAoldDMwoLT' : "tauIdMVAoldDMwoLT", -# 'tauIdMVAoldDMwLT' : "tauIdMVAoldDMwLT", -# 'tauIdMVAnewDMwoLT' : "tauIdMVAnewDMwoLT", -# 'tauIdMVAnewDMwLT' : "tauIdMVAnewDMwLT" -#} +tauIdDiscrMVA_trainings = { + 'tauIdMVAoldDMwoLT' : "tauIdMVAoldDMwoLT", + 'tauIdMVAoldDMwLT' : "tauIdMVAoldDMwLT", + 'tauIdMVAnewDMwoLT' : "tauIdMVAnewDMwoLT", + 'tauIdMVAnewDMwLT' : "tauIdMVAnewDMwLT" +} tauIdDiscrMVA_trainings_run2 = { 'tauIdMVADBoldDMwLT' : "tauIdMVADBoldDMwLT", 'tauIdMVADBnewDMwLT' : "tauIdMVADBnewDMwLT", @@ -29,40 +29,40 @@ 'tauIdMVADBdR03oldDMwLT' : "tauIdMVADBdR03oldDMwLT", 'tauIdMVAPWdR03oldDMwLT' : "tauIdMVAPWdR03oldDMwLT" } -#tauIdDiscrMVA_WPs = { -# 'tauIdMVAoldDMwoLT' : { -# 'Eff90' : "oldDMwoLTEff90", -# 'Eff80' : "oldDMwoLTEff80", -# 'Eff70' : "oldDMwoLTEff70", -# 'Eff60' : "oldDMwoLTEff60", -# 'Eff50' : "oldDMwoLTEff50", -# 'Eff40' : "oldDMwoLTEff40" -# }, -# 'tauIdMVAoldDMwLT' : { -# 'Eff90' : "oldDMwLTEff90", -# 'Eff80' : "oldDMwLTEff80", -# 'Eff70' : "oldDMwLTEff70", -# 'Eff60' : "oldDMwLTEff60", -# 'Eff50' : "oldDMwLTEff50", -# 'Eff40' : "oldDMwLTEff40" -# }, -# 'tauIdMVAnewDMwoLT' : { -# 'Eff90' : "newDMwoLTEff90", -# 'Eff80' : "newDMwoLTEff80", -# 'Eff70' : "newDMwoLTEff70", -# 'Eff60' : "newDMwoLTEff60", -# 'Eff50' : "newDMwoLTEff50", -# 'Eff40' : "newDMwoLTEff40" -# }, -# 'tauIdMVAnewDMwLT' : { -# 'Eff90' : "newDMwLTEff90", -# 'Eff80' : "newDMwLTEff80", -# 'Eff70' : "newDMwLTEff70", -# 'Eff60' : "newDMwLTEff60", -# 'Eff50' : "newDMwLTEff50", -# 'Eff40' : "newDMwLTEff40" -# } -#} +tauIdDiscrMVA_WPs = { + 'tauIdMVAoldDMwoLT' : { + 'Eff90' : "oldDMwoLTEff90", + 'Eff80' : "oldDMwoLTEff80", + 'Eff70' : "oldDMwoLTEff70", + 'Eff60' : "oldDMwoLTEff60", + 'Eff50' : "oldDMwoLTEff50", + 'Eff40' : "oldDMwoLTEff40" + }, + 'tauIdMVAoldDMwLT' : { + 'Eff90' : "oldDMwLTEff90", + 'Eff80' : "oldDMwLTEff80", + 'Eff70' : "oldDMwLTEff70", + 'Eff60' : "oldDMwLTEff60", + 'Eff50' : "oldDMwLTEff50", + 'Eff40' : "oldDMwLTEff40" + }, + 'tauIdMVAnewDMwoLT' : { + 'Eff90' : "newDMwoLTEff90", + 'Eff80' : "newDMwoLTEff80", + 'Eff70' : "newDMwoLTEff70", + 'Eff60' : "newDMwoLTEff60", + 'Eff50' : "newDMwoLTEff50", + 'Eff40' : "newDMwoLTEff40" + }, + 'tauIdMVAnewDMwLT' : { + 'Eff90' : "newDMwLTEff90", + 'Eff80' : "newDMwLTEff80", + 'Eff70' : "newDMwLTEff70", + 'Eff60' : "newDMwLTEff60", + 'Eff50' : "newDMwLTEff50", + 'Eff40' : "newDMwLTEff40" + } +} tauIdDiscrMVA_WPs_run2 = { 'tauIdMVADBoldDMwLT' : { 'Eff90' : "DBoldDMwLTEff90", @@ -113,12 +113,12 @@ 'Eff40' : "PWdR03oldDMwLTEff40" } } -#tauIdDiscrMVA_mvaOutput_normalizations = { -# 'tauIdMVAoldDMwoLT' : "mvaOutput_normalization_oldDMwoLT", -# 'tauIdMVAoldDMwLT' : "mvaOutput_normalization_oldDMwLT", -# 'tauIdMVAnewDMwoLT' : "mvaOutput_normalization_newDMwoLT", -# 'tauIdMVAnewDMwLT' : "mvaOutput_normalization_newDMwLT" -#} +tauIdDiscrMVA_mvaOutput_normalizations = { + 'tauIdMVAoldDMwoLT' : "mvaOutput_normalization_oldDMwoLT", + 'tauIdMVAoldDMwLT' : "mvaOutput_normalization_oldDMwLT", + 'tauIdMVAnewDMwoLT' : "mvaOutput_normalization_newDMwoLT", + 'tauIdMVAnewDMwLT' : "mvaOutput_normalization_newDMwLT" +} tauIdDiscrMVA_mvaOutput_normalizations_run2 = { 'tauIdMVADBoldDMwLT' : "mvaOutput_normalization_DBoldDMwLT", 'tauIdMVADBnewDMwLT' : "mvaOutput_normalization_DBnewDMwLT", @@ -128,29 +128,29 @@ 'tauIdMVAPWdR03oldDMwLT' : "mvaOutput_normalization_PWdR03oldDMwLT" } tauIdDiscrMVA_version = "v1" -#for training, gbrForestName in tauIdDiscrMVA_trainings.items(): -# loadRecoTauTagMVAsFromPrepDB.toGet.append( -# cms.PSet( -# record = cms.string('GBRWrapperRcd'), -# tag = cms.string("RecoTauTag_%s%s" % (gbrForestName, tauIdDiscrMVA_version)), -# label = cms.untracked.string("RecoTauTag_%s%s" % (gbrForestName, tauIdDiscrMVA_version)) -# ) -# ) -# for WP in tauIdDiscrMVA_WPs[training].keys(): -# loadRecoTauTagMVAsFromPrepDB.toGet.append( -# cms.PSet( -# record = cms.string('PhysicsTGraphPayloadRcd'), -# tag = cms.string("RecoTauTag_%s%s_WP%s" % (gbrForestName, tauIdDiscrMVA_version, WP)), -# label = cms.untracked.string("RecoTauTag_%s%s_WP%s" % (gbrForestName, tauIdDiscrMVA_version, WP)) -# ) -# ) -# loadRecoTauTagMVAsFromPrepDB.toGet.append( -# cms.PSet( -# record = cms.string('PhysicsTFormulaPayloadRcd'), -# tag = cms.string("RecoTauTag_%s%s_mvaOutput_normalization" % (gbrForestName, tauIdDiscrMVA_version)), -# label = cms.untracked.string("RecoTauTag_%s%s_mvaOutput_normalization" % (gbrForestName, tauIdDiscrMVA_version)) -# ) -# ) +for training, gbrForestName in tauIdDiscrMVA_trainings.items(): + loadRecoTauTagMVAsFromPrepDB.toGet.append( + cms.PSet( + record = cms.string('GBRWrapperRcd'), + tag = cms.string("RecoTauTag_%s%s" % (gbrForestName, tauIdDiscrMVA_version)), + label = cms.untracked.string("RecoTauTag_%s%s" % (gbrForestName, tauIdDiscrMVA_version)) + ) + ) + for WP in tauIdDiscrMVA_WPs[training].keys(): + loadRecoTauTagMVAsFromPrepDB.toGet.append( + cms.PSet( + record = cms.string('PhysicsTGraphPayloadRcd'), + tag = cms.string("RecoTauTag_%s%s_WP%s" % (gbrForestName, tauIdDiscrMVA_version, WP)), + label = cms.untracked.string("RecoTauTag_%s%s_WP%s" % (gbrForestName, tauIdDiscrMVA_version, WP)) + ) + ) + loadRecoTauTagMVAsFromPrepDB.toGet.append( + cms.PSet( + record = cms.string('PhysicsTFormulaPayloadRcd'), + tag = cms.string("RecoTauTag_%s%s_mvaOutput_normalization" % (gbrForestName, tauIdDiscrMVA_version)), + label = cms.untracked.string("RecoTauTag_%s%s_mvaOutput_normalization" % (gbrForestName, tauIdDiscrMVA_version)) + ) + ) for training, gbrForestName in tauIdDiscrMVA_trainings_run2.items(): loadRecoTauTagMVAsFromPrepDB.toGet.append( cms.PSet( @@ -176,42 +176,42 @@ ) # register anti-electron discriminator MVA -#antiElectronDiscrMVA5_categories = { - #'0' : "gbr_NoEleMatch_woGwoGSF_BL", - #'1' : "gbr_NoEleMatch_woGwGSF_BL", - #'2' : "gbr_NoEleMatch_wGwoGSF_BL", - #'3' : "gbr_NoEleMatch_wGwGSF_BL", - #'4' : "gbr_woGwoGSF_BL", - #'5' : "gbr_woGwGSF_BL", - #'6' : "gbr_wGwoGSF_BL", - #'7' : "gbr_wGwGSF_BL", - #'8' : "gbr_NoEleMatch_woGwoGSF_EC", - #'9' : "gbr_NoEleMatch_woGwGSF_EC", - #'10' : "gbr_NoEleMatch_wGwoGSF_EC", - #'11' : "gbr_NoEleMatch_wGwGSF_EC", - #'12' : "gbr_woGwoGSF_EC", - #'13' : "gbr_woGwGSF_EC", - #'14' : "gbr_wGwoGSF_EC", - #'15' : "gbr_wGwGSF_EC" -#} -#antiElectronDiscrMVA5_WPs = [ "eff99", "eff96", "eff91", "eff85", "eff79" ] -#antiElectronDiscrMVA5_version = "v1" -#for category, gbrForestName in antiElectronDiscrMVA5_categories.items(): - #loadRecoTauTagMVAsFromPrepDB.toGet.append( - #cms.PSet( - #record = cms.string('GBRWrapperRcd'), - #tag = cms.string("RecoTauTag_antiElectronMVA5%s_%s" % (antiElectronDiscrMVA5_version, gbrForestName)), - #label = cms.untracked.string("RecoTauTag_antiElectronMVA5%s_%s" % (antiElectronDiscrMVA5_version, gbrForestName)) - #) - #) - #for WP in antiElectronDiscrMVA5_WPs: - #loadRecoTauTagMVAsFromPrepDB.toGet.append( - #cms.PSet( - #record = cms.string('PhysicsTGraphPayloadRcd'), - #tag = cms.string("RecoTauTag_antiElectronMVA5%s_%s_WP%s" % (antiElectronDiscrMVA5_version, gbrForestName, WP)), - #label = cms.untracked.string("RecoTauTag_antiElectronMVA5%s_%s_WP%s" % (antiElectronDiscrMVA5_version, gbrForestName, WP)) - #) - #) +antiElectronDiscrMVA5_categories = { + '0' : "gbr_NoEleMatch_woGwoGSF_BL", + '1' : "gbr_NoEleMatch_woGwGSF_BL", + '2' : "gbr_NoEleMatch_wGwoGSF_BL", + '3' : "gbr_NoEleMatch_wGwGSF_BL", + '4' : "gbr_woGwoGSF_BL", + '5' : "gbr_woGwGSF_BL", + '6' : "gbr_wGwoGSF_BL", + '7' : "gbr_wGwGSF_BL", + '8' : "gbr_NoEleMatch_woGwoGSF_EC", + '9' : "gbr_NoEleMatch_woGwGSF_EC", + '10' : "gbr_NoEleMatch_wGwoGSF_EC", + '11' : "gbr_NoEleMatch_wGwGSF_EC", + '12' : "gbr_woGwoGSF_EC", + '13' : "gbr_woGwGSF_EC", + '14' : "gbr_wGwoGSF_EC", + '15' : "gbr_wGwGSF_EC" +} +antiElectronDiscrMVA5_WPs = [ "eff99", "eff96", "eff91", "eff85", "eff79" ] +antiElectronDiscrMVA5_version = "v1" +for category, gbrForestName in antiElectronDiscrMVA5_categories.items(): + loadRecoTauTagMVAsFromPrepDB.toGet.append( + cms.PSet( + record = cms.string('GBRWrapperRcd'), + tag = cms.string("RecoTauTag_antiElectronMVA5%s_%s" % (antiElectronDiscrMVA5_version, gbrForestName)), + label = cms.untracked.string("RecoTauTag_antiElectronMVA5%s_%s" % (antiElectronDiscrMVA5_version, gbrForestName)) + ) + ) + for WP in antiElectronDiscrMVA5_WPs: + loadRecoTauTagMVAsFromPrepDB.toGet.append( + cms.PSet( + record = cms.string('PhysicsTGraphPayloadRcd'), + tag = cms.string("RecoTauTag_antiElectronMVA5%s_%s_WP%s" % (antiElectronDiscrMVA5_version, gbrForestName, WP)), + label = cms.untracked.string("RecoTauTag_antiElectronMVA5%s_%s_WP%s" % (antiElectronDiscrMVA5_version, gbrForestName, WP)) + ) + ) antiElectronDiscrMVA6_categories = { '0' : "gbr_NoEleMatch_woGwoGSF_BL", diff --git a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolation2.cc b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolation2.cc index fac7c0b95a1a2..50957f0a827fc 100644 --- a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolation2.cc +++ b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolation2.cc @@ -23,7 +23,6 @@ #include "DataFormats/TauReco/interface/PFTauDiscriminator.h" #include "DataFormats/TauReco/interface/PFTauTransverseImpactParameterAssociation.h" #include "DataFormats/Math/interface/deltaR.h" -#include "RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h" #include "CondFormats/EgammaObjects/interface/GBRForest.h" #include "CondFormats/DataRecord/interface/GBRWrapperRcd.h" @@ -85,17 +84,11 @@ class PFRecoTauDiscriminationByIsolationMVA2 : public PFTauDiscriminationProduce else if ( mvaOpt_string == "oldDMwLT" ) mvaOpt_ = kOldDMwLT; else if ( mvaOpt_string == "newDMwoLT" ) mvaOpt_ = kNewDMwoLT; else if ( mvaOpt_string == "newDMwLT" ) mvaOpt_ = kNewDMwLT; - else if ( mvaOpt_string == "DBoldDMwLT" ) mvaOpt_ = kDBoldDMwLT; - else if ( mvaOpt_string == "DBnewDMwLT" ) mvaOpt_ = kDBnewDMwLT; - else if ( mvaOpt_string == "PWoldDMwLT" ) mvaOpt_ = kPWoldDMwLT; - else if ( mvaOpt_string == "PWnewDMwLT" ) mvaOpt_ = kPWnewDMwLT; else throw cms::Exception("PFRecoTauDiscriminationByIsolationMVA2") << " Invalid Configuration Parameter 'mvaOpt' = " << mvaOpt_string << " !!\n"; if ( mvaOpt_ == kOldDMwoLT || mvaOpt_ == kNewDMwoLT ) mvaInput_ = new float[6]; else if ( mvaOpt_ == kOldDMwLT || mvaOpt_ == kNewDMwLT ) mvaInput_ = new float[12]; - else if ( mvaOpt_ == kDBoldDMwLT || mvaOpt_ == kDBnewDMwLT || - mvaOpt_ == kPWoldDMwLT || mvaOpt_ == kPWnewDMwLT) mvaInput_ = new float[23]; else assert(0); TauTransverseImpactParameters_token = consumes(cfg.getParameter("srcTauTransverseImpactParameters")); @@ -103,8 +96,6 @@ class PFRecoTauDiscriminationByIsolationMVA2 : public PFTauDiscriminationProduce ChargedIsoPtSum_token = consumes(cfg.getParameter("srcChargedIsoPtSum")); NeutralIsoPtSum_token = consumes(cfg.getParameter("srcNeutralIsoPtSum")); PUcorrPtSum_token = consumes(cfg.getParameter("srcPUcorrPtSum")); - PhotonPtSumOutsideSignalCone_token = consumes(cfg.getParameter("srcPhotonPtSumOutsideSignalCone")); - FootprintCorrection_token = consumes(cfg.getParameter("srcFootprintCorrection")); verbosity_ = ( cfg.exists("verbosity") ) ? cfg.getParameter("verbosity") : 0; @@ -136,10 +127,10 @@ class PFRecoTauDiscriminationByIsolationMVA2 : public PFTauDiscriminationProduce bool loadMVAfromDB_; edm::FileInPath inputFileName_; const GBRForest* mvaReader_; - enum { kOldDMwoLT, kOldDMwLT, kNewDMwoLT, kNewDMwLT, kDBoldDMwLT, kDBnewDMwLT, kPWoldDMwLT, kPWnewDMwLT }; + enum { kOldDMwoLT, kOldDMwLT, kNewDMwoLT, kNewDMwLT }; int mvaOpt_; float* mvaInput_; - + typedef edm::AssociationVector > PFTauTIPAssociationByRef; edm::EDGetTokenT TauTransverseImpactParameters_token; edm::Handle tauLifetimeInfos; @@ -150,10 +141,6 @@ class PFRecoTauDiscriminationByIsolationMVA2 : public PFTauDiscriminationProduce edm::Handle neutralIsoPtSums_; edm::EDGetTokenT PUcorrPtSum_token; edm::Handle puCorrPtSums_; - edm::EDGetTokenT PhotonPtSumOutsideSignalCone_token; - edm::Handle photonPtSumOutsideSignalCone_; - edm::EDGetTokenT FootprintCorrection_token; - edm::Handle footprintCorrection_; edm::Handle taus_; std::auto_ptr category_output_; @@ -178,9 +165,7 @@ void PFRecoTauDiscriminationByIsolationMVA2::beginEvent(const edm::Event& evt, c evt.getByToken(ChargedIsoPtSum_token, chargedIsoPtSums_); evt.getByToken(NeutralIsoPtSum_token, neutralIsoPtSums_); evt.getByToken(PUcorrPtSum_token, puCorrPtSums_); - evt.getByToken(PhotonPtSumOutsideSignalCone_token, photonPtSumOutsideSignalCone_); - evt.getByToken(FootprintCorrection_token, footprintCorrection_); - + evt.getByToken(Tau_token, taus_); category_output_.reset(new PFTauDiscriminator(TauRefProd(taus_))); } @@ -196,14 +181,12 @@ double PFRecoTauDiscriminationByIsolationMVA2::discriminate(const PFTauRef& tau) int tauDecayMode = tau->decayMode(); - if ( ((mvaOpt_ == kOldDMwoLT || mvaOpt_ == kOldDMwLT || mvaOpt_ == kDBoldDMwLT || mvaOpt_ == kPWoldDMwLT) && (tauDecayMode == 0 || tauDecayMode == 1 || tauDecayMode == 2 || tauDecayMode == 10)) || - ((mvaOpt_ == kNewDMwoLT || mvaOpt_ == kNewDMwLT || mvaOpt_ == kDBnewDMwLT || mvaOpt_ == kPWnewDMwLT) && (tauDecayMode == 0 || tauDecayMode == 1 || tauDecayMode == 2 || tauDecayMode == 5 || tauDecayMode == 6 || tauDecayMode == 10)) ) { + if ( ((mvaOpt_ == kOldDMwoLT || mvaOpt_ == kOldDMwLT) && (tauDecayMode == 0 || tauDecayMode == 1 || tauDecayMode == 2 || tauDecayMode == 10)) || + ((mvaOpt_ == kNewDMwoLT || mvaOpt_ == kNewDMwLT) && (tauDecayMode == 0 || tauDecayMode == 1 || tauDecayMode == 2 || tauDecayMode == 5 || tauDecayMode == 6 || tauDecayMode == 10)) ) { double chargedIsoPtSum = (*chargedIsoPtSums_)[tau]; double neutralIsoPtSum = (*neutralIsoPtSums_)[tau]; double puCorrPtSum = (*puCorrPtSums_)[tau]; - double photonPtSumOutsideSignalCone = (*photonPtSumOutsideSignalCone_)[tau]; - double footprintCorrection = (*footprintCorrection_)[tau]; const reco::PFTauTransverseImpactParameter& tauLifetimeInfo = *(*tauLifetimeInfos)[tau]; @@ -211,15 +194,7 @@ double PFRecoTauDiscriminationByIsolationMVA2::discriminate(const PFTauRef& tau) double decayDistY = tauLifetimeInfo.flightLength().y(); double decayDistZ = tauLifetimeInfo.flightLength().z(); double decayDistMag = TMath::Sqrt(decayDistX*decayDistX + decayDistY*decayDistY + decayDistZ*decayDistZ); - - double nPhoton = double(tau_n_photons_total(*tau)); - double ptWeightedDetaStrip = tau_pt_weighted_deta_strip(*tau, tauDecayMode); - double ptWeightedDphiStrip = tau_pt_weighted_dphi_strip(*tau, tauDecayMode); - double ptWeightedDrSignal = tau_pt_weighted_dr_signal(*tau, tauDecayMode); - double ptWeightedDrIsolation = tau_pt_weighted_dr_iso(*tau, tauDecayMode); - double leadingTrackChi2 = tau_leadTrackChi2(*tau); - double eRatio = tau_Eratio(*tau); - + if ( mvaOpt_ == kOldDMwoLT || mvaOpt_ == kNewDMwoLT ) { mvaInput_[0] = TMath::Log(TMath::Max(1., Double_t(tau->pt()))); mvaInput_[1] = TMath::Abs(tau->eta()); @@ -240,56 +215,8 @@ double PFRecoTauDiscriminationByIsolationMVA2::discriminate(const PFTauRef& tau) mvaInput_[9] = ( tauLifetimeInfo.hasSecondaryVertex() ) ? 1. : 0.; mvaInput_[10] = TMath::Sqrt(decayDistMag); mvaInput_[11] = TMath::Min(10., tauLifetimeInfo.flightLengthSig()); - } else if ( mvaOpt_ == kDBoldDMwLT || mvaOpt_ == kDBnewDMwLT ) { - mvaInput_[0] = TMath::Log(TMath::Max(1., Double_t(tau->pt()))); - mvaInput_[1] = TMath::Abs(tau->eta()); - mvaInput_[2] = TMath::Log(TMath::Max(1.e-2, chargedIsoPtSum)); - mvaInput_[3] = TMath::Log(TMath::Max(1.e-2, neutralIsoPtSum)); - mvaInput_[4] = TMath::Log(TMath::Max(1.e-2, puCorrPtSum)); - mvaInput_[5] = TMath::Log(TMath::Max(1.e-2, photonPtSumOutsideSignalCone)); - mvaInput_[6] = tauDecayMode; - mvaInput_[7] = TMath::Min(30., nPhoton); - mvaInput_[8] = TMath::Min(0.5, ptWeightedDetaStrip); - mvaInput_[9] = TMath::Min(0.5, ptWeightedDphiStrip); - mvaInput_[10] = TMath::Min(0.5, ptWeightedDrSignal); - mvaInput_[11] = TMath::Min(0.5, ptWeightedDrIsolation); - mvaInput_[12] = TMath::Min(100., leadingTrackChi2); - mvaInput_[13] = TMath::Min(1., eRatio); - mvaInput_[14] = TMath::Sign(+1., tauLifetimeInfo.dxy()); - mvaInput_[15] = TMath::Sqrt(TMath::Abs(TMath::Min(1., TMath::Abs(tauLifetimeInfo.dxy())))); - mvaInput_[16] = TMath::Min(10., TMath::Abs(tauLifetimeInfo.dxy_Sig())); - mvaInput_[17] = TMath::Sign(+1., tauLifetimeInfo.ip3d()); - mvaInput_[18] = TMath::Sqrt(TMath::Abs(TMath::Min(1., TMath::Abs(tauLifetimeInfo.ip3d())))); - mvaInput_[19] = TMath::Min(10., TMath::Abs(tauLifetimeInfo.ip3d_Sig())); - mvaInput_[20] = ( tauLifetimeInfo.hasSecondaryVertex() ) ? 1. : 0.; - mvaInput_[21] = TMath::Sqrt(decayDistMag); - mvaInput_[22] = TMath::Min(10., tauLifetimeInfo.flightLengthSig()); - } else if ( mvaOpt_ == kPWoldDMwLT || mvaOpt_ == kPWnewDMwLT ) { - mvaInput_[0] = TMath::Log(TMath::Max(1., Double_t(tau->pt()))); - mvaInput_[1] = TMath::Abs(tau->eta()); - mvaInput_[2] = TMath::Log(TMath::Max(1.e-2, chargedIsoPtSum)); - mvaInput_[3] = TMath::Log(TMath::Max(1.e-2, neutralIsoPtSum)); - mvaInput_[4] = TMath::Log(TMath::Max(1.e-2, footprintCorrection)); - mvaInput_[5] = TMath::Log(TMath::Max(1.e-2, photonPtSumOutsideSignalCone)); - mvaInput_[6] = tauDecayMode; - mvaInput_[7] = TMath::Min(30., nPhoton); - mvaInput_[8] = TMath::Min(0.5, ptWeightedDetaStrip); - mvaInput_[9] = TMath::Min(0.5, ptWeightedDphiStrip); - mvaInput_[10] = TMath::Min(0.5, ptWeightedDrSignal); - mvaInput_[11] = TMath::Min(0.5, ptWeightedDrIsolation); - mvaInput_[12] = TMath::Min(100., leadingTrackChi2); - mvaInput_[13] = TMath::Min(1., eRatio); - mvaInput_[14] = TMath::Sign(+1., tauLifetimeInfo.dxy()); - mvaInput_[15] = TMath::Sqrt(TMath::Abs(TMath::Min(1., TMath::Abs(tauLifetimeInfo.dxy())))); - mvaInput_[16] = TMath::Min(10., TMath::Abs(tauLifetimeInfo.dxy_Sig())); - mvaInput_[17] = TMath::Sign(+1., tauLifetimeInfo.ip3d()); - mvaInput_[18] = TMath::Sqrt(TMath::Abs(TMath::Min(1., TMath::Abs(tauLifetimeInfo.ip3d())))); - mvaInput_[19] = TMath::Min(10., TMath::Abs(tauLifetimeInfo.ip3d_Sig())); - mvaInput_[20] = ( tauLifetimeInfo.hasSecondaryVertex() ) ? 1. : 0.; - mvaInput_[21] = TMath::Sqrt(decayDistMag); - mvaInput_[22] = TMath::Min(10., tauLifetimeInfo.flightLengthSig()); } - + double mvaValue = mvaReader_->GetClassifier(mvaInput_); if ( verbosity_ ) { edm::LogPrint("PFTauDiscByMVAIsol2") << ":"; diff --git a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolationRun2.cc b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolationRun2.cc new file mode 100644 index 0000000000000..868e7db6d1fca --- /dev/null +++ b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolationRun2.cc @@ -0,0 +1,316 @@ + +/** \class PFRecoTauDiscriminationByMVAIsolation2 + * + * MVA based discriminator against jet -> tau fakes + * + * \author Christian Veelken, LLR + * + */ + +#include "RecoTauTag/RecoTau/interface/TauDiscriminationProducerBase.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/Utilities/interface/InputTag.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/FileInPath.h" + +#include "FWCore/Utilities/interface/Exception.h" + +#include "DataFormats/Candidate/interface/Candidate.h" +#include "DataFormats/TauReco/interface/PFTau.h" +#include "DataFormats/TauReco/interface/PFTauFwd.h" +#include "DataFormats/TauReco/interface/PFTauDiscriminator.h" +#include "DataFormats/TauReco/interface/PFTauTransverseImpactParameterAssociation.h" +#include "DataFormats/Math/interface/deltaR.h" +#include "RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h" + +#include "CondFormats/EgammaObjects/interface/GBRForest.h" +#include "CondFormats/DataRecord/interface/GBRWrapperRcd.h" +#include "FWCore/Framework/interface/ESHandle.h" + +#include +#include + +#include + +using namespace reco; + +namespace +{ + const GBRForest* loadMVAfromFile(const edm::FileInPath& inputFileName, const std::string& mvaName, std::vector& inputFilesToDelete) + { + if ( inputFileName.location() == edm::FileInPath::Unknown ) throw cms::Exception("PFRecoTauDiscriminationByIsolationMVA2::loadMVA") + << " Failed to find File = " << inputFileName << " !!\n"; + TFile* inputFile = new TFile(inputFileName.fullPath().data()); + + //const GBRForest* mva = dynamic_cast(inputFile->Get(mvaName.data())); // CV: dynamic_cast fails for some reason ?! + const GBRForest* mva = (GBRForest*)inputFile->Get(mvaName.data()); + if ( !mva ) + throw cms::Exception("PFRecoTauDiscriminationByIsolationMVA2::loadMVA") + << " Failed to load MVA = " << mvaName.data() << " from file = " << inputFileName.fullPath().data() << " !!\n"; + + inputFilesToDelete.push_back(inputFile); + + return mva; + } + + const GBRForest* loadMVAfromDB(const edm::EventSetup& es, const std::string& mvaName) + { + edm::ESHandle mva; + es.get().get(mvaName, mva); + return mva.product(); + } +} + +class PFRecoTauDiscriminationByMVAIsolationRun2 : public PFTauDiscriminationProducerBase +{ + public: + explicit PFRecoTauDiscriminationByMVAIsolationRun2(const edm::ParameterSet& cfg) + : PFTauDiscriminationProducerBase(cfg), + moduleLabel_(cfg.getParameter("@module_label")), + mvaReader_(0), + mvaInput_(0), + category_output_(0) + { + mvaName_ = cfg.getParameter("mvaName"); + loadMVAfromDB_ = cfg.exists("loadMVAfromDB") ? cfg.getParameter("loadMVAfromDB") : false; + if ( !loadMVAfromDB_ ) { + if(cfg.exists("inputFileName")){ + inputFileName_ = cfg.getParameter("inputFileName"); + }else throw cms::Exception("MVA input not defined") << "Requested to load tau MVA input from ROOT file but no file provided in cfg file"; + } + std::string mvaOpt_string = cfg.getParameter("mvaOpt"); + if ( mvaOpt_string == "oldDMwoLT" ) mvaOpt_ = kOldDMwoLT; + else if ( mvaOpt_string == "oldDMwLT" ) mvaOpt_ = kOldDMwLT; + else if ( mvaOpt_string == "newDMwoLT" ) mvaOpt_ = kNewDMwoLT; + else if ( mvaOpt_string == "newDMwLT" ) mvaOpt_ = kNewDMwLT; + else if ( mvaOpt_string == "DBoldDMwLT" ) mvaOpt_ = kDBoldDMwLT; + else if ( mvaOpt_string == "DBnewDMwLT" ) mvaOpt_ = kDBnewDMwLT; + else if ( mvaOpt_string == "PWoldDMwLT" ) mvaOpt_ = kPWoldDMwLT; + else if ( mvaOpt_string == "PWnewDMwLT" ) mvaOpt_ = kPWnewDMwLT; + else throw cms::Exception("PFRecoTauDiscriminationByMVAIsolationRun2") + << " Invalid Configuration Parameter 'mvaOpt' = " << mvaOpt_string << " !!\n"; + + if ( mvaOpt_ == kOldDMwoLT || mvaOpt_ == kNewDMwoLT ) mvaInput_ = new float[6]; + else if ( mvaOpt_ == kOldDMwLT || mvaOpt_ == kNewDMwLT ) mvaInput_ = new float[12]; + else if ( mvaOpt_ == kDBoldDMwLT || mvaOpt_ == kDBnewDMwLT || + mvaOpt_ == kPWoldDMwLT || mvaOpt_ == kPWnewDMwLT) mvaInput_ = new float[23]; + else assert(0); + + TauTransverseImpactParameters_token = consumes(cfg.getParameter("srcTauTransverseImpactParameters")); + + ChargedIsoPtSum_token = consumes(cfg.getParameter("srcChargedIsoPtSum")); + NeutralIsoPtSum_token = consumes(cfg.getParameter("srcNeutralIsoPtSum")); + PUcorrPtSum_token = consumes(cfg.getParameter("srcPUcorrPtSum")); + PhotonPtSumOutsideSignalCone_token = consumes(cfg.getParameter("srcPhotonPtSumOutsideSignalCone")); + FootprintCorrection_token = consumes(cfg.getParameter("srcFootprintCorrection")); + + verbosity_ = ( cfg.exists("verbosity") ) ? + cfg.getParameter("verbosity") : 0; + + produces("category"); + } + + void beginEvent(const edm::Event&, const edm::EventSetup&); + + double discriminate(const PFTauRef&) const; + + void endEvent(edm::Event&); + + ~PFRecoTauDiscriminationByMVAIsolationRun2() + { + if(!loadMVAfromDB_) delete mvaReader_; + delete[] mvaInput_; + for ( std::vector::iterator it = inputFilesToDelete_.begin(); + it != inputFilesToDelete_.end(); ++it ) { + delete (*it); + } + } + + private: + + std::string moduleLabel_; + + std::string mvaName_; + bool loadMVAfromDB_; + edm::FileInPath inputFileName_; + const GBRForest* mvaReader_; + enum { kOldDMwoLT, kOldDMwLT, kNewDMwoLT, kNewDMwLT, kDBoldDMwLT, kDBnewDMwLT, kPWoldDMwLT, kPWnewDMwLT }; + int mvaOpt_; + float* mvaInput_; + + typedef edm::AssociationVector > PFTauTIPAssociationByRef; + edm::EDGetTokenT TauTransverseImpactParameters_token; + edm::Handle tauLifetimeInfos; + + edm::EDGetTokenT ChargedIsoPtSum_token; + edm::Handle chargedIsoPtSums_; + edm::EDGetTokenT NeutralIsoPtSum_token; + edm::Handle neutralIsoPtSums_; + edm::EDGetTokenT PUcorrPtSum_token; + edm::Handle puCorrPtSums_; + edm::EDGetTokenT PhotonPtSumOutsideSignalCone_token; + edm::Handle photonPtSumOutsideSignalCone_; + edm::EDGetTokenT FootprintCorrection_token; + edm::Handle footprintCorrection_; + + edm::Handle taus_; + std::auto_ptr category_output_; + + std::vector inputFilesToDelete_; + + int verbosity_; +}; + +void PFRecoTauDiscriminationByMVAIsolationRun2::beginEvent(const edm::Event& evt, const edm::EventSetup& es) +{ + if ( !mvaReader_ ) { + if ( loadMVAfromDB_ ) { + mvaReader_ = loadMVAfromDB(es, mvaName_); + } else { + mvaReader_ = loadMVAfromFile(inputFileName_, mvaName_, inputFilesToDelete_); + } + } + + evt.getByToken(TauTransverseImpactParameters_token, tauLifetimeInfos); + + evt.getByToken(ChargedIsoPtSum_token, chargedIsoPtSums_); + evt.getByToken(NeutralIsoPtSum_token, neutralIsoPtSums_); + evt.getByToken(PUcorrPtSum_token, puCorrPtSums_); + evt.getByToken(PhotonPtSumOutsideSignalCone_token, photonPtSumOutsideSignalCone_); + evt.getByToken(FootprintCorrection_token, footprintCorrection_); + + evt.getByToken(Tau_token, taus_); + category_output_.reset(new PFTauDiscriminator(TauRefProd(taus_))); +} + +double PFRecoTauDiscriminationByMVAIsolationRun2::discriminate(const PFTauRef& tau) const +{ + // CV: define dummy category index in order to use RecoTauDiscriminantCutMultiplexer module to appy WP cuts + double category = 0.; + category_output_->setValue(tauIndex_, category); + + // CV: computation of MVA value requires presence of leading charged hadron + if ( tau->leadPFChargedHadrCand().isNull() ) return 0.; + + int tauDecayMode = tau->decayMode(); + + if ( ((mvaOpt_ == kOldDMwoLT || mvaOpt_ == kOldDMwLT || mvaOpt_ == kDBoldDMwLT || mvaOpt_ == kPWoldDMwLT) && (tauDecayMode == 0 || tauDecayMode == 1 || tauDecayMode == 2 || tauDecayMode == 10)) || + ((mvaOpt_ == kNewDMwoLT || mvaOpt_ == kNewDMwLT || mvaOpt_ == kDBnewDMwLT || mvaOpt_ == kPWnewDMwLT) && (tauDecayMode == 0 || tauDecayMode == 1 || tauDecayMode == 2 || tauDecayMode == 5 || tauDecayMode == 6 || tauDecayMode == 10)) ) { + + double chargedIsoPtSum = (*chargedIsoPtSums_)[tau]; + double neutralIsoPtSum = (*neutralIsoPtSums_)[tau]; + double puCorrPtSum = (*puCorrPtSums_)[tau]; + double photonPtSumOutsideSignalCone = (*photonPtSumOutsideSignalCone_)[tau]; + double footprintCorrection = (*footprintCorrection_)[tau]; + + const reco::PFTauTransverseImpactParameter& tauLifetimeInfo = *(*tauLifetimeInfos)[tau]; + + double decayDistX = tauLifetimeInfo.flightLength().x(); + double decayDistY = tauLifetimeInfo.flightLength().y(); + double decayDistZ = tauLifetimeInfo.flightLength().z(); + double decayDistMag = TMath::Sqrt(decayDistX*decayDistX + decayDistY*decayDistY + decayDistZ*decayDistZ); + + double nPhoton = double(tau_n_photons_total(*tau)); + double ptWeightedDetaStrip = tau_pt_weighted_deta_strip(*tau, tauDecayMode); + double ptWeightedDphiStrip = tau_pt_weighted_dphi_strip(*tau, tauDecayMode); + double ptWeightedDrSignal = tau_pt_weighted_dr_signal(*tau, tauDecayMode); + double ptWeightedDrIsolation = tau_pt_weighted_dr_iso(*tau, tauDecayMode); + double leadingTrackChi2 = tau_leadTrackChi2(*tau); + double eRatio = tau_Eratio(*tau); + + if ( mvaOpt_ == kOldDMwoLT || mvaOpt_ == kNewDMwoLT ) { + mvaInput_[0] = TMath::Log(TMath::Max(1., Double_t(tau->pt()))); + mvaInput_[1] = TMath::Abs(tau->eta()); + mvaInput_[2] = TMath::Log(TMath::Max(1.e-2, chargedIsoPtSum)); + mvaInput_[3] = TMath::Log(TMath::Max(1.e-2, neutralIsoPtSum - 0.125*puCorrPtSum)); + mvaInput_[4] = TMath::Log(TMath::Max(1.e-2, puCorrPtSum)); + mvaInput_[5] = tauDecayMode; + } else if ( mvaOpt_ == kOldDMwLT || mvaOpt_ == kNewDMwLT ) { + mvaInput_[0] = TMath::Log(TMath::Max(1., Double_t(tau->pt()))); + mvaInput_[1] = TMath::Abs(tau->eta()); + mvaInput_[2] = TMath::Log(TMath::Max(1.e-2, chargedIsoPtSum)); + mvaInput_[3] = TMath::Log(TMath::Max(1.e-2, neutralIsoPtSum - 0.125*puCorrPtSum)); + mvaInput_[4] = TMath::Log(TMath::Max(1.e-2, puCorrPtSum)); + mvaInput_[5] = tauDecayMode; + mvaInput_[6] = TMath::Sign(+1., tauLifetimeInfo.dxy()); + mvaInput_[7] = TMath::Sqrt(TMath::Abs(TMath::Min(1., tauLifetimeInfo.dxy()))); + mvaInput_[8] = TMath::Min(10., TMath::Abs(tauLifetimeInfo.dxy_Sig())); + mvaInput_[9] = ( tauLifetimeInfo.hasSecondaryVertex() ) ? 1. : 0.; + mvaInput_[10] = TMath::Sqrt(decayDistMag); + mvaInput_[11] = TMath::Min(10., tauLifetimeInfo.flightLengthSig()); + } else if ( mvaOpt_ == kDBoldDMwLT || mvaOpt_ == kDBnewDMwLT ) { + mvaInput_[0] = TMath::Log(TMath::Max(1., Double_t(tau->pt()))); + mvaInput_[1] = TMath::Abs(tau->eta()); + mvaInput_[2] = TMath::Log(TMath::Max(1.e-2, chargedIsoPtSum)); + mvaInput_[3] = TMath::Log(TMath::Max(1.e-2, neutralIsoPtSum)); + mvaInput_[4] = TMath::Log(TMath::Max(1.e-2, puCorrPtSum)); + mvaInput_[5] = TMath::Log(TMath::Max(1.e-2, photonPtSumOutsideSignalCone)); + mvaInput_[6] = tauDecayMode; + mvaInput_[7] = TMath::Min(30., nPhoton); + mvaInput_[8] = TMath::Min(0.5, ptWeightedDetaStrip); + mvaInput_[9] = TMath::Min(0.5, ptWeightedDphiStrip); + mvaInput_[10] = TMath::Min(0.5, ptWeightedDrSignal); + mvaInput_[11] = TMath::Min(0.5, ptWeightedDrIsolation); + mvaInput_[12] = TMath::Min(100., leadingTrackChi2); + mvaInput_[13] = TMath::Min(1., eRatio); + mvaInput_[14] = TMath::Sign(+1., tauLifetimeInfo.dxy()); + mvaInput_[15] = TMath::Sqrt(TMath::Abs(TMath::Min(1., TMath::Abs(tauLifetimeInfo.dxy())))); + mvaInput_[16] = TMath::Min(10., TMath::Abs(tauLifetimeInfo.dxy_Sig())); + mvaInput_[17] = TMath::Sign(+1., tauLifetimeInfo.ip3d()); + mvaInput_[18] = TMath::Sqrt(TMath::Abs(TMath::Min(1., TMath::Abs(tauLifetimeInfo.ip3d())))); + mvaInput_[19] = TMath::Min(10., TMath::Abs(tauLifetimeInfo.ip3d_Sig())); + mvaInput_[20] = ( tauLifetimeInfo.hasSecondaryVertex() ) ? 1. : 0.; + mvaInput_[21] = TMath::Sqrt(decayDistMag); + mvaInput_[22] = TMath::Min(10., tauLifetimeInfo.flightLengthSig()); + } else if ( mvaOpt_ == kPWoldDMwLT || mvaOpt_ == kPWnewDMwLT ) { + mvaInput_[0] = TMath::Log(TMath::Max(1., Double_t(tau->pt()))); + mvaInput_[1] = TMath::Abs(tau->eta()); + mvaInput_[2] = TMath::Log(TMath::Max(1.e-2, chargedIsoPtSum)); + mvaInput_[3] = TMath::Log(TMath::Max(1.e-2, neutralIsoPtSum)); + mvaInput_[4] = TMath::Log(TMath::Max(1.e-2, footprintCorrection)); + mvaInput_[5] = TMath::Log(TMath::Max(1.e-2, photonPtSumOutsideSignalCone)); + mvaInput_[6] = tauDecayMode; + mvaInput_[7] = TMath::Min(30., nPhoton); + mvaInput_[8] = TMath::Min(0.5, ptWeightedDetaStrip); + mvaInput_[9] = TMath::Min(0.5, ptWeightedDphiStrip); + mvaInput_[10] = TMath::Min(0.5, ptWeightedDrSignal); + mvaInput_[11] = TMath::Min(0.5, ptWeightedDrIsolation); + mvaInput_[12] = TMath::Min(100., leadingTrackChi2); + mvaInput_[13] = TMath::Min(1., eRatio); + mvaInput_[14] = TMath::Sign(+1., tauLifetimeInfo.dxy()); + mvaInput_[15] = TMath::Sqrt(TMath::Abs(TMath::Min(1., TMath::Abs(tauLifetimeInfo.dxy())))); + mvaInput_[16] = TMath::Min(10., TMath::Abs(tauLifetimeInfo.dxy_Sig())); + mvaInput_[17] = TMath::Sign(+1., tauLifetimeInfo.ip3d()); + mvaInput_[18] = TMath::Sqrt(TMath::Abs(TMath::Min(1., TMath::Abs(tauLifetimeInfo.ip3d())))); + mvaInput_[19] = TMath::Min(10., TMath::Abs(tauLifetimeInfo.ip3d_Sig())); + mvaInput_[20] = ( tauLifetimeInfo.hasSecondaryVertex() ) ? 1. : 0.; + mvaInput_[21] = TMath::Sqrt(decayDistMag); + mvaInput_[22] = TMath::Min(10., tauLifetimeInfo.flightLengthSig()); + } + + double mvaValue = mvaReader_->GetClassifier(mvaInput_); + if ( verbosity_ ) { + edm::LogPrint("PFTauDiscByMVAIsol2") << ":"; + edm::LogPrint("PFTauDiscByMVAIsol2") << " tau: Pt = " << tau->pt() << ", eta = " << tau->eta(); + edm::LogPrint("PFTauDiscByMVAIsol2") << " isolation: charged = " << chargedIsoPtSum << ", neutral = " << neutralIsoPtSum << ", PUcorr = " << puCorrPtSum; + edm::LogPrint("PFTauDiscByMVAIsol2") << " decay mode = " << tauDecayMode; + edm::LogPrint("PFTauDiscByMVAIsol2") << " impact parameter: distance = " << tauLifetimeInfo.dxy() << ", significance = " << tauLifetimeInfo.dxy_Sig(); + edm::LogPrint("PFTauDiscByMVAIsol2") << " has decay vertex = " << tauLifetimeInfo.hasSecondaryVertex() << ":" + << " distance = " << decayDistMag << ", significance = " << tauLifetimeInfo.flightLengthSig(); + edm::LogPrint("PFTauDiscByMVAIsol2") << "--> mvaValue = " << mvaValue; + } + return mvaValue; + } else { + return -1.; + } +} + +void PFRecoTauDiscriminationByMVAIsolationRun2::endEvent(edm::Event& evt) +{ + // add all category indices to event + evt.put(category_output_, "category"); +} + +DEFINE_FWK_MODULE(PFRecoTauDiscriminationByMVAIsolationRun2); diff --git a/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolation2_cff.py b/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolation2_cff.py index 2a282b953aedd..fb2aaecb3e0c8 100644 --- a/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolation2_cff.py +++ b/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolation2_cff.py @@ -43,20 +43,6 @@ verbosity = cms.int32(0) ) -photonPtSumOutsideSignalCone = chargedIsoPtSum.clone( - ApplyDiscriminationByTrackerIsolation = cms.bool(False), - storeRawSumPt = cms.bool(False), - storeRawPhotonSumPt_outsideSignalCone = cms.bool(True), - verbosity = cms.int32(0) -) - -footprintCorrection = chargedIsoPtSum.clone( - ApplyDiscriminationByTrackerIsolation = cms.bool(False), - storeRawSumPt = cms.bool(False), - storeRawFootprintCorrection = cms.bool(True), - verbosity = cms.int32(0) -) - discriminationByIsolationMVA2raw = cms.EDProducer("PFRecoTauDiscriminationByIsolationMVA2", # tau collection to discriminate @@ -75,9 +61,7 @@ srcChargedIsoPtSum = cms.InputTag('chargedIsoPtSum'), srcNeutralIsoPtSum = cms.InputTag('neutralIsoPtSum'), - srcPUcorrPtSum = cms.InputTag('puCorrPtSum'), - srcPhotonPtSumOutsideSignalCone = cms.InputTag('photonPtSumOutsideSignalCone'), - srcFootprintCorrection = cms.InputTag('footprintCorrection') + srcPUcorrPtSum = cms.InputTag('puCorrPtSum') ) discriminationByIsolationMVA2VLoose = recoTauDiscriminantCutMultiplexer.clone( @@ -107,8 +91,6 @@ chargedIsoPtSum + neutralIsoPtSum + puCorrPtSum - + photonPtSumOutsideSignalCone - + footprintCorrection + discriminationByIsolationMVA2raw + discriminationByIsolationMVA2VLoose + discriminationByIsolationMVA2Loose diff --git a/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolationRun2_cff.py b/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolationRun2_cff.py new file mode 100644 index 0000000000000..be6ef4ff29b16 --- /dev/null +++ b/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolationRun2_cff.py @@ -0,0 +1,119 @@ +import FWCore.ParameterSet.Config as cms + +from RecoTauTag.RecoTau.PFRecoTauDiscriminationByIsolation_cfi import * +from RecoTauTag.RecoTau.RecoTauDiscriminantCutMultiplexer_cfi import * +from RecoTauTag.RecoTau.PFRecoTauDiscriminationByMVAIsolation2_cff import * + +#chargedIsoPtSum = pfRecoTauDiscriminationByIsolation.clone( +# PFTauProducer = cms.InputTag('pfTauProducer'), +# ApplyDiscriminationByECALIsolation = cms.bool(False), +# ApplyDiscriminationByTrackerIsolation = cms.bool(True), +# applyOccupancyCut = cms.bool(False), +# applySumPtCut = cms.bool(False), +# applyDeltaBetaCorrection = cms.bool(False), +# storeRawSumPt = cms.bool(True), +# storeRawPUsumPt = cms.bool(False), +# customOuterCone = cms.double(0.5), +# isoConeSizeForDeltaBeta = cms.double(0.8), +# verbosity = cms.int32(0) +#) +#neutralIsoPtSum = pfRecoTauDiscriminationByIsolation.clone( +# PFTauProducer = cms.InputTag('pfTauProducer'), +# ApplyDiscriminationByECALIsolation = cms.bool(True), +# ApplyDiscriminationByTrackerIsolation = cms.bool(False), +# applyOccupancyCut = cms.bool(False), +# applySumPtCut = cms.bool(False), +# applyDeltaBetaCorrection = cms.bool(False), +# storeRawSumPt = cms.bool(True), +# storeRawPUsumPt = cms.bool(False), +# customOuterCone = cms.double(0.5), +# isoConeSizeForDeltaBeta = cms.double(0.8), +# verbosity = cms.int32(0) +#) +#puCorrPtSum = pfRecoTauDiscriminationByIsolation.clone( +# PFTauProducer = cms.InputTag('pfTauProducer'), +# ApplyDiscriminationByECALIsolation = cms.bool(False), +# ApplyDiscriminationByTrackerIsolation = cms.bool(False), +# applyOccupancyCut = cms.bool(False), +# applySumPtCut = cms.bool(False), +# applyDeltaBetaCorrection = cms.bool(True), +# storeRawSumPt = cms.bool(False), +# storeRawPUsumPt = cms.bool(True), +# customOuterCone = cms.double(0.5), +# isoConeSizeForDeltaBeta = cms.double(0.8), +# verbosity = cms.int32(0) +#) + +photonPtSumOutsideSignalCone = chargedIsoPtSum.clone( + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + storeRawSumPt = cms.bool(False), + storeRawPhotonSumPt_outsideSignalCone = cms.bool(True), + verbosity = cms.int32(0) +) + +footprintCorrection = chargedIsoPtSum.clone( + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + storeRawSumPt = cms.bool(False), + storeRawFootprintCorrection = cms.bool(True), + verbosity = cms.int32(0) +) + +discriminationByIsolationMVArun2v1raw = cms.EDProducer("PFRecoTauDiscriminationByIsolationMVARun2", + + # tau collection to discriminate + PFTauProducer = cms.InputTag('pfTauProducer'), + + # Require leading pion ensures that: + # 1) these is at least one track above threshold (0.5 GeV) in the signal cone + # 2) a track OR a pi-zero in the signal cone has pT > 5 GeV + Prediscriminants = requireLeadTrack, + loadMVAfromDB = cms.bool(True), + mvaName = cms.string("tauIdMVAnewDMwLT"), + mvaOpt = cms.string("newDMwLT"), + + # NOTE: tau lifetime reconstruction sequence needs to be run before + srcTauTransverseImpactParameters = cms.InputTag(''), + + srcChargedIsoPtSum = cms.InputTag('chargedIsoPtSum'), + srcNeutralIsoPtSum = cms.InputTag('neutralIsoPtSum'), + srcPUcorrPtSum = cms.InputTag('puCorrPtSum'), + srcPhotonPtSumOutsideSignalCone = cms.InputTag('photonPtSumOutsideSignalCone'), + srcFootprintCorrection = cms.InputTag('footprintCorrection') +) + +discriminationByIsolationMVArun2v1VLoose = recoTauDiscriminantCutMultiplexer.clone( + PFTauProducer = cms.InputTag('pfTauProducer'), + Prediscriminants = requireLeadTrack, + toMultiplex = cms.InputTag('discriminationByIsolationMVArun2v1raw'), + key = cms.InputTag('discriminationByIsolationMVArun2v1raw:category'), + loadMVAfromDB = cms.bool(True), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("newDMwLTEff80"), + variable = cms.string("pt"), + ) + ) +) +discriminationByIsolationMVArun2v1Loose = discriminationByIsolationMVArun2v1VLoose.clone() +discriminationByIsolationMVArun2v1Loose.mapping[0].cut = cms.string("newDMwLTEff70") +discriminationByIsolationMVArun2v1Medium = discriminationByIsolationMVArun2v1VLoose.clone() +discriminationByIsolationMVArun2v1Medium.mapping[0].cut = cms.string("newDMwLTEff60") +discriminationByIsolationMVArun2v1Tight = discriminationByIsolationMVArun2v1VLoose.clone() +discriminationByIsolationMVArun2v1Tight.mapping[0].cut = cms.string("newDMwLTEff50") +discriminationByIsolationMVArun2v1VTight = discriminationByIsolationMVArun2v1VLoose.clone() +discriminationByIsolationMVArun2v1VTight.mapping[0].cut = cms.string("newDMwLTEff40") + +mvaIsolation2SeqRun2 = cms.Sequence( + chargedIsoPtSum + + neutralIsoPtSum + + puCorrPtSum + + photonPtSumOutsideSignalCone + + footprintCorrection + + discriminationByIsolationMVArun2v1raw + + discriminationByIsolationMVArun2v1VLoose + + discriminationByIsolationMVArun2v1Loose + + discriminationByIsolationMVArun2v1Medium + + discriminationByIsolationMVArun2v1Tight + + discriminationByIsolationMVArun2v1VTight +) diff --git a/Validation/RecoTau/python/RecoTauValidation_cfi.py b/Validation/RecoTau/python/RecoTauValidation_cfi.py index cba31f2e7b27a..808029ce3f80d 100644 --- a/Validation/RecoTau/python/RecoTauValidation_cfi.py +++ b/Validation/RecoTau/python/RecoTauValidation_cfi.py @@ -140,38 +140,38 @@ cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - #cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA6VLooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA6LooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA6MediumElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA6TightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA6VTightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA5VLooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA5LooseElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA5MediumElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA5TightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), + cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVA5VTightElectronRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), @@ -183,56 +183,6 @@ cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVALooseMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVAMediumMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMVATightMuonRejection"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauChargedIsoPtSumdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauNeutralIsoPtSumdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauPUcorrPtSumdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauNeutralIsoPtSumWeightdR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauFootprintCorrectiondR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauPhotonPtSumOutsideSignalConedR03"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(False)), - ) proc.TauValNumeratorAndDenominator = cms.Sequence( From 2371973ca8fc9e5337db4a657e9564d8621fc167 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 25 Nov 2015 19:59:00 +0100 Subject: [PATCH 33/66] removed unnecessary import statements in order not clutter python namespace --- .../python/updateHPSPFTaus_cff.py | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/RecoTauTag/Configuration/python/updateHPSPFTaus_cff.py b/RecoTauTag/Configuration/python/updateHPSPFTaus_cff.py index d6c2be075e4df..72a4a905813c7 100644 --- a/RecoTauTag/Configuration/python/updateHPSPFTaus_cff.py +++ b/RecoTauTag/Configuration/python/updateHPSPFTaus_cff.py @@ -11,30 +11,5 @@ ''' - -from RecoTauTag.RecoTau.PFRecoTauDiscriminationByMVAIsolation2_cff import * -from RecoTauTag.RecoTau.PFRecoTauDiscriminationByIsolation_cfi import * -from RecoTauTag.RecoTau.PFRecoTauDiscriminationByLeadingTrackFinding_cfi import * -from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectron_cfi import * -from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectronMVA5_cfi import * -from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi import * -from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstMuon_cfi import * -from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstMuon2_cfi import * -from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstMuonMVA_cfi import * - -from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauChargedIsoPtSum -from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauNeutralIsoPtSum -from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauPUcorrPtSum -from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauNeutralIsoPtSumWeight -from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauFootprintCorrection -from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauPhotonPtSumOutsideSignalCone -from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits -from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits -from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits -from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits -from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone -from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits - - updateHPSPFTaus = cms.Sequence() From 8f9b431a4c66ba2ac3b00dca799ae89ff6806f27 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 25 Nov 2015 20:00:28 +0100 Subject: [PATCH 34/66] added switchToPFTauHPS76xReMiniAOD function to add new tau ID discriminators for reminiAOD v2 processing --- .../PatAlgos/python/tools/tauTools.py | 134 +++++++++++++++++- 1 file changed, 131 insertions(+), 3 deletions(-) diff --git a/PhysicsTools/PatAlgos/python/tools/tauTools.py b/PhysicsTools/PatAlgos/python/tools/tauTools.py index 6de2055df4d5f..069362aab08f4 100644 --- a/PhysicsTools/PatAlgos/python/tools/tauTools.py +++ b/PhysicsTools/PatAlgos/python/tools/tauTools.py @@ -91,13 +91,15 @@ def _switchToPFTau(process, ("ecalIsolation", "DiscriminationByECALIsolation"), ("byIsolation", "DiscriminationByIsolation"), ("againstElectron", "DiscriminationAgainstElectron"), - ("againstMuon", "DiscriminationAgainstMuon") ] + ("againstMuon", "DiscriminationAgainstMuon") +] classicPFTauIDSources = [ ("leadingPionPtCut", "DiscriminationByLeadingPionPtCut"), ("trackIsolationUsingLeadingPion", "DiscriminationByTrackIsolationUsingLeadingPion"), ("ecalIsolationUsingLeadingPion", "DiscriminationByECALIsolationUsingLeadingPion"), - ("byIsolationUsingLeadingPion", "DiscriminationByIsolationUsingLeadingPion")] + ("byIsolationUsingLeadingPion", "DiscriminationByIsolationUsingLeadingPion") +] # Hadron-plus-strip(s) (HPS) Tau Discriminators hpsTauIDSources = [ @@ -169,7 +171,110 @@ def _switchToPFTau(process, ##("againstMuonLooseMVA", "DiscriminationByMVALooseMuonRejection"), ##("againstMuonMediumMVA", "DiscriminationByMVAMediumMuonRejection"), ##("againstMuonTightMVA", "DiscriminationByMVATightMuonRejection") - ] +] + +#-------------------------------------------------------------------------------- +# CV: define list of old and new tau ID discriminators for CMSSW 7_6_x reminiAOD v2 +hpsTauIDSources76xReMiniAOD = [ + ("decayModeFindingNewDMs", "DiscriminationByDecayModeFindingNewDMs"), + ("decayModeFinding", "DiscriminationByDecayModeFinding"), # CV: kept for backwards compatibility + ("byLooseCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"), + ("byMediumCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"), + ("byTightCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByTightCombinedIsolationDBSumPtCorr3Hits"), + ("byCombinedIsolationDeltaBetaCorrRaw3Hits", "DiscriminationByRawCombinedIsolationDBSumPtCorr3Hits"), + ("byLoosePileupWeightedIsolation3Hits", "DiscriminationByLoosePileupWeightedIsolation3Hits"), + ("byMediumPileupWeightedIsolation3Hits", "DiscriminationByMediumPileupWeightedIsolation3Hits"), + ("byTightPileupWeightedIsolation3Hits", "DiscriminationByTightPileupWeightedIsolation3Hits"), + ("byPhotonPtSumOutsideSignalCone", "DiscriminationByPhotonPtSumOutsideSignalCone"), + ("byPileupWeightedIsolationRaw3Hits", "DiscriminationByRawPileupWeightedIsolation3Hits"), + ("chargedIsoPtSum", "ChargedIsoPtSum"), + ("neutralIsoPtSum", "NeutralIsoPtSum"), + ("puCorrPtSum", "PUcorrPtSum"), + ("neutralIsoPtSumWeight", "NeutralIsoPtSumWeight"), + ("footprintCorrection", "FootprintCorrection"), + ("photonPtSumOutsideSignalCone", "PhotonPtSumOutsideSignalCone"), + ("byIsolationMVA3oldDMwLTraw", "DiscriminationByIsolationMVA3oldDMwLTraw"), + ("byVLooseIsolationMVA3oldDMwLT", "DiscriminationByVLooseIsolationMVA3oldDMwLT"), + ("byLooseIsolationMVA3oldDMwLT", "DiscriminationByLooseIsolationMVA3oldDMwLT"), + ("byMediumIsolationMVA3oldDMwLT", "DiscriminationByMediumIsolationMVA3oldDMwLT"), + ("byTightIsolationMVA3oldDMwLT", "DiscriminationByTightIsolationMVA3oldDMwLT"), + ("byVTightIsolationMVA3oldDMwLT", "DiscriminationByVTightIsolationMVA3oldDMwLT"), + ("byVVTightIsolationMVA3oldDMwLT", "DiscriminationByVVTightIsolationMVA3oldDMwLT"), + ("byIsolationMVA3newDMwLTraw", "DiscriminationByIsolationMVA3newDMwLTraw"), + ("byVLooseIsolationMVA3newDMwLT", "DiscriminationByVLooseIsolationMVA3newDMwLT"), + ("byLooseIsolationMVA3newDMwLT", "DiscriminationByLooseIsolationMVA3newDMwLT"), + ("byMediumIsolationMVA3newDMwLT", "DiscriminationByMediumIsolationMVA3newDMwLT"), + ("byTightIsolationMVA3newDMwLT", "DiscriminationByTightIsolationMVA3newDMwLT"), + ("byVTightIsolationMVA3newDMwLT", "DiscriminationByVTightIsolationMVA3newDMwLT"), + ("byVVTightIsolationMVA3newDMwLT", "DiscriminationByVVTightIsolationMVA3newDMwLT"), + ("againstElectronMVA5raw", "DiscriminationByMVA5rawElectronRejection"), + ("againstElectronMVA5category", "DiscriminationByMVA5rawElectronRejection:category"), + ("againstElectronVLooseMVA5", "DiscriminationByMVA5VLooseElectronRejection"), + ("againstElectronLooseMVA5", "DiscriminationByMVA5LooseElectronRejection"), + ("againstElectronMediumMVA5", "DiscriminationByMVA5MediumElectronRejection"), + ("againstElectronTightMVA5", "DiscriminationByMVA5TightElectronRejection"), + ("againstElectronVTightMVA5", "DiscriminationByMVA5VTightElectronRejection"), + ("againstMuonLoose3", "DiscriminationByLooseMuonRejection3"), + ("againstMuonTight3", "DiscriminationByTightMuonRejection3"), + ##New Run2 MVA isolation + ("byIsolationMVArun2v1DBoldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBoldDMwLTraw"), + ("byVLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT"), + ("byLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBoldDMwLT"), + ("byMediumIsolationMVArun2v1DBoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBoldDMwLT"), + ("byTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBoldDMwLT"), + ("byVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBoldDMwLT"), + ("byVVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT"), + ("byIsolationMVArun2v1DBnewDMwLTraw", "DiscriminationByIsolationMVArun2v1DBnewDMwLTraw"), + ("byVLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT"), + ("byLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBnewDMwLT"), + ("byMediumIsolationMVArun2v1DBnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBnewDMwLT"), + ("byTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByTightIsolationMVArun2v1DBnewDMwLT"), + ("byVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBnewDMwLT"), + ("byVVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT"), + ("byIsolationMVArun2v1PWoldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWoldDMwLTraw"), + ("byVLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT"), + ("byLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWoldDMwLT"), + ("byMediumIsolationMVArun2v1PWoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWoldDMwLT"), + ("byTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWoldDMwLT"), + ("byVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWoldDMwLT"), + ("byVVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT"), + ("byIsolationMVArun2v1PWnewDMwLTraw", "DiscriminationByIsolationMVArun2v1PWnewDMwLTraw"), + ("byVLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT"), + ("byLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWnewDMwLT"), + ("byMediumIsolationMVArun2v1PWnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWnewDMwLT"), + ("byTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByTightIsolationMVArun2v1PWnewDMwLT"), + ("byVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWnewDMwLT"), + ("byVVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT"), + ("chargedIsoPtSumdR03", "ChargedIsoPtSumdR03"), + ("neutralIsoPtSumdR03", "NeutralIsoPtSumdR03"), + ("puCorrPtSumdR03", "PUcorrPtSumdR03"), + ("neutralIsoPtSumWeightdR03", "NeutralIsoPtSumWeightdR03"), + ("footprintCorrectiondR03", "FootprintCorrectiondR03"), + ("photonPtSumOutsideSignalConedR03", "PhotonPtSumOutsideSignalConedR03"), + ("byIsolationMVArun2v1DBdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw"), + ("byVLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT"), + ("byLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT"), + ("byMediumIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT"), + ("byTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT"), + ("byVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT"), + ("byVVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT"), + ("byIsolationMVArun2v1PWdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw"), + ("byVLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT"), + ("byLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT"), + ("byMediumIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT"), + ("byTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT"), + ("byVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT"), + ("byVVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"), + ##New Run2 MVA discriminator against electrons + ("againstElectronMVA6raw", "DiscriminationByMVA6rawElectronRejection"), + ("againstElectronMVA6category", "DiscriminationByMVA6rawElectronRejection:category"), + ("againstElectronVLooseMVA6", "DiscriminationByMVA6VLooseElectronRejection"), + ("againstElectronLooseMVA6", "DiscriminationByMVA6LooseElectronRejection"), + ("againstElectronMediumMVA6", "DiscriminationByMVA6MediumElectronRejection"), + ("againstElectronTightMVA6", "DiscriminationByMVA6TightElectronRejection"), + ("againstElectronVTightMVA6", "DiscriminationByMVA6VTightElectronRejection"), +] +#-------------------------------------------------------------------------------- # switch to PFTau collection produced for fixed dR = 0.07 signal cone size def switchToPFTauFixedCone(process, @@ -212,6 +317,29 @@ def switchToPFTauHPS(process, 'pt > 18 & abs(eta) < 2.3 & tauID("decayModeFinding") > 0.5 & tauID("byLooseCombinedIsolationDeltaBetaCorr3Hits") > 0.5' \ + ' & tauID("againstMuonTight3") > 0.5 & tauID("againstElectronVLooseMVA5") > 0.5' +#-------------------------------------------------------------------------------- +# CV: function called by PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py +# to add old and new tau ID discriminators for CMSSW 7_6_x reminiAOD v2 +def switchToPFTauHPS76xReMiniAOD(process, + tauSource = cms.InputTag('hpsPFTauProducer'), + patTauLabel = "", + jecLevels = [], + postfix = ""): + + _switchToPFTau(process, tauSource, 'hpsPFTau', hpsTauIDSources76xReMiniAOD, + patTauLabel = patTauLabel, postfix = postfix) + + # CV: enable tau lifetime information for HPS PFTaus + applyPostfix(process, "patTaus" + patTauLabel, postfix).tauTransverseImpactParameterSource = tauSource.value().replace("Producer", "TransverseImpactParameters") + + ## adapt cleanPatTaus + if hasattr(process, "cleanPatTaus" + patTauLabel + postfix): + getattr(process, "cleanPatTaus" + patTauLabel + postfix).preselection = \ + 'pt > 18 & abs(eta) < 2.3 & tauID("decayModeFinding") > 0.5 & tauID("byLooseCombinedIsolationDeltaBetaCorr3Hits") > 0.5' \ + + ' & tauID("againstMuonTight3") > 0.5 & tauID("againstElectronVLooseMVA6") > 0.5' +#-------------------------------------------------------------------------------- + + # Select switcher by string def switchToPFTauByType(process, pfTauType = None, From 8f9f16854b0b540a50944738156cd10a44642e4c Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 25 Nov 2015 20:01:12 +0100 Subject: [PATCH 35/66] fixed typo in plugin name --- .../python/PFRecoTauDiscriminationByMVAIsolationRun2_cff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolationRun2_cff.py b/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolationRun2_cff.py index be6ef4ff29b16..cd230ead12675 100644 --- a/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolationRun2_cff.py +++ b/RecoTauTag/RecoTau/python/PFRecoTauDiscriminationByMVAIsolationRun2_cff.py @@ -58,7 +58,7 @@ verbosity = cms.int32(0) ) -discriminationByIsolationMVArun2v1raw = cms.EDProducer("PFRecoTauDiscriminationByIsolationMVARun2", +discriminationByIsolationMVArun2v1raw = cms.EDProducer("PFRecoTauDiscriminationByMVAIsolationRun2", # tau collection to discriminate PFTauProducer = cms.InputTag('pfTauProducer'), From c992b4a1c79ca810d802705c9fef52622441c482 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 25 Nov 2015 20:01:55 +0100 Subject: [PATCH 36/66] added protection that tautagInfoModifier module is added only once (logic is fully backwards compatible, i.e. does not change RECO sequence) --- RecoTauTag/Configuration/python/RecoPFTauTag_cff.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py b/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py index d89ac316bb688..96f1590575645 100644 --- a/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py +++ b/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py @@ -75,7 +75,13 @@ ) # Add the modifier to our tau producers -combinatoricRecoTaus.modifiers.append(tautagInfoModifer) +hasTTIworkaround = False +for modifier in combinatoricRecoTaus.modifiers: + if hasattr(modifier, "name") and modifier.name.value() == "TTIworkaround": + hasTTIworkaround = True +if not hasTTIworkaround: + combinatoricRecoTaus.modifiers.append(tautagInfoModifer) +##combinatoricRecoTaus.modifiers.append(tautagInfoModifer) recoTauPileUpVertices = cms.EDFilter( "RecoTauPileUpVertexSelector", From 214fdb93e6d995f53c1060d6ed90b4d492c58a6b Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 25 Nov 2015 20:03:13 +0100 Subject: [PATCH 37/66] - remove 3Prong1Pi0 decay mode from decayModeFindingNewDMs discriminator - remove 3Prong1Pi0 decay mode from tau candidate ranking/cleaning - enabled "old" (Run1) tau ID MVA and anti-e MVA5 discriminators --- .../python/HPSPFTaus_reminiAOD_cff.py | 71 ++++++++++++------- 1 file changed, 47 insertions(+), 24 deletions(-) diff --git a/RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py b/RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py index 4d858ac24f449..36538cb399a4f 100644 --- a/RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py +++ b/RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py @@ -27,16 +27,27 @@ from RecoTauTag.RecoTau.PFRecoTauPFJetInputs_cfi import PFRecoTauPFJetInputs # deltaBeta correction factor -ak4dBetaCorrection=0.20 +ak4dBetaCorrection = 0.20 # Load MVAs from SQLlite file/prep. DB from RecoTauTag.Configuration.loadRecoTauTagMVAsFromPrepDB_cfi import * # Select those taus that pass the HPS selections # - pt > 15, mass cuts, tauCone cut -from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import hpsSelectionDiscriminator, decayMode_1Prong0Pi0, decayMode_1Prong1Pi0, decayMode_1Prong2Pi0, decayMode_3Prong0Pi0 +from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import hpsSelectionDiscriminator, decayMode_1Prong0Pi0, decayMode_1Prong1Pi0, decayMode_1Prong2Pi0, decayMode_2Prong0Pi0, decayMode_2Prong1Pi0, decayMode_3Prong0Pi0 hpsPFTauDiscriminationByDecayModeFindingNewDMs = hpsSelectionDiscriminator.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer') + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + #---------------------------------------------------------------------------- + # CV: disable 3Prong1Pi0 decay mode + decayModes = cms.VPSet( + decayMode_1Prong0Pi0, + decayMode_1Prong1Pi0, + decayMode_1Prong2Pi0, + decayMode_2Prong0Pi0, + decayMode_2Prong1Pi0, + decayMode_3Prong0Pi0 + ) + #---------------------------------------------------------------------------- ) hpsPFTauDiscriminationByDecayModeFindingOldDMs = hpsSelectionDiscriminator.clone( PFTauProducer = cms.InputTag('hpsPFTauProducer'), @@ -701,6 +712,17 @@ # Define the HPS selection discriminator used in cleaning hpsSelectionDiscriminator.PFTauProducer = cms.InputTag("combinatoricRecoTaus") +#---------------------------------------------------------------------------- +# CV: disable 3Prong1Pi0 decay mode +hpsSelectionDiscriminator.decayModes = cms.VPSet( + decayMode_1Prong0Pi0, + decayMode_1Prong1Pi0, + decayMode_1Prong2Pi0, + decayMode_2Prong0Pi0, + decayMode_2Prong1Pi0, + decayMode_3Prong0Pi0 +) +#---------------------------------------------------------------------------- from RecoTauTag.RecoTau.RecoTauCleaner_cfi import RecoTauCleaner hpsPFTauProducerSansRefs = RecoTauCleaner.clone( @@ -713,7 +735,6 @@ src = cms.InputTag("hpsPFTauProducerSansRefs") ) - from RecoTauTag.RecoTau.PFTauPrimaryVertexProducer_cfi import * from RecoTauTag.RecoTau.PFTauSecondaryVertexProducer_cfi import * from RecoTauTag.RecoTau.PFTauTransverseImpactParameters_cfi import * @@ -1179,13 +1200,13 @@ #+ hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT #+ hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT #+ hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT - #+ hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw - #+ hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT - #+ hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT - #+ hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT - #+ hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT - #+ hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT - #+ hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT + + hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT + + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT #+ hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw #+ hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT #+ hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT @@ -1193,13 +1214,13 @@ #+ hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT #+ hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT #+ hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT - #+ hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw - #+ hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT - #+ hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT - #+ hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT - #+ hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT - #+ hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT - #+ hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT + + hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT + + hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT # new MVA isolations for Run2 + hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT @@ -1283,12 +1304,12 @@ hpsPFTauDiscriminationByLooseElectronRejection* hpsPFTauDiscriminationByMediumElectronRejection* hpsPFTauDiscriminationByTightElectronRejection* - #hpsPFTauDiscriminationByMVA5rawElectronRejection* - #hpsPFTauDiscriminationByMVA5VLooseElectronRejection* - #hpsPFTauDiscriminationByMVA5LooseElectronRejection* - #hpsPFTauDiscriminationByMVA5MediumElectronRejection* - #hpsPFTauDiscriminationByMVA5TightElectronRejection* - #hpsPFTauDiscriminationByMVA5VTightElectronRejection* + hpsPFTauDiscriminationByMVA5rawElectronRejection* + hpsPFTauDiscriminationByMVA5VLooseElectronRejection* + hpsPFTauDiscriminationByMVA5LooseElectronRejection* + hpsPFTauDiscriminationByMVA5MediumElectronRejection* + hpsPFTauDiscriminationByMVA5TightElectronRejection* + hpsPFTauDiscriminationByMVA5VTightElectronRejection* hpsPFTauDiscriminationByMVA6rawElectronRejection* hpsPFTauDiscriminationByMVA6VLooseElectronRejection* hpsPFTauDiscriminationByMVA6LooseElectronRejection* @@ -1313,3 +1334,5 @@ hpsPFTauMVAIsolation2Seq ) + + From 64ad58e84f291ecfa789791ca8e06982baeb228b Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 25 Nov 2015 20:04:24 +0100 Subject: [PATCH 38/66] added plugin to set mass of 1Prong0Pi0 tau candidates to charged pion mass --- .../RecoTau/plugins/PFRecoTauMassPlugin.cc | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 RecoTauTag/RecoTau/plugins/PFRecoTauMassPlugin.cc diff --git a/RecoTauTag/RecoTau/plugins/PFRecoTauMassPlugin.cc b/RecoTauTag/RecoTau/plugins/PFRecoTauMassPlugin.cc new file mode 100644 index 0000000000000..5027a203e269d --- /dev/null +++ b/RecoTauTag/RecoTau/plugins/PFRecoTauMassPlugin.cc @@ -0,0 +1,82 @@ +/* + * ============================================================================= + * Filename: PFRecoTauMassPlugin.cc + * + * Description: Set mass of taus reconstructed in 1prong0pi0 decay mode + * to charged pion mass + * + * Created: 27/10/2015 10:30:00 + * + * Authors: Christian Veelken (Tallinn) + * + * ============================================================================= + */ + +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +#include "RecoTauTag/RecoTau/interface/RecoTauBuilderPlugins.h" +#include "DataFormats/TauReco/interface/PFTau.h" + +#include + +namespace reco { namespace tau { + +class PFRecoTauMassPlugin : public RecoTauModifierPlugin +{ + public: + + explicit PFRecoTauMassPlugin(const edm::ParameterSet&, edm::ConsumesCollector &&iC); + virtual ~PFRecoTauMassPlugin(); + void operator()(PFTau&) const; + virtual void beginEvent(); + virtual void endEvent(); + + private: + + int verbosity_; +}; + + PFRecoTauMassPlugin::PFRecoTauMassPlugin(const edm::ParameterSet& cfg, edm::ConsumesCollector &&iC) + : RecoTauModifierPlugin(cfg, std::move(iC)) +{ + verbosity_ = ( cfg.exists("verbosity") ) ? + cfg.getParameter("verbosity") : 0; +} + +PFRecoTauMassPlugin::~PFRecoTauMassPlugin() +{} + +void PFRecoTauMassPlugin::beginEvent() +{} + +void PFRecoTauMassPlugin::operator()(PFTau& tau) const +{ + if ( verbosity_ ) { + std::cout << ":" << std::endl; + std::cout << "tau: Pt = " << tau.pt() << ", eta = " << tau.eta() << ", phi = " << tau.phi() << ", mass = " << tau.mass() << " (decayMode = " << tau.decayMode() << ")" << std::endl; + } + + if ( tau.decayMode() == reco::PFTau::kOneProng0PiZero ) { + double tauEn = tau.energy(); + const double chargedPionMass = 0.13957; // GeV + if ( tauEn < chargedPionMass ) tauEn = chargedPionMass; + double tauP_modified = TMath::Sqrt(tauEn*tauEn - chargedPionMass*chargedPionMass); + double tauPx_modified = TMath::Cos(tau.phi())*TMath::Sin(tau.theta())*tauP_modified; + double tauPy_modified = TMath::Sin(tau.phi())*TMath::Sin(tau.theta())*tauP_modified; + double tauPz_modified = TMath::Cos(tau.theta())*tauP_modified; + reco::Candidate::LorentzVector tauP4_modified(tauPx_modified, tauPy_modified, tauPz_modified, tauEn); + if ( verbosity_ ) { + std::cout << "--> setting tauP4: Pt = " << tauP4_modified.pt() << ", eta = " << tauP4_modified.eta() << ", phi = " << tauP4_modified.phi() << ", mass = " << tauP4_modified.mass() << std::endl; + } + tau.setP4(tauP4_modified); + } +} + +void PFRecoTauMassPlugin::endEvent() +{} + +}} // end namespace reco::tau + +#include "FWCore/Framework/interface/MakerMacros.h" + +DEFINE_EDM_PLUGIN(RecoTauModifierPluginFactory, reco::tau::PFRecoTauMassPlugin, "PFRecoTauMassPlugin"); From 258223860a6fff2de48b8cf41b273b8fa65d13e3 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 25 Nov 2015 20:05:08 +0100 Subject: [PATCH 39/66] added new (Run2) tau ID MVA and anti-e MVA6 discriminators --- PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py b/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py index 4d0c29fe28765..e0c71b983d8f9 100644 --- a/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py +++ b/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py @@ -202,6 +202,13 @@ def miniAOD_customizeCommon(process): cms.InputTag('reducedEgamma','reducedGedPhotons') for idmod in photon_ids: setupAllVIDIdsInModule(process,idmod,setupVIDPhotonSelection,None,False) + + #---------------------------------------------------------------------------- + # CV: add old and new tau ID discriminators for CMSSW 7_6_x reminiAOD v2 + process.load("RecoTauTag.Configuration.RecoPFTauTag_reminiAOD_cff") + from PhysicsTools.PatAlgos.tools.tauTools import switchToPFTauHPS76xReMiniAOD + switchToPFTauHPS76xReMiniAOD(process) + #---------------------------------------------------------------------------- # Adding puppi jets process.load('CommonTools.PileupAlgos.Puppi_cff') From 03770037be8981e0f830d37c3abc3412066b701f Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 25 Nov 2015 20:05:48 +0100 Subject: [PATCH 40/66] added "master" config file for HPS tau reconstruction for reminiAOD v2 processing in CMSSW_7_6_x --- .../python/RecoPFTauTag_reminiAOD_cff.py | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 RecoTauTag/Configuration/python/RecoPFTauTag_reminiAOD_cff.py diff --git a/RecoTauTag/Configuration/python/RecoPFTauTag_reminiAOD_cff.py b/RecoTauTag/Configuration/python/RecoPFTauTag_reminiAOD_cff.py new file mode 100644 index 0000000000000..2fb4d6902ee41 --- /dev/null +++ b/RecoTauTag/Configuration/python/RecoPFTauTag_reminiAOD_cff.py @@ -0,0 +1,120 @@ +import FWCore.ParameterSet.Config as cms + +from RecoTauTag.RecoTau.PFRecoTauPFJetInputs_cfi import PFRecoTauPFJetInputs +# to be able to run PFTau sequence standalone on AOD +from TrackingTools.TransientTrack.TransientTrackBuilder_cfi import TransientTrackBuilderESProducer + +#------------------------------------------------------------------------------- +#------------------ Jet Production and Preselection----------------------------- +#------------------------------------------------------------------------------- +# Apply a base selection to the jets. The acceptance selection takes only jets +# with pt > 5 and abs(eta) < 2.5. The preselection selects jets that have at +# least one constituent with pt > 5. This cut should be 100% efficient w.r.t a +# lead pion selection. +# +# After the basic preselection has been applied to the jets, the pizeros inside +# the jet are reconstructed. +#------------------------------------------------------------------------------- + +# Collection PFCandidates from a DR=0.8 cone about the jet axis and make new +# faux jets with this collection +from RecoTauTag.RecoTau.RecoTauJetRegionProducer_cfi import \ + RecoTauJetRegionProducer +recoTauAK4PFJets08Region=RecoTauJetRegionProducer.clone( + src = PFRecoTauPFJetInputs.inputJetCollection +) + +# Reconstruct the pi zeros in our pre-selected jets. +from RecoTauTag.RecoTau.RecoTauPiZeroProducer_cfi import \ + ak4PFJetsLegacyHPSPiZeros +ak4PFJetsLegacyHPSPiZeros.jetSrc = PFRecoTauPFJetInputs.inputJetCollection +# import charged hadrons +from RecoTauTag.RecoTau.PFRecoTauChargedHadronProducer_cfi import \ + ak4PFJetsRecoTauChargedHadrons + +#------------------------------------------------------------------------------- +#------------------ Produce combinatoric base taus------------------------------ +#------------------------------------------------------------------------------- +# These jets form the basis of the HPS & TaNC taus. There are many taus +# produced for each jet, which are cleaned by the respective algorithms. +# We split it into different collections for each different decay mode. + +from RecoTauTag.RecoTau.RecoTauCombinatoricProducer_cfi import \ + combinatoricRecoTaus + +combinatoricRecoTaus.jetSrc = PFRecoTauPFJetInputs.inputJetCollection + +#-------------------------------------------------------------------------------- +# CV: disable reconstruction of 3Prong1Pi0 tau candidates +combinatoricRecoTaus.builders[0].decayModes.remove(combinatoricRecoTaus.builders[0].decayModes[6]) +#-------------------------------------------------------------------------------- + +#-------------------------------------------------------------------------------- +# CV: set mass of tau candidates reconstructed in 1Prong0pi0 decay mode to charged pion mass +combinatoricRecoTaus.modifiers.append(cms.PSet( + name = cms.string("tau_mass"), + plugin = cms.string("PFRecoTauMassPlugin"), + verbosity = cms.int32(0) +)) +#-------------------------------------------------------------------------------- + +#------------------------------------------------------------------------------- +#------------------ HPS Taus --------------------------------------------------- +#------------------------------------------------------------------------------- + +from RecoTauTag.Configuration.HPSPFTaus_reminiAOD_cff import * + +combinatoricRecoTaus.piZeroSrc = cms.InputTag("ak4PFJetsLegacyHPSPiZeros") + +#------------------------------------------------------------------------------- +#------------------ PFTauTagInfo workaround ------------------------------------ +#------------------------------------------------------------------------------- +# Build the PFTauTagInfos separately, then relink them into the taus. +from RecoTauTag.RecoTau.PFRecoTauTagInfoProducer_cfi import \ + pfRecoTauTagInfoProducer +from RecoJets.JetAssociationProducers.ak4JTA_cff \ + import ak4JetTracksAssociatorAtVertexPF +ak4PFJetTracksAssociatorAtVertex = ak4JetTracksAssociatorAtVertexPF.clone() +ak4PFJetTracksAssociatorAtVertex.jets = PFRecoTauPFJetInputs.inputJetCollection +tautagInfoModifer = cms.PSet( + name = cms.string("TTIworkaround"), + plugin = cms.string("RecoTauTagInfoWorkaroundModifer"), + pfTauTagInfoSrc = cms.InputTag("pfRecoTauTagInfoProducer"), +) + +# Add the modifier to our tau producers +hasTTIworkaround = False +for modifier in combinatoricRecoTaus.modifiers: + if hasattr(modifier, "name") and modifier.name.value() == "TTIworkaround": + hasTTIworkaround = True +if not hasTTIworkaround: + combinatoricRecoTaus.modifiers.append(tautagInfoModifer) +##combinatoricRecoTaus.modifiers.append(tautagInfoModifer) + +recoTauPileUpVertices = cms.EDFilter( + "RecoTauPileUpVertexSelector", + src = cms.InputTag("offlinePrimaryVertices"), + minTrackSumPt = cms.double(5), + filter = cms.bool(False), +) + +recoTauCommonSequence = cms.Sequence( + ak4PFJetTracksAssociatorAtVertex * + recoTauAK4PFJets08Region* + recoTauPileUpVertices* + pfRecoTauTagInfoProducer +) + +# Produce only classic HPS taus +recoTauClassicHPSSequence = cms.Sequence( + ak4PFJetsLegacyHPSPiZeros * + ak4PFJetsRecoTauChargedHadrons * + combinatoricRecoTaus * + produceAndDiscriminateHPSPFTaus +) + +PFTau = cms.Sequence( + recoTauCommonSequence * + recoTauClassicHPSSequence +) + From 92d3e49edcf3197565df11417d7aabb126cf30cc Mon Sep 17 00:00:00 2001 From: Dinko Ferencek Date: Thu, 26 Nov 2015 03:41:28 -0600 Subject: [PATCH 41/66] turning more magic numbers into static consts --- ...ndidateBoostedDoubleSecondaryVertexComputer.h | 9 +++++++++ ...didateBoostedDoubleSecondaryVertexComputer.cc | 16 ++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h b/RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h index 3043fcea8b0ff..b295d4e8bd7fa 100644 --- a/RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h +++ b/RecoBTag/SecondaryVertex/interface/CandidateBoostedDoubleSecondaryVertexComputer.h @@ -52,6 +52,15 @@ class CandidateBoostedDoubleSecondaryVertexComputer : public JetTagComputer { std::unique_ptr mvaID; // static variables + static constexpr float dummyZ_ratio = -3.0f; + static constexpr float dummyTrackSip3dSig = -50.0f; + static constexpr float dummyTrackSip2dSigAbove = -19.0f; + static constexpr float dummyTrackEtaRel = -1.0f; + static constexpr float dummyVertexMass = -1.0f; + static constexpr float dummyVertexEnergyRatio = -1.0f; + static constexpr float dummyVertexDeltaR = -1.0f; + static constexpr float dummyFlightDistance2dSig = -1.0f; + static constexpr float charmThreshold = 1.5f; static constexpr float bottomThreshold = 5.2f; }; diff --git a/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc b/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc index 102e52196a52a..62bbac8f6be6b 100644 --- a/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc +++ b/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc @@ -78,14 +78,14 @@ float CandidateBoostedDoubleSecondaryVertexComputer::discriminator(const TagInfo float value = -10.; // default variable values - float z_ratio = -3.; - float trackSip3dSig_3 = -50., trackSip3dSig_2 = -50., trackSip3dSig_1 = -50., trackSip3dSig_0 = -50.; - float tau2_trackSip3dSig_0 = -50., tau1_trackSip3dSig_0 = -50., tau2_trackSip3dSig_1 = -50., tau1_trackSip3dSig_1 = -50.; - float trackSip2dSigAboveCharm_0 = -19., trackSip2dSigAboveBottom_0 = -19., trackSip2dSigAboveBottom_1 = -19.; - float tau1_trackEtaRel_0 = -1., tau1_trackEtaRel_1 = -1., tau1_trackEtaRel_2 = -1.; - float tau2_trackEtaRel_0 = -1., tau2_trackEtaRel_1 = -1., tau2_trackEtaRel_2 = -1.; - float tau1_vertexMass = -1., tau1_vertexEnergyRatio = -1., tau1_vertexDeltaR = -1., tau1_flightDistance2dSig = -1.; - float tau2_vertexMass = -1., tau2_vertexEnergyRatio = -1., tau2_vertexDeltaR = -1., tau2_flightDistance2dSig = -1.; + float z_ratio = dummyZ_ratio; + float trackSip3dSig_3 = dummyTrackSip3dSig, trackSip3dSig_2 = dummyTrackSip3dSig, trackSip3dSig_1 = dummyTrackSip3dSig, trackSip3dSig_0 = dummyTrackSip3dSig; + float tau2_trackSip3dSig_0 = dummyTrackSip3dSig, tau1_trackSip3dSig_0 = dummyTrackSip3dSig, tau2_trackSip3dSig_1 = dummyTrackSip3dSig, tau1_trackSip3dSig_1 = dummyTrackSip3dSig; + float trackSip2dSigAboveCharm_0 = dummyTrackSip2dSigAbove, trackSip2dSigAboveBottom_0 = dummyTrackSip2dSigAbove, trackSip2dSigAboveBottom_1 = dummyTrackSip2dSigAbove; + float tau1_trackEtaRel_0 = dummyTrackEtaRel, tau1_trackEtaRel_1 = dummyTrackEtaRel, tau1_trackEtaRel_2 = dummyTrackEtaRel; + float tau2_trackEtaRel_0 = dummyTrackEtaRel, tau2_trackEtaRel_1 = dummyTrackEtaRel, tau2_trackEtaRel_2 = dummyTrackEtaRel; + float tau1_vertexMass = dummyVertexMass, tau1_vertexEnergyRatio = dummyVertexEnergyRatio, tau1_vertexDeltaR = dummyVertexDeltaR, tau1_flightDistance2dSig = dummyFlightDistance2dSig; + float tau2_vertexMass = dummyVertexMass, tau2_vertexEnergyRatio = dummyVertexEnergyRatio, tau2_vertexDeltaR = dummyVertexDeltaR, tau2_flightDistance2dSig = dummyFlightDistance2dSig; float jetNTracks = 0, nSV = 0, tau1_nSecondaryVertices = 0, tau2_nSecondaryVertices = 0; // get the jet reference From 1c9f333f44a15faf84b745ee1c619f456fb384ca Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 26 Nov 2015 10:54:57 +0100 Subject: [PATCH 42/66] added keep statement for hpsPFTauFootprintCorrection discriminator --- RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py | 1 + 1 file changed, 1 insertion(+) diff --git a/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py b/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py index 3190443c817cd..471952916ef1f 100644 --- a/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py +++ b/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py @@ -102,6 +102,7 @@ 'keep *_hpsPFTauDiscriminationByMVArawMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits_*_*', 'keep *_hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone_*_*', + 'keep *_hpsPFTauFootprintCorrection_*_*', 'keep *_hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits_*_*', 'keep *_hpsPFTauNeutralIsoPtSum_*_*', 'keep *_hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits_*_*', From 56496d52a5c657b559fa0c5903c92e52e009ac16 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 26 Nov 2015 10:56:16 +0100 Subject: [PATCH 43/66] added cut-based HPS combined isolation with deltaBeta discriminators for dR = 0.3 isolation cone --- .../PatAlgos/python/tools/tauTools.py | 3 +++ .../python/HPSPFTaus_reminiAOD_cff.py | 20 +++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/PhysicsTools/PatAlgos/python/tools/tauTools.py b/PhysicsTools/PatAlgos/python/tools/tauTools.py index 069362aab08f4..3000f7ff3b1b6 100644 --- a/PhysicsTools/PatAlgos/python/tools/tauTools.py +++ b/PhysicsTools/PatAlgos/python/tools/tauTools.py @@ -182,6 +182,9 @@ def _switchToPFTau(process, ("byMediumCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"), ("byTightCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByTightCombinedIsolationDBSumPtCorr3Hits"), ("byCombinedIsolationDeltaBetaCorrRaw3Hits", "DiscriminationByRawCombinedIsolationDBSumPtCorr3Hits"), + ("byLooseCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03"), + ("byMediumCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03"), + ("byTightCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03"), ("byLoosePileupWeightedIsolation3Hits", "DiscriminationByLoosePileupWeightedIsolation3Hits"), ("byMediumPileupWeightedIsolation3Hits", "DiscriminationByMediumPileupWeightedIsolation3Hits"), ("byTightPileupWeightedIsolation3Hits", "DiscriminationByTightPileupWeightedIsolation3Hits"), diff --git a/RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py b/RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py index 36538cb399a4f..f785d4e58c5ea 100644 --- a/RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py +++ b/RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py @@ -535,7 +535,6 @@ hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff79") hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff79") - hpsPFTauDiscriminationByMVA6rawElectronRejection = pfRecoTauDiscriminationAgainstElectronMVA6.clone( PFTauProducer = cms.InputTag('hpsPFTauProducer'), Prediscriminants = requireDecayMode.clone(), @@ -669,6 +668,23 @@ hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits ) +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03 = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone() +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03 = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.clone() +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03 = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.clone() + +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03.customOuterCone = cms.double(0.3) +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03.customOuterCone = cms.double(0.3) +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03.customOuterCone = cms.double(0.3) + +hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3HitsdR03 = cms.Sequence( + hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03* + hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03* + hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03 +) + hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone( ApplyDiscriminationByECALIsolation = cms.bool(False), applyDeltaBetaCorrection = cms.bool(False), @@ -904,7 +920,6 @@ ) hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff80") -##hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT.verbosity = cms.int32(1) hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff70") hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() @@ -1299,6 +1314,7 @@ hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr* hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits* + hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3HitsdR03* hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits* hpsPFTauDiscriminationByLooseElectronRejection* From fa7941eee381cf3a4407d61d8381e5583def0818 Mon Sep 17 00:00:00 2001 From: AJ Johnson Date: Thu, 26 Nov 2015 19:13:51 +0100 Subject: [PATCH 44/66] Added missing modules to keep statements in RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py --- .../Configuration/python/RecoTauTag_EventContent_cff.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py b/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py index 471952916ef1f..61c3701a3a0a5 100644 --- a/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py +++ b/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py @@ -113,7 +113,9 @@ 'keep *_hpsPFTauMVA3IsolationChargedIsoPtSum_*_*', 'keep *_hpsPFTauMVA3IsolationNeutralIsoPtSum_*_*', 'keep *_hpsPFTauMVA3IsolationPUcorrPtSum_*_*', - 'keep *_hpsPFTauTransverseImpactParameters_*_*' + 'keep *_hpsPFTauTransverseImpactParameters_*_*', + 'keep *_hpsPFTauNeutralIsoPtSumWeight_*_*', + 'keep *_hpsPFTauPhotonPtSumOutsideSignalCone_*_*' ) ) #AOD content From 78bb2a028b777bc3287ace837aa63633c6a3d328 Mon Sep 17 00:00:00 2001 From: Dinko Ferencek Date: Mon, 16 Nov 2015 11:50:47 -0600 Subject: [PATCH 45/66] added double-b tagger to slimmed ak8 jets in MiniAOD --- PhysicsTools/PatAlgos/python/slimming/applySubstructure_cff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PhysicsTools/PatAlgos/python/slimming/applySubstructure_cff.py b/PhysicsTools/PatAlgos/python/slimming/applySubstructure_cff.py index f3868db7dd8a7..1f56656c0043b 100644 --- a/PhysicsTools/PatAlgos/python/slimming/applySubstructure_cff.py +++ b/PhysicsTools/PatAlgos/python/slimming/applySubstructure_cff.py @@ -21,7 +21,7 @@ def applySubstructure( process ) : jetSource = cms.InputTag('ak8PFJetsCHS'), algo= 'AK', rParam = 0.8, jetCorrections = ('AK8PFchs', cms.vstring(['L1FastJet', 'L2Relative', 'L3Absolute']), 'None'), - btagDiscriminators = [x.getModuleLabel() for x in patJetsDefault.discriminatorSources], + btagDiscriminators = ([x.getModuleLabel() for x in patJetsDefault.discriminatorSources] + ['pfBoostedDoubleSecondaryVertexAK8BJetTags']), genJetCollection = cms.InputTag('slimmedGenJetsAK8') ) process.patJetsAK8.userData.userFloats.src = [] # start with empty list of user floats From c8d8e7fc9c2e85efb556ee45a72a421e1ab01aab Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Thu, 8 Oct 2015 10:33:45 +0200 Subject: [PATCH 46/66] Use phi+dphi in dxy/dz(Point) Now dxy(PV) and dz(PV) give the same as dxy() and dzAssociatedPV() for the associated PV. --- DataFormats/PatCandidates/src/PackedCandidate.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DataFormats/PatCandidates/src/PackedCandidate.cc b/DataFormats/PatCandidates/src/PackedCandidate.cc index f75f796f64028..4b482ea405617 100644 --- a/DataFormats/PatCandidates/src/PackedCandidate.cc +++ b/DataFormats/PatCandidates/src/PackedCandidate.cc @@ -144,11 +144,13 @@ pat::PackedCandidate::~PackedCandidate() { float pat::PackedCandidate::dxy(const Point &p) const { maybeUnpackBoth(); - return -(vertex_.load()->X()-p.X()) * std::sin(float(p4_.load()->Phi())) + (vertex_.load()->Y()-p.Y()) * std::cos(float(p4_.load()->Phi())); + const float phi = float(p4_.load()->Phi())+dphi_; + return -(vertex_.load()->X()-p.X()) * std::sin(phi) + (vertex_.load()->Y()-p.Y()) * std::cos(phi); } float pat::PackedCandidate::dz(const Point &p) const { maybeUnpackBoth(); - return (vertex_.load()->Z()-p.Z()) - ((vertex_.load()->X()-p.X()) * std::cos(float(p4_.load()->Phi())) + (vertex_.load()->Y()-p.Y()) * std::sin(float(p4_.load()->Phi()))) * p4_.load()->Pz()/p4_.load()->Pt(); + const float phi = float(p4_.load()->Phi())+dphi_; + return (vertex_.load()->Z()-p.Z()) - ((vertex_.load()->X()-p.X()) * std::cos(phi) + (vertex_.load()->Y()-p.Y()) * std::sin(phi)) * p4_.load()->Pz()/p4_.load()->Pt(); } void pat::PackedCandidate::unpackTrk() const { From d049207de2feac1e3e967b3dd7b13d92b9db5b07 Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Thu, 26 Nov 2015 11:59:22 +0100 Subject: [PATCH 47/66] Fix smallest negative being packed as smallest positive Smallest negative was also packed as 0, which is unpacked as the smallest positive, resulting a sign flip. For backwards compatibility reasons, the range of negative numbers is shran. --- .../PatCandidates/interface/liblogintpack.h | 11 ++- DataFormats/PatCandidates/test/BuildFile.xml | 2 +- .../PatCandidates/test/testlogintpack.cpp | 72 +++++++++++++++++++ 3 files changed, 81 insertions(+), 4 deletions(-) create mode 100644 DataFormats/PatCandidates/test/testlogintpack.cpp diff --git a/DataFormats/PatCandidates/interface/liblogintpack.h b/DataFormats/PatCandidates/interface/liblogintpack.h index b7c701a96c002..06a006be24dbd 100644 --- a/DataFormats/PatCandidates/interface/liblogintpack.h +++ b/DataFormats/PatCandidates/interface/liblogintpack.h @@ -5,6 +5,11 @@ namespace logintpack { + constexpr int8_t smallestPositive = 0; + // note that abs(unpack(smallestNegative)) == unpack(1), i.e. there + // is no "x" such that "unpack(x) == -unpack(0)" + constexpr int8_t smallestNegative = -1; + int8_t pack8logCeil(double x,double lmin, double lmax, uint8_t base=128) { if(base>128) base=128; @@ -13,7 +18,7 @@ namespace logintpack int8_t r=ceil(centered); if(centered >= base-1) r=base-1; if(centered < 0) r=0; - if(x<0) r=-r; + if(x<0) r = r==0 ? -1 : -r; return r; } @@ -25,7 +30,7 @@ namespace logintpack int8_t r=centered; if(centered >= base-1) r=base-1; if(centered < 0) r=0; - if(x<0) r=-r; + if(x<0) r = r==0 ? -1 : -r; return r; } @@ -39,7 +44,7 @@ namespace logintpack int8_t r=round(centered); if(centered >= base-1) r=base-1; if(centered < 0) r=0; - if(x<0) r=-r; + if(x<0) r = r==0 ? -1 : -r; return r; } diff --git a/DataFormats/PatCandidates/test/BuildFile.xml b/DataFormats/PatCandidates/test/BuildFile.xml index 14eda66621850..07f723a4f2c19 100644 --- a/DataFormats/PatCandidates/test/BuildFile.xml +++ b/DataFormats/PatCandidates/test/BuildFile.xml @@ -1,7 +1,7 @@ - + diff --git a/DataFormats/PatCandidates/test/testlogintpack.cpp b/DataFormats/PatCandidates/test/testlogintpack.cpp new file mode 100644 index 0000000000000..1fd59e728e717 --- /dev/null +++ b/DataFormats/PatCandidates/test/testlogintpack.cpp @@ -0,0 +1,72 @@ +#include +#include +#include + +#include "DataFormats/PatCandidates/interface/liblogintpack.h" + +class testlogintpack : public CppUnit::TestFixture { + CPPUNIT_TEST_SUITE(testlogintpack); + + CPPUNIT_TEST(test); + + CPPUNIT_TEST_SUITE_END(); +public: + void setUp() {} + void tearDown() {} + + void test(); + +private: +}; + +namespace { + double pack(double x) { return logintpack::pack8log (x, -15, 0); } + double packceil(double x) { return logintpack::pack8logCeil (x, -15, 0); } + double packclosed(double x) { return logintpack::pack8log (x, -15, 0); } + double unpack(int8_t x) { return logintpack::unpack8log (x, -15, 0); } + double unpackclosed(int8_t x) { return logintpack::unpack8logClosed(x, -15, 0); } +} + +void testlogintpack::test() { + using logintpack::smallestPositive; + using logintpack::smallestNegative; + constexpr int8_t largestPositive = 127; + constexpr int8_t largestNegative = -127; + + const float smallestValuePos = std::exp(-15.f); + const float smallestValueNeg = -std::exp(-15.f+1.f/128.f*15.f); + const float smallestValueNegForClosed = -std::exp(-15.f+1.f/127.f*15.f); + CPPUNIT_ASSERT(pack(smallestValuePos) == smallestPositive); + CPPUNIT_ASSERT(packceil(smallestValuePos) == smallestPositive); + CPPUNIT_ASSERT(packclosed(smallestValuePos) == smallestPositive); + CPPUNIT_ASSERT(unpack(smallestPositive) == smallestValuePos); + CPPUNIT_ASSERT(unpackclosed(smallestPositive) == smallestValuePos); + + CPPUNIT_ASSERT(pack(smallestValueNeg) == smallestNegative); + CPPUNIT_ASSERT(packceil(smallestValueNeg) == smallestNegative); + CPPUNIT_ASSERT(unpack(smallestNegative) == smallestValueNeg); + CPPUNIT_ASSERT(unpack(pack(smallestValueNeg)) == smallestValueNeg); + CPPUNIT_ASSERT(unpack(packceil(smallestValueNeg)) == smallestValueNeg); + CPPUNIT_ASSERT(unpackclosed(packclosed(smallestValueNegForClosed)) == smallestValueNegForClosed); + + const float largestValuePos = std::exp(-15.f+127.f/128.f*15.f); + const float largestValueNeg = -largestValuePos; + CPPUNIT_ASSERT(pack(std::exp(0.f)) == largestPositive); // this one actually overflows + CPPUNIT_ASSERT(pack(largestValuePos) == largestPositive); + CPPUNIT_ASSERT(packceil(largestValuePos) == largestPositive); + CPPUNIT_ASSERT(unpack(largestPositive) == largestValuePos); + + CPPUNIT_ASSERT(pack(largestValueNeg) == largestNegative); + CPPUNIT_ASSERT(packceil(largestValueNeg) == largestNegative); + CPPUNIT_ASSERT(unpack(largestNegative) == largestValueNeg); + + const float largestValueClosedPos = std::exp(0.f); + const float largestValueClosedNeg = -largestValueClosedPos; + CPPUNIT_ASSERT(packclosed(largestValueClosedPos) == largestPositive); + CPPUNIT_ASSERT(unpackclosed(largestPositive) == largestValueClosedPos); + CPPUNIT_ASSERT(packclosed(largestValueClosedNeg) == largestNegative); + CPPUNIT_ASSERT(unpackclosed(largestNegative) == largestValueClosedNeg); +} + +CPPUNIT_TEST_SUITE_REGISTRATION(testlogintpack); + From 1729af1644a5cd51fad82db082cd54fbffea9ead Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Fri, 30 Oct 2015 13:42:41 +0100 Subject: [PATCH 48/66] Use doubles in intermediate steps in liblogintpack Using floats causes roundings. It happens that e.g. with int8_t packceil(double x) { return logintpack::pack8logCeil(x, -15, 0); } double unpack(int8_t x) { return logintpack::unpack8log (x, -15, 0); } the condition "unpack(packceil(v)) >= v" does not hold for some v (e.g. std:exp(-15.f + 1/128.f*15.f) + 1ulp, which is in the added unit test). --- .../PatCandidates/interface/liblogintpack.h | 28 +++++------ .../PatCandidates/test/testlogintpack.cpp | 46 +++++++++++++------ 2 files changed, 47 insertions(+), 27 deletions(-) diff --git a/DataFormats/PatCandidates/interface/liblogintpack.h b/DataFormats/PatCandidates/interface/liblogintpack.h index 06a006be24dbd..f447c1f72c013 100644 --- a/DataFormats/PatCandidates/interface/liblogintpack.h +++ b/DataFormats/PatCandidates/interface/liblogintpack.h @@ -13,9 +13,9 @@ namespace logintpack int8_t pack8logCeil(double x,double lmin, double lmax, uint8_t base=128) { if(base>128) base=128; - float l =log(fabs(x)); - float centered = (l-lmin)/(lmax-lmin)*base; - int8_t r=ceil(centered); + const double l = std::log(std::abs(x)); + const double centered = (l-lmin)/(lmax-lmin)*base; + int8_t r=std::ceil(centered); if(centered >= base-1) r=base-1; if(centered < 0) r=0; if(x<0) r = r==0 ? -1 : -r; @@ -25,8 +25,8 @@ namespace logintpack int8_t pack8log(double x,double lmin, double lmax, uint8_t base=128) { if(base>128) base=128; - float l =log(fabs(x)); - float centered = (l-lmin)/(lmax-lmin)*base; + const double l = std::log(std::abs(x)); + const double centered = (l-lmin)/(lmax-lmin)*base; int8_t r=centered; if(centered >= base-1) r=base-1; if(centered < 0) r=0; @@ -39,8 +39,8 @@ namespace logintpack int8_t pack8logClosed(double x,double lmin, double lmax, uint8_t base=128) { if(base>128) base=128; - float l =log(fabs(x)); - float centered = (l-lmin)/(lmax-lmin)*(base-1); + const double l = std::log(std::abs(x)); + const double centered = (l-lmin)/(lmax-lmin)*(base-1); int8_t r=round(centered); if(centered >= base-1) r=base-1; if(centered < 0) r=0; @@ -52,9 +52,9 @@ namespace logintpack double unpack8log(int8_t i,double lmin, double lmax, uint8_t base=128) { if(base>128) base=128; - float basef=base; - float l=lmin+abs(i)/basef*(lmax-lmin); - float val=exp(l); + const double basef=base; + const double l=lmin+std::abs(i)/basef*(lmax-lmin); + const double val=std::exp(l); if(i<0) return -val; else return val; } @@ -62,10 +62,10 @@ namespace logintpack double unpack8logClosed(int8_t i,double lmin, double lmax, uint8_t base=128) { if(base>128) base=128; - float basef=base-1; - float l=lmin+abs(i)/basef*(lmax-lmin); - if (abs(i) == base-1) l = lmax; - float val=exp(l); + const double basef=base-1; + double l=lmin+std::abs(i)/basef*(lmax-lmin); + if (std::abs(i) == base-1) l = lmax; + const double val=std::exp(l); if(i<0) return -val; else return val; } diff --git a/DataFormats/PatCandidates/test/testlogintpack.cpp b/DataFormats/PatCandidates/test/testlogintpack.cpp index 1fd59e728e717..e8fe375a20db3 100644 --- a/DataFormats/PatCandidates/test/testlogintpack.cpp +++ b/DataFormats/PatCandidates/test/testlogintpack.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include "DataFormats/PatCandidates/interface/liblogintpack.h" @@ -20,11 +21,11 @@ class testlogintpack : public CppUnit::TestFixture { }; namespace { - double pack(double x) { return logintpack::pack8log (x, -15, 0); } - double packceil(double x) { return logintpack::pack8logCeil (x, -15, 0); } - double packclosed(double x) { return logintpack::pack8log (x, -15, 0); } - double unpack(int8_t x) { return logintpack::unpack8log (x, -15, 0); } - double unpackclosed(int8_t x) { return logintpack::unpack8logClosed(x, -15, 0); } + int8_t pack(double x) { return logintpack::pack8log (x, -15, 0); } + int8_t packceil(double x) { return logintpack::pack8logCeil (x, -15, 0); } + int8_t packclosed(double x) { return logintpack::pack8log (x, -15, 0); } + double unpack(int8_t x) { return logintpack::unpack8log (x, -15, 0); } + double unpackclosed(int8_t x) { return logintpack::unpack8logClosed(x, -15, 0); } } void testlogintpack::test() { @@ -33,9 +34,9 @@ void testlogintpack::test() { constexpr int8_t largestPositive = 127; constexpr int8_t largestNegative = -127; - const float smallestValuePos = std::exp(-15.f); - const float smallestValueNeg = -std::exp(-15.f+1.f/128.f*15.f); - const float smallestValueNegForClosed = -std::exp(-15.f+1.f/127.f*15.f); + const double smallestValuePos = std::exp(-15.); + const double smallestValueNeg = -std::exp(-15.+1./128.*15.); + const double smallestValueNegForClosed = -std::exp(-15.+1./127.*15.); CPPUNIT_ASSERT(pack(smallestValuePos) == smallestPositive); CPPUNIT_ASSERT(packceil(smallestValuePos) == smallestPositive); CPPUNIT_ASSERT(packclosed(smallestValuePos) == smallestPositive); @@ -49,9 +50,8 @@ void testlogintpack::test() { CPPUNIT_ASSERT(unpack(packceil(smallestValueNeg)) == smallestValueNeg); CPPUNIT_ASSERT(unpackclosed(packclosed(smallestValueNegForClosed)) == smallestValueNegForClosed); - const float largestValuePos = std::exp(-15.f+127.f/128.f*15.f); - const float largestValueNeg = -largestValuePos; - CPPUNIT_ASSERT(pack(std::exp(0.f)) == largestPositive); // this one actually overflows + const double largestValuePos = std::exp(-15.+127./128.*15.); + const double largestValueNeg = -largestValuePos; CPPUNIT_ASSERT(pack(largestValuePos) == largestPositive); CPPUNIT_ASSERT(packceil(largestValuePos) == largestPositive); CPPUNIT_ASSERT(unpack(largestPositive) == largestValuePos); @@ -60,12 +60,32 @@ void testlogintpack::test() { CPPUNIT_ASSERT(packceil(largestValueNeg) == largestNegative); CPPUNIT_ASSERT(unpack(largestNegative) == largestValueNeg); - const float largestValueClosedPos = std::exp(0.f); - const float largestValueClosedNeg = -largestValueClosedPos; + const double largestValueClosedPos = std::exp(0.); + const double largestValueClosedNeg = -largestValueClosedPos; CPPUNIT_ASSERT(packclosed(largestValueClosedPos) == largestPositive); CPPUNIT_ASSERT(unpackclosed(largestPositive) == largestValueClosedPos); CPPUNIT_ASSERT(packclosed(largestValueClosedNeg) == largestNegative); CPPUNIT_ASSERT(unpackclosed(largestNegative) == largestValueClosedNeg); + + const double someValue = std::exp(-15. + 1/128.*15.); + const float someValueFloat = std::exp(-15.f + 1/128.f*15.f); + CPPUNIT_ASSERT(unpack(packceil(someValue)) == someValue); + CPPUNIT_ASSERT(static_cast(unpack(packceil(someValue))) == someValueFloat); + { + union { float flt; uint32_t i32; } conv; + conv.flt = someValueFloat; + conv.i32 += 1; + const float someValuePlus1Ulp32 = conv.flt; + CPPUNIT_ASSERT(static_cast(unpack(packceil(someValuePlus1Ulp32))) >= someValuePlus1Ulp32); + } + { + union { double flt; uint64_t i64; } conv; + conv.flt = someValue; + conv.i64 += 1; + const float someValuePlus1Ulp64 = conv.flt; + CPPUNIT_ASSERT(unpack(packceil(someValuePlus1Ulp64)) >= someValuePlus1Ulp64); + } + } CPPUNIT_TEST_SUITE_REGISTRATION(testlogintpack); From 7d849a1ce449ad606c11508946cd097793aeb3c2 Mon Sep 17 00:00:00 2001 From: Fabio Colombo Date: Sat, 28 Nov 2015 19:24:03 +0100 Subject: [PATCH 49/66] AntiEleMVA: addressing some of the comments from PR --- .../plugins/PFRecoTauDiscriminationAgainstElectronMVA6.cc | 8 +++----- RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc | 7 +++++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationAgainstElectronMVA6.cc b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationAgainstElectronMVA6.cc index 45526c1518b41..a37fcefbf80a3 100644 --- a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationAgainstElectronMVA6.cc +++ b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationAgainstElectronMVA6.cc @@ -18,8 +18,6 @@ #include "DataFormats/TauReco/interface/PFTauDiscriminator.h" #include "DataFormats/Math/interface/deltaR.h" -#include - #include #include #include @@ -161,7 +159,7 @@ double PFRecoTauDiscriminationAgainstElectronMVA6::discriminate(const PFTauRef& } //// Veto taus that go to Ecal crack - if ( TMath::Abs(tauEtaAtEcalEntrance) < 1.479 ) { // Barrel + if ( std::abs(tauEtaAtEcalEntrance) < 1.479 ) { // Barrel if ( numSignalPFGammaCandsInSigCone == 0 && hasGsfTrack ) { category = 5.; } @@ -177,7 +175,7 @@ double PFRecoTauDiscriminationAgainstElectronMVA6::discriminate(const PFTauRef& } } - mvaValue = TMath::Min(mvaValue, mva_match); + mvaValue = std::min(mvaValue, mva_match); isGsfElectronMatched = true; } // deltaR < 0.3 } // electron pt > 10 @@ -196,7 +194,7 @@ double PFRecoTauDiscriminationAgainstElectronMVA6::discriminate(const PFTauRef& } //// Veto taus that go to Ecal crack - if ( TMath::Abs(tauEtaAtEcalEntrance) < 1.479 ) { // Barrel + if ( std::abs(tauEtaAtEcalEntrance) < 1.479 ) { // Barrel if ( numSignalPFGammaCandsInSigCone == 0 && !hasGsfTrack ) { category = 0.; } diff --git a/RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc b/RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc index 80434061d47dd..957394a0c134d 100644 --- a/RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc +++ b/RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc @@ -12,6 +12,7 @@ #include "FWCore/Framework/interface/ESHandle.h" #include +#include AntiElectronIDMVA6::AntiElectronIDMVA6(const edm::ParameterSet& cfg) : isInitialized_(false), @@ -190,7 +191,10 @@ double AntiElectronIDMVA6::MVAValue(Float_t TauPt, dPhi2 += (pt_i*phi_i*phi_i); } - Float_t TauGammaEnFracIn = sumPt/TauPt; + Float_t TauGammaEnFracIn = -99.; + if ( TauPt > 0. ) { + TauGammaEnFracIn = sumPt/TauPt; + } if ( sumPt > 0. ) { dEta /= sumPt; @@ -878,7 +882,6 @@ double AntiElectronIDMVA6::minimum(double a, double b) } -#include namespace { // IN: define locations of the 18 phi-cracks From 31b2416c5dda30fbf6b19967f27572642ac4e0d3 Mon Sep 17 00:00:00 2001 From: Aruna Date: Sun, 29 Nov 2015 09:51:00 +0100 Subject: [PATCH 50/66] fix for comments from PR --- .../RecoTau/interface/PFRecoTauClusterVariables.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h b/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h index 4b3f44a881240..13c9301f8f23b 100644 --- a/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h +++ b/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h @@ -26,11 +26,17 @@ namespace bool isInside(float photon_pt, float deta, float dphi){ + double stripEtaAssociationDistance_0p95_p0 = 0.197077; + double stripEtaAssociationDistance_0p95_p1 = 0.658701; + + double stripPhiAssociationDistance_0p95_p0 = 0.352476; + double stripPhiAssociationDistance_0p95_p1 = 0.707716; + if(photon_pt==0){return false;} if( - (dphi < TMath::Min(0.3, TMath::Max(0.05, 0.352476*TMath::Power(photon_pt, -0.707716)))) && \ - (deta < TMath::Min(0.15, TMath::Max(0.05, 0.197077*TMath::Power(photon_pt, -0.658701)))) + (dphi < std::min(0.3, std::max(0.05, stripPhiAssociationDistance_0p95_p0*std::pow(photon_pt, -(stripPhiAssociationDistance_0p95_p1))))) && \ + (deta < std::min(0.15, std::max(0.05, stripEtaAssociationDistance_0p95_p0*std::pow(photon_pt, -(stripEtaAssociationDistance_0p95_p1))))) ){ return true; } @@ -78,7 +84,7 @@ namespace float sum_pt = 0.; float sum_dx_pt = 0.; - float signalrad = std::max(0.05, std::min(0.1, 3./tau.pt())); + float signalrad = (tau.pt() > 0) ? std::max(0.05, std::min(0.1, 3./tau.pt())) : 0.05; int is3prong = (decaymode==10); auto& cands = getPFGammas(tau, mode < 2); From b0bb77599e3c3e82cda62fd2fd3237d108128fd3 Mon Sep 17 00:00:00 2001 From: Aruna Date: Sun, 29 Nov 2015 12:31:04 +0100 Subject: [PATCH 51/66] another fix for comments from PR --- RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h b/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h index 13c9301f8f23b..c762f55ff5c86 100644 --- a/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h +++ b/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h @@ -84,7 +84,7 @@ namespace float sum_pt = 0.; float sum_dx_pt = 0.; - float signalrad = (tau.pt() > 0) ? std::max(0.05, std::min(0.1, 3./tau.pt())) : 0.05; + float signalrad = std::max(0.05, std::min(0.1, 3./std::max(1., tau.pt()))); int is3prong = (decaymode==10); auto& cands = getPFGammas(tau, mode < 2); From 342bbf14e5a66b2bbe8642c4a292eac971879373 Mon Sep 17 00:00:00 2001 From: Fabio Colombo Date: Sun, 29 Nov 2015 12:56:39 +0100 Subject: [PATCH 52/66] AntiEleMVA: ensure non-zeroness before dividing --- ...ecoTauDiscriminationAgainstElectronMVA6.cc | 8 ++- RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc | 59 +++++++++++-------- 2 files changed, 40 insertions(+), 27 deletions(-) diff --git a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationAgainstElectronMVA6.cc b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationAgainstElectronMVA6.cc index a37fcefbf80a3..6b1ef90d22c34 100644 --- a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationAgainstElectronMVA6.cc +++ b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationAgainstElectronMVA6.cc @@ -91,6 +91,7 @@ double PFRecoTauDiscriminationAgainstElectronMVA6::discriminate(const PFTauRef& float deltaRDummy = 9.9; + const float ECALBarrelEndcapEtaBorder = 1.479; float tauEtaAtEcalEntrance = -99.; float sumEtaTimesEnergy = 0.; float sumEnergy = 0.; @@ -131,9 +132,10 @@ double PFRecoTauDiscriminationAgainstElectronMVA6::discriminate(const PFTauRef& pfGamma != signalPFGammaCands.end(); ++pfGamma ) { double dR = deltaR((*pfGamma)->p4(), thePFTauRef->leadPFChargedHadrCand()->p4()); + double signalrad = std::max(0.05, std::min(0.10, 3.0/std::max(1.0, thePFTauRef->pt()))); // pfGammas inside the tau signal cone - if (dR < std::max(0.05, std::min(0.10, 3.0/thePFTauRef->pt()))) { + if (dR < signalrad) { numSignalPFGammaCandsInSigCone += 1; } } @@ -159,7 +161,7 @@ double PFRecoTauDiscriminationAgainstElectronMVA6::discriminate(const PFTauRef& } //// Veto taus that go to Ecal crack - if ( std::abs(tauEtaAtEcalEntrance) < 1.479 ) { // Barrel + if ( std::abs(tauEtaAtEcalEntrance) < ECALBarrelEndcapEtaBorder ) { // Barrel if ( numSignalPFGammaCandsInSigCone == 0 && hasGsfTrack ) { category = 5.; } @@ -194,7 +196,7 @@ double PFRecoTauDiscriminationAgainstElectronMVA6::discriminate(const PFTauRef& } //// Veto taus that go to Ecal crack - if ( std::abs(tauEtaAtEcalEntrance) < 1.479 ) { // Barrel + if ( std::abs(tauEtaAtEcalEntrance) < ECALBarrelEndcapEtaBorder ) { // Barrel if ( numSignalPFGammaCandsInSigCone == 0 && !hasGsfTrack ) { category = 0.; } diff --git a/RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc b/RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc index 957394a0c134d..2f9bd463cf229 100644 --- a/RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc +++ b/RecoTauTag/RecoTau/src/AntiElectronIDMVA6.cc @@ -322,8 +322,15 @@ double AntiElectronIDMVA6::MVAValue(Float_t TauPt, } double mvaValue = -99.; + + const float ECALBarrelEndcapEtaBorder = 1.479; + float ElecDeltaPinPoutOverPin = (ElecPin > 0.0) ? (std::abs(ElecPin - ElecPout)/ElecPin) : 1.0; + float ElecEecalOverPout = (ElecPout > 0.0) ? (ElecEecal/ElecPout) : 20.0; + float ElecNumHitsDiffOverSum = ((ElecGSFNumHits + ElecKFNumHits) > 0.0) ? + ((ElecGSFNumHits - ElecKFNumHits)/(ElecGSFNumHits + ElecKFNumHits)) : 1.0; + if ( deltaR(TauEtaAtEcalEntrance, TauPhi, ElecEta, ElecPhi) > 0.3 && TauSignalPFGammaCandsIn == 0 && TauHasGsf < 0.5) { - if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ){ + if ( std::abs(TauEtaAtEcalEntrance) < ECALBarrelEndcapEtaBorder ){ Var_NoEleMatch_woGwoGSF_Barrel_[0] = TauEtaAtEcalEntrance; Var_NoEleMatch_woGwoGSF_Barrel_[1] = TauLeadChargedPFCandEtaAtEcalEntrance; Var_NoEleMatch_woGwoGSF_Barrel_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt)); @@ -349,7 +356,7 @@ double AntiElectronIDMVA6::MVAValue(Float_t TauPt, } } else if ( deltaR(TauEtaAtEcalEntrance, TauPhi, ElecEta, ElecPhi) > 0.3 && TauSignalPFGammaCandsIn > 0 && TauHasGsf < 0.5 ) { - if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ){ + if ( std::abs(TauEtaAtEcalEntrance) < ECALBarrelEndcapEtaBorder ){ Var_NoEleMatch_wGwoGSF_Barrel_[0] = TauEtaAtEcalEntrance; Var_NoEleMatch_wGwoGSF_Barrel_[1] = TauLeadChargedPFCandEtaAtEcalEntrance; Var_NoEleMatch_wGwoGSF_Barrel_[2] = std::min(float(2.), TauLeadChargedPFCandPt/std::max(float(1.), TauPt)); @@ -391,16 +398,16 @@ double AntiElectronIDMVA6::MVAValue(Float_t TauPt, } } else if ( TauSignalPFGammaCandsIn == 0 && TauHasGsf > 0.5 ) { - if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ) { + if ( std::abs(TauEtaAtEcalEntrance) < ECALBarrelEndcapEtaBorder ) { Var_woGwGSF_Barrel_[0] = std::max(float(-0.1), ElecEtotOverPin); Var_woGwGSF_Barrel_[1] = std::log(ElecChi2NormGSF); Var_woGwGSF_Barrel_[2] = ElecGSFNumHits; Var_woGwGSF_Barrel_[3] = std::log(ElecGSFTrackResol); Var_woGwGSF_Barrel_[4] = ElecGSFTracklnPt; - Var_woGwGSF_Barrel_[5] = ((ElecGSFNumHits - ElecKFNumHits)/(ElecGSFNumHits + ElecKFNumHits)); + Var_woGwGSF_Barrel_[5] = ElecNumHitsDiffOverSum; Var_woGwGSF_Barrel_[6] = std::log(ElecChi2NormKF); - Var_woGwGSF_Barrel_[7] = std::min(std::abs(ElecPin - ElecPout)/ElecPin, float(1.)); - Var_woGwGSF_Barrel_[8] = std::min(ElecEecal/ElecPout, float(20.)); + Var_woGwGSF_Barrel_[7] = std::min(ElecDeltaPinPoutOverPin, float(1.)); + Var_woGwGSF_Barrel_[8] = std::min(ElecEecalOverPout, float(20.)); Var_woGwGSF_Barrel_[9] = ElecDeltaEta; Var_woGwGSF_Barrel_[10] = ElecDeltaPhi; Var_woGwGSF_Barrel_[11] = std::min(ElecMvaInSigmaEtaEta, float(0.01)); @@ -423,10 +430,10 @@ double AntiElectronIDMVA6::MVAValue(Float_t TauPt, Var_woGwGSF_Endcap_[2] = ElecGSFNumHits; Var_woGwGSF_Endcap_[3] = std::log(ElecGSFTrackResol); Var_woGwGSF_Endcap_[4] = ElecGSFTracklnPt; - Var_woGwGSF_Endcap_[5] = ((ElecGSFNumHits - ElecKFNumHits)/(ElecGSFNumHits + ElecKFNumHits)); + Var_woGwGSF_Endcap_[5] = ElecNumHitsDiffOverSum; Var_woGwGSF_Endcap_[6] = std::log(ElecChi2NormKF); - Var_woGwGSF_Endcap_[7] = std::min(std::abs(ElecPin - ElecPout)/ElecPin, float(1.)); - Var_woGwGSF_Endcap_[8] = std::min(ElecEecal/ElecPout, float(20.)); + Var_woGwGSF_Endcap_[7] = std::min(ElecDeltaPinPoutOverPin, float(1.)); + Var_woGwGSF_Endcap_[8] = std::min(ElecEecalOverPout, float(20.)); Var_woGwGSF_Endcap_[9] = ElecDeltaEta; Var_woGwGSF_Endcap_[10] = ElecDeltaPhi; Var_woGwGSF_Endcap_[11] = std::min(ElecMvaInSigmaEtaEta, float(0.01)); @@ -445,16 +452,16 @@ double AntiElectronIDMVA6::MVAValue(Float_t TauPt, } } else if ( TauSignalPFGammaCandsIn > 0 && TauHasGsf > 0.5 ) { - if ( std::abs(TauEtaAtEcalEntrance) < 1.479 ) { + if ( std::abs(TauEtaAtEcalEntrance) < ECALBarrelEndcapEtaBorder ) { Var_wGwGSF_Barrel_[0] = std::max(float(-0.1), ElecEtotOverPin); Var_wGwGSF_Barrel_[1] = std::log(ElecChi2NormGSF); Var_wGwGSF_Barrel_[2] = ElecGSFNumHits; Var_wGwGSF_Barrel_[3] = std::log(ElecGSFTrackResol); Var_wGwGSF_Barrel_[4] = ElecGSFTracklnPt; - Var_wGwGSF_Barrel_[5] = ((ElecGSFNumHits - ElecKFNumHits)/(ElecGSFNumHits + ElecKFNumHits)); + Var_wGwGSF_Barrel_[5] = ElecNumHitsDiffOverSum; Var_wGwGSF_Barrel_[6] = std::log(ElecChi2NormKF); - Var_wGwGSF_Barrel_[7] = std::min(std::abs(ElecPin - ElecPout)/ElecPin, float(1.)); - Var_wGwGSF_Barrel_[8] = std::min(ElecEecal/ElecPout, float(20.)); + Var_wGwGSF_Barrel_[7] = std::min(ElecDeltaPinPoutOverPin, float(1.)); + Var_wGwGSF_Barrel_[8] = std::min(ElecEecalOverPout, float(20.)); Var_wGwGSF_Barrel_[9] = ElecDeltaEta; Var_wGwGSF_Barrel_[10] = ElecDeltaPhi; Var_wGwGSF_Barrel_[11] = std::min(ElecMvaInSigmaEtaEta, float(0.01)); @@ -485,10 +492,10 @@ double AntiElectronIDMVA6::MVAValue(Float_t TauPt, Var_wGwGSF_Endcap_[2] = ElecGSFNumHits; Var_wGwGSF_Endcap_[3] = std::log(ElecGSFTrackResol); Var_wGwGSF_Endcap_[4] = ElecGSFTracklnPt; - Var_wGwGSF_Endcap_[5] = ((ElecGSFNumHits - ElecKFNumHits)/(ElecGSFNumHits + ElecKFNumHits)); + Var_wGwGSF_Endcap_[5] = ElecNumHitsDiffOverSum; Var_wGwGSF_Endcap_[6] = std::log(ElecChi2NormKF); - Var_wGwGSF_Endcap_[7] = std::min(std::abs(ElecPin - ElecPout)/ElecPin, float(1.)); - Var_wGwGSF_Endcap_[8] = std::min(ElecEecal/ElecPout, float(20.)); + Var_wGwGSF_Endcap_[7] = std::min(ElecDeltaPinPoutOverPin, float(1.)); + Var_wGwGSF_Endcap_[8] = std::min(ElecEecalOverPout, float(20.)); Var_wGwGSF_Endcap_[9] = ElecDeltaEta; Var_wGwGSF_Endcap_[10] = ElecDeltaPhi; Var_wGwGSF_Endcap_[11] = std::min(ElecMvaInSigmaEtaEta, float(0.01)); @@ -522,7 +529,7 @@ double AntiElectronIDMVA6::MVAValue(const reco::PFTau& thePFTau, { // === tau variables === - Float_t TauEtaAtEcalEntrance = -99.; + float TauEtaAtEcalEntrance = -99.; float sumEtaTimesEnergy = 0.; float sumEnergy = 0.; const std::vector& signalPFCands = thePFTau.signalPFCands(); @@ -574,9 +581,10 @@ double AntiElectronIDMVA6::MVAValue(const reco::PFTau& thePFTau, for ( unsigned i = 0 ; i < thePFTau.signalPFGammaCands().size(); ++i ) { reco::PFCandidatePtr gamma = thePFTau.signalPFGammaCands().at(i); float dR = deltaR(gamma->p4(), thePFTau.leadPFChargedHadrCand()->p4()); + float signalrad = std::max(0.05, std::min(0.10, 3.0/std::max(1.0, thePFTau.pt()))); // pfGammas inside the tau signal cone - if (dR < std::max(0.05, std::min(0.10, 3.0/thePFTau.pt()))) { + if (dR < signalrad) { if ( thePFTau.leadPFChargedHadrCand().isNonnull() ) { GammasdEtaInSigCone.push_back(gamma->eta() - thePFTau.leadPFChargedHadrCand()->eta()); GammasdPhiInSigCone.push_back(gamma->phi() - thePFTau.leadPFChargedHadrCand()->phi()); @@ -605,9 +613,10 @@ double AntiElectronIDMVA6::MVAValue(const reco::PFTau& thePFTau, for ( unsigned i = 0 ; i < thePFTau.signalPFChargedHadrCands().size(); ++i ) { reco::PFCandidatePtr charged = thePFTau.signalPFChargedHadrCands().at(i); float dR = deltaR(charged->p4(), thePFTau.leadPFChargedHadrCand()->p4()); + float signalrad = std::max(0.05, std::min(0.10, 3.0/std::max(1.0, thePFTau.pt()))); // charged particles inside the tau signal cone - if (dR < std::max(0.05, std::min(0.10, 3.0/thePFTau.pt()))) { + if (dR < signalrad) { pfChargedSum += charged->p4(); } } @@ -650,8 +659,8 @@ double AntiElectronIDMVA6::MVAValue(const reco::PFTau& thePFTau, } Float_t ElecPin = std::sqrt(theGsfEle.trackMomentumAtVtx().Mag2()); - Float_t ElecPout = std::sqrt(theGsfEle.trackMomentumOut().Mag2()); - Float_t ElecEtotOverPin = (ElecEe + ElecEgamma)/ElecPin; + Float_t ElecPout = std::sqrt(theGsfEle.trackMomentumOut().Mag2()); + Float_t ElecEtotOverPin = (ElecPin > 0.0) ? ((ElecEe + ElecEgamma)/ElecPin) : -0.1; Float_t ElecEecal = theGsfEle.ecalEnergy(); Float_t ElecDeltaEta = theGsfEle.deltaEtaSeedClusterTrackAtCalo(); Float_t ElecDeltaPhi = theGsfEle.deltaPhiSeedClusterTrackAtCalo(); @@ -723,7 +732,7 @@ double AntiElectronIDMVA6::MVAValue(const reco::PFTau& thePFTau, double AntiElectronIDMVA6::MVAValue(const reco::PFTau& thePFTau) { // === tau variables === - Float_t TauEtaAtEcalEntrance = -99.; + float TauEtaAtEcalEntrance = -99.; float sumEtaTimesEnergy = 0.; float sumEnergy = 0.; const std::vector& signalPFCands = thePFTau.signalPFCands(); @@ -775,9 +784,10 @@ double AntiElectronIDMVA6::MVAValue(const reco::PFTau& thePFTau) for ( unsigned i = 0 ; i < thePFTau.signalPFGammaCands().size(); ++i ) { reco::PFCandidatePtr gamma = thePFTau.signalPFGammaCands().at(i); float dR = deltaR(gamma->p4(), thePFTau.leadPFChargedHadrCand()->p4()); + float signalrad = std::max(0.05, std::min(0.10, 3.0/std::max(1.0, thePFTau.pt()))); // pfGammas inside the tau signal cone - if (dR < std::max(0.05, std::min(0.10, 3.0/thePFTau.pt()))) { + if (dR < signalrad) { if ( thePFTau.leadPFChargedHadrCand().isNonnull() ) { GammasdEtaInSigCone.push_back(gamma->eta() - thePFTau.leadPFChargedHadrCand()->eta()); GammasdPhiInSigCone.push_back(gamma->phi() - thePFTau.leadPFChargedHadrCand()->phi()); @@ -806,9 +816,10 @@ double AntiElectronIDMVA6::MVAValue(const reco::PFTau& thePFTau) for ( unsigned i = 0 ; i < thePFTau.signalPFChargedHadrCands().size(); ++i ) { reco::PFCandidatePtr charged = thePFTau.signalPFChargedHadrCands().at(i); float dR = deltaR(charged->p4(), thePFTau.leadPFChargedHadrCand()->p4()); + float signalrad = std::max(0.05, std::min(0.10, 3.0/std::max(1.0, thePFTau.pt()))); // charged particles inside the tau signal cone - if (dR < std::max(0.05, std::min(0.10, 3.0/thePFTau.pt()))) { + if (dR < signalrad) { pfChargedSum += charged->p4(); } } From 64aff46ca4e8f6c5eaa8ea74cb599f8e2a76daf7 Mon Sep 17 00:00:00 2001 From: Christian Date: Sun, 29 Nov 2015 13:51:33 +0100 Subject: [PATCH 53/66] fixed problem with clashing python modules in matrix test 1330 step 3 --- .../PatAlgos/python/tools/tauTools.py | 198 +-- .../python/HPSPFTaus_reminiAOD_cff.py | 1278 +++++++++-------- .../python/RecoPFTauTag_reminiAOD_cff.py | 83 +- 3 files changed, 781 insertions(+), 778 deletions(-) diff --git a/PhysicsTools/PatAlgos/python/tools/tauTools.py b/PhysicsTools/PatAlgos/python/tools/tauTools.py index 3000f7ff3b1b6..7df17f2c7f8ae 100644 --- a/PhysicsTools/PatAlgos/python/tools/tauTools.py +++ b/PhysicsTools/PatAlgos/python/tools/tauTools.py @@ -176,106 +176,106 @@ def _switchToPFTau(process, #-------------------------------------------------------------------------------- # CV: define list of old and new tau ID discriminators for CMSSW 7_6_x reminiAOD v2 hpsTauIDSources76xReMiniAOD = [ - ("decayModeFindingNewDMs", "DiscriminationByDecayModeFindingNewDMs"), - ("decayModeFinding", "DiscriminationByDecayModeFinding"), # CV: kept for backwards compatibility - ("byLooseCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"), - ("byMediumCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"), - ("byTightCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByTightCombinedIsolationDBSumPtCorr3Hits"), - ("byCombinedIsolationDeltaBetaCorrRaw3Hits", "DiscriminationByRawCombinedIsolationDBSumPtCorr3Hits"), - ("byLooseCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03"), - ("byMediumCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03"), - ("byTightCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03"), - ("byLoosePileupWeightedIsolation3Hits", "DiscriminationByLoosePileupWeightedIsolation3Hits"), - ("byMediumPileupWeightedIsolation3Hits", "DiscriminationByMediumPileupWeightedIsolation3Hits"), - ("byTightPileupWeightedIsolation3Hits", "DiscriminationByTightPileupWeightedIsolation3Hits"), - ("byPhotonPtSumOutsideSignalCone", "DiscriminationByPhotonPtSumOutsideSignalCone"), - ("byPileupWeightedIsolationRaw3Hits", "DiscriminationByRawPileupWeightedIsolation3Hits"), - ("chargedIsoPtSum", "ChargedIsoPtSum"), - ("neutralIsoPtSum", "NeutralIsoPtSum"), - ("puCorrPtSum", "PUcorrPtSum"), - ("neutralIsoPtSumWeight", "NeutralIsoPtSumWeight"), - ("footprintCorrection", "FootprintCorrection"), - ("photonPtSumOutsideSignalCone", "PhotonPtSumOutsideSignalCone"), - ("byIsolationMVA3oldDMwLTraw", "DiscriminationByIsolationMVA3oldDMwLTraw"), - ("byVLooseIsolationMVA3oldDMwLT", "DiscriminationByVLooseIsolationMVA3oldDMwLT"), - ("byLooseIsolationMVA3oldDMwLT", "DiscriminationByLooseIsolationMVA3oldDMwLT"), - ("byMediumIsolationMVA3oldDMwLT", "DiscriminationByMediumIsolationMVA3oldDMwLT"), - ("byTightIsolationMVA3oldDMwLT", "DiscriminationByTightIsolationMVA3oldDMwLT"), - ("byVTightIsolationMVA3oldDMwLT", "DiscriminationByVTightIsolationMVA3oldDMwLT"), - ("byVVTightIsolationMVA3oldDMwLT", "DiscriminationByVVTightIsolationMVA3oldDMwLT"), - ("byIsolationMVA3newDMwLTraw", "DiscriminationByIsolationMVA3newDMwLTraw"), - ("byVLooseIsolationMVA3newDMwLT", "DiscriminationByVLooseIsolationMVA3newDMwLT"), - ("byLooseIsolationMVA3newDMwLT", "DiscriminationByLooseIsolationMVA3newDMwLT"), - ("byMediumIsolationMVA3newDMwLT", "DiscriminationByMediumIsolationMVA3newDMwLT"), - ("byTightIsolationMVA3newDMwLT", "DiscriminationByTightIsolationMVA3newDMwLT"), - ("byVTightIsolationMVA3newDMwLT", "DiscriminationByVTightIsolationMVA3newDMwLT"), - ("byVVTightIsolationMVA3newDMwLT", "DiscriminationByVVTightIsolationMVA3newDMwLT"), - ("againstElectronMVA5raw", "DiscriminationByMVA5rawElectronRejection"), - ("againstElectronMVA5category", "DiscriminationByMVA5rawElectronRejection:category"), - ("againstElectronVLooseMVA5", "DiscriminationByMVA5VLooseElectronRejection"), - ("againstElectronLooseMVA5", "DiscriminationByMVA5LooseElectronRejection"), - ("againstElectronMediumMVA5", "DiscriminationByMVA5MediumElectronRejection"), - ("againstElectronTightMVA5", "DiscriminationByMVA5TightElectronRejection"), - ("againstElectronVTightMVA5", "DiscriminationByMVA5VTightElectronRejection"), - ("againstMuonLoose3", "DiscriminationByLooseMuonRejection3"), - ("againstMuonTight3", "DiscriminationByTightMuonRejection3"), + ("decayModeFindingNewDMs", "DiscriminationByDecayModeFindingNewDMs76xReMiniAOD"), + ("decayModeFinding", "DiscriminationByDecayModeFinding76xReMiniAOD"), # CV: kept for backwards compatibility + ("byLooseCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD"), + ("byMediumCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD"), + ("byTightCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD"), + ("byCombinedIsolationDeltaBetaCorrRaw3Hits", "DiscriminationByRawCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD"), + ("byLooseCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD"), + ("byMediumCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD"), + ("byTightCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD"), + ("byLoosePileupWeightedIsolation3Hits", "DiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD"), + ("byMediumPileupWeightedIsolation3Hits", "DiscriminationByMediumPileupWeightedIsolation3Hits76xReMiniAOD"), + ("byTightPileupWeightedIsolation3Hits", "DiscriminationByTightPileupWeightedIsolation3Hits76xReMiniAOD"), + ("byPhotonPtSumOutsideSignalCone", "DiscriminationByPhotonPtSumOutsideSignalCone76xReMiniAOD"), + ("byPileupWeightedIsolationRaw3Hits", "DiscriminationByRawPileupWeightedIsolation3Hits76xReMiniAOD"), + ("chargedIsoPtSum", "ChargedIsoPtSum76xReMiniAOD"), + ("neutralIsoPtSum", "NeutralIsoPtSum76xReMiniAOD"), + ("puCorrPtSum", "PUcorrPtSum76xReMiniAOD"), + ("neutralIsoPtSumWeight", "NeutralIsoPtSumWeight76xReMiniAOD"), + ("footprintCorrection", "FootprintCorrection76xReMiniAOD"), + ("photonPtSumOutsideSignalCone", "PhotonPtSumOutsideSignalCone76xReMiniAOD"), + ("byIsolationMVA3oldDMwLTraw", "DiscriminationByIsolationMVA3oldDMwLTraw76xReMiniAOD"), + ("byVLooseIsolationMVA3oldDMwLT", "DiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD"), + ("byLooseIsolationMVA3oldDMwLT", "DiscriminationByLooseIsolationMVA3oldDMwLT76xReMiniAOD"), + ("byMediumIsolationMVA3oldDMwLT", "DiscriminationByMediumIsolationMVA3oldDMwLT76xReMiniAOD"), + ("byTightIsolationMVA3oldDMwLT", "DiscriminationByTightIsolationMVA3oldDMwLT76xReMiniAOD"), + ("byVTightIsolationMVA3oldDMwLT", "DiscriminationByVTightIsolationMVA3oldDMwLT76xReMiniAOD"), + ("byVVTightIsolationMVA3oldDMwLT", "DiscriminationByVVTightIsolationMVA3oldDMwLT76xReMiniAOD"), + ("byIsolationMVA3newDMwLTraw", "DiscriminationByIsolationMVA3newDMwLTraw76xReMiniAOD"), + ("byVLooseIsolationMVA3newDMwLT", "DiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD"), + ("byLooseIsolationMVA3newDMwLT", "DiscriminationByLooseIsolationMVA3newDMwLT76xReMiniAOD"), + ("byMediumIsolationMVA3newDMwLT", "DiscriminationByMediumIsolationMVA3newDMwLT76xReMiniAOD"), + ("byTightIsolationMVA3newDMwLT", "DiscriminationByTightIsolationMVA3newDMwLT76xReMiniAOD"), + ("byVTightIsolationMVA3newDMwLT", "DiscriminationByVTightIsolationMVA3newDMwLT76xReMiniAOD"), + ("byVVTightIsolationMVA3newDMwLT", "DiscriminationByVVTightIsolationMVA3newDMwLT76xReMiniAOD"), + ("againstElectronMVA5raw", "DiscriminationByMVA5rawElectronRejection76xReMiniAOD"), + ("againstElectronMVA5category", "DiscriminationByMVA5rawElectronRejection76xReMiniAOD:category"), + ("againstElectronVLooseMVA5", "DiscriminationByMVA5VLooseElectronRejection76xReMiniAOD"), + ("againstElectronLooseMVA5", "DiscriminationByMVA5LooseElectronRejection76xReMiniAOD"), + ("againstElectronMediumMVA5", "DiscriminationByMVA5MediumElectronRejection76xReMiniAOD"), + ("againstElectronTightMVA5", "DiscriminationByMVA5TightElectronRejection76xReMiniAOD"), + ("againstElectronVTightMVA5", "DiscriminationByMVA5VTightElectronRejection76xReMiniAOD"), + ("againstMuonLoose3", "DiscriminationByLooseMuonRejection376xReMiniAOD"), + ("againstMuonTight3", "DiscriminationByTightMuonRejection376xReMiniAOD"), ##New Run2 MVA isolation - ("byIsolationMVArun2v1DBoldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBoldDMwLTraw"), - ("byVLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT"), - ("byLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBoldDMwLT"), - ("byMediumIsolationMVArun2v1DBoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBoldDMwLT"), - ("byTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBoldDMwLT"), - ("byVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBoldDMwLT"), - ("byVVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT"), - ("byIsolationMVArun2v1DBnewDMwLTraw", "DiscriminationByIsolationMVArun2v1DBnewDMwLTraw"), - ("byVLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT"), - ("byLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBnewDMwLT"), - ("byMediumIsolationMVArun2v1DBnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBnewDMwLT"), - ("byTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByTightIsolationMVArun2v1DBnewDMwLT"), - ("byVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBnewDMwLT"), - ("byVVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT"), - ("byIsolationMVArun2v1PWoldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWoldDMwLTraw"), - ("byVLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT"), - ("byLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWoldDMwLT"), - ("byMediumIsolationMVArun2v1PWoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWoldDMwLT"), - ("byTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWoldDMwLT"), - ("byVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWoldDMwLT"), - ("byVVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT"), - ("byIsolationMVArun2v1PWnewDMwLTraw", "DiscriminationByIsolationMVArun2v1PWnewDMwLTraw"), - ("byVLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT"), - ("byLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWnewDMwLT"), - ("byMediumIsolationMVArun2v1PWnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWnewDMwLT"), - ("byTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByTightIsolationMVArun2v1PWnewDMwLT"), - ("byVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWnewDMwLT"), - ("byVVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT"), - ("chargedIsoPtSumdR03", "ChargedIsoPtSumdR03"), - ("neutralIsoPtSumdR03", "NeutralIsoPtSumdR03"), - ("puCorrPtSumdR03", "PUcorrPtSumdR03"), - ("neutralIsoPtSumWeightdR03", "NeutralIsoPtSumWeightdR03"), - ("footprintCorrectiondR03", "FootprintCorrectiondR03"), - ("photonPtSumOutsideSignalConedR03", "PhotonPtSumOutsideSignalConedR03"), - ("byIsolationMVArun2v1DBdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw"), - ("byVLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT"), - ("byLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT"), - ("byMediumIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT"), - ("byTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT"), - ("byVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT"), - ("byVVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT"), - ("byIsolationMVArun2v1PWdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw"), - ("byVLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT"), - ("byLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT"), - ("byMediumIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT"), - ("byTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT"), - ("byVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT"), - ("byVVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"), + ("byIsolationMVArun2v1DBoldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD"), + ("byVLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD"), + ("byLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD"), + ("byMediumIsolationMVArun2v1DBoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBoldDMwLT76xReMiniAOD"), + ("byTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD"), + ("byVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD"), + ("byVVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD"), + ("byIsolationMVArun2v1DBnewDMwLTraw", "DiscriminationByIsolationMVArun2v1DBnewDMwLTraw76xReMiniAOD"), + ("byVLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD"), + ("byLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD"), + ("byMediumIsolationMVArun2v1DBnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBnewDMwLT76xReMiniAOD"), + ("byTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD"), + ("byVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD"), + ("byVVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD"), + ("byIsolationMVArun2v1PWoldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD"), + ("byVLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD"), + ("byLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD"), + ("byMediumIsolationMVArun2v1PWoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWoldDMwLT76xReMiniAOD"), + ("byTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD"), + ("byVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD"), + ("byVVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD"), + ("byIsolationMVArun2v1PWnewDMwLTraw", "DiscriminationByIsolationMVArun2v1PWnewDMwLTraw76xReMiniAOD"), + ("byVLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD"), + ("byLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD"), + ("byMediumIsolationMVArun2v1PWnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWnewDMwLT76xReMiniAOD"), + ("byTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD"), + ("byVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD"), + ("byVVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD"), + ("chargedIsoPtSumdR03", "ChargedIsoPtSumdR0376xReMiniAOD"), + ("neutralIsoPtSumdR03", "NeutralIsoPtSumdR0376xReMiniAOD"), + ("puCorrPtSumdR03", "PUcorrPtSumdR0376xReMiniAOD"), + ("neutralIsoPtSumWeightdR03", "NeutralIsoPtSumWeightdR0376xReMiniAOD"), + ("footprintCorrectiondR03", "FootprintCorrectiondR0376xReMiniAOD"), + ("photonPtSumOutsideSignalConedR03", "PhotonPtSumOutsideSignalConedR0376xReMiniAOD"), + ("byIsolationMVArun2v1DBdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD"), + ("byVLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD"), + ("byLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD"), + ("byMediumIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD"), + ("byTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD"), + ("byVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD"), + ("byVVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD"), + ("byIsolationMVArun2v1PWdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw76xReMiniAOD"), + ("byVLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD"), + ("byLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD"), + ("byMediumIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD"), + ("byTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD"), + ("byVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD"), + ("byVVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD"), ##New Run2 MVA discriminator against electrons - ("againstElectronMVA6raw", "DiscriminationByMVA6rawElectronRejection"), - ("againstElectronMVA6category", "DiscriminationByMVA6rawElectronRejection:category"), - ("againstElectronVLooseMVA6", "DiscriminationByMVA6VLooseElectronRejection"), - ("againstElectronLooseMVA6", "DiscriminationByMVA6LooseElectronRejection"), - ("againstElectronMediumMVA6", "DiscriminationByMVA6MediumElectronRejection"), - ("againstElectronTightMVA6", "DiscriminationByMVA6TightElectronRejection"), - ("againstElectronVTightMVA6", "DiscriminationByMVA6VTightElectronRejection"), + ("againstElectronMVA6raw", "DiscriminationByMVA6rawElectronRejection76xReMiniAOD"), + ("againstElectronMVA6category", "DiscriminationByMVA6rawElectronRejection76xReMiniAOD:category"), + ("againstElectronVLooseMVA6", "DiscriminationByMVA6VLooseElectronRejection76xReMiniAOD"), + ("againstElectronLooseMVA6", "DiscriminationByMVA6LooseElectronRejection76xReMiniAOD"), + ("againstElectronMediumMVA6", "DiscriminationByMVA6MediumElectronRejection76xReMiniAOD"), + ("againstElectronTightMVA6", "DiscriminationByMVA6TightElectronRejection76xReMiniAOD"), + ("againstElectronVTightMVA6", "DiscriminationByMVA6VTightElectronRejection76xReMiniAOD"), ] #-------------------------------------------------------------------------------- @@ -324,7 +324,7 @@ def switchToPFTauHPS(process, # CV: function called by PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py # to add old and new tau ID discriminators for CMSSW 7_6_x reminiAOD v2 def switchToPFTauHPS76xReMiniAOD(process, - tauSource = cms.InputTag('hpsPFTauProducer'), + tauSource = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), patTauLabel = "", jecLevels = [], postfix = ""): diff --git a/RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py b/RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py index f785d4e58c5ea..bdaca8c8aee2e 100644 --- a/RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py +++ b/RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py @@ -35,8 +35,10 @@ # Select those taus that pass the HPS selections # - pt > 15, mass cuts, tauCone cut from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import hpsSelectionDiscriminator, decayMode_1Prong0Pi0, decayMode_1Prong1Pi0, decayMode_1Prong2Pi0, decayMode_2Prong0Pi0, decayMode_2Prong1Pi0, decayMode_3Prong0Pi0 -hpsPFTauDiscriminationByDecayModeFindingNewDMs = hpsSelectionDiscriminator.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsSelectionDiscriminator76xReMiniAOD = hpsSelectionDiscriminator.clone() + +hpsPFTauDiscriminationByDecayModeFindingNewDMs76xReMiniAOD = hpsSelectionDiscriminator76xReMiniAOD.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), #---------------------------------------------------------------------------- # CV: disable 3Prong1Pi0 decay mode decayModes = cms.VPSet( @@ -49,8 +51,8 @@ ) #---------------------------------------------------------------------------- ) -hpsPFTauDiscriminationByDecayModeFindingOldDMs = hpsSelectionDiscriminator.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByDecayModeFindingOldDMs76xReMiniAOD = hpsSelectionDiscriminator76xReMiniAOD.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), decayModes = cms.VPSet( decayMode_1Prong0Pi0, decayMode_1Prong1Pi0, @@ -59,60 +61,60 @@ ), requireTauChargedHadronsToBeChargedPFCands = cms.bool(True) ) -hpsPFTauDiscriminationByDecayModeFinding = hpsPFTauDiscriminationByDecayModeFindingOldDMs.clone() # CV: kept for backwards compatibility +hpsPFTauDiscriminationByDecayModeFinding76xReMiniAOD = hpsPFTauDiscriminationByDecayModeFindingOldDMs76xReMiniAOD.clone() # CV: kept for backwards compatibility # Define decay mode prediscriminant -requireDecayMode = cms.PSet( +requireDecayMode76xReMiniAOD = cms.PSet( BooleanOperator = cms.string("and"), decayMode = cms.PSet( - Producer = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs'), + Producer = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs76xReMiniAOD'), cut = cms.double(0.5) ) ) #Building the prototype for the Discriminator by Isolation -hpsPFTauDiscriminationByLooseIsolation = pfRecoTauDiscriminationByIsolation.clone( - PFTauProducer = cms.InputTag("hpsPFTauProducer"), - Prediscriminants = requireDecayMode.clone(), +hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD = pfRecoTauDiscriminationByIsolation.clone( + PFTauProducer = cms.InputTag("hpsPFTauProducer76xReMiniAOD"), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), ApplyDiscriminationByTrackerIsolation = False, ApplyDiscriminationByECALIsolation = True, applyOccupancyCut = True ) -hpsPFTauDiscriminationByLooseIsolation.Prediscriminants.preIso = cms.PSet( - Producer = cms.InputTag("hpsPFTauDiscriminationByLooseChargedIsolation"), +hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.Prediscriminants.preIso = cms.PSet( + Producer = cms.InputTag("hpsPFTauDiscriminationByLooseChargedIsolation76xReMiniAOD"), cut = cms.double(0.5)) # Make an even looser discriminator -hpsPFTauDiscriminationByVLooseIsolation = hpsPFTauDiscriminationByLooseIsolation.clone( +hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.clone( customOuterCone = cms.double(0.3), isoConeSizeForDeltaBeta = cms.double(0.3), ) -hpsPFTauDiscriminationByVLooseIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 1.5 -hpsPFTauDiscriminationByVLooseIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 2.0 -hpsPFTauDiscriminationByVLooseIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByVLooseChargedIsolation") +hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 1.5 +hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 2.0 +hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByVLooseChargedIsolation76xReMiniAOD") -hpsPFTauDiscriminationByMediumIsolation = hpsPFTauDiscriminationByLooseIsolation.clone() -hpsPFTauDiscriminationByMediumIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 0.8 -hpsPFTauDiscriminationByMediumIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 0.8 -hpsPFTauDiscriminationByMediumIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByMediumChargedIsolation") +hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.8 +hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.8 +hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByMediumChargedIsolation76xReMiniAOD") -hpsPFTauDiscriminationByTightIsolation = hpsPFTauDiscriminationByLooseIsolation.clone() -hpsPFTauDiscriminationByTightIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByTightIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 -hpsPFTauDiscriminationByTightIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByTightChargedIsolation") +hpsPFTauDiscriminationByTightIsolation76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByTightIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 +hpsPFTauDiscriminationByTightIsolation76xReMiniAOD.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByTightChargedIsolation76xReMiniAOD") -hpsPFTauDiscriminationByIsolationSeq = cms.Sequence( - hpsPFTauDiscriminationByVLooseIsolation* - hpsPFTauDiscriminationByLooseIsolation* - hpsPFTauDiscriminationByMediumIsolation* - hpsPFTauDiscriminationByTightIsolation +hpsPFTauDiscriminationByIsolationSeq76xReMiniAOD = cms.Sequence( + hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD* + hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD* + hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD* + hpsPFTauDiscriminationByTightIsolation76xReMiniAOD ) _isolation_types = ['VLoose', 'Loose', 'Medium', 'Tight'] # Now build the sequences that apply PU corrections # Make Delta Beta corrections (on SumPt quantity) -hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr = hpsPFTauDiscriminationByVLooseIsolation.clone( +hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD.clone( deltaBetaPUTrackPtCutOverride = cms.double(0.5), applyDeltaBetaCorrection = True, isoConeSizeForDeltaBeta = 0.8, @@ -120,9 +122,9 @@ applyOccupancyCut = False, applySumPtCut = True, ) -hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr.maximumSumPtCut = hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt +hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD.maximumSumPtCut = hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt -hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseIsolation.clone( +hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.clone( deltaBetaPUTrackPtCutOverride = cms.double(0.5), applyDeltaBetaCorrection = True, isoConeSizeForDeltaBeta = 0.8, @@ -130,9 +132,9 @@ applyOccupancyCut = False, applySumPtCut = True, ) -hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.maximumSumPtCut = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt +hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD.maximumSumPtCut = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt -hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr = hpsPFTauDiscriminationByMediumIsolation.clone( +hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD.clone( deltaBetaPUTrackPtCutOverride = cms.double(0.5), applyDeltaBetaCorrection = True, isoConeSizeForDeltaBeta = 0.8, @@ -140,9 +142,9 @@ applyOccupancyCut = False, applySumPtCut = True, ) -hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.maximumSumPtCut = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt +hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD.maximumSumPtCut = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt -hpsPFTauDiscriminationByTightIsolationDBSumPtCorr = hpsPFTauDiscriminationByTightIsolation.clone( +hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByTightIsolation76xReMiniAOD.clone( deltaBetaPUTrackPtCutOverride = cms.double(0.5), applyDeltaBetaCorrection = True, isoConeSizeForDeltaBeta = 0.8, @@ -150,192 +152,192 @@ applyOccupancyCut = False, applySumPtCut = True, ) -hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.maximumSumPtCut = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt +hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD.maximumSumPtCut = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt -hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr = cms.Sequence( - hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr* - hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr* - hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr* - hpsPFTauDiscriminationByTightIsolationDBSumPtCorr +hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr76xReMiniAOD = cms.Sequence( + hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD* + hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD* + hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD* + hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD ) -hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD.clone( ApplyDiscriminationByTrackerIsolation = True, ApplyDiscriminationByECALIsolation = True, deltaBetaFactor = "%0.4f"%((0.09/0.25)*(ak4dBetaCorrection)), applyOccupancyCut = False, applySumPtCut = True, maximumSumPtCut = 3.5, - Prediscriminants = requireDecayMode.clone() + Prediscriminants = requireDecayMode76xReMiniAOD.clone() ) -hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 +hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD.clone( ApplyDiscriminationByTrackerIsolation = True, ApplyDiscriminationByECALIsolation = True, deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection), applyOccupancyCut = False, applySumPtCut = True, maximumSumPtCut = 2.5, - Prediscriminants = requireDecayMode.clone() + Prediscriminants = requireDecayMode76xReMiniAOD.clone() ) -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 -hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( applySumPtCut = False, storeRawSumPt = cms.bool(True) ) -hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( applySumPtCut = False, ApplyDiscriminationByECALIsolation = False, storeRawSumPt = cms.bool(True) ) -hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( applySumPtCut = False, ApplyDiscriminationByTrackerIsolation = False, storeRawSumPt = cms.bool(True) ) -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD.clone( ApplyDiscriminationByTrackerIsolation = True, ApplyDiscriminationByECALIsolation = True, deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection), applyOccupancyCut = False, applySumPtCut = True, maximumSumPtCut = 1.5, - Prediscriminants = requireDecayMode.clone() + Prediscriminants = requireDecayMode76xReMiniAOD.clone() ) -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD.clone( ApplyDiscriminationByTrackerIsolation = True, ApplyDiscriminationByECALIsolation = True, deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection), applyOccupancyCut = False, applySumPtCut = True, maximumSumPtCut = 0.8, - Prediscriminants = requireDecayMode.clone() + Prediscriminants = requireDecayMode76xReMiniAOD.clone() ) -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 -hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr = cms.Sequence( - hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr* - hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr* - hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr* - hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr +hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr76xReMiniAOD = cms.Sequence( + hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD* + hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD* + hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD* + hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD ) #Charge isolation based on combined isolation -hpsPFTauDiscriminationByVLooseChargedIsolation = hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByVLooseChargedIsolation76xReMiniAOD = hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( ApplyDiscriminationByECALIsolation = False ) -hpsPFTauDiscriminationByLooseChargedIsolation = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByLooseChargedIsolation76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( ApplyDiscriminationByECALIsolation = False ) -hpsPFTauDiscriminationByMediumChargedIsolation = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByMediumChargedIsolation76xReMiniAOD = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( ApplyDiscriminationByECALIsolation = False ) -hpsPFTauDiscriminationByTightChargedIsolation = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByTightChargedIsolation76xReMiniAOD = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( ApplyDiscriminationByECALIsolation = False ) -hpsPFTauDiscriminationByChargedIsolationSeq = cms.Sequence( - hpsPFTauDiscriminationByVLooseChargedIsolation* - hpsPFTauDiscriminationByLooseChargedIsolation* - hpsPFTauDiscriminationByMediumChargedIsolation* - hpsPFTauDiscriminationByTightChargedIsolation +hpsPFTauDiscriminationByChargedIsolationSeq76xReMiniAOD = cms.Sequence( + hpsPFTauDiscriminationByVLooseChargedIsolation76xReMiniAOD* + hpsPFTauDiscriminationByLooseChargedIsolation76xReMiniAOD* + hpsPFTauDiscriminationByMediumChargedIsolation76xReMiniAOD* + hpsPFTauDiscriminationByTightChargedIsolation76xReMiniAOD ) #copying discriminator against electrons and muons -hpsPFTauDiscriminationByLooseElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByLooseElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectron.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants, PFElectronMVA_maxValue = cms.double(0.6) ) -hpsPFTauDiscriminationByMediumElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByMediumElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectron.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants, ApplyCut_EcalCrackCut = cms.bool(True) ) -hpsPFTauDiscriminationByTightElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByTightElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectron.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants, ApplyCut_EcalCrackCut = cms.bool(True), ApplyCut_BremCombined = cms.bool(True) ) -hpsPFTauDiscriminationByLooseMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByLooseMuonRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstMuon.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants ) -hpsPFTauDiscriminationByMediumMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByMediumMuonRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstMuon.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants, discriminatorOption = cms.string('noAllArbitrated') ) -hpsPFTauDiscriminationByTightMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByTightMuonRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstMuon.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants, discriminatorOption = cms.string('noAllArbitratedWithHOP') ) -hpsPFTauDiscriminationByLooseMuonRejection2 = pfRecoTauDiscriminationAgainstMuon2.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByLooseMuonRejection276xReMiniAOD = pfRecoTauDiscriminationAgainstMuon2.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants ) -hpsPFTauDiscriminationByMediumMuonRejection2 = pfRecoTauDiscriminationAgainstMuon2.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByMediumMuonRejection276xReMiniAOD = pfRecoTauDiscriminationAgainstMuon2.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants, discriminatorOption = cms.string('medium') ) -hpsPFTauDiscriminationByTightMuonRejection2 = pfRecoTauDiscriminationAgainstMuon2.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByTightMuonRejection276xReMiniAOD = pfRecoTauDiscriminationAgainstMuon2.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants, discriminatorOption = cms.string('tight') ) -hpsPFTauDiscriminationByLooseMuonRejection3 = pfRecoTauDiscriminationAgainstMuon2.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByLooseMuonRejection376xReMiniAOD = pfRecoTauDiscriminationAgainstMuon2.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants, discriminatorOption = cms.string('custom'), maxNumberOfMatches = cms.int32(1), doCaloMuonVeto = cms.bool(True), maxNumberOfHitsLast2Stations = cms.int32(-1) ) -hpsPFTauDiscriminationByTightMuonRejection3 = hpsPFTauDiscriminationByLooseMuonRejection3.clone( +hpsPFTauDiscriminationByTightMuonRejection376xReMiniAOD = hpsPFTauDiscriminationByLooseMuonRejection376xReMiniAOD.clone( maxNumberOfHitsLast2Stations = cms.int32(0) ) -hpsPFTauDiscriminationByMVArawMuonRejection = pfRecoTauDiscriminationAgainstMuonMVA.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), +hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstMuonMVA.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), loadMVAfromDB = cms.bool(True), returnMVA = cms.bool(True), mvaName = cms.string("RecoTauTag_againstMuonMVAv1") ) -##hpsPFTauDiscriminationByMVALooseMuonRejection = hpsPFTauDiscriminationByMVArawMuonRejection.clone( +##hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD.clone( ## returnMVA = cms.bool(False), ## mvaMin = cms.double(0.75) ##) -##hpsPFTauDiscriminationByMVAMediumMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone( +##hpsPFTauDiscriminationByMVAMediumMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD.clone( ## mvaMin = cms.double(0.950) ##) -##hpsPFTauDiscriminationByMVATightMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone( +##hpsPFTauDiscriminationByMVATightMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD.clone( ## mvaMin = cms.double(0.975) ##) -hpsPFTauDiscriminationByMVALooseMuonRejection = recoTauDiscriminantCutMultiplexer.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection'), - key = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection:category'), +hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD = recoTauDiscriminantCutMultiplexer.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD:category'), loadMVAfromDB = cms.bool(True), mvaOutput_normalization = cms.string("RecoTauTag_againstMuonMVAv1_mvaOutput_normalization"), mapping = cms.VPSet( @@ -346,14 +348,14 @@ ) ) ) -hpsPFTauDiscriminationByMVAMediumMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone() -hpsPFTauDiscriminationByMVAMediumMuonRejection.mapping[0].cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff99_0") -hpsPFTauDiscriminationByMVATightMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone() -hpsPFTauDiscriminationByMVATightMuonRejection.mapping[0].cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff98_0") +hpsPFTauDiscriminationByMVAMediumMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD.clone() +hpsPFTauDiscriminationByMVAMediumMuonRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff99_0") +hpsPFTauDiscriminationByMVATightMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD.clone() +hpsPFTauDiscriminationByMVATightMuonRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff98_0") -hpsPFTauDiscriminationByMVA5rawElectronRejection = pfRecoTauDiscriminationAgainstElectronMVA5.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), +hpsPFTauDiscriminationByMVA5rawElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectronMVA5.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), loadMVAfromDB = cms.bool(True), mvaName_NoEleMatch_woGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL"), mvaName_NoEleMatch_woGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL"), @@ -373,11 +375,11 @@ mvaName_wGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC") ) -hpsPFTauDiscriminationByMVA5VLooseElectronRejection = recoTauDiscriminantCutMultiplexer.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection'), - key = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection:category'), +hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD = recoTauDiscriminantCutMultiplexer.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection76xReMiniAOD:category'), loadMVAfromDB = cms.bool(True), mapping = cms.VPSet( cms.PSet( @@ -463,81 +465,81 @@ ) ) -hpsPFTauDiscriminationByMVA5LooseElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection) -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff96") - -hpsPFTauDiscriminationByMVA5MediumElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection) -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff91") - -hpsPFTauDiscriminationByMVA5TightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection) -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff85") - -hpsPFTauDiscriminationByMVA5VTightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection) -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff79") - -hpsPFTauDiscriminationByMVA6rawElectronRejection = pfRecoTauDiscriminationAgainstElectronMVA6.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD) +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff96") + +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD) +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff91") + +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD) +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff85") + +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD) +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff79") + +hpsPFTauDiscriminationByMVA6rawElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectronMVA6.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), loadMVAfromDB = cms.bool(True), mvaName_NoEleMatch_woGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL"), mvaName_NoEleMatch_wGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL"), @@ -549,11 +551,11 @@ mvaName_wGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC") ) -hpsPFTauDiscriminationByMVA6VLooseElectronRejection = recoTauDiscriminantCutMultiplexer.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection'), - key = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection:category'), +hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD = recoTauDiscriminantCutMultiplexer.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection76xReMiniAOD:category'), loadMVAfromDB = cms.bool(True), mapping = cms.VPSet( cms.PSet( @@ -599,93 +601,93 @@ ) ) -hpsPFTauDiscriminationByMVA6LooseElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) -hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff96") - -hpsPFTauDiscriminationByMVA6MediumElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) -hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff91") - -hpsPFTauDiscriminationByMVA6TightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) -hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff85") - -hpsPFTauDiscriminationByMVA6VTightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) -hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff79") - -hpsPFTauDiscriminationByDeadECALElectronRejection = pfRecoTauDiscriminationAgainstElectronDeadECAL.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone() +hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD) +hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff96") + +hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD) +hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff91") + +hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD) +hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff85") + +hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD) +hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff79") + +hpsPFTauDiscriminationByDeadECALElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectronDeadECAL.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone() ) #Define new sequence that is using smaller number on hits cut -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone() -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.clone() -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.clone() - -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) - -hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone( +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD.clone() + +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) + +hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone( applySumPtCut = False, storeRawSumPt = cms.bool(True) ) -hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits = cms.Sequence( - hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits* - hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits* - hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits* - hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits +hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits76xReMiniAOD = cms.Sequence( + hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD* + hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD* + hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD* + hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD ) -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03 = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone() -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03 = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.clone() -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03 = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.clone() +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03.customOuterCone = cms.double(0.3) -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03.customOuterCone = cms.double(0.3) -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03.customOuterCone = cms.double(0.3) +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.customOuterCone = cms.double(0.3) +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.customOuterCone = cms.double(0.3) +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.customOuterCone = cms.double(0.3) -hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3HitsdR03 = cms.Sequence( - hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03* - hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03* - hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03 +hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3HitsdR0376xReMiniAOD = cms.Sequence( + hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD* + hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD* + hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD ) -hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone( +hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone( ApplyDiscriminationByECALIsolation = cms.bool(False), applyDeltaBetaCorrection = cms.bool(False), ApplyDiscriminationByWeightedECALIsolation = cms.bool(True), @@ -694,23 +696,23 @@ applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) ) -hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone( - maximumSumPtCut = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.maximumSumPtCut +hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits76xReMiniAOD = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD.clone( + maximumSumPtCut = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.maximumSumPtCut ) -hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone( - maximumSumPtCut = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.maximumSumPtCut +hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits76xReMiniAOD = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD.clone( + maximumSumPtCut = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.maximumSumPtCut ) -hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone( +hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone76xReMiniAOD = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD.clone( applySumPtCut = cms.bool(False) ) -hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone( +hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits76xReMiniAOD = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD.clone( Prediscriminants = cms.PSet( BooleanOperator = cms.string("and"), decayMode = cms.PSet( - Producer = cms.InputTag('hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone'), + Producer = cms.InputTag('hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone76xReMiniAOD'), cut = cms.double(0.5) ) ), @@ -718,19 +720,19 @@ storeRawSumPt = cms.bool(True) ) -hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits = cms.Sequence( - hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits* - hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits* - hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits* - hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone* - hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits +hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits76xReMiniAOD = cms.Sequence( + hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD* + hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits76xReMiniAOD* + hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits76xReMiniAOD* + hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone76xReMiniAOD* + hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits76xReMiniAOD ) # Define the HPS selection discriminator used in cleaning -hpsSelectionDiscriminator.PFTauProducer = cms.InputTag("combinatoricRecoTaus") +hpsSelectionDiscriminator76xReMiniAOD.PFTauProducer = cms.InputTag("combinatoricRecoTaus76xReMiniAOD") #---------------------------------------------------------------------------- # CV: disable 3Prong1Pi0 decay mode -hpsSelectionDiscriminator.decayModes = cms.VPSet( +hpsSelectionDiscriminator76xReMiniAOD.decayModes = cms.VPSet( decayMode_1Prong0Pi0, decayMode_1Prong1Pi0, decayMode_1Prong2Pi0, @@ -741,21 +743,21 @@ #---------------------------------------------------------------------------- from RecoTauTag.RecoTau.RecoTauCleaner_cfi import RecoTauCleaner -hpsPFTauProducerSansRefs = RecoTauCleaner.clone( - src = cms.InputTag("combinatoricRecoTaus") +hpsPFTauProducerSansRefs76xReMiniAOD = RecoTauCleaner.clone( + src = cms.InputTag("combinatoricRecoTaus76xReMiniAOD") ) - +hpsPFTauProducerSansRefs76xReMiniAOD.cleaners[1].src = cms.InputTag("hpsSelectionDiscriminator76xReMiniAOD") from RecoTauTag.RecoTau.RecoTauPiZeroUnembedder_cfi import RecoTauPiZeroUnembedder -hpsPFTauProducer = RecoTauPiZeroUnembedder.clone( - src = cms.InputTag("hpsPFTauProducerSansRefs") +hpsPFTauProducer76xReMiniAOD = RecoTauPiZeroUnembedder.clone( + src = cms.InputTag("hpsPFTauProducerSansRefs76xReMiniAOD") ) from RecoTauTag.RecoTau.PFTauPrimaryVertexProducer_cfi import * from RecoTauTag.RecoTau.PFTauSecondaryVertexProducer_cfi import * from RecoTauTag.RecoTau.PFTauTransverseImpactParameters_cfi import * -hpsPFTauPrimaryVertexProducer = PFTauPrimaryVertexProducer.clone( - PFTauTag = cms.InputTag("hpsPFTauProducer"), +hpsPFTauPrimaryVertexProducer76xReMiniAOD = PFTauPrimaryVertexProducer.clone( + PFTauTag = cms.InputTag("hpsPFTauProducer76xReMiniAOD"), ElectronTag = cms.InputTag(""), MuonTag = cms.InputTag(""), PVTag = cms.InputTag("offlinePrimaryVertices"), @@ -768,32 +770,32 @@ useSelectedTaus = cms.bool(False), discriminators = cms.VPSet( cms.PSet( - discriminator = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs'), + discriminator = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs76xReMiniAOD'), selectionCut = cms.double(0.5) ) ), cut = cms.string("pt > 18.0 & abs(eta) < 2.4") ) -hpsPFTauSecondaryVertexProducer = PFTauSecondaryVertexProducer.clone( - PFTauTag = cms.InputTag("hpsPFTauProducer") +hpsPFTauSecondaryVertexProducer76xReMiniAOD = PFTauSecondaryVertexProducer.clone( + PFTauTag = cms.InputTag("hpsPFTauProducer76xReMiniAOD") ) -hpsPFTauTransverseImpactParameters = PFTauTransverseImpactParameters.clone( - PFTauTag = cms.InputTag("hpsPFTauProducer"), - PFTauPVATag = cms.InputTag("hpsPFTauPrimaryVertexProducer"), - PFTauSVATag = cms.InputTag("hpsPFTauSecondaryVertexProducer"), +hpsPFTauTransverseImpactParameters76xReMiniAOD = PFTauTransverseImpactParameters.clone( + PFTauTag = cms.InputTag("hpsPFTauProducer76xReMiniAOD"), + PFTauPVATag = cms.InputTag("hpsPFTauPrimaryVertexProducer76xReMiniAOD"), + PFTauSVATag = cms.InputTag("hpsPFTauSecondaryVertexProducer76xReMiniAOD"), useFullCalculation = cms.bool(True) ) -hpsPFTauVertexAndImpactParametersSeq = cms.Sequence( - hpsPFTauPrimaryVertexProducer* - hpsPFTauSecondaryVertexProducer* - hpsPFTauTransverseImpactParameters +hpsPFTauVertexAndImpactParametersSeq76xReMiniAOD = cms.Sequence( + hpsPFTauPrimaryVertexProducer76xReMiniAOD* + hpsPFTauSecondaryVertexProducer76xReMiniAOD* + hpsPFTauTransverseImpactParameters76xReMiniAOD ) from RecoTauTag.RecoTau.PFRecoTauDiscriminationByMVAIsolation2_cff import * -hpsPFTauChargedIsoPtSum = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), +hpsPFTauChargedIsoPtSum76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), ApplyDiscriminationByECALIsolation = cms.bool(False), ApplyDiscriminationByTrackerIsolation = cms.bool(True), applySumPtCut = cms.bool(False), @@ -804,12 +806,12 @@ isoConeSizeForDeltaBeta = cms.double(0.8), verbosity = cms.int32(0) ) -hpsPFTauNeutralIsoPtSum = hpsPFTauChargedIsoPtSum.clone( +hpsPFTauNeutralIsoPtSum76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( ApplyDiscriminationByECALIsolation = cms.bool(True), ApplyDiscriminationByTrackerIsolation = cms.bool(False), verbosity = cms.int32(0) ) -hpsPFTauPUcorrPtSum = hpsPFTauChargedIsoPtSum.clone( +hpsPFTauPUcorrPtSum76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( ApplyDiscriminationByECALIsolation = cms.bool(False), ApplyDiscriminationByTrackerIsolation = cms.bool(False), applyDeltaBetaCorrection = cms.bool(True), @@ -817,42 +819,42 @@ storeRawPUsumPt = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauNeutralIsoPtSumWeight = hpsPFTauChargedIsoPtSum.clone( +hpsPFTauNeutralIsoPtSumWeight76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( ApplyDiscriminationByWeightedECALIsolation = cms.bool(True), ApplyDiscriminationByTrackerIsolation = cms.bool(False), UseAllPFCandsForWeights = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauFootprintCorrection = hpsPFTauChargedIsoPtSum.clone( +hpsPFTauFootprintCorrection76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( ApplyDiscriminationByTrackerIsolation = cms.bool(False), storeRawSumPt = cms.bool(False), storeRawFootprintCorrection = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauPhotonPtSumOutsideSignalCone = hpsPFTauChargedIsoPtSum.clone( +hpsPFTauPhotonPtSumOutsideSignalCone76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( ApplyDiscriminationByTrackerIsolation = cms.bool(False), storeRawSumPt = cms.bool(False), storeRawPhotonSumPt_outsideSignalCone = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw = discriminationByIsolationMVA2raw.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), +hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD = discriminationByIsolationMVA2raw.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), loadMVAfromDB = cms.bool(True), mvaName = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1"), mvaOpt = cms.string("oldDMwoLT"), - srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters'), - srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum'), - srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum'), - srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum'), + srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters76xReMiniAOD'), + srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum76xReMiniAOD'), + srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum76xReMiniAOD'), + srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum76xReMiniAOD'), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT = discriminationByIsolationMVA2VLoose.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw:category'), +hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD = discriminationByIsolationMVA2VLoose.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD:category'), loadMVAfromDB = cms.bool(True), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_mvaOutput_normalization"), mapping = cms.VPSet( @@ -863,24 +865,24 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() -hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff40") -hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone( +hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff40") +hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD.clone( mvaName = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1"), mvaOpt = cms.string("oldDMwLT"), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw:category'), +hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw76xReMiniAOD:category'), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_mvaOutput_normalization"), mapping = cms.VPSet( cms.PSet( @@ -890,24 +892,24 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() -hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff40") -hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone( +hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff40") +hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD.clone( mvaName = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1"), mvaOpt = cms.string("newDMwoLT"), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw:category'), +hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw76xReMiniAOD:category'), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_mvaOutput_normalization"), mapping = cms.VPSet( cms.PSet( @@ -918,24 +920,24 @@ ), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() -hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff40") -hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone( +hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff40") +hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD.clone( mvaName = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1"), mvaOpt = cms.string("newDMwLT"), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw:category'), +hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw76xReMiniAOD:category'), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_mvaOutput_normalization"), mapping = cms.VPSet( cms.PSet( @@ -945,39 +947,39 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() -hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff40") +hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff40") #Define new Run2 MVA isolations from RecoTauTag.RecoTau.PFRecoTauDiscriminationByMVAIsolationRun2_cff import * -hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw = discriminationByIsolationMVArun2v1raw.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), +hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD = discriminationByIsolationMVArun2v1raw.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), loadMVAfromDB = cms.bool(True), mvaName = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1"), mvaOpt = cms.string("DBoldDMwLT"), - srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters'), - srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum'), - srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum'), - srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum'), - srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalCone'), - srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrection'), + srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters76xReMiniAOD'), + srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum76xReMiniAOD'), + srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum76xReMiniAOD'), + srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum76xReMiniAOD'), + srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalCone76xReMiniAOD'), + srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrection76xReMiniAOD'), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT = discriminationByIsolationMVArun2v1VLoose.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw:category'), +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = discriminationByIsolationMVArun2v1VLoose.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD:category'), loadMVAfromDB = cms.bool(True), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_mvaOutput_normalization"), mapping = cms.VPSet( @@ -988,26 +990,26 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff40") - -hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw.clone( +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD.clone( mvaName = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1"), mvaOpt = cms.string("DBnewDMwLT"), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw:category'), +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw76xReMiniAOD:category'), loadMVAfromDB = cms.bool(True), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_mvaOutput_normalization"), mapping = cms.VPSet( @@ -1018,27 +1020,27 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff40") - -hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw.clone( +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD.clone( mvaName = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1"), mvaOpt = cms.string("PWoldDMwLT"), - srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeight'), + srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeight76xReMiniAOD'), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw:category'), +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD:category'), loadMVAfromDB = cms.bool(True), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_mvaOutput_normalization"), mapping = cms.VPSet( @@ -1049,26 +1051,26 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff40") - -hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw.clone( +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD.clone( mvaName = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1"), mvaOpt = cms.string("PWnewDMwLT"), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw:category'), +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw76xReMiniAOD:category'), loadMVAfromDB = cms.bool(True), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_mvaOutput_normalization"), mapping = cms.VPSet( @@ -1079,20 +1081,20 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff40") - -hpsPFTauChargedIsoPtSumdR03 = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff40") + +hpsPFTauChargedIsoPtSumdR0376xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), ApplyDiscriminationByECALIsolation = cms.bool(False), ApplyDiscriminationByTrackerIsolation = cms.bool(True), applySumPtCut = cms.bool(False), @@ -1103,12 +1105,12 @@ isoConeSizeForDeltaBeta = cms.double(0.8), verbosity = cms.int32(0) ) -hpsPFTauNeutralIsoPtSumdR03 = hpsPFTauChargedIsoPtSumdR03.clone( +hpsPFTauNeutralIsoPtSumdR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( ApplyDiscriminationByECALIsolation = cms.bool(True), ApplyDiscriminationByTrackerIsolation = cms.bool(False), verbosity = cms.int32(0) ) -hpsPFTauPUcorrPtSumdR03 = hpsPFTauChargedIsoPtSumdR03.clone( +hpsPFTauPUcorrPtSumdR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( ApplyDiscriminationByECALIsolation = cms.bool(False), ApplyDiscriminationByTrackerIsolation = cms.bool(False), applyDeltaBetaCorrection = cms.bool(True), @@ -1116,40 +1118,40 @@ storeRawPUsumPt = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauNeutralIsoPtSumWeightdR03 = hpsPFTauChargedIsoPtSumdR03.clone( +hpsPFTauNeutralIsoPtSumWeightdR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( ApplyDiscriminationByWeightedECALIsolation = cms.bool(True), ApplyDiscriminationByTrackerIsolation = cms.bool(False), UseAllPFCandsForWeights = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauFootprintCorrectiondR03 = hpsPFTauChargedIsoPtSumdR03.clone( +hpsPFTauFootprintCorrectiondR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( ApplyDiscriminationByTrackerIsolation = cms.bool(False), storeRawSumPt = cms.bool(False), storeRawFootprintCorrection = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauPhotonPtSumOutsideSignalConedR03 = hpsPFTauChargedIsoPtSumdR03.clone( +hpsPFTauPhotonPtSumOutsideSignalConedR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( ApplyDiscriminationByTrackerIsolation = cms.bool(False), storeRawSumPt = cms.bool(False), storeRawPhotonSumPt_outsideSignalCone = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw.clone( +hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD.clone( mvaName = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1"), mvaOpt = cms.string("DBoldDMwLT"), - srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSumdR03'), - srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumdR03'), - srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSumdR03'), - srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalConedR03'), - srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrectiondR03'), + srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSumdR0376xReMiniAOD'), + srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumdR0376xReMiniAOD'), + srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSumdR0376xReMiniAOD'), + srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalConedR0376xReMiniAOD'), + srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrectiondR0376xReMiniAOD'), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw:category'), +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD:category'), loadMVAfromDB = cms.bool(True), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_mvaOutput_normalization"), mapping = cms.VPSet( @@ -1160,26 +1162,26 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff40") - -hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw.clone( +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD.clone( mvaName = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1"), mvaOpt = cms.string("PWoldDMwLT"), - srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeightdR03'), + srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeightdR0376xReMiniAOD'), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw:category'), +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw76xReMiniAOD:category'), loadMVAfromDB = cms.bool(True), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_mvaOutput_normalization"), mapping = cms.VPSet( @@ -1190,165 +1192,165 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff40") - -hpsPFTauMVAIsolation2Seq = cms.Sequence( - hpsPFTauChargedIsoPtSum - + hpsPFTauNeutralIsoPtSum - + hpsPFTauPUcorrPtSum - + hpsPFTauNeutralIsoPtSumWeight - + hpsPFTauFootprintCorrection - + hpsPFTauPhotonPtSumOutsideSignalCone - #+ hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw - #+ hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT - #+ hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT - #+ hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT - #+ hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT - #+ hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT - #+ hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT - + hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT - + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT - + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT - + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT - + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT - + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT - #+ hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw - #+ hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT - #+ hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT - #+ hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT - #+ hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT - #+ hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT - #+ hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT - + hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT - + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT - + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT - + hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT - + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT - + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff40") + +hpsPFTauMVAIsolation2Seq76xReMiniAOD = cms.Sequence( + hpsPFTauChargedIsoPtSum76xReMiniAOD + + hpsPFTauNeutralIsoPtSum76xReMiniAOD + + hpsPFTauPUcorrPtSum76xReMiniAOD + + hpsPFTauNeutralIsoPtSumWeight76xReMiniAOD + + hpsPFTauFootprintCorrection76xReMiniAOD + + hpsPFTauPhotonPtSumOutsideSignalCone76xReMiniAOD + #+ hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD + #+ hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT76xReMiniAOD + + hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw76xReMiniAOD + + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT76xReMiniAOD + #+ hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw76xReMiniAOD + #+ hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT76xReMiniAOD + + hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw76xReMiniAOD + + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT76xReMiniAOD # new MVA isolations for Run2 - + hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT - + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT - + hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT - + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT - + hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT - + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT - + hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT - + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT - + hpsPFTauChargedIsoPtSumdR03 - + hpsPFTauNeutralIsoPtSumdR03 - + hpsPFTauPUcorrPtSumdR03 - + hpsPFTauNeutralIsoPtSumWeightdR03 - + hpsPFTauFootprintCorrectiondR03 - + hpsPFTauPhotonPtSumOutsideSignalConedR03 - + hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT - + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT - + hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT - + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT + + hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw76xReMiniAOD + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw76xReMiniAOD + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD + + hpsPFTauChargedIsoPtSumdR0376xReMiniAOD + + hpsPFTauNeutralIsoPtSumdR0376xReMiniAOD + + hpsPFTauPUcorrPtSumdR0376xReMiniAOD + + hpsPFTauNeutralIsoPtSumWeightdR0376xReMiniAOD + + hpsPFTauFootprintCorrectiondR0376xReMiniAOD + + hpsPFTauPhotonPtSumOutsideSignalConedR0376xReMiniAOD + + hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw76xReMiniAOD + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD ) -produceHPSPFTaus = cms.Sequence( - hpsSelectionDiscriminator - #*hpsTightIsolationCleaner - #*hpsMediumIsolationCleaner - #*hpsLooseIsolationCleaner - #*hpsVLooseIsolationCleaner - *hpsPFTauProducerSansRefs - *hpsPFTauProducer -) - -produceAndDiscriminateHPSPFTaus = cms.Sequence( - produceHPSPFTaus* - hpsPFTauDiscriminationByDecayModeFindingNewDMs* - hpsPFTauDiscriminationByDecayModeFindingOldDMs* - hpsPFTauDiscriminationByDecayModeFinding* # CV: kept for backwards compatibility - hpsPFTauDiscriminationByChargedIsolationSeq* - hpsPFTauDiscriminationByIsolationSeq* - #hpsPFTauDiscriminationByIsolationSeqRhoCorr* - #hpsPFTauDiscriminationByIsolationSeqCustomRhoCorr* - hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr* +produceHPSPFTaus76xReMiniAOD = cms.Sequence( + hpsSelectionDiscriminator76xReMiniAOD + #*hpsTightIsolationCleaner76xReMiniAOD + #*hpsMediumIsolationCleaner76xReMiniAOD + #*hpsLooseIsolationCleaner76xReMiniAOD + #*hpsVLooseIsolationCleaner76xReMiniAOD + *hpsPFTauProducerSansRefs76xReMiniAOD + *hpsPFTauProducer76xReMiniAOD +) + +produceAndDiscriminateHPSPFTaus76xReMiniAOD = cms.Sequence( + produceHPSPFTaus76xReMiniAOD* + hpsPFTauDiscriminationByDecayModeFindingNewDMs76xReMiniAOD* + hpsPFTauDiscriminationByDecayModeFindingOldDMs76xReMiniAOD* + hpsPFTauDiscriminationByDecayModeFinding76xReMiniAOD* # CV: kept for backwards compatibility + hpsPFTauDiscriminationByChargedIsolationSeq76xReMiniAOD* + hpsPFTauDiscriminationByIsolationSeq76xReMiniAOD* + #hpsPFTauDiscriminationByIsolationSeqRhoCorr76xReMiniAOD* + #hpsPFTauDiscriminationByIsolationSeqCustomRhoCorr76xReMiniAOD* + hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr* - hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr* - hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr* - - hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr* - hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits* - hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3HitsdR03* - hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits* + hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr76xReMiniAOD* + hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr76xReMiniAOD* + hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr76xReMiniAOD* + + hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr76xReMiniAOD* + hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits76xReMiniAOD* + hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3HitsdR0376xReMiniAOD* + hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits76xReMiniAOD* - hpsPFTauDiscriminationByLooseElectronRejection* - hpsPFTauDiscriminationByMediumElectronRejection* - hpsPFTauDiscriminationByTightElectronRejection* - hpsPFTauDiscriminationByMVA5rawElectronRejection* - hpsPFTauDiscriminationByMVA5VLooseElectronRejection* - hpsPFTauDiscriminationByMVA5LooseElectronRejection* - hpsPFTauDiscriminationByMVA5MediumElectronRejection* - hpsPFTauDiscriminationByMVA5TightElectronRejection* - hpsPFTauDiscriminationByMVA5VTightElectronRejection* - hpsPFTauDiscriminationByMVA6rawElectronRejection* - hpsPFTauDiscriminationByMVA6VLooseElectronRejection* - hpsPFTauDiscriminationByMVA6LooseElectronRejection* - hpsPFTauDiscriminationByMVA6MediumElectronRejection* - hpsPFTauDiscriminationByMVA6TightElectronRejection* - hpsPFTauDiscriminationByMVA6VTightElectronRejection* - hpsPFTauDiscriminationByDeadECALElectronRejection* - hpsPFTauDiscriminationByLooseMuonRejection* - hpsPFTauDiscriminationByMediumMuonRejection* - hpsPFTauDiscriminationByTightMuonRejection* - hpsPFTauDiscriminationByLooseMuonRejection2* - hpsPFTauDiscriminationByMediumMuonRejection2* - hpsPFTauDiscriminationByTightMuonRejection2* - hpsPFTauDiscriminationByLooseMuonRejection3* - hpsPFTauDiscriminationByTightMuonRejection3* - hpsPFTauDiscriminationByMVArawMuonRejection* - hpsPFTauDiscriminationByMVALooseMuonRejection* - hpsPFTauDiscriminationByMVAMediumMuonRejection* - hpsPFTauDiscriminationByMVATightMuonRejection* - - hpsPFTauVertexAndImpactParametersSeq* - - hpsPFTauMVAIsolation2Seq + hpsPFTauDiscriminationByLooseElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMediumElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByTightElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA5rawElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA6rawElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByDeadECALElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByLooseMuonRejection76xReMiniAOD* + hpsPFTauDiscriminationByMediumMuonRejection76xReMiniAOD* + hpsPFTauDiscriminationByTightMuonRejection76xReMiniAOD* + hpsPFTauDiscriminationByLooseMuonRejection276xReMiniAOD* + hpsPFTauDiscriminationByMediumMuonRejection276xReMiniAOD* + hpsPFTauDiscriminationByTightMuonRejection276xReMiniAOD* + hpsPFTauDiscriminationByLooseMuonRejection376xReMiniAOD* + hpsPFTauDiscriminationByTightMuonRejection376xReMiniAOD* + hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVAMediumMuonRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVATightMuonRejection76xReMiniAOD* + + hpsPFTauVertexAndImpactParametersSeq76xReMiniAOD* + + hpsPFTauMVAIsolation2Seq76xReMiniAOD ) diff --git a/RecoTauTag/Configuration/python/RecoPFTauTag_reminiAOD_cff.py b/RecoTauTag/Configuration/python/RecoPFTauTag_reminiAOD_cff.py index 2fb4d6902ee41..19290bbc84951 100644 --- a/RecoTauTag/Configuration/python/RecoPFTauTag_reminiAOD_cff.py +++ b/RecoTauTag/Configuration/python/RecoPFTauTag_reminiAOD_cff.py @@ -18,19 +18,19 @@ # Collection PFCandidates from a DR=0.8 cone about the jet axis and make new # faux jets with this collection -from RecoTauTag.RecoTau.RecoTauJetRegionProducer_cfi import \ - RecoTauJetRegionProducer -recoTauAK4PFJets08Region=RecoTauJetRegionProducer.clone( +from RecoTauTag.RecoTau.RecoTauJetRegionProducer_cfi import RecoTauJetRegionProducer +recoTauAK4PFJets08Region76xReMiniAOD = RecoTauJetRegionProducer.clone( src = PFRecoTauPFJetInputs.inputJetCollection ) # Reconstruct the pi zeros in our pre-selected jets. -from RecoTauTag.RecoTau.RecoTauPiZeroProducer_cfi import \ - ak4PFJetsLegacyHPSPiZeros -ak4PFJetsLegacyHPSPiZeros.jetSrc = PFRecoTauPFJetInputs.inputJetCollection +from RecoTauTag.RecoTau.RecoTauPiZeroProducer_cfi import ak4PFJetsLegacyHPSPiZeros +ak4PFJetsLegacyHPSPiZeros76xReMiniAOD = ak4PFJetsLegacyHPSPiZeros.clone() +ak4PFJetsLegacyHPSPiZeros76xReMiniAOD.jetSrc = PFRecoTauPFJetInputs.inputJetCollection + # import charged hadrons -from RecoTauTag.RecoTau.PFRecoTauChargedHadronProducer_cfi import \ - ak4PFJetsRecoTauChargedHadrons +from RecoTauTag.RecoTau.PFRecoTauChargedHadronProducer_cfi import ak4PFJetsRecoTauChargedHadrons +ak4PFJetsRecoTauChargedHadrons76xReMiniAOD = ak4PFJetsRecoTauChargedHadrons.clone() #------------------------------------------------------------------------------- #------------------ Produce combinatoric base taus------------------------------ @@ -39,19 +39,19 @@ # produced for each jet, which are cleaned by the respective algorithms. # We split it into different collections for each different decay mode. -from RecoTauTag.RecoTau.RecoTauCombinatoricProducer_cfi import \ - combinatoricRecoTaus - -combinatoricRecoTaus.jetSrc = PFRecoTauPFJetInputs.inputJetCollection +from RecoTauTag.RecoTau.RecoTauCombinatoricProducer_cfi import combinatoricRecoTaus +combinatoricRecoTaus76xReMiniAOD = combinatoricRecoTaus.clone() +combinatoricRecoTaus76xReMiniAOD.jetRegionSrc = cms.InputTag("recoTauAK4PFJets08Region76xReMiniAOD") +combinatoricRecoTaus76xReMiniAOD.jetSrc = PFRecoTauPFJetInputs.inputJetCollection #-------------------------------------------------------------------------------- # CV: disable reconstruction of 3Prong1Pi0 tau candidates -combinatoricRecoTaus.builders[0].decayModes.remove(combinatoricRecoTaus.builders[0].decayModes[6]) +combinatoricRecoTaus76xReMiniAOD.builders[0].decayModes.remove(combinatoricRecoTaus76xReMiniAOD.builders[0].decayModes[6]) #-------------------------------------------------------------------------------- #-------------------------------------------------------------------------------- # CV: set mass of tau candidates reconstructed in 1Prong0pi0 decay mode to charged pion mass -combinatoricRecoTaus.modifiers.append(cms.PSet( +combinatoricRecoTaus76xReMiniAOD.modifiers.append(cms.PSet( name = cms.string("tau_mass"), plugin = cms.string("PFRecoTauMassPlugin"), verbosity = cms.int32(0) @@ -64,57 +64,58 @@ from RecoTauTag.Configuration.HPSPFTaus_reminiAOD_cff import * -combinatoricRecoTaus.piZeroSrc = cms.InputTag("ak4PFJetsLegacyHPSPiZeros") +combinatoricRecoTaus76xReMiniAOD.chargedHadronSrc = cms.InputTag("ak4PFJetsRecoTauChargedHadrons76xReMiniAOD") +combinatoricRecoTaus76xReMiniAOD.piZeroSrc = cms.InputTag("ak4PFJetsLegacyHPSPiZeros76xReMiniAOD") #------------------------------------------------------------------------------- #------------------ PFTauTagInfo workaround ------------------------------------ #------------------------------------------------------------------------------- # Build the PFTauTagInfos separately, then relink them into the taus. -from RecoTauTag.RecoTau.PFRecoTauTagInfoProducer_cfi import \ - pfRecoTauTagInfoProducer -from RecoJets.JetAssociationProducers.ak4JTA_cff \ - import ak4JetTracksAssociatorAtVertexPF -ak4PFJetTracksAssociatorAtVertex = ak4JetTracksAssociatorAtVertexPF.clone() -ak4PFJetTracksAssociatorAtVertex.jets = PFRecoTauPFJetInputs.inputJetCollection -tautagInfoModifer = cms.PSet( +from RecoTauTag.RecoTau.PFRecoTauTagInfoProducer_cfi import pfRecoTauTagInfoProducer +pfRecoTauTagInfoProducer76xReMiniAOD = pfRecoTauTagInfoProducer.clone() +pfRecoTauTagInfoProducer76xReMiniAOD.PFJetTracksAssociatorProducer = cms.InputTag("ak4PFJetTracksAssociatorAtVertex76xReMiniAOD") + +from RecoJets.JetAssociationProducers.ak4JTA_cff import ak4JetTracksAssociatorAtVertexPF +ak4PFJetTracksAssociatorAtVertex76xReMiniAOD = ak4JetTracksAssociatorAtVertexPF.clone() +ak4PFJetTracksAssociatorAtVertex76xReMiniAOD.jets = PFRecoTauPFJetInputs.inputJetCollection +tautagInfoModifer76xReMiniAOD = cms.PSet( name = cms.string("TTIworkaround"), plugin = cms.string("RecoTauTagInfoWorkaroundModifer"), - pfTauTagInfoSrc = cms.InputTag("pfRecoTauTagInfoProducer"), + pfTauTagInfoSrc = cms.InputTag("pfRecoTauTagInfoProducer76xReMiniAOD"), ) # Add the modifier to our tau producers hasTTIworkaround = False -for modifier in combinatoricRecoTaus.modifiers: +for modifier in combinatoricRecoTaus76xReMiniAOD.modifiers: if hasattr(modifier, "name") and modifier.name.value() == "TTIworkaround": hasTTIworkaround = True if not hasTTIworkaround: - combinatoricRecoTaus.modifiers.append(tautagInfoModifer) -##combinatoricRecoTaus.modifiers.append(tautagInfoModifer) + combinatoricRecoTaus76xReMiniAOD.modifiers.append(tautagInfoModifer76xReMiniAOD) +##combinatoricRecoTaus76xReMiniAOD.modifiers.append(tautagInfoModifer76xReMiniAOD) -recoTauPileUpVertices = cms.EDFilter( - "RecoTauPileUpVertexSelector", +recoTauPileUpVertices76xReMiniAOD = cms.EDFilter("RecoTauPileUpVertexSelector", src = cms.InputTag("offlinePrimaryVertices"), minTrackSumPt = cms.double(5), filter = cms.bool(False), ) -recoTauCommonSequence = cms.Sequence( - ak4PFJetTracksAssociatorAtVertex * - recoTauAK4PFJets08Region* - recoTauPileUpVertices* - pfRecoTauTagInfoProducer +recoTauCommonSequence76xReMiniAOD = cms.Sequence( + ak4PFJetTracksAssociatorAtVertex76xReMiniAOD * + recoTauAK4PFJets08Region76xReMiniAOD * + recoTauPileUpVertices76xReMiniAOD * + pfRecoTauTagInfoProducer76xReMiniAOD ) # Produce only classic HPS taus -recoTauClassicHPSSequence = cms.Sequence( - ak4PFJetsLegacyHPSPiZeros * - ak4PFJetsRecoTauChargedHadrons * - combinatoricRecoTaus * - produceAndDiscriminateHPSPFTaus +recoTauClassicHPSSequence76xReMiniAOD = cms.Sequence( + ak4PFJetsLegacyHPSPiZeros76xReMiniAOD * + ak4PFJetsRecoTauChargedHadrons76xReMiniAOD * + combinatoricRecoTaus76xReMiniAOD * + produceAndDiscriminateHPSPFTaus76xReMiniAOD ) -PFTau = cms.Sequence( - recoTauCommonSequence * - recoTauClassicHPSSequence +PFTau76xReMiniAOD = cms.Sequence( + recoTauCommonSequence76xReMiniAOD * + recoTauClassicHPSSequence76xReMiniAOD ) From 679a07ca65b10555e5d1e7ed5d6ee00d9e655148 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 30 Nov 2015 19:14:41 +0100 Subject: [PATCH 54/66] fixed probem with matrix test 135.4 --- .../Configuration/python/RecoPFTauTag_cff.py | 10 +--- .../python/RecoPFTauTag_reminiAOD_cff.py | 13 +--- .../python/RecoTauCombinatoricProducer_cfi.py | 60 ++++++++++--------- 3 files changed, 36 insertions(+), 47 deletions(-) diff --git a/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py b/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py index 96f1590575645..2f7f9c6e96fd3 100644 --- a/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py +++ b/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py @@ -73,15 +73,7 @@ plugin = cms.string("RecoTauTagInfoWorkaroundModifer"), pfTauTagInfoSrc = cms.InputTag("pfRecoTauTagInfoProducer"), ) - -# Add the modifier to our tau producers -hasTTIworkaround = False -for modifier in combinatoricRecoTaus.modifiers: - if hasattr(modifier, "name") and modifier.name.value() == "TTIworkaround": - hasTTIworkaround = True -if not hasTTIworkaround: - combinatoricRecoTaus.modifiers.append(tautagInfoModifer) -##combinatoricRecoTaus.modifiers.append(tautagInfoModifer) +combinatoricRecoTaus.modifiers.append(tautagInfoModifer) recoTauPileUpVertices = cms.EDFilter( "RecoTauPileUpVertexSelector", diff --git a/RecoTauTag/Configuration/python/RecoPFTauTag_reminiAOD_cff.py b/RecoTauTag/Configuration/python/RecoPFTauTag_reminiAOD_cff.py index 19290bbc84951..01aec3a84ec44 100644 --- a/RecoTauTag/Configuration/python/RecoPFTauTag_reminiAOD_cff.py +++ b/RecoTauTag/Configuration/python/RecoPFTauTag_reminiAOD_cff.py @@ -39,8 +39,9 @@ # produced for each jet, which are cleaned by the respective algorithms. # We split it into different collections for each different decay mode. -from RecoTauTag.RecoTau.RecoTauCombinatoricProducer_cfi import combinatoricRecoTaus +from RecoTauTag.RecoTau.RecoTauCombinatoricProducer_cfi import combinatoricRecoTaus, combinatoricModifierConfigs combinatoricRecoTaus76xReMiniAOD = combinatoricRecoTaus.clone() +combinatoricRecoTaus76xReMiniAOD.modifiers = cms.VPSet(combinatoricModifierConfigs) combinatoricRecoTaus76xReMiniAOD.jetRegionSrc = cms.InputTag("recoTauAK4PFJets08Region76xReMiniAOD") combinatoricRecoTaus76xReMiniAOD.jetSrc = PFRecoTauPFJetInputs.inputJetCollection @@ -83,15 +84,7 @@ plugin = cms.string("RecoTauTagInfoWorkaroundModifer"), pfTauTagInfoSrc = cms.InputTag("pfRecoTauTagInfoProducer76xReMiniAOD"), ) - -# Add the modifier to our tau producers -hasTTIworkaround = False -for modifier in combinatoricRecoTaus76xReMiniAOD.modifiers: - if hasattr(modifier, "name") and modifier.name.value() == "TTIworkaround": - hasTTIworkaround = True -if not hasTTIworkaround: - combinatoricRecoTaus76xReMiniAOD.modifiers.append(tautagInfoModifer76xReMiniAOD) -##combinatoricRecoTaus76xReMiniAOD.modifiers.append(tautagInfoModifer76xReMiniAOD) +combinatoricRecoTaus76xReMiniAOD.modifiers.append(tautagInfoModifer76xReMiniAOD) recoTauPileUpVertices76xReMiniAOD = cms.EDFilter("RecoTauPileUpVertexSelector", src = cms.InputTag("offlinePrimaryVertices"), diff --git a/RecoTauTag/RecoTau/python/RecoTauCombinatoricProducer_cfi.py b/RecoTauTag/RecoTau/python/RecoTauCombinatoricProducer_cfi.py index e917a7edfbb12..37960c8550900 100644 --- a/RecoTauTag/RecoTau/python/RecoTauCombinatoricProducer_cfi.py +++ b/RecoTauTag/RecoTau/python/RecoTauCombinatoricProducer_cfi.py @@ -77,6 +77,37 @@ ) ) +combinatoricModifierConfigs = [ + cms.PSet( + name = cms.string("sipt"), + plugin = cms.string("RecoTauImpactParameterSignificancePlugin"), + qualityCuts = PFTauQualityCuts, + ), + # Electron rejection + cms.PSet( + name = cms.string("elec_rej"), + plugin = cms.string("RecoTauElectronRejectionPlugin"), + #Electron rejection parameters + ElectronPreIDProducer = cms.InputTag("elecpreid"), + EcalStripSumE_deltaPhiOverQ_minValue = cms.double(-0.1), + EcalStripSumE_deltaPhiOverQ_maxValue = cms.double(0.5), + EcalStripSumE_minClusEnergy = cms.double(0.1), + EcalStripSumE_deltaEta = cms.double(0.03), + ElecPreIDLeadTkMatch_maxDR = cms.double(0.01), + maximumForElectrionPreIDOutput = cms.double(-0.1), + DataType = cms.string("AOD"), + ), + # Tau energy reconstruction + # (to avoid double-counting of energy carried by neutral PFCandidates + # in case PFRecoTauChargedHadrons are built from reco::Tracks) + cms.PSet( + pfTauEnergyAlgorithmPlugin, + name = cms.string("tau_en_reconstruction"), + plugin = cms.string("PFRecoTauEnergyAlgorithmPlugin"), + verbosity = cms.int32(0) + ) +] + _combinatoricTauConfig = cms.PSet( name = cms.string("combinatoric"), plugin = cms.string("RecoTauBuilderCombinatoricPlugin"), @@ -113,33 +144,6 @@ _combinatoricTauConfig ), modifiers = cms.VPSet( - cms.PSet( - name = cms.string("sipt"), - plugin = cms.string("RecoTauImpactParameterSignificancePlugin"), - qualityCuts = PFTauQualityCuts, - ), - # Electron rejection - cms.PSet( - name = cms.string("elec_rej"), - plugin = cms.string("RecoTauElectronRejectionPlugin"), - #Electron rejection parameters - ElectronPreIDProducer = cms.InputTag("elecpreid"), - EcalStripSumE_deltaPhiOverQ_minValue = cms.double(-0.1), - EcalStripSumE_deltaPhiOverQ_maxValue = cms.double(0.5), - EcalStripSumE_minClusEnergy = cms.double(0.1), - EcalStripSumE_deltaEta = cms.double(0.03), - ElecPreIDLeadTkMatch_maxDR = cms.double(0.01), - maximumForElectrionPreIDOutput = cms.double(-0.1), - DataType = cms.string("AOD"), - ), - # Tau energy reconstruction - # (to avoid double-counting of energy carried by neutral PFCandidates - # in case PFRecoTauChargedHadrons are built from reco::Tracks) - cms.PSet( - pfTauEnergyAlgorithmPlugin, - name = cms.string("tau_en_reconstruction"), - plugin = cms.string("PFRecoTauEnergyAlgorithmPlugin"), - verbosity = cms.int32(0) - ) + combinatoricModifierConfigs ) ) From 24e765057898b92c46d8efaa3b05ef37af585540 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 16 Nov 2015 12:16:58 +0100 Subject: [PATCH 55/66] comment out parts of unit test that are not expected to work --- .../PatCandidates/test/testPackedCandidate.cc | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/DataFormats/PatCandidates/test/testPackedCandidate.cc b/DataFormats/PatCandidates/test/testPackedCandidate.cc index fbb03f9b3a580..e6f8fd317838e 100644 --- a/DataFormats/PatCandidates/test/testPackedCandidate.cc +++ b/DataFormats/PatCandidates/test/testPackedCandidate.cc @@ -50,15 +50,16 @@ void testPackedCandidate::testCopyConstructor() { //invalid Refs use a special key pat::PackedCandidate pc(lv, v, 1., 11, reco::VertexRefProd(), reco::VertexRef().key()); - CPPUNIT_ASSERT(pc.polarP4() == plv); - CPPUNIT_ASSERT(pc.p4() == lv); - CPPUNIT_ASSERT(pc.vertex() == v); + //these by design do not work + // CPPUNIT_ASSERT(pc.polarP4() == plv); + // CPPUNIT_ASSERT(pc.p4() == lv); + // CPPUNIT_ASSERT(pc.vertex() == v); pat::PackedCandidate copy_pc(pc); - CPPUNIT_ASSERT(copy_pc.polarP4() == plv); - CPPUNIT_ASSERT(copy_pc.p4() == lv); - CPPUNIT_ASSERT(copy_pc.vertex() == v); + //CPPUNIT_ASSERT(copy_pc.polarP4() == plv); + //CPPUNIT_ASSERT(copy_pc.p4() == lv); + //CPPUNIT_ASSERT(copy_pc.vertex() == v); CPPUNIT_ASSERT(©_pc.polarP4() != &pc.polarP4()); CPPUNIT_ASSERT(©_pc.p4() != &pc.p4()); @@ -81,11 +82,6 @@ testPackedCandidate::testPackUnpack() { //invalid Refs use a special key pat::PackedCandidate pc(lv, v, -3./4.*3.1416, 11, reco::VertexRefProd(), reco::VertexRef().key()); - CPPUNIT_ASSERT(pc.polarP4() == plv); - CPPUNIT_ASSERT(pc.p4() == lv); - CPPUNIT_ASSERT(pc.vertex() == v); - CPPUNIT_ASSERT(pc.pseudoTrack().p() == lv.P()); - pc.pack(true); pc.packVtx(true); @@ -112,10 +108,10 @@ void testPackedCandidate::testSimulateReadFromRoot() { //invalid Refs use a special key pat::PackedCandidate pc(lv, v, -3./4.*3.1416, 11, reco::VertexRefProd(), reco::VertexRef().key()); - CPPUNIT_ASSERT(pc.polarP4() == plv); - CPPUNIT_ASSERT(pc.p4() == lv); - CPPUNIT_ASSERT(pc.vertex() == v); - CPPUNIT_ASSERT(pc.pseudoTrack().p() == lv.P()); + // CPPUNIT_ASSERT(pc.polarP4() == plv); + // CPPUNIT_ASSERT(pc.p4() == lv); + // CPPUNIT_ASSERT(pc.vertex() == v); + // CPPUNIT_ASSERT(pc.pseudoTrack().p() == lv.P()); //When reading back from ROOT, these were not stored and are nulled out delete pc.p4_.exchange(nullptr); From 32e79950c3da9e23d89819d9e94f4b23efc801bb Mon Sep 17 00:00:00 2001 From: AJ Johnson Date: Tue, 1 Dec 2015 08:21:50 +0100 Subject: [PATCH 56/66] Adding import statements per Slava's suggestion - hopefully this will fix the unit test errors --- .../Configuration/python/updateHPSPFTaus_cff.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/RecoTauTag/Configuration/python/updateHPSPFTaus_cff.py b/RecoTauTag/Configuration/python/updateHPSPFTaus_cff.py index 72a4a905813c7..b12c61b435209 100644 --- a/RecoTauTag/Configuration/python/updateHPSPFTaus_cff.py +++ b/RecoTauTag/Configuration/python/updateHPSPFTaus_cff.py @@ -10,6 +10,18 @@ Christian Veelken, LLR ''' +from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauChargedIsoPtSum +from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauNeutralIsoPtSum +from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauPUcorrPtSum +from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauNeutralIsoPtSumWeight +from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauFootprintCorrection +from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauPhotonPtSumOutsideSignalCone +from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits +from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits +from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits +from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits +from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone +from RecoTauTag.Configuration.HPSPFTaus_cff import hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits updateHPSPFTaus = cms.Sequence() From 9fc470c31836f68c5198d090c3b65a71b5f62fd7 Mon Sep 17 00:00:00 2001 From: Dinko Ferencek Date: Tue, 1 Dec 2015 11:59:32 -0600 Subject: [PATCH 57/66] removing dead assignment --- .../src/CandidateBoostedDoubleSecondaryVertexComputer.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc b/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc index 62bbac8f6be6b..d047f888aba7f 100644 --- a/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc +++ b/RecoBTag/SecondaryVertex/src/CandidateBoostedDoubleSecondaryVertexComputer.cc @@ -521,7 +521,6 @@ float CandidateBoostedDoubleSecondaryVertexComputer::discriminator(const TagInfo tau1_flightDistance2dSig= tau2_flightDistance2dSig; tau2_flightDistance2dSig= temp; - temp = tau1_vertexDeltaR; tau1_vertexDeltaR= tau2_vertexDeltaR; temp = tau1_vertexEnergyRatio; From 236c0738627bd81f9f94b71c57d83238e591e58a Mon Sep 17 00:00:00 2001 From: federico de guio Date: Tue, 1 Dec 2015 20:38:52 +0100 Subject: [PATCH 58/66] support case where validation sequence runs without reco (re-miniAOD) --- Configuration/Applications/python/ConfigBuilder.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Configuration/Applications/python/ConfigBuilder.py b/Configuration/Applications/python/ConfigBuilder.py index 1eb5a46c4732c..f6e02179d1e27 100644 --- a/Configuration/Applications/python/ConfigBuilder.py +++ b/Configuration/Applications/python/ConfigBuilder.py @@ -1811,10 +1811,7 @@ def NFI(index): return '' else: return '%s'%index - - if not 'DIGI' in self.stepMap and not self._options.fast and not any(map( lambda s : s.startswith('genvalid'), valSeqName)): - if self._options.restoreRNDSeeds==False and not self._options.restoreRNDSeeds==True: - self._options.restoreRNDSeeds=True + #rename the HLT process in validation steps if ('HLT' in self.stepMap and not self._options.fast) or self._options.hltProcess: @@ -1830,6 +1827,14 @@ def NFI(index): setattr(self.process,'validation_step%s'%NFI(i), cms.EndPath( getattr(self.process, s))) self.schedule.append(getattr(self.process,'validation_step%s'%NFI(i))) + #needed in case the miniAODValidation sequence is run starting from AODSIM + if 'PAT' in self.stepMap and not 'RECO' in self.stepMap: + return + + if not 'DIGI' in self.stepMap and not self._options.fast and not any(map( lambda s : s.startswith('genvalid'), valSeqName)): + if self._options.restoreRNDSeeds==False and not self._options.restoreRNDSeeds==True: + self._options.restoreRNDSeeds=True + if not 'DIGI' in self.stepMap and not self._options.fast: self.executeAndRemember("process.mix.playback = True") self.executeAndRemember("process.mix.digitizers = cms.PSet()") From 89b65d9261d094f5e3aa1d5dab55af8a14253e48 Mon Sep 17 00:00:00 2001 From: federico de guio Date: Tue, 1 Dec 2015 23:06:42 +0100 Subject: [PATCH 59/66] makes the miniAODDQM able to run with miniAODValidation starting from AODSIM --- JetMETCorrections/Type1MET/python/pfMETCorrectionType0_cfi.py | 4 ++-- Validation/RecoParticleFlow/python/miniAODDQM_cff.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/JetMETCorrections/Type1MET/python/pfMETCorrectionType0_cfi.py b/JetMETCorrections/Type1MET/python/pfMETCorrectionType0_cfi.py index c0bdaab160d53..abb611e16e723 100644 --- a/JetMETCorrections/Type1MET/python/pfMETCorrectionType0_cfi.py +++ b/JetMETCorrections/Type1MET/python/pfMETCorrectionType0_cfi.py @@ -69,8 +69,8 @@ type0PFMEtCorrectionPFCandToVertexAssociationForValidationMiniAOD = cms.Sequence( - selectedVerticesForPFMEtCorrType0 - * selectedPrimaryVertexHighestPtTrackSumForPFMEtCorrType0 + cms.ignore(selectedVerticesForPFMEtCorrType0) + * cms.ignore(selectedPrimaryVertexHighestPtTrackSumForPFMEtCorrType0) * particleFlowDisplacedVertex * pfCandidateToVertexAssociation ) diff --git a/Validation/RecoParticleFlow/python/miniAODDQM_cff.py b/Validation/RecoParticleFlow/python/miniAODDQM_cff.py index ce4585176e546..0cf6615ec9d33 100644 --- a/Validation/RecoParticleFlow/python/miniAODDQM_cff.py +++ b/Validation/RecoParticleFlow/python/miniAODDQM_cff.py @@ -80,9 +80,10 @@ #ElectronValidation2.InputCollection = slimmedMuonValidation1.InputCollection #ElectronValidation2.MatchCollection = slimmedMuonValidation1.MatchCollection - +from JetMETCorrections.Type1MET.pfMETCorrectionType0_cfi import type0PFMEtCorrectionPFCandToVertexAssociationForValidationMiniAOD miniAODDQMSequence = cms.Sequence( + type0PFMEtCorrectionPFCandToVertexAssociationForValidationMiniAOD * JetValidation1 * JetValidation2 * JetResValidation1 * JetResValidation2 * METValidation1 * METValidation2 * From 0d8a5f127d2465b62dbc3a45f5edd992ec9d1bf1 Mon Sep 17 00:00:00 2001 From: AJ Johnson Date: Wed, 2 Dec 2015 02:01:18 +0100 Subject: [PATCH 60/66] Removed added 'keep' statements --- .../Configuration/python/RecoTauTag_EventContent_cff.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py b/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py index 61c3701a3a0a5..b01a53055a3ac 100644 --- a/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py +++ b/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py @@ -102,20 +102,16 @@ 'keep *_hpsPFTauDiscriminationByMVArawMuonRejection_*_*', 'keep *_hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits_*_*', 'keep *_hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone_*_*', - 'keep *_hpsPFTauFootprintCorrection_*_*', 'keep *_hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits_*_*', 'keep *_hpsPFTauNeutralIsoPtSum_*_*', 'keep *_hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits_*_*', 'keep *_hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits_*_*', 'keep *_hpsPFTauPUcorrPtSum_*_*', 'keep *_hpsPFTauChargedIsoPtSum_*_*', - #'keep *_hpsPFTau*PtSum_*_*', 'keep *_hpsPFTauMVA3IsolationChargedIsoPtSum_*_*', 'keep *_hpsPFTauMVA3IsolationNeutralIsoPtSum_*_*', 'keep *_hpsPFTauMVA3IsolationPUcorrPtSum_*_*', - 'keep *_hpsPFTauTransverseImpactParameters_*_*', - 'keep *_hpsPFTauNeutralIsoPtSumWeight_*_*', - 'keep *_hpsPFTauPhotonPtSumOutsideSignalCone_*_*' + 'keep *_hpsPFTauTransverseImpactParameters_*_*' ) ) #AOD content From 81f54464a590c96542aca63b1d778bd0d291f2f4 Mon Sep 17 00:00:00 2001 From: Carl Vuosalo Date: Wed, 2 Dec 2015 06:02:53 +0100 Subject: [PATCH 61/66] Restored CSCHaloData to AOD, which was inadvertently deleted by PR 11068 --- RecoMET/Configuration/python/RecoMET_EventContent_cff.py | 1 + 1 file changed, 1 insertion(+) diff --git a/RecoMET/Configuration/python/RecoMET_EventContent_cff.py b/RecoMET/Configuration/python/RecoMET_EventContent_cff.py index 5c7512f713365..2c6606e8720a3 100644 --- a/RecoMET/Configuration/python/RecoMET_EventContent_cff.py +++ b/RecoMET/Configuration/python/RecoMET_EventContent_cff.py @@ -71,6 +71,7 @@ 'keep HcalNoiseSummary_hcalnoise_*_*', #'keep *GlobalHaloData_*_*_*', 'keep recoGlobalHaloData_GlobalHaloData_*_*', + 'keep recoCSCHaloData_CSCHaloData_*_*', 'keep recoBeamHaloSummary_BeamHaloSummary_*_*' ) ) From 51bc347ac994634bc0022f6abd2db9563b3aa78f Mon Sep 17 00:00:00 2001 From: AJ Johnson Date: Wed, 2 Dec 2015 06:58:52 +0100 Subject: [PATCH 62/66] Re-adding previous fix that was reverted: removal of namespace and include statements in PFRecoTauClusterVariables.h, switching from TMath to std in PFRecoTauDiscriminationByIsolationRun2.cc --- .../interface/PFRecoTauClusterVariables.h | 6 - ...RecoTauDiscriminationByMVAIsolationRun2.cc | 106 +++++++++--------- 2 files changed, 53 insertions(+), 59 deletions(-) diff --git a/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h b/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h index c762f55ff5c86..9b2fb9105acbf 100644 --- a/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h +++ b/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h @@ -7,12 +7,6 @@ * */ -#include "DataFormats/Candidate/interface/Candidate.h" -#include "DataFormats/TauReco/interface/PFTau.h" -#include "DataFormats/TauReco/interface/PFTauFwd.h" -#include "DataFormats/Math/interface/deltaR.h" -#include - using namespace reco; namespace diff --git a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolationRun2.cc b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolationRun2.cc index 868e7db6d1fca..811619680062c 100644 --- a/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolationRun2.cc +++ b/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByMVAIsolationRun2.cc @@ -210,7 +210,7 @@ double PFRecoTauDiscriminationByMVAIsolationRun2::discriminate(const PFTauRef& t double decayDistX = tauLifetimeInfo.flightLength().x(); double decayDistY = tauLifetimeInfo.flightLength().y(); double decayDistZ = tauLifetimeInfo.flightLength().z(); - double decayDistMag = TMath::Sqrt(decayDistX*decayDistX + decayDistY*decayDistY + decayDistZ*decayDistZ); + double decayDistMag = std::sqrt(decayDistX*decayDistX + decayDistY*decayDistY + decayDistZ*decayDistZ); double nPhoton = double(tau_n_photons_total(*tau)); double ptWeightedDetaStrip = tau_pt_weighted_deta_strip(*tau, tauDecayMode); @@ -221,73 +221,73 @@ double PFRecoTauDiscriminationByMVAIsolationRun2::discriminate(const PFTauRef& t double eRatio = tau_Eratio(*tau); if ( mvaOpt_ == kOldDMwoLT || mvaOpt_ == kNewDMwoLT ) { - mvaInput_[0] = TMath::Log(TMath::Max(1., Double_t(tau->pt()))); - mvaInput_[1] = TMath::Abs(tau->eta()); - mvaInput_[2] = TMath::Log(TMath::Max(1.e-2, chargedIsoPtSum)); - mvaInput_[3] = TMath::Log(TMath::Max(1.e-2, neutralIsoPtSum - 0.125*puCorrPtSum)); - mvaInput_[4] = TMath::Log(TMath::Max(1.e-2, puCorrPtSum)); + mvaInput_[0] = std::log(std::max(1., Double_t(tau->pt()))); + mvaInput_[1] = std::fabs(tau->eta()); + mvaInput_[2] = std::log(std::max(1.e-2, chargedIsoPtSum)); + mvaInput_[3] = std::log(std::max(1.e-2, neutralIsoPtSum - 0.125*puCorrPtSum)); + mvaInput_[4] = std::log(std::max(1.e-2, puCorrPtSum)); mvaInput_[5] = tauDecayMode; } else if ( mvaOpt_ == kOldDMwLT || mvaOpt_ == kNewDMwLT ) { - mvaInput_[0] = TMath::Log(TMath::Max(1., Double_t(tau->pt()))); - mvaInput_[1] = TMath::Abs(tau->eta()); - mvaInput_[2] = TMath::Log(TMath::Max(1.e-2, chargedIsoPtSum)); - mvaInput_[3] = TMath::Log(TMath::Max(1.e-2, neutralIsoPtSum - 0.125*puCorrPtSum)); - mvaInput_[4] = TMath::Log(TMath::Max(1.e-2, puCorrPtSum)); + mvaInput_[0] = std::log(std::max(1., Double_t(tau->pt()))); + mvaInput_[1] = std::fabs(tau->eta()); + mvaInput_[2] = std::log(std::max(1.e-2, chargedIsoPtSum)); + mvaInput_[3] = std::log(std::max(1.e-2, neutralIsoPtSum - 0.125*puCorrPtSum)); + mvaInput_[4] = std::log(std::max(1.e-2, puCorrPtSum)); mvaInput_[5] = tauDecayMode; mvaInput_[6] = TMath::Sign(+1., tauLifetimeInfo.dxy()); - mvaInput_[7] = TMath::Sqrt(TMath::Abs(TMath::Min(1., tauLifetimeInfo.dxy()))); - mvaInput_[8] = TMath::Min(10., TMath::Abs(tauLifetimeInfo.dxy_Sig())); + mvaInput_[7] = std::sqrt(std::fabs(std::min(1., tauLifetimeInfo.dxy()))); + mvaInput_[8] = std::min(10., std::fabs(tauLifetimeInfo.dxy_Sig())); mvaInput_[9] = ( tauLifetimeInfo.hasSecondaryVertex() ) ? 1. : 0.; - mvaInput_[10] = TMath::Sqrt(decayDistMag); - mvaInput_[11] = TMath::Min(10., tauLifetimeInfo.flightLengthSig()); + mvaInput_[10] = std::sqrt(decayDistMag); + mvaInput_[11] = std::min(10., tauLifetimeInfo.flightLengthSig()); } else if ( mvaOpt_ == kDBoldDMwLT || mvaOpt_ == kDBnewDMwLT ) { - mvaInput_[0] = TMath::Log(TMath::Max(1., Double_t(tau->pt()))); - mvaInput_[1] = TMath::Abs(tau->eta()); - mvaInput_[2] = TMath::Log(TMath::Max(1.e-2, chargedIsoPtSum)); - mvaInput_[3] = TMath::Log(TMath::Max(1.e-2, neutralIsoPtSum)); - mvaInput_[4] = TMath::Log(TMath::Max(1.e-2, puCorrPtSum)); - mvaInput_[5] = TMath::Log(TMath::Max(1.e-2, photonPtSumOutsideSignalCone)); + mvaInput_[0] = std::log(std::max(1., Double_t(tau->pt()))); + mvaInput_[1] = std::fabs(tau->eta()); + mvaInput_[2] = std::log(std::max(1.e-2, chargedIsoPtSum)); + mvaInput_[3] = std::log(std::max(1.e-2, neutralIsoPtSum)); + mvaInput_[4] = std::log(std::max(1.e-2, puCorrPtSum)); + mvaInput_[5] = std::log(std::max(1.e-2, photonPtSumOutsideSignalCone)); mvaInput_[6] = tauDecayMode; - mvaInput_[7] = TMath::Min(30., nPhoton); - mvaInput_[8] = TMath::Min(0.5, ptWeightedDetaStrip); - mvaInput_[9] = TMath::Min(0.5, ptWeightedDphiStrip); - mvaInput_[10] = TMath::Min(0.5, ptWeightedDrSignal); - mvaInput_[11] = TMath::Min(0.5, ptWeightedDrIsolation); - mvaInput_[12] = TMath::Min(100., leadingTrackChi2); - mvaInput_[13] = TMath::Min(1., eRatio); + mvaInput_[7] = std::min(30., nPhoton); + mvaInput_[8] = std::min(0.5, ptWeightedDetaStrip); + mvaInput_[9] = std::min(0.5, ptWeightedDphiStrip); + mvaInput_[10] = std::min(0.5, ptWeightedDrSignal); + mvaInput_[11] = std::min(0.5, ptWeightedDrIsolation); + mvaInput_[12] = std::min(100., leadingTrackChi2); + mvaInput_[13] = std::min(1., eRatio); mvaInput_[14] = TMath::Sign(+1., tauLifetimeInfo.dxy()); - mvaInput_[15] = TMath::Sqrt(TMath::Abs(TMath::Min(1., TMath::Abs(tauLifetimeInfo.dxy())))); - mvaInput_[16] = TMath::Min(10., TMath::Abs(tauLifetimeInfo.dxy_Sig())); + mvaInput_[15] = std::sqrt(std::fabs(std::min(1., std::fabs(tauLifetimeInfo.dxy())))); + mvaInput_[16] = std::min(10., std::fabs(tauLifetimeInfo.dxy_Sig())); mvaInput_[17] = TMath::Sign(+1., tauLifetimeInfo.ip3d()); - mvaInput_[18] = TMath::Sqrt(TMath::Abs(TMath::Min(1., TMath::Abs(tauLifetimeInfo.ip3d())))); - mvaInput_[19] = TMath::Min(10., TMath::Abs(tauLifetimeInfo.ip3d_Sig())); + mvaInput_[18] = std::sqrt(std::fabs(std::min(1., std::fabs(tauLifetimeInfo.ip3d())))); + mvaInput_[19] = std::min(10., std::fabs(tauLifetimeInfo.ip3d_Sig())); mvaInput_[20] = ( tauLifetimeInfo.hasSecondaryVertex() ) ? 1. : 0.; - mvaInput_[21] = TMath::Sqrt(decayDistMag); - mvaInput_[22] = TMath::Min(10., tauLifetimeInfo.flightLengthSig()); + mvaInput_[21] = std::sqrt(decayDistMag); + mvaInput_[22] = std::min(10., tauLifetimeInfo.flightLengthSig()); } else if ( mvaOpt_ == kPWoldDMwLT || mvaOpt_ == kPWnewDMwLT ) { - mvaInput_[0] = TMath::Log(TMath::Max(1., Double_t(tau->pt()))); - mvaInput_[1] = TMath::Abs(tau->eta()); - mvaInput_[2] = TMath::Log(TMath::Max(1.e-2, chargedIsoPtSum)); - mvaInput_[3] = TMath::Log(TMath::Max(1.e-2, neutralIsoPtSum)); - mvaInput_[4] = TMath::Log(TMath::Max(1.e-2, footprintCorrection)); - mvaInput_[5] = TMath::Log(TMath::Max(1.e-2, photonPtSumOutsideSignalCone)); + mvaInput_[0] = std::log(std::max(1., Double_t(tau->pt()))); + mvaInput_[1] = std::fabs(tau->eta()); + mvaInput_[2] = std::log(std::max(1.e-2, chargedIsoPtSum)); + mvaInput_[3] = std::log(std::max(1.e-2, neutralIsoPtSum)); + mvaInput_[4] = std::log(std::max(1.e-2, footprintCorrection)); + mvaInput_[5] = std::log(std::max(1.e-2, photonPtSumOutsideSignalCone)); mvaInput_[6] = tauDecayMode; - mvaInput_[7] = TMath::Min(30., nPhoton); - mvaInput_[8] = TMath::Min(0.5, ptWeightedDetaStrip); - mvaInput_[9] = TMath::Min(0.5, ptWeightedDphiStrip); - mvaInput_[10] = TMath::Min(0.5, ptWeightedDrSignal); - mvaInput_[11] = TMath::Min(0.5, ptWeightedDrIsolation); - mvaInput_[12] = TMath::Min(100., leadingTrackChi2); - mvaInput_[13] = TMath::Min(1., eRatio); + mvaInput_[7] = std::min(30., nPhoton); + mvaInput_[8] = std::min(0.5, ptWeightedDetaStrip); + mvaInput_[9] = std::min(0.5, ptWeightedDphiStrip); + mvaInput_[10] = std::min(0.5, ptWeightedDrSignal); + mvaInput_[11] = std::min(0.5, ptWeightedDrIsolation); + mvaInput_[12] = std::min(100., leadingTrackChi2); + mvaInput_[13] = std::min(1., eRatio); mvaInput_[14] = TMath::Sign(+1., tauLifetimeInfo.dxy()); - mvaInput_[15] = TMath::Sqrt(TMath::Abs(TMath::Min(1., TMath::Abs(tauLifetimeInfo.dxy())))); - mvaInput_[16] = TMath::Min(10., TMath::Abs(tauLifetimeInfo.dxy_Sig())); + mvaInput_[15] = std::sqrt(std::fabs(std::min(1., std::fabs(tauLifetimeInfo.dxy())))); + mvaInput_[16] = std::min(10., std::fabs(tauLifetimeInfo.dxy_Sig())); mvaInput_[17] = TMath::Sign(+1., tauLifetimeInfo.ip3d()); - mvaInput_[18] = TMath::Sqrt(TMath::Abs(TMath::Min(1., TMath::Abs(tauLifetimeInfo.ip3d())))); - mvaInput_[19] = TMath::Min(10., TMath::Abs(tauLifetimeInfo.ip3d_Sig())); + mvaInput_[18] = std::sqrt(std::fabs(std::min(1., std::fabs(tauLifetimeInfo.ip3d())))); + mvaInput_[19] = std::min(10., std::fabs(tauLifetimeInfo.ip3d_Sig())); mvaInput_[20] = ( tauLifetimeInfo.hasSecondaryVertex() ) ? 1. : 0.; - mvaInput_[21] = TMath::Sqrt(decayDistMag); - mvaInput_[22] = TMath::Min(10., tauLifetimeInfo.flightLengthSig()); + mvaInput_[21] = std::sqrt(decayDistMag); + mvaInput_[22] = std::min(10., tauLifetimeInfo.flightLengthSig()); } double mvaValue = mvaReader_->GetClassifier(mvaInput_); From f68d193a9416407e43abe85da92adef27a6d1c06 Mon Sep 17 00:00:00 2001 From: isobelojalvo Date: Wed, 2 Dec 2015 12:36:11 +0100 Subject: [PATCH 63/66] remove using namespace reco; Removing namespace reco from the header file. This had 0 effect on the compilation (which is mildly surprising) --- RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h b/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h index 9b2fb9105acbf..ebcb1491f8fec 100644 --- a/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h +++ b/RecoTauTag/RecoTau/interface/PFRecoTauClusterVariables.h @@ -7,8 +7,6 @@ * */ -using namespace reco; - namespace { From 690c00fcf8cf21d32ddb843d733c1b4120a5a5a8 Mon Sep 17 00:00:00 2001 From: Clemens Lange Date: Wed, 2 Dec 2015 12:52:17 +0100 Subject: [PATCH 64/66] new version split into charged hadron and muon filter --- .../plugins/ChargedHadronMuonRefFilter.cc | 123 ------- .../ChargedHadronTrackResolutionFilter.cc | 149 +++++++++ .../METFilters/plugins/MuonBadTrackFilter.cc | 309 ++++++++++++++++-- ...chargedHadronTrackResolutionFilter_cfi.py} | 6 +- RecoMET/METFilters/python/metFilters_cff.py | 8 +- 5 files changed, 442 insertions(+), 153 deletions(-) delete mode 100644 RecoMET/METFilters/plugins/ChargedHadronMuonRefFilter.cc create mode 100644 RecoMET/METFilters/plugins/ChargedHadronTrackResolutionFilter.cc rename RecoMET/METFilters/python/{chargedHadronMuonRefFilter_cfi.py => chargedHadronTrackResolutionFilter_cfi.py} (54%) diff --git a/RecoMET/METFilters/plugins/ChargedHadronMuonRefFilter.cc b/RecoMET/METFilters/plugins/ChargedHadronMuonRefFilter.cc deleted file mode 100644 index 3358cfdfe53a2..0000000000000 --- a/RecoMET/METFilters/plugins/ChargedHadronMuonRefFilter.cc +++ /dev/null @@ -1,123 +0,0 @@ - - - -// system include files -#include -#include - -// user include files -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/EDFilter.h" - -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/MakerMacros.h" - -#include "FWCore/ParameterSet/interface/ParameterSet.h" - -#include "DataFormats/MuonReco/interface/Muon.h" -#include "DataFormats/MuonReco/interface/MuonFwd.h" -#include "DataFormats/TrackReco/interface/Track.h" -#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" -#include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h" - -// -// class declaration -// - -class ChargedHadronMuonRefFilter : public edm::EDFilter { -public: - explicit ChargedHadronMuonRefFilter(const edm::ParameterSet&); - ~ChargedHadronMuonRefFilter(); - -private: - virtual bool filter(edm::Event&, const edm::EventSetup&) override; - - // ----------member data --------------------------- - - edm::EDGetTokenT tokenPFCandidates_; - const bool taggingMode_; - const double ptMin_; - const bool debug_; - -}; - -// -// constants, enums and typedefs -// - -// -// static data member definitions -// - -// -// constructors and destructor -// -ChargedHadronMuonRefFilter::ChargedHadronMuonRefFilter(const edm::ParameterSet& iConfig) - : tokenPFCandidates_ ( consumes(iConfig.getParameter ("PFCandidates") )) - , taggingMode_ ( iConfig.getParameter ("taggingMode") ) - , ptMin_ ( iConfig.getParameter ("ptMin") ) - , debug_ ( iConfig.getParameter ("debug") ) -{ - produces(); -} - -ChargedHadronMuonRefFilter::~ChargedHadronMuonRefFilter() { } - - -// -// member functions -// - -// ------------ method called on each new Event ------------ -bool -ChargedHadronMuonRefFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) -{ - using namespace std; - using namespace edm; - - Handle pfCandidates; - iEvent.getByToken(tokenPFCandidates_,pfCandidates); - - bool foundBadTrack = false; - // if ( debug_ ) cout << "starting loop over pfCandidates" << endl; - - for ( unsigned i=0; isize(); ++i ) { - - const reco::PFCandidate & cand = (*pfCandidates)[i]; - - if (!(( fabs(cand.pdgId()) == 211 ) || ( fabs(cand.pdgId()) == 13 ))) continue; - // if ( debug_ ) cout << "Found charged hadron or muon candidate" << std::endl; - - if (cand.trackRef().isNull()) continue; - // if ( debug_ ) cout << "Found valid TrackRef" << std::endl; - const reco::TrackRef trackref = cand.trackRef(); - const double Pt = trackref->pt(); - if (Pt < ptMin_) continue; - // if ( debug_ ) cout << "track pT > " << ptMin_ << " GeV - algorithm: " << trackref->algo() << std::endl; - - const double P = trackref->p(); - const double DPt = trackref->ptError(); - const unsigned int LostHits = trackref->numberOfLostHits(); - - if ((DPt/Pt) > (5 * sqrt(1.20*1.20/P+0.06*0.06) / (1.+LostHits))) { - - foundBadTrack = true; - - if ( debug_ ) { - cout << cand << endl; - cout << "\t" << "track pT = " << Pt << " +/- " << DPt; - cout << endl; - } - } - - } // end loop over PF candidates - - bool pass = !foundBadTrack; - - iEvent.put( std::auto_ptr(new bool(pass)) ); - - return taggingMode_ || pass; -} - -//define this as a plug-in -DEFINE_FWK_MODULE(ChargedHadronMuonRefFilter); diff --git a/RecoMET/METFilters/plugins/ChargedHadronTrackResolutionFilter.cc b/RecoMET/METFilters/plugins/ChargedHadronTrackResolutionFilter.cc new file mode 100644 index 0000000000000..e436d14bcf34e --- /dev/null +++ b/RecoMET/METFilters/plugins/ChargedHadronTrackResolutionFilter.cc @@ -0,0 +1,149 @@ + + + +// system include files +#include +#include + +// user include files +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/EDFilter.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/MakerMacros.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "DataFormats/TrackReco/interface/Track.h" +#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" +#include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h" +#include "DataFormats/METReco/interface/PFMET.h" +#include "DataFormats/METReco/interface/PFMETFwd.h" +#include "DataFormats/METReco/interface/PFMETCollection.h" +// +// class declaration +// + +class ChargedHadronTrackResolutionFilter : public edm::EDFilter { +public: + explicit ChargedHadronTrackResolutionFilter(const edm::ParameterSet&); + ~ChargedHadronTrackResolutionFilter(); + +private: + virtual bool filter(edm::Event&, const edm::EventSetup&) override; + + // ----------member data --------------------------- + + edm::EDGetTokenT tokenPFCandidates_; + edm::EDGetTokenT tokenPFMET_; + const bool taggingMode_; + const double ptMin_; + const double metSignifMin_; + const bool debug_; + +}; + +// +// constants, enums and typedefs +// + +// +// static data member definitions +// + +// +// constructors and destructor +// +ChargedHadronTrackResolutionFilter::ChargedHadronTrackResolutionFilter(const edm::ParameterSet& iConfig) + : tokenPFCandidates_ ( consumes(iConfig.getParameter ("PFCandidates") )) + , tokenPFMET_ ( consumes(iConfig.getParameter ("PFMET") )) + , taggingMode_ ( iConfig.getParameter ("taggingMode") ) + , ptMin_ ( iConfig.getParameter ("ptMin") ) + , metSignifMin_ ( iConfig.getParameter ("MetSignifMin") ) + , debug_ ( iConfig.getParameter ("debug") ) +{ + produces(); +} + +ChargedHadronTrackResolutionFilter::~ChargedHadronTrackResolutionFilter() { } + + +// +// member functions +// + +// ------------ method called on each new Event ------------ +bool +ChargedHadronTrackResolutionFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) +{ + using namespace std; + using namespace edm; + + Handle pfCandidates; + iEvent.getByToken(tokenPFCandidates_,pfCandidates); + Handle pfMET; + iEvent.getByToken(tokenPFMET_,pfMET); + + bool foundBadTrack = false; + if ( debug_ ) cout << "starting loop over pfCandidates" << endl; + + for ( unsigned i=0; isize(); ++i ) { + + const reco::PFCandidate & cand = (*pfCandidates)[i]; + + if ( fabs(cand.pdgId()) == 211 ) { + // if ( debug_ ) cout << "Found charged hadron candidate" << std::endl; + + if (cand.trackRef().isNull()) continue; + // if ( debug_ ) cout << "Found valid TrackRef" << std::endl; + const reco::TrackRef trackref = cand.trackRef(); + const double Pt = trackref->pt(); + const double DPt = trackref->ptError(); + if (Pt < ptMin_) continue; + if ( debug_ ) cout << "charged hadron track pT > " << Pt << " GeV - " << " dPt: " << DPt << " GeV - algorithm: " << trackref->algo() << std::endl; + + const double P = trackref->p(); + + const unsigned int LostHits = trackref->numberOfLostHits(); + + if ( (DPt/Pt) > (5 * sqrt(1.20*1.20/P+0.06*0.06) / (1.+LostHits)) ) { + + const double MET_px = pfMET->begin()->px(); + const double MET_py = pfMET->begin()->py(); + const double MET_et = pfMET->begin()->et(); + const double MET_sumEt = pfMET->begin()->sumEt(); + const double hadron_px = cand.px(); + const double hadron_py = cand.py(); + if (MET_sumEt == 0) continue; + const double MET_signif = MET_et/MET_sumEt; + const double MET_et_corr = sqrt( (MET_px + hadron_px)*(MET_px + hadron_px) + (MET_py + hadron_py)*(MET_py + hadron_py) ); + const double MET_signif_corr = MET_et_corr/MET_sumEt; + if ( debug_ ) std::cout << "MET signif before: " << MET_signif << " - after: " << MET_signif_corr << " - reduction factor: " << MET_signif/MET_signif_corr << endl; + + if ( (MET_signif/MET_signif_corr) > metSignifMin_ ) { + + foundBadTrack = true; + + if ( debug_ ) { + cout << cand << endl; + cout << "charged hadron \t" << "track pT = " << Pt << " +/- " << DPt; + cout << endl; + cout << "MET: " << MET_et << " MET phi: " << pfMET->begin()->phi()<< + " MET sumet: " << MET_sumEt << " MET significance: " << MET_et/MET_sumEt << endl; + cout << "MET_px: " << MET_px << " MET_py: " << MET_py << " hadron_px: " << hadron_px << " hadron_py: " << hadron_py << endl; + cout << "corrected: " << sqrt( pow((MET_px + hadron_px),2) + pow((MET_py + hadron_py),2)) << endl; + } + } + } + } + } // end loop over PF candidates + + bool pass = !foundBadTrack; + + iEvent.put( std::auto_ptr(new bool(pass)) ); + + return taggingMode_ || pass; +} + +//define this as a plug-in +DEFINE_FWK_MODULE(ChargedHadronTrackResolutionFilter); diff --git a/RecoMET/METFilters/plugins/MuonBadTrackFilter.cc b/RecoMET/METFilters/plugins/MuonBadTrackFilter.cc index a2986a2cbf72d..e41f08f8aca1d 100644 --- a/RecoMET/METFilters/plugins/MuonBadTrackFilter.cc +++ b/RecoMET/METFilters/plugins/MuonBadTrackFilter.cc @@ -16,11 +16,10 @@ #include "DataFormats/MuonReco/interface/Muon.h" #include "DataFormats/MuonReco/interface/MuonFwd.h" +#include "DataFormats/MuonReco/interface/MuonSelectors.h" #include "DataFormats/TrackReco/interface/Track.h" #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h" -#include "DataFormats/MuonReco/interface/Muon.h" -#include "DataFormats/MuonReco/interface/MuonFwd.h" // // class declaration @@ -33,13 +32,15 @@ class MuonBadTrackFilter : public edm::EDFilter { private: virtual bool filter(edm::Event&, const edm::EventSetup&) override; + virtual std::string trackInfo(const reco::TrackRef& trackRef); + virtual void printMuonProperties(const reco::MuonRef& muonRef); // ----------member data --------------------------- edm::EDGetTokenT tokenPFCandidates_; const bool taggingMode_; const double ptMin_; - const double chi2Min_; + const double chi2Min_; const bool debug_; }; @@ -59,7 +60,7 @@ MuonBadTrackFilter::MuonBadTrackFilter(const edm::ParameterSet& iConfig) : tokenPFCandidates_ ( consumes(iConfig.getParameter ("PFCandidates") )) , taggingMode_ ( iConfig.getParameter ("taggingMode") ) , ptMin_ ( iConfig.getParameter ("ptMin") ) - , chi2Min_ ( iConfig.getParameter ("chi2Min") ) + , chi2Min_ ( iConfig.getParameter ("chi2Min") ) , debug_ ( iConfig.getParameter ("debug") ) { produces(); @@ -88,32 +89,119 @@ MuonBadTrackFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) for ( unsigned i=0; isize(); ++i ) { const reco::PFCandidate & cand = (*pfCandidates)[i]; - - if ( fabs(cand.pdgId()) != 13 ) continue; + + if ( fabs(cand.pdgId()) != 13 ) continue; // if ( debug_ ) cout << "Found muon" << std::endl; if (cand.pt() < ptMin_) continue; if (cand.muonRef().isNull()) continue; // if ( debug_ ) cout << "Found valid MuonRef" << std::endl; - - const reco::MuonRef muon = cand.muonRef(); - - if (!muon->muonBestTrack().isAvailable()) continue; - if (muon->muonBestTrack()->hitPattern().numberOfValidMuonHits() != 0) continue; - - if (!muon->globalTrack().isAvailable()) continue; - if (muon->globalTrack()->normalizedChi2() > chi2Min_) { - foundBadTrack = true; - if ( debug_ ) cout << "globalTrack numberOfValidMuonHits: " << muon->globalTrack()->hitPattern().numberOfValidMuonHits() << - " numberOfValidMuonCSCHits: " << muon->globalTrack()->hitPattern().numberOfValidMuonCSCHits() << - " numberOfValidMuonDTHits: " << muon->globalTrack()->hitPattern().numberOfValidMuonDTHits() << - " normalizedChi2: " << muon->globalTrack()->normalizedChi2() << endl; - if ( debug_ ) cout << "muonBestTrack numberOfValidMuonHits: " << muon->muonBestTrack()->hitPattern().numberOfValidMuonHits() << - " numberOfValidMuonCSCHits: " << muon->muonBestTrack()->hitPattern().numberOfValidMuonCSCHits() << - " numberOfValidMuonDTHits: " << muon->muonBestTrack()->hitPattern().numberOfValidMuonDTHits() << - " normalizedChi2: " << muon->muonBestTrack()->normalizedChi2() << endl; - } + + const reco::MuonRef muon = cand.muonRef(); + if ( debug_ ) printMuonProperties(muon); + + if (muon->muonBestTrack().isAvailable()) { + if (muon->muonBestTrack()->hitPattern().numberOfValidMuonHits() == 0) { + + if (muon->globalTrack().isAvailable()) { + if (muon->globalTrack()->normalizedChi2() > chi2Min_) { + foundBadTrack = true; + if ( debug_ ) cout << "globalTrack numberOfValidMuonHits: " << muon->globalTrack()->hitPattern().numberOfValidMuonHits() << + " numberOfValidMuonCSCHits: " << muon->globalTrack()->hitPattern().numberOfValidMuonCSCHits() << + " numberOfValidMuonDTHits: " << muon->globalTrack()->hitPattern().numberOfValidMuonDTHits() << + " normalizedChi2: " << muon->globalTrack()->normalizedChi2() << endl; + if ( debug_ ) cout << "muonBestTrack numberOfValidMuonHits: " << muon->muonBestTrack()->hitPattern().numberOfValidMuonHits() << + " numberOfValidMuonCSCHits: " << muon->muonBestTrack()->hitPattern().numberOfValidMuonCSCHits() << + " numberOfValidMuonDTHits: " << muon->muonBestTrack()->hitPattern().numberOfValidMuonDTHits() << + " normalizedChi2: " << muon->muonBestTrack()->normalizedChi2() << endl; + } + } + + } + } + + // perform same check as for charged hadrons + if (!cand.trackRef().isNull()) { + + // if ( debug_ ) cout << "Found valid TrackRef" << std::endl; + const reco::TrackRef trackref = cand.trackRef(); + const double Pt = trackref->pt(); + const double DPt = trackref->ptError(); + const double P = trackref->p(); + const unsigned int LostHits = trackref->numberOfLostHits(); + + if ((DPt/Pt) > (5 * sqrt(1.20*1.20/P+0.06*0.06) / (1.+LostHits))) { + + foundBadTrack = true; + + if ( debug_ ) { + cout << cand << endl; + cout << "muon \t" << "track pT = " << Pt << " +/- " << DPt; + cout << endl; + } + } + } + + // check if at least one track has good quality + if (muon->innerTrack().isAvailable()) { + const double P = muon->innerTrack()->p(); + const double DPt = muon->innerTrack()->ptError(); + if (P != 0) { + if ( debug_ ) cout << "innerTrack DPt/P: " << DPt/P << endl; + if (DPt/P < 1) { + if ( debug_ ) cout << "innerTrack good" << endl; + continue; + } + } + } + if (muon->pickyTrack().isAvailable()) { + const double P = muon->pickyTrack()->p(); + const double DPt = muon->pickyTrack()->ptError(); + if (P != 0) { + if ( debug_ ) cout << "pickyTrack DPt/P: " << DPt/P << endl; + if (DPt/P < 1) { + if ( debug_ ) cout << "pickyTrack good" << endl; + continue; + } + } + } + if (muon->globalTrack().isAvailable()) { + const double P = muon->globalTrack()->p(); + const double DPt = muon->globalTrack()->ptError(); + if (P != 0) { + if ( debug_ ) cout << "globalTrack DPt/P: " << DPt/P << endl; + if (DPt/P < 1) { + if ( debug_ ) cout << "globalTrack good" << endl; + continue; + } + } + } + if (muon->tpfmsTrack().isAvailable()) { + const double P = muon->tpfmsTrack()->p(); + const double DPt = muon->tpfmsTrack()->ptError(); + if (P != 0) { + if ( debug_ ) cout << "tpfmsTrack DPt/P: " << DPt/P << endl; + if (DPt/P < 1) { + if ( debug_ ) cout << "tpfmsTrack good" << endl; + continue; + } + } + } + if (muon->dytTrack().isAvailable()) { + const double P = muon->dytTrack()->p(); + const double DPt = muon->dytTrack()->ptError(); + if (P != 0) { + if ( debug_ ) cout << "dytTrack DPt/P: " << DPt/P << endl; + if (DPt/P < 1) { + if ( debug_ ) cout << "dytTrack good" << endl; + continue; + } + } + } + if ( debug_ ) cout << "No tracks are good" << endl; + foundBadTrack = true; + } // end loop over PF candidates @@ -125,5 +213,178 @@ MuonBadTrackFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) return taggingMode_ || pass; } + +std::string MuonBadTrackFilter::trackInfo(const reco::TrackRef& trackRef) { + + std::ostringstream out; + + if(trackRef.isNull()) { + out << "track ref not set"; + } + else if (! trackRef.isAvailable()) { + out << "track ref not available"; + } + else { + const reco::Track& track = *trackRef; + out << "pt = " << track.pt() << " +- " << track.ptError()/track.pt() + << " chi2 = " << track.normalizedChi2() + << "; Muon Hits: " << track.hitPattern().numberOfValidMuonHits() + << "/" << track.hitPattern().numberOfLostMuonHits() + << " (DT: " << track.hitPattern().numberOfValidMuonDTHits() + << "/" << track.hitPattern().numberOfLostMuonDTHits() + << " CSC: " << track.hitPattern().numberOfValidMuonCSCHits() + << "/" << track.hitPattern().numberOfLostMuonCSCHits() + << " RPC: " << track.hitPattern().numberOfValidMuonRPCHits() + << "/" << track.hitPattern().numberOfLostMuonRPCHits() << ")" + << "; Valid inner hits:" + << " TRK: " << track.hitPattern().numberOfValidTrackerHits() + << " PIX: " << track.hitPattern().numberOfValidPixelHits(); + } + return out.str(); +} + + +void MuonBadTrackFilter::printMuonProperties(const reco::MuonRef& muonRef) { + + if ( !muonRef.isNonnull() ) return; + + bool isGL = muonRef->isGlobalMuon(); + bool isTR = muonRef->isTrackerMuon(); + bool isST = muonRef->isStandAloneMuon(); + bool isTPFMS = muonRef->tpfmsTrack().isNonnull() && muonRef->tpfmsTrack()->pt()>0; + bool isPicky = muonRef->pickyTrack().isNonnull() && muonRef->pickyTrack()->pt()>0; + bool isDyt = muonRef->dytTrack().isNonnull() && muonRef->dytTrack()->pt()>0; + + reco::Muon::MuonTrackType tunePType = muonRef->tunePMuonBestTrackType(); + std::string tunePTypeStr; + switch( tunePType ){ + case reco::Muon::InnerTrack: tunePTypeStr = "Inner"; break; + case reco::Muon::OuterTrack: tunePTypeStr = "Outer"; break; + case reco::Muon::CombinedTrack: tunePTypeStr = "Combined"; break; + case reco::Muon::TPFMS: tunePTypeStr = "TPFMS"; break; + case reco::Muon::Picky: tunePTypeStr = "Picky"; break; + case reco::Muon::DYT: tunePTypeStr = "DYT"; break; + default:tunePTypeStr = "unknow"; break; + } + + std::cout<<"pt " << muonRef->pt() + <<" eta " << muonRef->eta() + <<" GL: "<numberOfMatches()<combinedMuon())<innerTrack())<standAloneMuon())<innerTrack(); + // const reco::Track& track = *trackerMu; + std::cout<<"\tInner "<pickyTrack())<dytTrack())<tpfmsTrack())<isGlobalMuon() + && muonRef->isTrackerMuon() + && muonRef->isStandAloneMuon() ) { + reco::TrackRef combinedMu = muonRef->combinedMuon(); + reco::TrackRef trackerMu = muonRef->track(); + reco::TrackRef standAloneMu = muonRef->standAloneMuon(); + + double sigmaCombined = combinedMu->ptError()/(combinedMu->pt()*combinedMu->pt()); + double sigmaTracker = trackerMu->ptError()/(trackerMu->pt()*trackerMu->pt()); + double sigmaStandAlone = standAloneMu->ptError()/(standAloneMu->pt()*standAloneMu->pt()); + + bool combined = combinedMu->ptError()/combinedMu->pt() < 0.20; + bool tracker = trackerMu->ptError()/trackerMu->pt() < 0.20; + bool standAlone = standAloneMu->ptError()/standAloneMu->pt() < 0.20; + + double delta1 = combined && tracker ? + fabs(1./combinedMu->pt() -1./trackerMu->pt()) + /sqrt(sigmaCombined*sigmaCombined + sigmaTracker*sigmaTracker) : 100.; + double delta2 = combined && standAlone ? + fabs(1./combinedMu->pt() -1./standAloneMu->pt()) + /sqrt(sigmaCombined*sigmaCombined + sigmaStandAlone*sigmaStandAlone) : 100.; + + double delta3 = standAlone && tracker ? + fabs(1./standAloneMu->pt() -1./trackerMu->pt()) + /sqrt(sigmaStandAlone*sigmaStandAlone + sigmaTracker*sigmaTracker) : 100.; + + double delta = + standAloneMu->hitPattern().numberOfValidMuonDTHits()+ + standAloneMu->hitPattern().numberOfValidMuonCSCHits() > 0 ? + std::min(delta3,std::min(delta1,delta2)) : std::max(delta3,std::max(delta1,delta2)); + + std::cout << "delta = " << delta << " delta1 "<ptError()/combinedMu->pt() + / (trackerMu->ptError()/trackerMu->pt()); + //if ( ratio > 2. && delta < 3. ) std::cout << "ALARM ! " << ratio << ", " << delta << std::endl; + std::cout<<" ratio "<pt()<pt() < 50. || ratio < 2. ) && delta < 3.; + } + + double sumPtR03 = muonRef->isolationR03().sumPt; + double emEtR03 = muonRef->isolationR03().emEt; + double hadEtR03 = muonRef->isolationR03().hadEt; + double relIsoR03 = (sumPtR03 + emEtR03 + hadEtR03)/muonRef->pt(); + double sumPtR05 = muonRef->isolationR05().sumPt; + double emEtR05 = muonRef->isolationR05().emEt; + double hadEtR05 = muonRef->isolationR05().hadEt; + double relIsoR05 = (sumPtR05 + emEtR05 + hadEtR05)/muonRef->pt(); + std::cout<<" 0.3 Rel Iso: "< Date: Wed, 2 Dec 2015 13:50:41 +0100 Subject: [PATCH 65/66] add new filters to PatAlgos --- .../PatAlgos/python/slimming/metFilterPaths_cff.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/PhysicsTools/PatAlgos/python/slimming/metFilterPaths_cff.py b/PhysicsTools/PatAlgos/python/slimming/metFilterPaths_cff.py index f120180232fe1..a6ea0ec0d3479 100644 --- a/PhysicsTools/PatAlgos/python/slimming/metFilterPaths_cff.py +++ b/PhysicsTools/PatAlgos/python/slimming/metFilterPaths_cff.py @@ -6,6 +6,7 @@ from RecoMET.METFilters.metFilters_cff import EcalDeadCellTriggerPrimitiveFilter, eeBadScFilter, ecalLaserCorrFilter, EcalDeadCellBoundaryEnergyFilter from RecoMET.METFilters.metFilters_cff import primaryVertexFilter, CSCTightHaloFilter, CSCTightHaloTrkMuUnvetoFilter, CSCTightHalo2015Filter, HcalStripHaloFilter from RecoMET.METFilters.metFilters_cff import goodVertices, trackingFailureFilter, trkPOGFilters, manystripclus53X, toomanystripclus53X, logErrorTooManyClusters +from RecoMET.METFilters.metFilters_cff import chargedHadronTrackResolutionFilter, muonBadTrackFilter from RecoMET.METFilters.metFilters_cff import metFilters # individual filters @@ -23,6 +24,8 @@ Flag_eeBadScFilter = cms.Path(eeBadScFilter) Flag_ecalLaserCorrFilter = cms.Path(ecalLaserCorrFilter) Flag_trkPOGFilters = cms.Path(trkPOGFilters) +Flag_chargedHadronTrackResolutionFilter = cms.Path(chargedHadronTrackResolutionFilter) +Flag_muonBadTrackFilter = cms.Path(muonBadTrackFilter) # and the sub-filters Flag_trkPOG_manystripclus53X = cms.Path(~manystripclus53X) Flag_trkPOG_toomanystripclus53X = cms.Path(~toomanystripclus53X) @@ -34,12 +37,12 @@ #add your new path here!! allMetFilterPaths=['HBHENoiseFilter','HBHENoiseIsoFilter','CSCTightHaloFilter','CSCTightHaloTrkMuUnvetoFilter','CSCTightHalo2015Filter','HcalStripHaloFilter','hcalLaserEventFilter','EcalDeadCellTriggerPrimitiveFilter','EcalDeadCellBoundaryEnergyFilter','goodVertices','eeBadScFilter', - 'ecalLaserCorrFilter','trkPOGFilters','trkPOG_manystripclus53X','trkPOG_toomanystripclus53X','trkPOG_logErrorTooManyClusters','METFilters'] + 'ecalLaserCorrFilter','trkPOGFilters','chargedHadronTrackResolutionFilter','muonBadTrackFilter','trkPOG_manystripclus53X','trkPOG_toomanystripclus53X','trkPOG_logErrorTooManyClusters','METFilters'] def miniAOD_customizeMETFiltersFastSim(process): """Replace some MET filters that don't work in FastSim with trivial bools""" - for X in 'CSCTightHaloFilter', 'CSCTightHaloTrkMuUnvetoFilter','CSCTightHalo2015Filter','HcalStripHaloFilter','HBHENoiseFilter', 'HBHENoiseIsoFilter', 'HBHENoiseFilterResultProducer': + for X in 'CSCTightHaloFilter', 'CSCTightHaloTrkMuUnvetoFilter','CSCTightHalo2015Filter','HcalStripHaloFilter','HBHENoiseFilter', 'HBHENoiseIsoFilter', 'HBHENoiseFilterResultProducer', 'chargedHadronTrackResolutionFilter', 'muonBadTrackFilter': process.globalReplace(X, cms.EDFilter("HLTBool", result=cms.bool(True))) for X in 'manystripclus53X', 'toomanystripclus53X', 'logErrorTooManyClusters': process.globalReplace(X, cms.EDFilter("HLTBool", result=cms.bool(False))) From d63d2a9e9aff411ee09328dbf9eaad14a9289b87 Mon Sep 17 00:00:00 2001 From: Clemens Lange Date: Wed, 2 Dec 2015 16:04:58 +0100 Subject: [PATCH 66/66] improve quality of code --- .../ChargedHadronTrackResolutionFilter.cc | 21 ++++---- .../METFilters/plugins/MuonBadTrackFilter.cc | 48 ++++++++++--------- .../chargedHadronTrackResolutionFilter_cfi.py | 3 ++ .../python/muonBadTrackFilter_cfi.py | 3 ++ 4 files changed, 44 insertions(+), 31 deletions(-) diff --git a/RecoMET/METFilters/plugins/ChargedHadronTrackResolutionFilter.cc b/RecoMET/METFilters/plugins/ChargedHadronTrackResolutionFilter.cc index e436d14bcf34e..f4cf6e55d958c 100644 --- a/RecoMET/METFilters/plugins/ChargedHadronTrackResolutionFilter.cc +++ b/RecoMET/METFilters/plugins/ChargedHadronTrackResolutionFilter.cc @@ -7,7 +7,7 @@ // user include files #include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/EDFilter.h" +#include "FWCore/Framework/interface/global/EDFilter.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/MakerMacros.h" @@ -24,13 +24,13 @@ // class declaration // -class ChargedHadronTrackResolutionFilter : public edm::EDFilter { +class ChargedHadronTrackResolutionFilter : public edm::global::EDFilter<> { public: explicit ChargedHadronTrackResolutionFilter(const edm::ParameterSet&); ~ChargedHadronTrackResolutionFilter(); private: - virtual bool filter(edm::Event&, const edm::EventSetup&) override; + virtual bool filter(edm::StreamID iID, edm::Event&, const edm::EventSetup&) const override; // ----------member data --------------------------- @@ -39,6 +39,9 @@ class ChargedHadronTrackResolutionFilter : public edm::EDFilter { const bool taggingMode_; const double ptMin_; const double metSignifMin_; + const double p1_; + const double p2_; + const double p3_; const bool debug_; }; @@ -60,6 +63,9 @@ ChargedHadronTrackResolutionFilter::ChargedHadronTrackResolutionFilter(const edm , taggingMode_ ( iConfig.getParameter ("taggingMode") ) , ptMin_ ( iConfig.getParameter ("ptMin") ) , metSignifMin_ ( iConfig.getParameter ("MetSignifMin") ) + , p1_ ( iConfig.getParameter ("p1") ) + , p2_ ( iConfig.getParameter ("p2") ) + , p3_ ( iConfig.getParameter ("p3") ) , debug_ ( iConfig.getParameter ("debug") ) { produces(); @@ -74,7 +80,7 @@ ChargedHadronTrackResolutionFilter::~ChargedHadronTrackResolutionFilter() { } // ------------ method called on each new Event ------------ bool -ChargedHadronTrackResolutionFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) +ChargedHadronTrackResolutionFilter::filter(edm::StreamID iID, edm::Event& iEvent, const edm::EventSetup& iSetup) const { using namespace std; using namespace edm; @@ -91,11 +97,10 @@ ChargedHadronTrackResolutionFilter::filter(edm::Event& iEvent, const edm::EventS const reco::PFCandidate & cand = (*pfCandidates)[i]; - if ( fabs(cand.pdgId()) == 211 ) { - // if ( debug_ ) cout << "Found charged hadron candidate" << std::endl; + if ( std::abs(cand.pdgId()) == 211 ) { if (cand.trackRef().isNull()) continue; - // if ( debug_ ) cout << "Found valid TrackRef" << std::endl; + const reco::TrackRef trackref = cand.trackRef(); const double Pt = trackref->pt(); const double DPt = trackref->ptError(); @@ -106,7 +111,7 @@ ChargedHadronTrackResolutionFilter::filter(edm::Event& iEvent, const edm::EventS const unsigned int LostHits = trackref->numberOfLostHits(); - if ( (DPt/Pt) > (5 * sqrt(1.20*1.20/P+0.06*0.06) / (1.+LostHits)) ) { + if ( (DPt/Pt) > (p1_ * sqrt(p2_*p2_/P+p3_*p3_) / (1.+LostHits)) ) { const double MET_px = pfMET->begin()->px(); const double MET_py = pfMET->begin()->py(); diff --git a/RecoMET/METFilters/plugins/MuonBadTrackFilter.cc b/RecoMET/METFilters/plugins/MuonBadTrackFilter.cc index e41f08f8aca1d..48c92d103ac3b 100644 --- a/RecoMET/METFilters/plugins/MuonBadTrackFilter.cc +++ b/RecoMET/METFilters/plugins/MuonBadTrackFilter.cc @@ -7,7 +7,7 @@ // user include files #include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/EDFilter.h" +#include "FWCore/Framework/interface/global/EDFilter.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/MakerMacros.h" @@ -25,15 +25,15 @@ // class declaration // -class MuonBadTrackFilter : public edm::EDFilter { +class MuonBadTrackFilter : public edm::global::EDFilter<> { public: explicit MuonBadTrackFilter(const edm::ParameterSet&); ~MuonBadTrackFilter(); private: - virtual bool filter(edm::Event&, const edm::EventSetup&) override; - virtual std::string trackInfo(const reco::TrackRef& trackRef); - virtual void printMuonProperties(const reco::MuonRef& muonRef); + virtual bool filter(edm::StreamID iID, edm::Event&, const edm::EventSetup&) const override; + virtual std::string trackInfo(const reco::TrackRef& trackRef) const; + virtual void printMuonProperties(const reco::MuonRef& muonRef) const; // ----------member data --------------------------- @@ -41,6 +41,9 @@ class MuonBadTrackFilter : public edm::EDFilter { const bool taggingMode_; const double ptMin_; const double chi2Min_; + const double p1_; + const double p2_; + const double p3_; const bool debug_; }; @@ -61,6 +64,9 @@ MuonBadTrackFilter::MuonBadTrackFilter(const edm::ParameterSet& iConfig) , taggingMode_ ( iConfig.getParameter ("taggingMode") ) , ptMin_ ( iConfig.getParameter ("ptMin") ) , chi2Min_ ( iConfig.getParameter ("chi2Min") ) + , p1_ ( iConfig.getParameter ("p1") ) + , p2_ ( iConfig.getParameter ("p2") ) + , p3_ ( iConfig.getParameter ("p3") ) , debug_ ( iConfig.getParameter ("debug") ) { produces(); @@ -75,7 +81,7 @@ MuonBadTrackFilter::~MuonBadTrackFilter() { } // ------------ method called on each new Event ------------ bool -MuonBadTrackFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) +MuonBadTrackFilter::filter(edm::StreamID iID, edm::Event& iEvent, const edm::EventSetup& iSetup) const { using namespace std; using namespace edm; @@ -84,19 +90,16 @@ MuonBadTrackFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) iEvent.getByToken(tokenPFCandidates_,pfCandidates); bool foundBadTrack = false; - // if ( debug_ ) cout << "starting loop over pfCandidates" << endl; for ( unsigned i=0; isize(); ++i ) { const reco::PFCandidate & cand = (*pfCandidates)[i]; - if ( fabs(cand.pdgId()) != 13 ) continue; - // if ( debug_ ) cout << "Found muon" << std::endl; + if ( std::abs(cand.pdgId()) != 13 ) continue; if (cand.pt() < ptMin_) continue; if (cand.muonRef().isNull()) continue; - // if ( debug_ ) cout << "Found valid MuonRef" << std::endl; const reco::MuonRef muon = cand.muonRef(); if ( debug_ ) printMuonProperties(muon); @@ -124,14 +127,13 @@ MuonBadTrackFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) // perform same check as for charged hadrons if (!cand.trackRef().isNull()) { - // if ( debug_ ) cout << "Found valid TrackRef" << std::endl; const reco::TrackRef trackref = cand.trackRef(); const double Pt = trackref->pt(); const double DPt = trackref->ptError(); const double P = trackref->p(); const unsigned int LostHits = trackref->numberOfLostHits(); - if ((DPt/Pt) > (5 * sqrt(1.20*1.20/P+0.06*0.06) / (1.+LostHits))) { + if ((DPt/Pt) > (p1_ * sqrt(p2_*p2_/P+p3_*p3_) / (1.+LostHits))) { foundBadTrack = true; @@ -214,7 +216,7 @@ MuonBadTrackFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) } -std::string MuonBadTrackFilter::trackInfo(const reco::TrackRef& trackRef) { +std::string MuonBadTrackFilter::trackInfo(const reco::TrackRef& trackRef) const { std::ostringstream out; @@ -244,7 +246,7 @@ std::string MuonBadTrackFilter::trackInfo(const reco::TrackRef& trackRef) { } -void MuonBadTrackFilter::printMuonProperties(const reco::MuonRef& muonRef) { +void MuonBadTrackFilter::printMuonProperties(const reco::MuonRef& muonRef) const { if ( !muonRef.isNonnull() ) return; @@ -277,7 +279,7 @@ void MuonBadTrackFilter::printMuonProperties(const reco::MuonRef& muonRef) { <<" DYT: "<numberOfMatches()<combinedMuon())<innerTrack())<isGlobalMuon() && muonRef->isTrackerMuon() && muonRef->isStandAloneMuon() ) { reco::TrackRef combinedMu = muonRef->combinedMuon(); reco::TrackRef trackerMu = muonRef->track(); reco::TrackRef standAloneMu = muonRef->standAloneMuon(); - + double sigmaCombined = combinedMu->ptError()/(combinedMu->pt()*combinedMu->pt()); double sigmaTracker = trackerMu->ptError()/(trackerMu->pt()*trackerMu->pt()); double sigmaStandAlone = standAloneMu->ptError()/(standAloneMu->pt()*standAloneMu->pt()); - + bool combined = combinedMu->ptError()/combinedMu->pt() < 0.20; bool tracker = trackerMu->ptError()/trackerMu->pt() < 0.20; bool standAlone = standAloneMu->ptError()/standAloneMu->pt() < 0.20; - + double delta1 = combined && tracker ? fabs(1./combinedMu->pt() -1./trackerMu->pt()) /sqrt(sigmaCombined*sigmaCombined + sigmaTracker*sigmaTracker) : 100.; double delta2 = combined && standAlone ? fabs(1./combinedMu->pt() -1./standAloneMu->pt()) /sqrt(sigmaCombined*sigmaCombined + sigmaStandAlone*sigmaStandAlone) : 100.; - + double delta3 = standAlone && tracker ? fabs(1./standAloneMu->pt() -1./trackerMu->pt()) /sqrt(sigmaStandAlone*sigmaStandAlone + sigmaTracker*sigmaTracker) : 100.; @@ -363,7 +365,7 @@ void MuonBadTrackFilter::printMuonProperties(const reco::MuonRef& muonRef) { std::min(delta3,std::min(delta1,delta2)) : std::max(delta3,std::max(delta1,delta2)); std::cout << "delta = " << delta << " delta1 "<ptError()/combinedMu->pt() / (trackerMu->ptError()/trackerMu->pt()); @@ -371,7 +373,7 @@ void MuonBadTrackFilter::printMuonProperties(const reco::MuonRef& muonRef) { std::cout<<" ratio "<pt()<pt() < 50. || ratio < 2. ) && delta < 3.; } - + double sumPtR03 = muonRef->isolationR03().sumPt; double emEtR03 = muonRef->isolationR03().emEt; double hadEtR03 = muonRef->isolationR03().hadEt; @@ -387,4 +389,4 @@ void MuonBadTrackFilter::printMuonProperties(const reco::MuonRef& muonRef) { //define this as a plug-in -DEFINE_FWK_MODULE(MuonBadTrackFilter); +DEFINE_FWK_MODULE(MuonBadTrackFilter); \ No newline at end of file diff --git a/RecoMET/METFilters/python/chargedHadronTrackResolutionFilter_cfi.py b/RecoMET/METFilters/python/chargedHadronTrackResolutionFilter_cfi.py index 65062ffffcdfb..010c8c7278d33 100644 --- a/RecoMET/METFilters/python/chargedHadronTrackResolutionFilter_cfi.py +++ b/RecoMET/METFilters/python/chargedHadronTrackResolutionFilter_cfi.py @@ -7,6 +7,9 @@ taggingMode = cms.bool(False), ptMin = cms.double(100.), # Tracks with pT below this are ignored (will not be checked) MetSignifMin = cms.double(5.), # minimum relative MET significance change when removing charged hadron from MET + p1 = cms.double(5.), # parameter 1 of calo resolution formula + p2 = cms.double(1.2), # parameter 2 of calo resolution formula + p3 = cms.double(0.06), # parameter 3 of calo resolution formula verbose = cms.untracked.bool(False), debug = cms.bool(False), ) diff --git a/RecoMET/METFilters/python/muonBadTrackFilter_cfi.py b/RecoMET/METFilters/python/muonBadTrackFilter_cfi.py index 1e59087b0cb82..19060ac03c3a6 100644 --- a/RecoMET/METFilters/python/muonBadTrackFilter_cfi.py +++ b/RecoMET/METFilters/python/muonBadTrackFilter_cfi.py @@ -6,6 +6,9 @@ taggingMode = cms.bool(False), ptMin = cms.double(100.), # Tracks with pT below this are ignored (will not be checked) chi2Min = cms.double(100.), # global Tracks with normalizeChi2 below this are ignored (will not be checked) + p1 = cms.double(5.), # parameter 1 of calo resolution formula + p2 = cms.double(1.2), # parameter 2 of calo resolution formula + p3 = cms.double(0.06), # parameter 3 of calo resolution formula verbose = cms.untracked.bool(False), debug = cms.bool(False), )