Exemple #1
0
            .setDefault('numThreads', 1)
            .setDefault('useHLTFilter', True)
            .setDefault('useObjectBasedJetID', True)
            .setDefault('jetIDSpec', "2016")
            .setDefault('jetIDWorkingPoint', "TightLepVeto")
            #.setDefault('jecVersion', "__JEC_VERSION__")
            .setDefault('jecFromGlobalTag', True)
            .setDefault('edmOut', False)
    ).parseArguments()


# create the process
process = KarmaProcess(
    "DIJETANA",
    input_files=options.inputFiles,
    max_events=options.maxEvents,
    global_tag=options.globalTag,
    edm_out='.'.join(options.outputFile.split('.')[:-1]) + "_edmOut.root" if options.edmOut else None,
    num_threads=options.numThreads,
)

from PhysicsTools.PatUtils.l1ECALPrefiringWeightProducer_cfi import l1ECALPrefiringWeightProducer
process.prefiringweight = l1ECALPrefiringWeightProducer.clone(
    DataEra = cms.string("2016BtoH"),
    UseJetEMPt = cms.bool(False),
    PrefiringRateSystematicUncty = cms.double(0.2),
    SkipWarnings = False)

print(process.paths) #[0] += process.prefiringweight

process.enable_verbose_logging()  # for testing
Exemple #2
0
                                -1).setDefault('dumpPython', False).setDefault(
                                    'useHLTFilter',
                                    False).setDefault('jsonFilterFile',
                                                      "")  # no filter in MC
        .setDefault('withPATCollections', False).setDefault(
            'reportEvery',
            int(
                max(1, 10**(round(math.log(__MAX_EVENTS__) / math.log(10)) -
                            1)))).setDefault('numThreads',
                                             1)).parseArguments()

# create the process
process = KarmaProcess(
    "KARMASKIM",
    input_files=options.inputFiles,
    max_events=options.maxEvents,
    global_tag=options.globalTag,
    edm_out=options.outputFile,
    num_threads=options.numThreads,
)

if not os.getenv("GC_VERSION"):
    process.enable_verbose_logging()  # for testing

# configure the process
zjetSkim_94X_Run2016_17Jul2018.configure(process, options)

# dump expanded cmsRun configuration
if options.dumpPython:
    process.dump_python('.'.join(options.outputFile.split('.')[:-1]) +
                        '_dump.py',
                        overwrite=True)
Exemple #3
0
from Karma.Common.Tools import KarmaOptions, KarmaProcess

# set up and parse command-line options
options = (KarmaOptions().setDefault(
    'inputFiles',
    "file:///storage/9/dsavoiu/test_miniAOD/test_DoubleEG_Run2016G_17Jul2018_MINIAOD_10events.root"
).setDefault('isData',
             True).setDefault('globalTag', "94X_dataRun2_v10").setDefault(
                 'outputFile', "testEDMSkim_out.root").setDefault(
                     'maxEvents', 100).setDefault('dumpPython',
                                                  True)).parseArguments()

# create the process
process = KarmaProcess("EDMSKIM",
                       input_files=options.inputFiles,
                       max_events=options.maxEvents,
                       global_tag=options.globalTag,
                       edm_out=options.outputFile,
                       num_threads=1)

# create the main module path
process.add_path('path')

# enable verbose log file output
#enableVerboseLogging(process)

# == configure CMSSW modules ==========================================

# -- Jets (default from miniAOD) --------------------------------------

# just write out miniAOD jets
process.add_output_commands(