Exemplo n.º 1
0
import FWCore.ParameterSet.Config as cms

from Configuration.StandardSequences.Eras import eras
from cp3_llbb.Framework import Framework
from cp3_llbb.Framework import METProducer
from cp3_llbb.Framework.CmdLine import CmdLine

options = CmdLine()
runOnData = options.runOnData == 1

globalTag_ = '80X_mcRun2_asymptotic_2016_TrancheIV_v8'
processName_ = 'PAT'
if runOnData:
    globalTag_ = '80X_dataRun2_2016SeptRepro_v7'
    processName_ = 'RECO'

# WARNING: prescale factor for data should be set to -1
options = CmdLine(defaults=dict(
    runOnData=0, era="25ns", globalTag='80X_dataRun2_2016SeptRepro_v7'))

framework = Framework.Framework(options)

framework.addAnalyzer(
    'hZA_analyzer',
    cms.PSet(
        type=cms.string('hZA_analyzer'),
        prefix=cms.string('hZA_'),
        enable=cms.bool(True),
        categories_parameters=cms.PSet(
            # Per-category lepton pt cuts
            mumu_leadingLeptonPtCut=cms.untracked.double(20),  # muon
Exemplo n.º 2
0
import FWCore.ParameterSet.Config as cms

from Configuration.StandardSequences.Eras import eras
from cp3_llbb.Framework import Framework
from cp3_llbb.Framework import METProducer
from cp3_llbb.Framework.CmdLine import CmdLine

options = CmdLine()
runOnData = options.runOnData == 1

print('Now starting')
# Not sure it's the correct way to add a new era
options.changeDefaults(era='2016')
print('Changed era')

# 2017 tags from https://twiki.cern.ch/twiki/bin/view/CMS/PdmV2017Analysis
if runOnData:
    options.changeDefaults(globalTag='94X_dataRun2_ReReco_EOY17_v6',
                           process='RECO')
else:
    options.changeDefaults(globalTag='94X_mc2017_realistic_v14', process='PAT')

print('Changed defaults')

framework = Framework.Framework(options)

print('Created framework object')
framework.addAnalyzer(
    'tth_analyzer',
    cms.PSet(
        type=cms.string('tth_analyzer'),
Exemplo n.º 3
0
import FWCore.ParameterSet.Config as cms

from Configuration.StandardSequences.Eras import eras
from cp3_llbb.Framework import Framework
from cp3_llbb.Framework.CmdLine import CmdLine

options = CmdLine(defaults=dict(runOnData=1,
                                era="2017",
                                globalTag='94X_dataRun2_ReReco_EOY17_v6',
                                process='RECO'))

framework = Framework.Framework(options)

framework.addAnalyzer(
    'dilepton',
    cms.PSet(type=cms.string('dilepton_analyzer'),
             prefix=cms.string('dilepton_'),
             enable=cms.bool(True),
             categories_parameters=cms.PSet(mll_cut=cms.untracked.double(20)),
             parameters=cms.PSet(standalone=cms.untracked.bool(True),
                                 muons_wp=cms.untracked.string('loose'),
                                 electrons_wp=cms.untracked.string('loose'))))

framework.addAnalyzer(
    'test',
    cms.PSet(type=cms.string('test_analyzer'),
             prefix=cms.string('test_'),
             enable=cms.bool(True)))

#framework.applyElectronRegression()
#framework.applyElectronSmearing(tag='Moriond17_23Jan')
Exemplo n.º 4
0
import FWCore.ParameterSet.Config as cms

from Configuration.StandardSequences.Eras import eras
from cp3_llbb.Framework import Framework
from cp3_llbb.Framework.CmdLine import CmdLine

options = CmdLine(
    defaults=dict(runOnData=0,
                  era="25ns",
                  globalTag='80X_mcRun2_asymptotic_2016_miniAODv2_v1'))

framework = Framework.Framework(options)
from cp3_llbb.Framework.JetsProducer import discriminators_deepFlavour
framework.redoJEC(JECDatabase='Spring16_25nsV1_MC.db',
                  addBtagDiscriminators=discriminators_deepFlavour)
process = framework.create()

process.source.fileNames = cms.untracked.vstring(
    'file://TTTo2L2Nu_13TeV-powheg_RunIISpring16MiniAODv2_reduced.root')

process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(10))
Exemplo n.º 5
0
import FWCore.ParameterSet.Config as cms

from Configuration.StandardSequences.Eras import eras
from cp3_llbb.Framework import Framework
from cp3_llbb.Framework.CmdLine import CmdLine

options = CmdLine(defaults=dict(runOnData=0, era="2017", globalTag='94X_mc2017_realistic_v14'))
# Up-to-date tags can be found at https://twiki.cern.ch/twiki/bin/view/CMS/PdmV#Analysis_Recipe (e.g. https://twiki.cern.ch/twiki/bin/view/CMS/PdmV2017Analysis for 2017 data/mc)

framework = Framework.Framework(options)

framework.addAnalyzer('dilepton', cms.PSet(
    type = cms.string('dilepton_analyzer'),
    prefix = cms.string('dilepton_'),
    enable = cms.bool(True),
    categories_parameters = cms.PSet(
        mll_cut = cms.untracked.double(20)
        ),
    parameters = cms.PSet(
        standalone = cms.untracked.bool(True),
        muons_wp = cms.untracked.string('loose'),
        electrons_wp = cms.untracked.string('loose')
        )
    ))


framework.addAnalyzer('test', cms.PSet(
    type = cms.string('test_analyzer'),
    prefix = cms.string('test_'),
    enable = cms.bool(True),
    parameters = cms.PSet(
Exemplo n.º 6
0
import FWCore.ParameterSet.Config as cms

from Configuration.StandardSequences.Eras import eras
from cp3_llbb.Framework import Framework
from cp3_llbb.Framework.CmdLine import CmdLine

options = CmdLine(defaults=dict(runOnData=1,
                                era="25ns",
                                globalTag='80X_dataRun2_Prompt_ICHEP16JEC_v0',
                                process="RECO"))

framework = Framework.Framework(options)

from cp3_llbb.Framework.JetsProducer import discriminators_deepFlavour
framework.redoJEC(addBtagDiscriminators=discriminators_deepFlavour)

process = framework.create()

process.source.fileNames = cms.untracked.vstring(
    'file://DoubleMuon_Run2016B_PromptReco-v2_reduced.root')

process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(10))
Exemplo n.º 7
0
import FWCore.ParameterSet.Config as cms

from Configuration.StandardSequences.Eras import eras
from cp3_llbb.Framework import Framework
from cp3_llbb.Framework.CmdLine import CmdLine

options = CmdLine(defaults=dict(runOnData=1,
                                era="25ns",
                                globalTag='80X_dataRun2_2016SeptRepro_v7',
                                process='RECO'))

framework = Framework.Framework(options)

framework.addAnalyzer(
    'dilepton',
    cms.PSet(type=cms.string('dilepton_analyzer'),
             prefix=cms.string('dilepton_'),
             enable=cms.bool(True),
             categories_parameters=cms.PSet(mll_cut=cms.untracked.double(20)),
             parameters=cms.PSet(standalone=cms.untracked.bool(True),
                                 muons_wp=cms.untracked.string('loose'),
                                 electrons_wp=cms.untracked.string('loose'))))

framework.addAnalyzer(
    'test',
    cms.PSet(type=cms.string('test_analyzer'),
             prefix=cms.string('test_'),
             enable=cms.bool(True)))

framework.applyElectronRegression()
framework.applyElectronSmearing()
Exemplo n.º 8
0
import FWCore.ParameterSet.Config as cms

from Configuration.StandardSequences.Eras import eras
from cp3_llbb.Framework import Framework
from cp3_llbb.Framework.CmdLine import CmdLine

options = CmdLine(
    defaults=dict(runOnData=0,
                  era="25ns",
                  globalTag='80X_mcRun2_asymptotic_2016_TrancheIV_v7'))

framework = Framework.Framework(options)

framework.addAnalyzer(
    'dilepton',
    cms.PSet(type=cms.string('dilepton_analyzer'),
             prefix=cms.string('dilepton_'),
             enable=cms.bool(True),
             categories_parameters=cms.PSet(mll_cut=cms.untracked.double(20)),
             parameters=cms.PSet(standalone=cms.untracked.bool(True),
                                 muons_wp=cms.untracked.string('loose'),
                                 electrons_wp=cms.untracked.string('loose'))))

framework.addAnalyzer(
    'test',
    cms.PSet(type=cms.string('test_analyzer'),
             prefix=cms.string('test_'),
             enable=cms.bool(True),
             parameters=cms.PSet(test=cms.untracked.string('jets'),
                                 test2=cms.untracked.string('met'))))
Exemplo n.º 9
0
import FWCore.ParameterSet.Config as cms

from Configuration.StandardSequences.Eras import eras
from cp3_llbb.Framework import Framework
from cp3_llbb.Framework import METProducer
from cp3_llbb.Framework.CmdLine import CmdLine

options = CmdLine()
runOnData = options.runOnData == 1

globalTag_ = '80X_mcRun2_asymptotic_2016_TrancheIV_v7'
processName_ = 'PAT'
if runOnData:
    globalTag_ = '80X_dataRun2_2016SeptRepro_v6'
    processName_ = 'RECO'

framework = Framework.Framework(runOnData,
                                eras.Run2_25ns,
                                globalTag=globalTag_,
                                processName=processName_)

framework.addAnalyzer(
    'hh_analyzer',
    cms.PSet(
        type=cms.string('hh_analyzer'),
        prefix=cms.string('hh_'),
        enable=cms.bool(True),
        categories_parameters=cms.PSet(
            # Per-category lepton pt cuts
            mumu_leadingLeptonPtCut=cms.untracked.double(20),  # muon
            mumu_subleadingLeptonPtCut=cms.untracked.double(10),  # muon