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 1512 of file upgradeWorkflowComponents.py.

Member Function Documentation

◆ condition()

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

Definition at line 1569 of file upgradeWorkflowComponents.py.

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

1569  def condition(self, fragment, stepList, key, hasHarvest):
1570  if not 'PU' in key:
1571  return False
1572  if not any(y in key for y in ['2021', '2023', '2024', '2026']):
1573  return False
1574  if self.suffix.endswith("S1"):
1575  return "NuGun" in fragment
1576  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 1513 of file upgradeWorkflowComponents.py.

1513  def setup_(self, step, stepName, stepDict, k, properties):
1514  # just copy steps
1515  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 1516 of file upgradeWorkflowComponents.py.

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

1516  def setupPU_(self, step, stepName, stepDict, k, properties):
1517  # setup for stage 1
1518  if "GenSim" in stepName:
1519  stepNamePmx = stepName.replace('GenSim','Premix')
1520  if not stepNamePmx in stepDict: stepDict[stepNamePmx] = {}
1521  stepDict[stepNamePmx][k] = merge([
1522  {
1523  '-s': 'GEN,SIM,DIGI:pdigi_valid',
1524  '--datatier': 'PREMIX',
1525  '--eventcontent': 'PREMIX',
1526  '--procModifiers': 'premix_stage1'
1527  },
1528  stepDict[stepName][k]
1529  ])
1530  if "ProdLike" in self.suffix:
1531  stepDict[stepNamePmx][k] = merge([{'-s': 'GEN,SIM,DIGI'},stepDict[stepNamePmx][k]])
1532  # setup for stage 2
1533  elif "Digi" in step or "Reco" in step:
1534  # go back to non-PU step version
1535  d = merge([stepDict[self.getStepName(step)][k]])
1536  if d is None: return
1537  if "Digi" in step:
1538  tmpsteps = []
1539  for s in d["-s"].split(","):
1540  if s == "DIGI" or "DIGI:" in s:
1541  tmpsteps.extend([s, "DATAMIX"])
1542  else:
1543  tmpsteps.append(s)
1544  d = merge([{"-s" : ",".join(tmpsteps),
1545  "--datamix" : "PreMix",
1546  "--procModifiers": "premix_stage2"},
1547  d])
1548  # for combined stage1+stage2
1549  if "_PMXS1S2" in self.suffix:
1550  d = merge([digiPremixLocalPileup, d])
1551  elif "Reco" in step:
1552  if "--procModifiers" in d:
1553  d["--procModifiers"] += ",premix_stage2"
1554  else:
1555  d["--procModifiers"] = "premix_stage2"
1556  stepDict[stepName][k] = d
1557  # Increase the input file step number by one for Nano in combined stage1+stage2
1558  elif "Nano"==step:
1559  # go back to non-PU step version
1560  d = merge([stepDict[self.getStepName(step)][k]])
1561  if "--filein" in d:
1562  filein = d["--filein"]
1563  m = re.search("step(?P<ind>\d+)_", filein)
1564  if m:
1565  d["--filein"] = filein.replace(m.group(), "step%d_"%(int(m.group("ind"))+1))
1566  stepDict[stepName][k] = d
1567  # run2/3 WFs use Nano (not NanoPU) in PU WF
1568  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 1577 of file upgradeWorkflowComponents.py.

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

1577  def workflow_(self, workflows, num, fragment, stepList, key):
1578  fragmentTmp = fragment
1579  if self.suffix.endswith("S1"):
1580  fragmentTmp = 'PREMIXUP' + key[2:].replace("PU", "").replace("Design", "") + '_PU25'
1581  super(UpgradeWorkflowPremix,self).workflow_(workflows, num, fragmentTmp, stepList, key)
1582 # Premix stage1
1583 upgradeWFs['PMXS1'] = UpgradeWorkflowPremix(
def replace(string, replacements)

Member Data Documentation

◆ offset

upgradeWorkflowComponents.UpgradeWorkflowPremix.offset
static

Definition at line 1592 of file upgradeWorkflowComponents.py.

◆ PU

upgradeWorkflowComponents.UpgradeWorkflowPremix.PU
static

Definition at line 1586 of file upgradeWorkflowComponents.py.

◆ steps

upgradeWorkflowComponents.UpgradeWorkflowPremix.steps
static

Definition at line 1584 of file upgradeWorkflowComponents.py.

◆ suffix

upgradeWorkflowComponents.UpgradeWorkflowPremix.suffix
static

Definition at line 1591 of file upgradeWorkflowComponents.py.