Ejemplo n.º 1
0
                                                 process.commonSequence,
                                                 muons=muons)

# Pileup weighting
from HiggsAnalysis.HeavyChHiggsToTauNu.HChTools import *
import HiggsAnalysis.HeavyChHiggsToTauNu.HChSignalAnalysisParameters_cff as param

# Pileup weighting
process.pileupWeight = cms.EDProducer(
    "HPlusVertexWeightProducer",
    alias=cms.string("pileupWeight"),
)
puweight = "Run2011A"
if len(options.puWeightEra) > 0:
    puweight = options.puWeightEra
param.setPileupWeightFor2011(dataVersion, era="puweight")
insertPSetContentsTo(param.vertexWeight, process.pileupWeight)

# Vertex weighting
#process.vertexWeight = cms.EDProducer("HPlusVertexWeightProducer",
#    alias = cms.string("vertexWeight"),
#)
#param.setVertexWeightFor2011()
#insertPSetContentsTo(param.vertexWeight, process.vertexWeight)

process.commonSequence *= process.pileupWeight  #*process.vertexWeight)

if dataVersion.isData():
    process.pileupWeight.enabled = False
#    process.vertexWeight.enabled = False
Ejemplo n.º 2
0
# Isolation embedding
import HiggsAnalysis.HeavyChHiggsToTauNu.tauEmbedding.customisations as customisations
muons = customisations.addMuonIsolationEmbedding(process, process.commonSequence, muons=muons)

# Pileup weighting
from HiggsAnalysis.HeavyChHiggsToTauNu.HChTools import *
import HiggsAnalysis.HeavyChHiggsToTauNu.HChSignalAnalysisParameters_cff as param

# Pileup weighting
process.pileupWeight = cms.EDProducer("HPlusVertexWeightProducer",
    alias = cms.string("pileupWeight"),
)
puweight = "Run2011A"
if len(options.puWeightEra) > 0:
        puweight = options.puWeightEra
param.setPileupWeightFor2011(dataVersion, era="puweight")
insertPSetContentsTo(param.vertexWeight, process.pileupWeight)

# Vertex weighting
#process.vertexWeight = cms.EDProducer("HPlusVertexWeightProducer",
#    alias = cms.string("vertexWeight"),
#)
#param.setVertexWeightFor2011()
#insertPSetContentsTo(param.vertexWeight, process.vertexWeight)

process.commonSequence *= process.pileupWeight#*process.vertexWeight)

if dataVersion.isData():
    process.pileupWeight.enabled = False
#    process.vertexWeight.enabled = False
param.overrideTriggerFromOptions(options)
param.trigger.triggerSrc.setProcessName(dataVersion.getTriggerProcess())
# Set tau selection mode (options: 'tauCandidateSelectionOnly', 'tauCandidateSelectionOnlyReversedRtau')
# other options (use not recommended here): 'standard'
param.setAllTauSelectionOperatingMode('tauCandidateSelectionOnly')

# Set tau sources to trigger matched tau collections
param.setAllTauSelectionSrcSelectedPatTausTriggerMatched()

# Trigger with scale factors (at the moment hard coded)
if applyTriggerScaleFactor and dataVersion.isMC():
    param.triggerEfficiencyScaleFactor.mode = "scaleFactor"


# Set the data scenario for vertex/pileup weighting
param.setPileupWeightFor2011(dataVersion, era="EPS", method="intime") # Reweight by true PU distribution 
param.setDataTriggerEfficiency(dataVersion, era="EPS")

#Reminder(from HChSignalAnalysisParameters_cff.py):
#def setTriggerPileupFor2011(**kwargs):
#    setEfficiencyTriggersFor2011(**kwargs)
#    setPileupWeightFor2011()

# Overwrite necessary values here
#param.trigger.hltMetCut = 45.0 # note: 45 is the minimum possible value for which HLT_MET is saved (see histogram hlt_met) attikis
#param.trigger.hltMetCut = 0.0 
print "\nhltMetCut:", param.trigger.hltMetCut
param.InvMassVetoOnJets.setTrueToUseModule = False

##############################################################################
process.QCDMeasurement_PASJuly11 = cms.EDProducer("HPlusQCDMeasurement_PASJuly11Producer",
Ejemplo n.º 4
0
# other options (use not recommended here): 'standard'
param.setAllTauSelectionOperatingMode("tauCandidateSelectionOnly")

# Set tau sources to trigger matched tau collections
param.setAllTauSelectionSrcSelectedPatTausTriggerMatched()

# Trigger with scale factors (at the moment hard coded)
if applyTriggerScaleFactor and dataVersion.isMC():
    param.triggerEfficiencyScaleFactor.mode = "scaleFactor"


# Set the data scenario for vertex/pileup weighting
puweight = "Run2011A"
if len(options.puWeightEra) > 0:
    puweight = options.puWeightEra
param.setPileupWeightFor2011(dataVersion, era=puweight)  # Reweight by true PU distribution
param.setDataTriggerEfficiency(dataVersion, era=puweight)

# Reminder(from HChSignalAnalysisParameters_cff.py):
# def setTriggerPileupFor2011(**kwargs):
#    setEfficiencyTriggersFor2011(**kwargs)
#    setPileupWeightFor2011()

# Overwrite necessary values here
# param.trigger.hltMetCut = 45.0 # note: 45 is the minimum possible value for which HLT_MET is saved (see histogram hlt_met) attikis
# param.trigger.hltMetCut = 0.0
print "\nhltMetCut:", param.trigger.hltMetCut
param.InvMassVetoOnJets.setTrueToUseModule = False

##############################################################################
process.QCDMeasurement = cms.EDProducer(
Ejemplo n.º 5
0
# Set tau selection mode (options: 'tauCandidateSelectionOnly', 'tauCandidateSelectionOnlyReversedRtau')
# other options (use not recommended here): 'standard'
param.setAllTauSelectionOperatingMode('tauCandidateSelectionOnly')

# Set tau sources to trigger matched tau collections
param.setAllTauSelectionSrcSelectedPatTausTriggerMatched()

# Trigger with scale factors (at the moment hard coded)
if applyTriggerScaleFactor and dataVersion.isMC():
    param.triggerEfficiencyScaleFactor.mode = "scaleFactor"

# Set the data scenario for vertex/pileup weighting
puweight = "Run2011A"
if len(options.puWeightEra) > 0:
    puweight = options.puWeightEra
param.setPileupWeightFor2011(dataVersion,
                             era=puweight)  # Reweight by true PU distribution
param.setDataTriggerEfficiency(dataVersion, era=puweight)

#Reminder(from HChSignalAnalysisParameters_cff.py):
#def setTriggerPileupFor2011(**kwargs):
#    setEfficiencyTriggersFor2011(**kwargs)
#    setPileupWeightFor2011()

# Overwrite necessary values here
#param.trigger.hltMetCut = 45.0 # note: 45 is the minimum possible value for which HLT_MET is saved (see histogram hlt_met) attikis
#param.trigger.hltMetCut = 0.0
print "\nhltMetCut:", param.trigger.hltMetCut
param.InvMassVetoOnJets.setTrueToUseModule = False

##############################################################################
process.QCDMeasurement = cms.EDProducer(
Ejemplo n.º 6
0
# Vertex selection
from HiggsAnalysis.HeavyChHiggsToTauNu.HChPrimaryVertex import addPrimaryVertexSelection
addPrimaryVertexSelection(process, process.commonSequence)

# Pileup weights
import HiggsAnalysis.HeavyChHiggsToTauNu.HChSignalAnalysisParameters_cff as param
process.pileupWeightEPS = cms.EDProducer(
    "HPlusVertexWeightProducer",
    alias=cms.string("pileupWeightEPS"),
)
process.pileupWeightRun2011AnoEPS = process.pileupWeightEPS.clone(
    alias="pileupWeightRun2011AnoEPS")
process.pileupWeightRun2011A = process.pileupWeightEPS.clone(
    alias="pileupWeightRun2011A")
param.setPileupWeightFor2011(dataVersion, era="EPS")
insertPSetContentsTo(param.vertexWeight.clone(), process.pileupWeightEPS)
param.setPileupWeightFor2011(dataVersion, era="Run2011A-EPS")
insertPSetContentsTo(param.vertexWeight.clone(),
                     process.pileupWeightRun2011AnoEPS)
param.setPileupWeightFor2011(dataVersion, era="Run2011A")
insertPSetContentsTo(param.vertexWeight.clone(), process.pileupWeightRun2011A)

process.commonSequence *= (process.pileupWeightEPS *
                           process.pileupWeightRun2011AnoEPS *
                           process.pileupWeightRun2011A)

# Embedding-like preselection
import HiggsAnalysis.HeavyChHiggsToTauNu.tauEmbedding.customisations as tauEmbeddingCustomisations
additionalCounters.extend(
    tauEmbeddingCustomisations.addEmbeddingLikePreselection(
Ejemplo n.º 7
0
# Vertex selection
from HiggsAnalysis.HeavyChHiggsToTauNu.HChPrimaryVertex import addPrimaryVertexSelection
addPrimaryVertexSelection(process, process.commonSequence)

# Pileup weights
import HiggsAnalysis.HeavyChHiggsToTauNu.HChSignalAnalysisParameters_cff as param
process.pileupWeightEPS = cms.EDProducer("HPlusVertexWeightProducer",
    alias = cms.string("pileupWeightEPS"),
)
process.pileupWeightRun2011AnoEPS = process.pileupWeightEPS.clone(
    alias = "pileupWeightRun2011AnoEPS"
)
process.pileupWeightRun2011A = process.pileupWeightEPS.clone(
    alias = "pileupWeightRun2011A"
)
param.setPileupWeightFor2011(dataVersion, era="EPS")
insertPSetContentsTo(param.vertexWeight.clone(), process.pileupWeightEPS)
param.setPileupWeightFor2011(dataVersion, era="Run2011A-EPS")
insertPSetContentsTo(param.vertexWeight.clone(), process.pileupWeightRun2011AnoEPS)
param.setPileupWeightFor2011(dataVersion, era="Run2011A")
insertPSetContentsTo(param.vertexWeight.clone(), process.pileupWeightRun2011A)

process.commonSequence *= (
    process.pileupWeightEPS *
    process.pileupWeightRun2011AnoEPS *
    process.pileupWeightRun2011A
)


muons = cms.InputTag("tauEmbeddingMuons")
#taus = cms.InputTag("selectedPatTausShrinkingConePFTau")