[ caloMEtHistManagerBgEstWplusJetsEnriched, caloMEtHistManagerBgEstWplusJetsEnrichedFRweighted ],
    [ pfMEtHistManagerBgEstWplusJetsEnriched, pfMEtHistManagerBgEstWplusJetsEnrichedFRweighted ],
    [ jetHistManagerBgEstWplusJetsEnriched, jetHistManagerBgEstWplusJetsEnrichedFRweighted ]
]

analyzeEventsBgEstWplusJetsEnrichedFRmcWeighted = analyzeEventsBgEstWplusJetsEnriched.clone(
  name = cms.string('BgEstTemplateAnalyzer_WplusJetsEnrichedFRmcWeighted')
)
replaceEventSelections(analyzeEventsBgEstWplusJetsEnrichedFRmcWeighted, eventSelectionReplacementsWplusJetsEnrichedFRweighted)
analyzerModuleReplacementsWplusJetsEnrichedFRmcWeighted = copy.deepcopy(analyzerModuleReplacementsWplusJetsEnrichedFRweighted)
analyzerModuleReplacementsWplusJetsEnrichedFRmcWeighted.extend([
    [ tauHistManagerBgEstWplusJetsEnriched, tauHistManagerBgEstWplusJetsEnrichedFRmcWeighted ],
    [ diTauCandidateHistManagerBgEstWplusJetsEnriched, diTauCandidateHistManagerBgEstWplusJetsEnrichedFRmcWeighted ],    
    #[ diTauCandidateNSVfitHistManagerBgEstWplusJetsEnriched, diTauCandidateNSVfitHistManagerBgEstWplusJetsEnrichedFRmcWeighted ]
])
replaceAnalyzerModules(analyzeEventsBgEstWplusJetsEnrichedFRmcWeighted, analyzerModuleReplacementsWplusJetsEnrichedFRmcWeighted)
psetFRmcEventWeightWplusJetsEnriched = cms.PSet(
    src = cms.InputTag('bgEstFakeRateEventWeights', 'WplusJetsSim'),
    applyAfterFilter = cms.string("tauTaNCdiscrCutNotAppliedBgEstWplusJetsEnrichedFRweighted")
)
if hasattr(analyzeEventsBgEstWplusJetsEnrichedFRmcWeighted, "eventWeights"):
    getattr(analyzeEventsBgEstWplusJetsEnrichedFRmcWeighted, "eventWeights").append(psetFRmcEventWeightWplusJetsEnriched)
else:
    setattr(analyzeEventsBgEstWplusJetsEnrichedFRmcWeighted, "eventWeights", cms.VPSet(psetFRmcEventWeightWplusJetsEnriched))
setattr(tauHistManagerBgEstWplusJetsEnrichedFRmcWeighted, "checkWeightConsistency", cms.bool(True))

analyzeEventsBgEstWplusJetsEnrichedFRdataWeighted = analyzeEventsBgEstWplusJetsEnriched.clone(
  name = cms.string('BgEstTemplateAnalyzer_WplusJetsEnrichedFRdataWeighted')
)
replaceEventSelections(analyzeEventsBgEstWplusJetsEnrichedFRdataWeighted, eventSelectionReplacementsWplusJetsEnrichedFRweighted)
analyzerModuleReplacementsWplusJetsEnrichedFRdataWeighted = copy.deepcopy(analyzerModuleReplacementsWplusJetsEnrichedFRweighted)
        psKine_MEt_logM_int = cms.string('psKine_MEt_logM_int')
    )
)    

analyzeZtoDiTauEvents_factorizedLoose2ndTau = analyzeZtoDiTauEvents.clone(
    name = cms.string('zDiTauAnalyzer_factorizedLoose2ndTau')
)
if len(analyzeZtoDiTauEvents_factorizedLoose2ndTau.eventDumps) > 0:
    analyzeZtoDiTauEvents_factorizedLoose2ndTau.eventDumps[0] = diTauEventDump_factorizedLoose2ndTau
replaceEventSelections(analyzeZtoDiTauEvents_factorizedLoose2ndTau, 
    [ [ evtSelSecondTauLeadTrkPt, evtSelSecondTauLeadTrkPtLoose ],
      [ evtSelSecondTauTaNCdiscr, evtSelSecondTauTaNCdiscrLoose ],
      [ evtSelSecondTauTrkIso, evtSelSecondTauTrkIsoLoose ],
      [ evtSelSecondTauEcalIso, evtSelSecondTauEcalIsoLoose ],
      [ evtSelSecondTauProng, evtSelSecondTauProngLoose ],
      [ evtSelSecondTauCharge, evtSelSecondTauChargeLoose ],
      [ evtSelSecondTauMuonVeto, evtSelSecondTauMuonVetoLoose ],
      [ evtSelSecondTauElectronVeto, evtSelSecondTauElectronVetoLoose ],
      [ evtSelDiTauCandidateForDiTauAntiOverlapVeto, evtSelDiTauCandidateForDiTauAntiOverlapVetoLoose2ndTau ],
      [ evtSelDiTauCandidateForDiTauZeroCharge, evtSelDiTauCandidateForDiTauZeroChargeLoose2ndTau ],
      [ evtSelDiTauCandidateForDiTauAcoplanarity, evtSelDiTauCandidateForDiTauAcoplanarityLoose2ndTau ],
      [ evtSelDiTauCandidateForDiTauPzetaDiff, evtSelDiTauCandidateForDiTauPzetaDiffLoose2ndTau ] ]
      #[ evtSelCentralJetVeto, evtSelCentralJetVetoLoose2ndTau] ]
)
analyzeZtoDiTauEvents_factorizedLoose2ndTau.analysisSequence = diTauAnalysisSequence_factorizedLoose2ndTau
replaceAnalyzerModules(analyzeZtoDiTauEvents_factorizedLoose2ndTau,
    [ [ diTauCandidateNSVfitHistManagerForDiTau, diTauCandidateNSVfitHistManagerForDiTau_factorizedLoose2ndTau ] ]
)                       

analyzeZtoDiTauSequence_factorizedLoose2ndTau = cms.Sequence(analyzeZtoDiTauEvents_factorizedLoose2ndTau)
     [evtSelSecondTauProng, evtSelSecondTauProngLoose],
     [evtSelSecondTauCharge, evtSelSecondTauChargeLoose],
     [evtSelSecondTauMuonVeto, evtSelSecondTauMuonVetoLoose],
     [evtSelSecondTauElectronVeto, evtSelSecondTauElectronVetoLoose],
     [
         evtSelDiTauCandidateForDiTauAntiOverlapVeto,
         evtSelDiTauCandidateForDiTauAntiOverlapVetoLoose2ndTau
     ],
     [
         evtSelDiTauCandidateForDiTauZeroCharge,
         evtSelDiTauCandidateForDiTauZeroChargeLoose2ndTau
     ],
     [
         evtSelDiTauCandidateForDiTauAcoplanarity,
         evtSelDiTauCandidateForDiTauAcoplanarityLoose2ndTau
     ],
     [
         evtSelDiTauCandidateForDiTauPzetaDiff,
         evtSelDiTauCandidateForDiTauPzetaDiffLoose2ndTau
     ]]
    #[ evtSelCentralJetVeto, evtSelCentralJetVetoLoose2ndTau] ]
)
analyzeZtoDiTauEvents_factorizedLoose2ndTau.analysisSequence = diTauAnalysisSequence_factorizedLoose2ndTau
replaceAnalyzerModules(analyzeZtoDiTauEvents_factorizedLoose2ndTau, [[
    diTauCandidateNSVfitHistManagerForDiTau,
    diTauCandidateNSVfitHistManagerForDiTau_factorizedLoose2ndTau
]])

analyzeZtoDiTauSequence_factorizedLoose2ndTau = cms.Sequence(
    analyzeZtoDiTauEvents_factorizedLoose2ndTau)
Esempio n. 4
0
                       eventSelectionReplacementsWplusJetsEnrichedFRweighted)
analyzerModuleReplacementsWplusJetsEnrichedFRmcWeighted = copy.deepcopy(
    analyzerModuleReplacementsWplusJetsEnrichedFRweighted)
analyzerModuleReplacementsWplusJetsEnrichedFRmcWeighted.extend([
    [
        tauHistManagerBgEstWplusJetsEnriched,
        tauHistManagerBgEstWplusJetsEnrichedFRmcWeighted
    ],
    [
        diTauCandidateHistManagerBgEstWplusJetsEnriched,
        diTauCandidateHistManagerBgEstWplusJetsEnrichedFRmcWeighted
    ],
    #[ diTauCandidateNSVfitHistManagerBgEstWplusJetsEnriched, diTauCandidateNSVfitHistManagerBgEstWplusJetsEnrichedFRmcWeighted ]
])
replaceAnalyzerModules(
    analyzeEventsBgEstWplusJetsEnrichedFRmcWeighted,
    analyzerModuleReplacementsWplusJetsEnrichedFRmcWeighted)
psetFRmcEventWeightWplusJetsEnriched = cms.PSet(
    src=cms.InputTag('bgEstFakeRateEventWeights', 'WplusJetsSim'),
    applyAfterFilter=cms.string(
        "tauTaNCdiscrCutNotAppliedBgEstWplusJetsEnrichedFRweighted"))
if hasattr(analyzeEventsBgEstWplusJetsEnrichedFRmcWeighted, "eventWeights"):
    getattr(analyzeEventsBgEstWplusJetsEnrichedFRmcWeighted,
            "eventWeights").append(psetFRmcEventWeightWplusJetsEnriched)
else:
    setattr(analyzeEventsBgEstWplusJetsEnrichedFRmcWeighted, "eventWeights",
            cms.VPSet(psetFRmcEventWeightWplusJetsEnriched))
setattr(tauHistManagerBgEstWplusJetsEnrichedFRmcWeighted,
        "checkWeightConsistency", cms.bool(True))

analyzeEventsBgEstWplusJetsEnrichedFRdataWeighted = analyzeEventsBgEstWplusJetsEnriched.clone(