File indexing completed on 2024-06-13 03:23:30
0001
0002 from Configuration.PyReleaseValidation.relval_steps import *
0003
0004
0005 workflows = Matrix()
0006
0007
0008
0009
0010
0011 def makeStepNameSim(key,frag,step,suffix):
0012 return frag+'_'+key+'_'+step+suffix
0013
0014 def makeStepName(key,frag,step,suffix):
0015 return step+suffix+'_'+key
0016
0017
0018
0019
0020 def notForGenOnly(key,specialType):
0021 return "GenOnly" in key and specialType != 'baseline'
0022
0023 for year in upgradeKeys:
0024 for i,key in enumerate(upgradeKeys[year]):
0025 numWF=numWFAll[year][i]
0026 for frag,info in upgradeFragments.items():
0027
0028 if ("CE_E" in frag or "CE_H" in frag) and year==2017:
0029 numWF += 1
0030 continue
0031 stepList={}
0032 for specialType in upgradeWFs.keys():
0033 if notForGenOnly(key,specialType):
0034 continue
0035 stepList[specialType] = []
0036 hasHarvest = False
0037 for step in upgradeProperties[year][key]['ScenToRun']:
0038 stepMaker = makeStepName
0039 if 'Sim' in step and 'Fast' not in step and step != "Sim":
0040 if 'HLBeamSpot' in step:
0041 if '14TeV' in frag:
0042 step = 'GenSimHLBeamSpot14'
0043 if 'CloseByParticle' in frag or 'CE_E' in frag or 'CE_H' in frag:
0044 step = 'GenSimHLBeamSpotHGCALCloseBy'
0045 stepMaker = makeStepNameSim
0046 elif 'Gen' in step:
0047 stepMaker = makeStepNameSim
0048
0049 if 'HARVEST' in step: hasHarvest = True
0050
0051 for specialType,specialWF in upgradeWFs.items():
0052
0053 if notForGenOnly(key,specialType):
0054 continue
0055
0056 if (specialType != 'baseline') and ( ('PU' in step and step.replace('PU','') in specialWF.PU) or (step in specialWF.steps) ):
0057 stepList[specialType].append(stepMaker(key,frag[:-4],step,specialWF.suffix))
0058
0059 if 'ProdLike' in specialType:
0060 if 'Reco' in step:
0061 stepWoFakeHLT = step.replace('FakeHLT','')
0062 stepList[specialType].append(stepMaker(key,frag[:-4],stepWoFakeHLT.replace('RecoGlobal','MiniAOD').replace('RecoNano','MiniAOD').replace('Reco','MiniAOD'),specialWF.suffix))
0063 if 'RecoNano' in stepWoFakeHLT:
0064 stepList[specialType].append(stepMaker(key,frag[:-4],stepWoFakeHLT.replace('RecoNano','Nano'),specialWF.suffix))
0065
0066 if 'HLT75e33' in specialType:
0067 if 'RecoGlobal' in step:
0068 stepList[specialType].append(stepMaker(key,frag[:-4],step.replace('RecoGlobal','HLT75e33'),specialWF.suffix))
0069
0070 if 'PMX' in specialType:
0071 if 'GenSim' in step:
0072 s = step.replace('GenSim','Premix')+'PU'
0073 if step in specialWF.PU:
0074 stepMade = stepMaker(key,'PREMIX',s,specialWF.suffix)
0075
0076 if 'S2' in specialType: stepList[specialType].append(stepMade)
0077
0078 else: stepList[specialType][-1] = stepMade
0079 else:
0080 stepList[specialType].append(stepMaker(key,frag[:-4],step,''))
0081
0082 for specialType,specialWF in upgradeWFs.items():
0083
0084 if notForGenOnly(key,specialType):
0085 continue
0086 if specialType=="PMXS1":
0087 stepList[specialType] = stepList[specialType][:1]
0088 specialWF.workflow(workflows, numWF, info.dataset, stepList[specialType], key, hasHarvest)
0089
0090 numWF+=1