Skip to content

Commit

Permalink
Merge pull request #35776 from slava77/CMSSW_12_1_X_2021-10-21-1100/t…
Browse files Browse the repository at this point in the history
…estSplash21-wf

add basic data run3 reco and apply to splash events as a wf 138.3; fix tools for simple lumi list
  • Loading branch information
cmsbuild authored Oct 27, 2021
2 parents e07029d + 1a3ffb2 commit 24176c0
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 5 deletions.
6 changes: 5 additions & 1 deletion Configuration/PyReleaseValidation/python/MatrixUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,11 @@ def lumis(self):
if self.ls:
for run in self.ls.keys():
run_lumis = []
for rng in self.ls[run]: run_lumis.append(str(rng[0])+","+str(rng[1]))
for rng in self.ls[run]:
if isinstance(rng, int):
run_lumis.append(str(rng))
else:
run_lumis.append(str(rng[0])+","+str(rng[1]))
query_lumis.append(":".join(run_lumis))
return query_lumis

Expand Down
2 changes: 2 additions & 0 deletions Configuration/PyReleaseValidation/python/relval_standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,8 @@
### LS2 - MWGR ###
workflows[138.1] = ['',['RunCosmics2021','RECOCOSDPROMPTRUN3','ALCACOSDPROMPTRUN3','HARVESTDCPROMPTRUN3']]
workflows[138.2] = ['',['RunCosmics2021','RECOCOSDEXPRUN3','ALCACOSDEXPRUN3','HARVESTDCEXPRUN3']]
### 2021 Splash events
workflows[138.3] = ['',['RunMinimumBias2021Splash','RECODR3Splash','HARVESTDR3']]

#### Test of lumi section boundary crossing with run2 2018D ####
workflows[136.8861] = ['',['RunEGamma2018Dml1','HLTDR2_2018ml','RECODR2_2018reHLT_skimEGamma_Prompt_L1TEgDQM','HARVEST2018_L1TEgDQM_Prompt']]
Expand Down
12 changes: 12 additions & 0 deletions Configuration/PyReleaseValidation/python/relval_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,11 @@
##Run 344518 @ 0T 2021CRUZET
steps['RunCosmics2021CRUZET']={'INPUT':InputInfo(dataSet='/Cosmics/Commissioning2021-v1/RAW',label='2021CRUZET',run=[344518],events=100000,location='STD')}

#### run3 Splash ####
##Run 345881
steps['RunMinimumBias2021Splash']={'INPUT':InputInfo(dataSet='/MinimumBias/Commissioning2021-v1/RAW',label='2021Splash',ls={345881: [782, 790, 796, 801, 1031, 1037]},events=100000,location='STD')}


#### Test of lumi section boundary crossing with run2 2018D ####
Run2018Dml1={320822: [[1,1]] , 320823: [[1,1]]}
Run2018Dml2={320822: [[1,2]]}
Expand Down Expand Up @@ -1904,6 +1909,9 @@ def lhegensim2018ml(fragment,howMuch):
steps['RECODR2_2016']=merge([{'--scenario':'pp','--conditions':'auto:run2_data_relval','--era':'Run2_2016','--customise':'Configuration/DataProcessing/RecoTLR.customisePostEra_Run2_2016'},dataReco])
steps['RECODR2_2017']=merge([{'--scenario':'pp','--conditions':'auto:run2_data_relval','--era':'Run2_2017','--customise':'Configuration/DataProcessing/RecoTLR.customisePostEra_Run2_2017'},dataReco])
steps['RECODR2_2018']=merge([{'--scenario':'pp','--conditions':'auto:run2_data_relval','--era':'Run2_2018','--customise':'Configuration/DataProcessing/RecoTLR.customisePostEra_Run2_2018'},dataReco])
#Run 3
steps['RECODR3']=merge([{'--scenario':'pp','--conditions':'auto:run3_data_prompt','--era':'Run3','--customise':'Configuration/DataProcessing/RecoTLR.customisePostEra_Run3'},dataReco])
steps['RECODR3Splash']=merge([{'-n': 2},steps['RECODR3']])

steps['RECODR2AlCaEle']=merge([{'--scenario':'pp','--conditions':'auto:run2_data_relval','--customise':'Configuration/DataProcessing/RecoTLR.customisePromptRun2',},dataRecoAlCaCalo])

Expand Down Expand Up @@ -2803,6 +2811,10 @@ def gen2021HiMix(fragment,howMuch):
'--filein':"file:step6_inDQM.root,file:step3_inDQM.root",
}, steps['HARVEST2018_L1TEgDQM'] ])


#RUN3
steps['HARVESTDR3'] = merge([ {'--conditions':'auto:run3_data_prompt','--era':'Run3'}, steps['HARVESTD'] ])

steps['DQMHLTonAOD_2017']={
'-s':'DQM:offlineHLTSourceOnAOD', ### DQM-only workflow on AOD input: for HLT
'--conditions':'auto:run2_data',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@

def match_in(sub_list,lumi_list):
for i in range(int(sub_list[0]),int(sub_list[1])+1):
if i >= int(lumi_list[0]) and i <= int(lumi_list[1]): return True
if len(lumi_list) == 1:
if i == int(lumi_list[0]): return True
else:
if i >= int(lumi_list[0]) and i <= int(lumi_list[1]): return True
return False

def check_lumi_ranges(given_lumi_list , sub_range):
Expand Down
12 changes: 9 additions & 3 deletions FWCore/PythonUtilities/python/LumiList.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,13 @@ def __init__(self, filename = None, lumis = None, runsAndLumis = None, runs = No
newLumis = []
for lumi in sorted(self.compactList[run]):
# If the next lumi starts inside or just after the last just change the endpoint of the first
if newLumis and newLumis[-1][0] <= lumi[0] <= newLumis[-1][1] + 1:
newLumis[-1][1] = max(newLumis[-1][1], lumi[1])
else:
if isinstance(lumi, int):
newLumis.append(lumi)
else:
if newLumis and newLumis[-1][0] <= lumi[0] <= newLumis[-1][1] + 1:
newLumis[-1][1] = max(newLumis[-1][1], lumi[1])
else:
newLumis.append(lumi)
self.compactList[run] = newLumis

def __sub__(self, other): # Things from self not in other
Expand Down Expand Up @@ -272,6 +275,9 @@ def _getLumiParts(self):
for run in runs:
lumis = self.compactList[run]
for lumiPair in sorted(lumis):
if isinstance(lumiPair, int):
parts.append(str("%s:%s" % (run, lumiPair)))
continue
if lumiPair[0] == lumiPair[1]:
parts.append(str("%s:%s" % (run, lumiPair[0])))
else:
Expand Down

0 comments on commit 24176c0

Please sign in to comment.