Skip to content

Commit 4f8d1ea

Browse files
authored
Merge pull request #48386 from flodamas/MuonSkimForIon_151X
Muon skims for the 2025 light-ion runs
2 parents f1e5d11 + 06c85a6 commit 4f8d1ea

File tree

8 files changed

+118
-5
lines changed

8 files changed

+118
-5
lines changed

Configuration/Applications/python/ConfigBuilder.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,10 +1909,16 @@ def prepare_SKIM(self, stepSpec = "all"):
19091909
print("replacing %s process name - step SKIM:%s will use '%s'" % (stdHLTProcName, sequence, newHLTProcName))
19101910

19111911
## support @Mu+DiJet+@Electron configuration via autoSkim.py
1912-
from Configuration.Skimming.autoSkim import autoSkim
1912+
from Configuration.Skimming.autoSkim import autoSkim, autoSkimRunI
19131913
skimlist = sequence.split('+')
19141914
self.expandMapping(skimlist,autoSkim)
19151915

1916+
autoSkimRunIList = list(set(
1917+
item
1918+
for v in autoSkimRunI.values()
1919+
for item in v.split('+')
1920+
))
1921+
19161922
#print("dictionary for skims:", skimConfig.__dict__)
19171923
for skim in skimConfig.__dict__:
19181924
skimstream = getattr(skimConfig, skim)
@@ -1931,6 +1937,10 @@ def prepare_SKIM(self, stepSpec = "all"):
19311937
shortname = skim.replace('SKIMStream','')
19321938
if (sequence=="all"):
19331939
self.addExtraStream(skim,skimstream)
1940+
elif (sequence=="allRun1"):
1941+
if not shortname in autoSkimRunIList:
1942+
continue
1943+
self.addExtraStream(skim,skimstream)
19341944
elif (shortname in skimlist):
19351945
self.addExtraStream(skim,skimstream)
19361946
#add a DQM eventcontent for this guy
@@ -1948,7 +1958,7 @@ def prepare_SKIM(self, stepSpec = "all"):
19481958
for i in range(skimlist.count(shortname)):
19491959
skimlist.remove(shortname)
19501960

1951-
if (skimlist.__len__()!=0 and sequence!="all"):
1961+
if (skimlist.__len__()!=0 and sequence!="all" and sequence!="allRun1"):
19521962
print('WARNING, possible typo with SKIM:'+'+'.join(skimlist))
19531963
raise Exception('WARNING, possible typo with SKIM:'+'+'.join(skimlist))
19541964

Configuration/PyReleaseValidation/python/relval_production.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# the name of step1 will be used
1010

1111
## data production test
12-
workflows[1000] = [ '',['RunMinBias2011A','TIER0','SKIMD','HARVESTDfst2','ALCASPLIT']]
12+
workflows[1000] = [ '',['RunMinBias2011A','TIER0','SKIMDRun1','HARVESTDfst2','ALCASPLIT']]
1313
workflows[1001] = [ '',['RunMinBias2011A','TIER0EXP','ALCAEXP','ALCAHARVDSIPIXELCALRUN1','ALCAHARVD1','ALCAHARVD2','ALCAHARVD3','ALCAHARVD4','ALCAHARVD5','ALCAHARVD7','ALCAHARVD8']]
1414
workflows[1001.2] = [ '',['RunZeroBias2017F','TIER0EXPRUN2','ALCAEXPRUN2','ALCAHARVDSIPIXELCAL','ALCAHARVDSIPIXELCALLA','ALCAHARVD4','ALCAHARVDSIPIXELALIHG']]
1515
workflows[1001.3] = [ '',['RunSingleMuon2022B','TIER0EXPRUN3','ALCAEXPRUN3','ALCAHARVDEXPRUN3']]

Configuration/PyReleaseValidation/python/relval_standard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@
573573
### run3-2025 (2025 HI OXY data)
574574
workflows[143.911] = ['',['RunUPC2024','RECODR3_2025_OXY','HARVESTDPROMPTR3']]
575575
workflows[143.912] = ['',['RunUPC2024','RECODR3_2025_UPC_OXY','HARVESTDPROMPTR3']]
576-
576+
workflows[143.921] = ['',['RunUPC2024','RECODR3_2025_OXY_SKIMIONPHYSICS0','HARVESTDPROMPTR3']]
577577

578578
## Lumi mask fixed 2024 wfs
579579
base_wf = 145.0

Configuration/PyReleaseValidation/python/relval_steps.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@
640640
Run2023UPC={375463: [[52,52]]}
641641
steps['RunUPC2023']={'INPUT':InputInfo(dataSet='/HIForward1/HIRun2023A-v1/RAW',label='upc2023',events=10000,location='STD',ls=Run2023UPC)}
642642

643-
Run2024UPC={388784: [[344,344]]}
643+
Run2024UPC={388784: [[406,406]]}
644644
steps['RunUPC2024']={'INPUT':InputInfo(dataSet='/HIForward0/HIRun2024B-v1/RAW',label='upc2024',events=10000,location='STD',ls=Run2024UPC)}
645645

646646
RunHI2023={375491: [[100, 100]]}
@@ -2903,6 +2903,7 @@ def lhegensim2018ml(fragment,howMuch):
29032903
steps['RECODR3_2025_UPC']=merge([{'--era':'Run3_2025_UPC'},steps['RECODR3_2025_HIN']])
29042904
steps['RECODR3_2025_OXY']=merge([{'--era':'Run3_2025_OXY'},steps['RECODR3_2025_HIN']])
29052905
steps['RECODR3_2025_UPC_OXY']=merge([{'--era':'Run3_2025_UPC_OXY'},steps['RECODR3_2025_HIN']])
2906+
steps['RECODR3_2025_OXY_SKIMIONPHYSICS0']=merge([{'--era':'Run3_2025_OXY', '-s':'RAW2DIGI,L1Reco,RECO,SKIM:%s,PAT,DQM:@commonFakeHLT+@standardDQMFakeHLT'%(autoSkim['IonPhysics0'])},steps['RECODR3_2025_HIN']])
29062907

29072908
steps['RECODR3Splash']=merge([{'-n': 2,
29082909
'-s': 'RAW2DIGI,L1Reco,RECO,PAT,ALCA:SiStripCalZeroBias+SiStripCalMinBias+TkAlMinBias+EcalESAlign,DQM:@standardDQMFakeHLT+@miniAODDQM'
@@ -4417,6 +4418,13 @@ def gen2024HiMix(fragment,howMuch):
44174418

44184419
steps['SKIMDreHLT'] = merge([ {'--conditions':'auto:run1_data_%s'%menu, '--hltProcess':'reHLT', '--filein':'file:step3.root'}, steps['SKIMD'] ])
44194420

4421+
steps['SKIMDRun1']={'-s':'SKIM:allRun1',
4422+
'--conditions':'auto:run1_data',
4423+
'--data':'',
4424+
'--scenario':'pp',
4425+
'--filein':'file:step2.root',
4426+
'--secondfilein':'filelist:step1_dasquery.log'}
4427+
44204428
steps['SKIMCOSD']={'-s':'SKIM:all',
44214429
'--conditions':'auto:run1_data',
44224430
'--data':'',
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import FWCore.ParameterSet.Config as cms
2+
3+
# single high-pT muon skim sequence
4+
5+
HighPtMuonSelection = "(isTrackerMuon || isGlobalMuon) && abs(eta) <= 2.4 && pt > 10."
6+
7+
highPtMuonSelectorForMuonIon = cms.EDFilter("PATMuonRefSelector",
8+
src = cms.InputTag("slimmedMuons"),
9+
cut = cms.string(HighPtMuonSelection),
10+
filter = cms.bool(True)
11+
)
12+
13+
highPtMuonCountFilterForMuonIon = cms.EDFilter("MuonRefPatCount",
14+
src = cms.InputTag("slimmedMuons"),
15+
cut = cms.string(HighPtMuonSelection),
16+
minNumber = cms.uint32(1)
17+
)
18+
19+
HighPtMuonIonSkimSequence = cms.Sequence(
20+
highPtMuonSelectorForMuonIon *
21+
highPtMuonCountFilterForMuonIon
22+
)
23+
24+
25+
# loose dimuon skim sequence
26+
27+
LooseMuonSelection = "(isTrackerMuon || isGlobalMuon) && ((abs(eta) <= 1.0 && pt > 3.3) || (1.0 < abs(eta) <= 2.4 && pt > 1.0))"
28+
29+
looseMuonSelectorForMuonIon = cms.EDFilter("PATMuonRefSelector",
30+
src = cms.InputTag("slimmedMuons"),
31+
cut = cms.string(LooseMuonSelection),
32+
filter = cms.bool(True)
33+
)
34+
35+
looseMuonCountFilterForMuonIon = cms.EDFilter("MuonRefPatCount",
36+
src = cms.InputTag("slimmedMuons"),
37+
cut = cms.string(LooseMuonSelection),
38+
minNumber = cms.uint32(2)
39+
)
40+
41+
42+
dimuonMassCutForMuonIon = cms.EDProducer("CandViewShallowCloneCombiner",
43+
checkCharge = cms.bool(False),
44+
cut = cms.string("mass > 2.4"),
45+
decay = cms.string("looseMuonSelectorForMuonIon looseMuonSelectorForMuonIon")
46+
)
47+
48+
dimuonCountFilterForMuonIon = cms.EDFilter("CandViewCountFilter",
49+
src = cms.InputTag("dimuonMassCutForMuonIon"),
50+
minNumber = cms.uint32(1)
51+
)
52+
53+
# dimuon skim sequence
54+
DimuonIonSkimSequence = cms.Sequence(
55+
looseMuonSelectorForMuonIon *
56+
looseMuonCountFilterForMuonIon *
57+
dimuonMassCutForMuonIon *
58+
dimuonCountFilterForMuonIon
59+
)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import FWCore.ParameterSet.Config as cms
2+
3+
from Configuration.EventContent.EventContent_cff import MINIAODEventContent
4+
5+
skimMINIAODEventContent = MINIAODEventContent.clone()
6+
skimMINIAODEventContent.outputCommands.append("drop *_MEtoEDMConverter_*_*")
7+
skimMINIAODEventContent.outputCommands.append("drop *_*_*_SKIM")
8+
9+
from Configuration.Skimming.Ion_MuonSkim_cff import *
10+
11+
HighPtMuonIonSkimPath = cms.Path( HighPtMuonIonSkimSequence )
12+
SKIMStreamIonHighPtMuon = cms.FilteredStream(
13+
responsible = 'HI PAG',
14+
name = 'IonHighPtMuon',
15+
paths = (HighPtMuonIonSkimPath),
16+
content = skimMINIAODEventContent.outputCommands+['drop *_slimmedJetsPuppi_*_*', 'drop *_slimmedOOTPhotons_*_*', 'drop *_slimmedTaus_*_*', 'drop *_slimmedTausBoosted_*_*', 'drop recoDeDxHitInfos_dedxEstimator_*_*'],
17+
selectEvents = cms.untracked.PSet(),
18+
dataTier = cms.untracked.string('USER')
19+
)
20+
21+
DimuonIonSkimPath = cms.Path( DimuonIonSkimSequence )
22+
SKIMStreamIonDimuon = cms.FilteredStream(
23+
responsible = 'HI PAG',
24+
name = 'IonDimuon',
25+
paths = (DimuonIonSkimPath),
26+
content = skimMINIAODEventContent.outputCommands+['drop *_slimmedJetsPuppi_*_*', 'drop *_slimmedJetsAK8_*_*', 'drop *_slimmedOOTPhotons_*_*', 'drop *_slimmedTaus_*_*', 'drop *_slimmedTausBoosted_*_*', 'drop *_dedxEstimator_*_*', 'keep recoDeDxDataedmValueMap_dedxEstimator_dedxAllLikelihood_*'],
27+
selectEvents = cms.untracked.PSet(),
28+
dataTier = cms.untracked.string('USER')
29+
)
30+
31+
#####################

Configuration/Skimming/python/autoSkim.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
#'SingleMuon': 'LogError+LogErrorMonitor',
4141
}
4242

43+
# For 2025 Ion skims
44+
for i_split in range(60):
45+
autoSkim[f'IonPhysics{i_split}'] = 'IonHighPtMuon+IonDimuon+LogError+LogErrorMonitor'
46+
4347
# For 2024 PbPb skims
4448
for i_split in range(20):
4549
autoSkim[f'HIForward{i_split}'] = 'UPCMonopole+LogError+LogErrorMonitor'

Configuration/StandardSequences/python/Skims_cff.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ def getSkimDataTier(skimname):
4949
from Configuration.Skimming.Skims_PDWG_cff import *
5050
from Configuration.Skimming.Skims_PA_cff import *
5151
from Configuration.Skimming.Skims_PbPb_cff import *
52+
from Configuration.Skimming.Skims_Ion_cff import *

0 commit comments

Comments
 (0)