diff --git a/Configuration/Applications/python/ConfigBuilder.py b/Configuration/Applications/python/ConfigBuilder.py index ee88eae5b9749..f49b314c86f1f 100644 --- a/Configuration/Applications/python/ConfigBuilder.py +++ b/Configuration/Applications/python/ConfigBuilder.py @@ -1808,10 +1808,16 @@ def prepare_SKIM(self, stepSpec = "all"): print("replacing %s process name - step SKIM:%s will use '%s'" % (stdHLTProcName, sequence, newHLTProcName)) ## support @Mu+DiJet+@Electron configuration via autoSkim.py - from Configuration.Skimming.autoSkim import autoSkim + from Configuration.Skimming.autoSkim import autoSkim, autoSkimRunI skimlist = sequence.split('+') self.expandMapping(skimlist,autoSkim) + autoSkimRunIList = list(set( + item + for v in autoSkimRunI.values() + for item in v.split('+') + )) + #print("dictionary for skims:", skimConfig.__dict__) for skim in skimConfig.__dict__: skimstream = getattr(skimConfig, skim) @@ -1830,6 +1836,10 @@ def prepare_SKIM(self, stepSpec = "all"): shortname = skim.replace('SKIMStream','') if (sequence=="all"): self.addExtraStream(skim,skimstream) + elif (sequence=="allRun1"): + if not shortname in autoSkimRunIList: + continue + self.addExtraStream(skim,skimstream) elif (shortname in skimlist): self.addExtraStream(skim,skimstream) #add a DQM eventcontent for this guy @@ -1847,7 +1857,7 @@ def prepare_SKIM(self, stepSpec = "all"): for i in range(skimlist.count(shortname)): skimlist.remove(shortname) - if (skimlist.__len__()!=0 and sequence!="all"): + if (skimlist.__len__()!=0 and sequence!="all" and sequence!="allRun1"): print('WARNING, possible typo with SKIM:'+'+'.join(skimlist)) raise Exception('WARNING, possible typo with SKIM:'+'+'.join(skimlist)) diff --git a/Configuration/PyReleaseValidation/python/relval_production.py b/Configuration/PyReleaseValidation/python/relval_production.py index 6b97967eea083..38e8b02f4cada 100644 --- a/Configuration/PyReleaseValidation/python/relval_production.py +++ b/Configuration/PyReleaseValidation/python/relval_production.py @@ -9,7 +9,7 @@ # the name of step1 will be used ## data production test -workflows[1000] = [ '',['RunMinBias2011A','TIER0','SKIMD','HARVESTDfst2','ALCASPLIT']] +workflows[1000] = [ '',['RunMinBias2011A','TIER0','SKIMDRun1','HARVESTDfst2','ALCASPLIT']] workflows[1001] = [ '',['RunMinBias2011A','TIER0EXP','ALCAEXP','ALCAHARVDSIPIXELCALRUN1','ALCAHARVD1','ALCAHARVD2','ALCAHARVD3','ALCAHARVD4','ALCAHARVD5','ALCAHARVD7','ALCAHARVD8']] workflows[1001.2] = [ '',['RunZeroBias2017F','TIER0EXPRUN2','ALCAEXPRUN2','ALCAHARVDSIPIXELCAL','ALCAHARVDSIPIXELCALLA','ALCAHARVD4','ALCAHARVDSIPIXELALIHG']] workflows[1001.3] = [ '',['RunSingleMuon2022B','TIER0EXPRUN3','ALCAEXPRUN3','ALCAHARVDEXPRUN3']] diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 0e6aae5c3654d..94ad758b249be 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -3878,6 +3878,13 @@ def gen2023HiMix(fragment,howMuch): steps['SKIMDreHLT'] = merge([ {'--conditions':'auto:run1_data_%s'%menu, '--hltProcess':'reHLT', '--filein':'file:step3.root'}, steps['SKIMD'] ]) +steps['SKIMDRun1']={'-s':'SKIM:allRun1', + '--conditions':'auto:run1_data', + '--data':'', + '--scenario':'pp', + '--filein':'file:step2.root', + '--secondfilein':'filelist:step1_dasquery.log'} + steps['SKIMCOSD']={'-s':'SKIM:all', '--conditions':'auto:run1_data', '--data':'', diff --git a/Configuration/Skimming/python/PbPb_EWSkim_cff.py b/Configuration/Skimming/python/PbPb_EWSkim_cff.py new file mode 100644 index 0000000000000..4caa5a817c5e2 --- /dev/null +++ b/Configuration/Skimming/python/PbPb_EWSkim_cff.py @@ -0,0 +1,41 @@ +import FWCore.ParameterSet.Config as cms + +# primary vertex filter +primaryVertexFilterForPbPbEWSkim = cms.EDFilter("VertexSelector", + src = cms.InputTag("offlinePrimaryVertices"), + cut = cms.string("!isFake && abs(z) <= 25 && position.Rho <= 2"), + filter = cms.bool(True), +) + +# lepton filter +goodMuonsForPbPbEWSkim = cms.EDFilter("PATMuonSelector", + src = cms.InputTag("slimmedMuons"), + cut = cms.string("pt >= 15.0 && passed('CutBasedIdLoose')") +) +goodElectronsForPbPbEWSkim = cms.EDFilter("PATElectronSelector", + src = cms.InputTag("slimmedElectrons"), + cut = cms.string("pt >= 15.0") +) +oneLeptonForPbPbEWSkim = cms.EDFilter("PATLeptonCountFilter", + electronSource = cms.InputTag("goodElectronsForPbPbEWSkim"), + muonSource = cms.InputTag("goodMuonsForPbPbEWSkim"), + tauSource = cms.InputTag(""), + countElectrons = cms.bool(True), + countMuons = cms.bool(True), + countTaus = cms.bool(False), + minNumber = cms.uint32(1), + maxNumber = cms.uint32(1000000), +) + +# skim sequence +EWSkimSequence = cms.Sequence( + primaryVertexFilterForPbPbEWSkim * + goodMuonsForPbPbEWSkim * + goodElectronsForPbPbEWSkim * + oneLeptonForPbPbEWSkim +) + +# skim content +from Configuration.EventContent.EventContent_cff import MINIAODEventContent +EWSkimContent = MINIAODEventContent.clone() +EWSkimContent.outputCommands.append("drop *_*_*_SKIM") diff --git a/Configuration/Skimming/python/Skims_PbPb_cff.py b/Configuration/Skimming/python/Skims_PbPb_cff.py index d873b2ce0fdc5..ee8b4b6946d41 100644 --- a/Configuration/Skimming/python/Skims_PbPb_cff.py +++ b/Configuration/Skimming/python/Skims_PbPb_cff.py @@ -63,3 +63,16 @@ ) ##################### + +from Configuration.Skimming.PbPb_EWSkim_cff import * +EWSkimPathPbPb = cms.Path( EWSkimSequence ) +SKIMStreamPbPbEW = cms.FilteredStream( + responsible = 'HI PAG', + name = 'PbPbEW', + paths = (EWSkimPathPbPb), + content = EWSkimContent.outputCommands, + selectEvents = cms.untracked.PSet(), + dataTier = cms.untracked.string('MINIAOD') + ) + +##################### diff --git a/Configuration/Skimming/python/autoSkim.py b/Configuration/Skimming/python/autoSkim.py index 06aa87197e2f8..e9b5528f17922 100644 --- a/Configuration/Skimming/python/autoSkim.py +++ b/Configuration/Skimming/python/autoSkim.py @@ -47,7 +47,7 @@ # For 2023 PbPb skims for i_split in range(32): - autoSkim[f'HIPhysicsRawPrime{i_split}'] = 'PbPbEMu+PbPbZEE+PbPbZMM+LogError+LogErrorMonitor' + autoSkim[f'HIPhysicsRawPrime{i_split}'] = 'PbPbEW' autoSkimRunII = { 'BTagCSV' : 'LogError+LogErrorMonitor',