Created
September 30, 2018 10:45
-
-
Save mmusich/5e5c4576d295ce472d67b429c44f2c2e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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