Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import FWCore.ParameterSet.Config as cms
import FWCore.ParameterSet.VarParsing as VarParsing
options = VarParsing.VarParsing()
###################################################################
# Setup 'standard' options
###################################################################
options.register('myGT',
"103X_upgrade2018_realistic_HI_v2", # default value
VarParsing.VarParsing.multiplicity.singleton, # singleton or list
VarParsing.VarParsing.varType.string, # string, int, or float
"name of the input Global Tag (POSTLS170_V5 is default)")
options.parseArguments()
process = cms.Process("ALCARECOSKIM")
###################################################################
# Message logger service
###################################################################
process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.MessageLogger.cerr = cms.untracked.PSet(placeholder = cms.untracked.bool(True))
process.MessageLogger.cout = cms.untracked.PSet(INFO = cms.untracked.PSet(
reportEvery = cms.untracked.int32(1000) # every 100th only
# limit = cms.untracked.int32(10) # or limit to 10 printouts...
))
###################################################################
# Geometry producer and standard includes
###################################################################
process.load("Configuration.StandardSequences.Services_cff")
###################################################################
# Option 1: just state the Global Tag
###################################################################
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
process.GlobalTag.globaltag = options.myGT
###################################################################
# Source
###################################################################
process.source = cms.Source ("PoolSource",fileNames = cms.untracked.vstring())
process.source.fileNames = [
'root://cmsxrootd.fnal.gov///store/user/xiaowang/HI_TkSingleMu/CRAB_UserFiles/crab_HI_ALCARECO/180928_053037/0000/step2_1.root',
'root://cmsxrootd.fnal.gov///store/user/xiaowang/HI_TkSingleMu/CRAB_UserFiles/crab_HI_ALCARECO/180928_053037/0000/step2_2.root',
'root://cmsxrootd.fnal.gov///store/user/xiaowang/HI_TkSingleMu/CRAB_UserFiles/crab_HI_ALCARECO/180928_053037/0000/step2_3.root',
'root://cmsxrootd.fnal.gov///store/user/xiaowang/HI_TkSingleMu/CRAB_UserFiles/crab_HI_ALCARECO/180928_053037/0000/step2_4.root',
'root://cmsxrootd.fnal.gov///store/user/xiaowang/HI_TkSingleMu/CRAB_UserFiles/crab_HI_ALCARECO/180928_053037/0000/step2_5.root',
]
process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(-1))
###################################################################
# Filter only events passing the ALCARECO sequence
###################################################################
import HLTrigger.HLTfilters.hltHighLevel_cfi
process.ALCARECOTkAlMuonIsolatedHLT = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone(
andOr = True, ## choose logical OR between Triggerbits
TriggerResultsTag = cms.InputTag( 'TriggerResults', '', 'RECO' ),
HLTPaths = ['pathALCARECOTkAlMuonIsolated'],
throw = False # tolerate triggers stated above, but not available
)
process.path = cms.Path(process.ALCARECOTkAlMuonIsolatedHLT)
##
## configure the event selection
##
EventSelection = cms.PSet(
SelectEvents = cms.untracked.PSet(
SelectEvents = cms.vstring('path')
)
)
##
## configure output module
##
process.out = cms.OutputModule("PoolOutputModule",
## Parameters directly for PoolOutputModule
fileName = cms.untracked.string("file:step2.root"),
# Maximum size per file before a new one is created
maxSize = cms.untracked.int32(350000),
dropMetaData = cms.untracked.string("DROPPED"),
## Parameters for inherited OutputModule
SelectEvents = EventSelection.SelectEvents,
outputCommands = cms.untracked.vstring('keep *')
)
##
## Outpath
##
process.outpath = cms.EndPath(process.out)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.