1 import FWCore.ParameterSet.Config
as cms
9 objectTypeSelectedTauValDenominatorModuleZTT = cms.EDFilter(
"TauGenJetDecayModeSelector",
10 src = cms.InputTag(
"tauGenJets"),
11 select = cms.vstring(
'oneProng0Pi0',
'oneProng1Pi0',
'oneProng2Pi0',
'oneProngOther',
12 'threeProng0Pi0',
'threeProng1Pi0',
'threeProngOther',
'rare'),
13 filter = cms.bool(
False)
17 kinematicSelectedTauValDenominatorZTT = cms.EDFilter(
19 src = cms.InputTag(
'objectTypeSelectedTauValDenominatorModuleZTT'),
20 cut = kinematicSelectedTauValDenominatorCut,
21 filter = cms.bool(
False)
24 procAttributes =
dir(proc)
27 helpers.massSearchReplaceAnyInputTag(proc.TauValNumeratorAndDenominatorZTT,
'kinematicSelectedTauValDenominator',
'kinematicSelectedTauValDenominatorZTT')
31 zttModifier = ApplyFunctionToSequence(zttLabeler)
32 proc.TauValNumeratorAndDenominatorZTT.visit(zttModifier)
35 discs_to_retain = [
'ByDecayModeFinding',
'CombinedIsolationDBSumPtCorr3Hits',
'IsolationMVArun2v1DBoldDMwLT',
'IsolationMVArun2v1DBnewDMwLT',
'MuonRejection',
'ElectronRejection']
36 proc.RunHPSValidationZTT.discriminators = cms.VPSet([p
for p
in proc.RunHPSValidationZTT.discriminators
if any(disc
in p.discriminator.value()
for disc
in discs_to_retain) ])
39 proc.efficienciesZTT.plots = Utils.SetPlotSequence(proc.TauValNumeratorAndDenominatorZTT)
40 proc.efficienciesZTTSummary = cms.EDProducer(
"TauDQMHistEffProducer",
43 denominator = cms.string(
'RecoTauV/hpsPFTauProducerZTT_Summary/#PAR#PlotDen'),
44 efficiency = cms.string(
'RecoTauV/hpsPFTauProducerZTT_Summary/#PAR#Plot'),
45 numerator = cms.string(
'RecoTauV/hpsPFTauProducerZTT_Summary/#PAR#PlotNum'),
46 parameter = cms.vstring(
'summary'),
47 stepByStep = cms.bool(
True)
53 newProcAttributes = [x
for x
in dir(proc)
if (x
not in procAttributes)
and (x.find(
'ZTT') != -1)]
56 for newAttr
in newProcAttributes:
57 locals()[newAttr] = getattr(proc,newAttr)
59 produceDenominatorZTT = cms.Sequence(
61 +objectTypeSelectedTauValDenominatorModuleZTT
62 +kinematicSelectedTauValDenominatorZTT
65 produceDenominator = cms.Sequence(produceDenominatorZTT)
67 runTauValidationBatchMode = cms.Sequence(
69 +TauValNumeratorAndDenominatorZTT
72 runTauValidation = cms.Sequence(
73 runTauValidationBatchMode
def cloneProcessingSnippet(process, sequence, postfix, removePostfix="", noClones=[], addToTask=False)
bool any(const std::vector< T > &v, const T &what)
def SetValidationExtention(module, extension)