CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes
upgradeWorkflowComponents.UpgradeWorkflowPremix Class Reference
Inheritance diagram for upgradeWorkflowComponents.UpgradeWorkflowPremix:
upgradeWorkflowComponents.UpgradeWorkflow upgradeWorkflowComponents.UpgradeWorkflowAdjustPU upgradeWorkflowComponents.UpgradeWorkflowPremixProdLike

Public Member Functions

def condition (self, fragment, stepList, key, hasHarvest)
 
def setup_ (self, step, stepName, stepDict, k, properties)
 
def setupPU_ (self, step, stepName, stepDict, k, properties)
 
def workflow_ (self, workflows, num, fragment, stepList, key)
 
- Public Member Functions inherited from upgradeWorkflowComponents.UpgradeWorkflow
def __init__ (self, steps, PU, suffix, offset)
 
def condition (self, fragment, stepList, key, hasHarvest)
 
def getStepName (self, step, extra="")
 
def getStepNamePU (self, step, extra="")
 
def init (self, stepDict)
 
def preventReuse (self, stepName, stepDict, k)
 
def setup (self, stepDict, k, properties)
 
def setup_ (self, step, stepName, stepDict, k, properties)
 
def setupPU (self, stepDict, k, properties)
 
def setupPU_ (self, step, stepName, stepDict, k, properties)
 
def workflow (self, workflows, num, fragment, stepList, key, hasHarvest)
 
def workflow_ (self, workflows, num, fragment, stepList, key)
 

Static Public Attributes

 offset
 
 PU
 
 steps
 
 suffix
 

Additional Inherited Members

- Public Attributes inherited from upgradeWorkflowComponents.UpgradeWorkflow
 allowReuse
 
 offset
 
 PU
 
 steps
 
 suffix
 

Detailed Description

Definition at line 1648 of file upgradeWorkflowComponents.py.

Member Function Documentation

◆ condition()

def upgradeWorkflowComponents.UpgradeWorkflowPremix.condition (   self,
  fragment,
  stepList,
  key,
  hasHarvest 
)

Definition at line 1705 of file upgradeWorkflowComponents.py.

References any(), and upgradeWorkflowComponents.UpgradeWorkflow.suffix.

1705  def condition(self, fragment, stepList, key, hasHarvest):
1706  if not 'PU' in key:
1707  return False
1708  if not any(y in key for y in ['2021', '2023', '2024', '2026']):
1709  return False
1710  if self.suffix.endswith("S1"):
1711  return "NuGun" in fragment
1712  return True
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:37

◆ setup_()

def upgradeWorkflowComponents.UpgradeWorkflowPremix.setup_ (   self,
  step,
  stepName,
  stepDict,
  k,
  properties 
)

Definition at line 1649 of file upgradeWorkflowComponents.py.

1649  def setup_(self, step, stepName, stepDict, k, properties):
1650  # just copy steps
1651  stepDict[stepName][k] = merge([stepDict[step][k]])
Definition: merge.py:1

◆ setupPU_()

def upgradeWorkflowComponents.UpgradeWorkflowPremix.setupPU_ (   self,
  step,
  stepName,
  stepDict,
  k,
  properties 
)

Definition at line 1652 of file upgradeWorkflowComponents.py.

References upgradeWorkflowComponents.UpgradeWorkflow.getStepName(), createfilelist.int, join(), submitPVValidationJobs.split(), and upgradeWorkflowComponents.UpgradeWorkflow.suffix.

1652  def setupPU_(self, step, stepName, stepDict, k, properties):
1653  # setup for stage 1
1654  if "GenSim" in stepName:
1655  stepNamePmx = stepName.replace('GenSim','Premix')
1656  if not stepNamePmx in stepDict: stepDict[stepNamePmx] = {}
1657  stepDict[stepNamePmx][k] = merge([
1658  {
1659  '-s': 'GEN,SIM,DIGI:pdigi_valid',
1660  '--datatier': 'PREMIX',
1661  '--eventcontent': 'PREMIX',
1662  '--procModifiers': 'premix_stage1'
1663  },
1664  stepDict[stepName][k]
1665  ])
1666  if "ProdLike" in self.suffix:
1667  stepDict[stepNamePmx][k] = merge([{'-s': 'GEN,SIM,DIGI'},stepDict[stepNamePmx][k]])
1668  # setup for stage 2
1669  elif "Digi" in step or "Reco" in step:
1670  # go back to non-PU step version
1671  d = merge([stepDict[self.getStepName(step)][k]])
1672  if d is None: return
1673  if "Digi" in step:
1674  tmpsteps = []
1675  for s in d["-s"].split(","):
1676  if s == "DIGI" or "DIGI:" in s:
1677  tmpsteps.extend([s, "DATAMIX"])
1678  else:
1679  tmpsteps.append(s)
1680  d = merge([{"-s" : ",".join(tmpsteps),
1681  "--datamix" : "PreMix",
1682  "--procModifiers": "premix_stage2"},
1683  d])
1684  # for combined stage1+stage2
1685  if "_PMXS1S2" in self.suffix:
1686  d = merge([digiPremixLocalPileup, d])
1687  elif "Reco" in step:
1688  if "--procModifiers" in d:
1689  d["--procModifiers"] += ",premix_stage2"
1690  else:
1691  d["--procModifiers"] = "premix_stage2"
1692  stepDict[stepName][k] = d
1693  # Increase the input file step number by one for Nano in combined stage1+stage2
1694  elif "Nano"==step:
1695  # go back to non-PU step version
1696  d = merge([stepDict[self.getStepName(step)][k]])
1697  if "--filein" in d:
1698  filein = d["--filein"]
1699  m = re.search("step(?P<ind>\d+)_", filein)
1700  if m:
1701  d["--filein"] = filein.replace(m.group(), "step%d_"%(int(m.group("ind"))+1))
1702  stepDict[stepName][k] = d
1703  # run2/3 WFs use Nano (not NanoPU) in PU WF
1704  stepDict[self.getStepName(step)][k] = merge([d])
Definition: merge.py:1
static std::string join(char **cmd)
Definition: RemoteFile.cc:19

◆ workflow_()

def upgradeWorkflowComponents.UpgradeWorkflowPremix.workflow_ (   self,
  workflows,
  num,
  fragment,
  stepList,
  key 
)

Definition at line 1713 of file upgradeWorkflowComponents.py.

References python.rootplot.root2matplotlib.replace(), and upgradeWorkflowComponents.UpgradeWorkflow.suffix.

1713  def workflow_(self, workflows, num, fragment, stepList, key):
1714  fragmentTmp = fragment
1715  if self.suffix.endswith("S1"):
1716  fragmentTmp = 'PREMIXUP' + key[2:].replace("PU", "").replace("Design", "") + '_PU25'
1717  super(UpgradeWorkflowPremix,self).workflow_(workflows, num, fragmentTmp, stepList, key)
1718 # Premix stage1
1719 upgradeWFs['PMXS1'] = UpgradeWorkflowPremix(
def replace(string, replacements)

Member Data Documentation

◆ offset

upgradeWorkflowComponents.UpgradeWorkflowPremix.offset
static

Definition at line 1728 of file upgradeWorkflowComponents.py.

◆ PU

upgradeWorkflowComponents.UpgradeWorkflowPremix.PU
static

Definition at line 1722 of file upgradeWorkflowComponents.py.

◆ steps

upgradeWorkflowComponents.UpgradeWorkflowPremix.steps
static

Definition at line 1720 of file upgradeWorkflowComponents.py.

◆ suffix

upgradeWorkflowComponents.UpgradeWorkflowPremix.suffix
static

Definition at line 1727 of file upgradeWorkflowComponents.py.