Esempio n. 1
0
#param.trigger.selectionType = "disabled"

import HiggsAnalysis.HeavyChHiggsToTauNu.tauEmbedding.customisations as tauEmbeddingCustomisations
if options.tauEmbeddingInput != 0:
    #tauEmbeddingCustomisations.addMuonIsolationEmbeddingForSignalAnalysis(process, process.commonSequence)
    tauEmbeddingCustomisations.setCaloMetSum(process, process.commonSequence, options, dataVersion)
    tauEmbeddingCustomisations.customiseParamForTauEmbedding(param, options, dataVersion)
    if dataVersion.isMC():
        process.muonTriggerFixSequence = cms.Sequence()
        additionalCounters.extend(tauEmbeddingCustomisations.addMuonTriggerFix(process, dataVersion, process.muonTriggerFixSequence, options))
        process.commonSequence.replace(process.patSequence, process.muonTriggerFixSequence*process.patSequence)
    if tauEmbeddingFinalizeMuonSelection:
        #applyIsolation = not doTauEmbeddingMuonSelectionScan
        applyIsolation = False
        additionalCounters.extend(tauEmbeddingCustomisations.addFinalMuonSelection(process, process.commonSequence, param,
                                                                                   enableIsolation=applyIsolation))
    #process.muonFinalSelectionElectronVetoFilter.GlobalElectronVeto.ElectronCollectionName = cms.untracked.InputTag("selectedPatElectronsPFlow","","MUONSKIM")

# Signal analysis module for the "golden analysis"
process.signalAnalysis = cms.EDFilter("HPlusEWKMatchingFilter",
    histogramAmbientLevel = param.histogramAmbientLevel,
    trigger = param.trigger.clone(),
    triggerEfficiencyScaleFactor = param.triggerEfficiencyScaleFactor.clone(),
    primaryVertexSelection = param.primaryVertexSelection.clone(),
    GlobalElectronVeto = param.GlobalElectronVeto.clone(),
    GlobalMuonVeto = param.GlobalMuonVeto.clone(),
    jetSelection = param.jetSelection.clone(),
    MET = param.MET.clone(),
    bTagging = param.bTagging.clone(),
    deltaPhiTauMET = param.deltaPhiTauMET,
    prescaleWeightReader = param.prescaleWeightReader.clone(),
import HiggsAnalysis.HeavyChHiggsToTauNu.tauEmbedding.customisations as tauEmbeddingCustomisations
import HiggsAnalysis.HeavyChHiggsToTauNu.HChSignalAnalysisParameters_cff as param
# FIXME: hack to apply trigger in MC
#if dataVersion.isMC():
#    additionalCounters.extend(tauEmbeddingCustomisations.addMuonTriggerFix(process, dataVersion, process.commonSequence, options))
param.setAllTauSelectionSrcSelectedPatTausTriggerMatched()
tauEmbeddingCustomisations.customiseParamForTauEmbedding(
    param, options, dataVersion)

#tauEmbeddingCustomisations.PF2PATVersion = PF2PATVersion
#muons = cms.InputTag(tauEmbeddingCustomisations.addMuonIsolationEmbedding(process, process.commonSequence, muons.value()))
additionalCounters.extend(
    tauEmbeddingCustomisations.addFinalMuonSelection(
        process,
        process.commonSequence,
        param,
        enableIsolation=False,
        tightenMuonPt=False,
    ))
#taus = cms.InputTag("patTaus"+PF2PATVersion+"TauEmbeddingMuonMatched")
#taus = cms.InputTag("patTaus"+PF2PATVersion+"TauEmbeddingMuonMatched")
taus = cms.InputTag(param.tauSelectionHPSMediumTauBased.src.value())

process.genTauVisibleSequence = tauEmbeddingCustomisations.addTauEmbeddingMuonTausUsingVisible(
    process)
process.commonSequence *= process.genTauVisibleSequence
taus = cms.InputTag("tauEmbeddingGenTauVisibleMatchTauMatched")

process.genTausOriginal = cms.EDFilter(
    "GenParticleSelector",
    src=cms.InputTag("genParticles", "", "HLT"),
param.setAllTauSelectionSrcSelectedPatTausTriggerMatched()
#param.setAllTauSelectionSrcSelectedPatTaus()

if options.tauEmbeddingInput != 0:
    tauEmbeddingCustomisations.addMuonIsolationEmbeddingForSignalAnalysis(
        process, process.commonSequence)
    tauEmbeddingCustomisations.setCaloMetSum(process, process.commonSequence,
                                             param, dataVersion)
    tauEmbeddingCustomisations.customiseParamForTauEmbedding(
        param, dataVersion)
    if tauEmbeddingFinalizeMuonSelection:
        applyIsolation = not doTauEmbeddingMuonSelectionScan
        additionalCounters.extend(
            tauEmbeddingCustomisations.addFinalMuonSelection(
                process,
                process.commonSequence,
                param,
                enableIsolation=applyIsolation))

# Set the triggers for trigger efficiency parametrisation
#param.trigger.triggerTauSelection = param.tauSelectionHPSVeryLooseTauBased.clone( # VeryLoose
param.trigger.triggerTauSelection = param.tauSelectionHPSTightTauBased.clone(  # Tight
    rtauCut=cms.untracked.double(0.0)  # No rtau cut for trigger tau
)
param.trigger.triggerMETSelection = param.MET.clone(
    METCut=cms.untracked.double(0.0)  # No MET cut for trigger MET
)
if (doTriggerParametrisation
        and not dataVersion.isData()) or options.tauEmbeddingInput != 0:
    # 2010 and 2011 scenarios
    #param.setEfficiencyTriggersFor2010()
    src = cms.InputTag("offlinePrimaryVertices")
)
process.commonSequence *= process.firstPrimaryVertex

import HiggsAnalysis.HeavyChHiggsToTauNu.tauEmbedding.customisations as tauEmbeddingCustomisations
import HiggsAnalysis.HeavyChHiggsToTauNu.HChSignalAnalysisParameters_cff as param
# FIXME: hack to apply trigger in MC
#if dataVersion.isMC():
#    additionalCounters.extend(tauEmbeddingCustomisations.addMuonTriggerFix(process, dataVersion, process.commonSequence, options))
param.setAllTauSelectionSrcSelectedPatTausTriggerMatched()
tauEmbeddingCustomisations.customiseParamForTauEmbedding(param, options, dataVersion)

#tauEmbeddingCustomisations.PF2PATVersion = PF2PATVersion
#muons = cms.InputTag(tauEmbeddingCustomisations.addMuonIsolationEmbedding(process, process.commonSequence, muons.value()))
additionalCounters.extend(tauEmbeddingCustomisations.addFinalMuonSelection(process, process.commonSequence, param,
                                                                           enableIsolation=False,
                                                                           tightenMuonPt=False,
                                                                           ))
#taus = cms.InputTag("patTaus"+PF2PATVersion+"TauEmbeddingMuonMatched")
#taus = cms.InputTag("patTaus"+PF2PATVersion+"TauEmbeddingMuonMatched")
taus = cms.InputTag(param.tauSelectionHPSMediumTauBased.src.value())

process.genTauVisibleSequence = tauEmbeddingCustomisations.addTauEmbeddingMuonTausUsingVisible(process)
process.commonSequence *= process.genTauVisibleSequence
taus = cms.InputTag("tauEmbeddingGenTauVisibleMatchTauMatched")

process.genTausOriginal = cms.EDFilter("GenParticleSelector",
    src = cms.InputTag("genParticles", "", "HLT"),
    cut = cms.string(tauEmbeddingCustomisations.generatorTauSelection % tauEmbeddingCustomisations.generatorTauPt)
)
process.commonSequence *= process.genTausOriginal
Esempio n. 5
0
muons = cms.InputTag("tauEmbeddingMuons")
#taus = cms.InputTag("selectedPatTausShrinkingConePFTau")
taus = cms.InputTag("selectedPatTausHpsPFTau")
pfMET = cms.InputTag("pfMet")
pfMETOriginal = cms.InputTag("pfMet", "", recoProcess)

# Finalise muon selection
process.firstPrimaryVertex = cms.EDProducer("HPlusFirstVertexSelector",
    src = cms.InputTag("offlinePrimaryVertices")
)
process.commonSequence *= process.firstPrimaryVertex

import HiggsAnalysis.HeavyChHiggsToTauNu.tauEmbedding.customisations as tauEmbeddingCustomisations
import HiggsAnalysis.HeavyChHiggsToTauNu.HChSignalAnalysisParameters_cff as param
muons = cms.InputTag(tauEmbeddingCustomisations.addMuonIsolationEmbedding(process, process.commonSequence, muons.value()))
additionalCounters.extend(tauEmbeddingCustomisations.addFinalMuonSelection(process, process.commonSequence, param))
taus = cms.InputTag("patTausHpsPFTauTauEmbeddingMuonMatched")


import HiggsAnalysis.HeavyChHiggsToTauNu.tauEmbedding.muonAnalysis as muonAnalysis
ntuple = cms.EDAnalyzer("HPlusTauEmbeddingNtupleAnalyzer",
    selectedPrimaryVertexSrc = cms.InputTag("selectedPrimaryVertex"),
    goodPrimaryVertexSrc = cms.InputTag("goodPrimaryVertices"),
    muonSrc = cms.InputTag(muons.value()),
    muonFunctions = cms.PSet(),
    tauSrc = cms.InputTag(taus.value()),
    tauFunctions = cms.PSet(),
    jetSrc = cms.InputTag("selectedPatJets"),
    jetFunctions = cms.PSet(
        tche = cms.string("bDiscriminator('trackCountingHighEffBJetTags')"),
    ),