Skip to content

Commit

Permalink
Rerun anti-e-in-deadECal tauID for all eras but run2_miniAOD_devel
Browse files Browse the repository at this point in the history
  • Loading branch information
mbluj committed Aug 27, 2020
1 parent 7cfdeaa commit c554314
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
7 changes: 4 additions & 3 deletions PhysicsTools/NanoAOD/python/taus_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _tauId8WPMask(pattern,doc):
photonsOutsideSignalCone = Var( "tauID('photonPtSumOutsideSignalCone')", float, doc = "sum of photons outside signal cone", precision=10),

idAntiMu = _tauId2WPMask("againstMuon%s3", doc= "Anti-muon discriminator V3: "),
idAntiEleDeadECal = Var("tauID('againstElectronDeadECAL')", bool, doc = "Anti-electron dead-ECal discriminator"),
idAntiEleDeadECal = Var("tauID('againstElectronDeadECALForNano')", bool, doc = "Anti-electron dead-ECal discriminator"),

# isoCI3hit = Var( "tauID("byCombinedIsolationDeltaBetaCorrRaw3Hits")" doc="byCombinedIsolationDeltaBetaCorrRaw3Hits raw output discriminator"),
# photonOutsideSigCone = Var( "tauID("photonPtSumOutsideSignalCone")" doc="photonPtSumOutsideSignalCone raw output discriminator"),
Expand Down Expand Up @@ -166,11 +166,12 @@ def _tauId8WPMask(pattern,doc):
run2_miniAOD_80XLegacy.toModify(tauTable,
variables = _variables80X
)
(~run2_miniAOD_devel).toModify(tauTable.variables,
idAntiEleDeadECal = None
run2_miniAOD_80XLegacy.toModify(tauTable.variables,
idAntiEleDeadECal = None
)

run2_miniAOD_devel.toModify(tauTable.variables,
idAntiEleDeadECal = Var("tauID('againstElectronDeadECAL')", bool, doc = "Anti-electron dead-ECal discriminator"),
rawAntiEle2018 = Var("tauID('againstElectronMVA6Raw')", float, doc= "Anti-electron MVA discriminator V6 raw output discriminator (2018)", precision=10),
rawAntiEleCat2018 = Var("tauID('againstElectronMVA6category')", int, doc="Anti-electron MVA discriminator V6 category (2018)"),
idAntiEle2018 = _tauId5WPMask("againstElectron%sMVA6", doc= "Anti-electron MVA discriminator V6 (2018)"),
Expand Down
15 changes: 15 additions & 0 deletions PhysicsTools/NanoAOD/python/taus_updatedMVAIds_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,21 @@
run2_miniAOD_devel.toModify(slimmedTausUpdated,
tauIDSources = _tauIDSourcesWithAntiE2015)

## anti-electron in dead-ECal regions
from RecoTauTag.RecoTau.patTauDiscriminationAgainstElectronDeadECAL_cfi import patTauDiscriminationAgainstElectronDeadECAL
patTauDiscriminationAgainstElectronDeadECALForNano = patTauDiscriminationAgainstElectronDeadECAL.clone(
PATTauProducer = 'slimmedTaus',
Prediscriminants = noPrediscriminants
)
_patTauMVAIDsSeqWithAntiEdeadECal = patTauMVAIDsSeq.copy()
_patTauMVAIDsSeqWithAntiEdeadECal += patTauDiscriminationAgainstElectronDeadECALForNano
_tauIDSourcesWithAntiEdeadECal = cms.PSet(
slimmedTausUpdated.tauIDSources.clone(),
againstElectronDeadECALForNano = cms.InputTag("patTauDiscriminationAgainstElectronDeadECALForNano")
)
(~run2_miniAOD_devel).toReplaceWith(patTauMVAIDsSeq,_patTauMVAIDsSeqWithAntiEdeadECal)
(~run2_miniAOD_devel).toModify(slimmedTausUpdated,
tauIDSources = _tauIDSourcesWithAntiEdeadECal)


patTauMVAIDsSeq += slimmedTausUpdated
Expand Down

0 comments on commit c554314

Please sign in to comment.