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

Member Function Documentation

◆ condition()

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

Definition at line 2387 of file upgradeWorkflowComponents.py.

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

2387  def condition(self, fragment, stepList, key, hasHarvest):
2388  if not 'PU' in key:
2389  return False
2390  if not any(y in key for y in ['2021', '2023', '2024', '2026']):
2391  return False
2392  if self.suffix.endswith("S1"):
2393  return "NuGun" in fragment
2394  return True
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:36

◆ setup_()

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

Definition at line 2331 of file upgradeWorkflowComponents.py.

2331  def setup_(self, step, stepName, stepDict, k, properties):
2332  # just copy steps
2333  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 2334 of file upgradeWorkflowComponents.py.

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

2334  def setupPU_(self, step, stepName, stepDict, k, properties):
2335  # setup for stage 1
2336  if "GenSim" in stepName:
2337  stepNamePmx = stepName.replace('GenSim','Premix')
2338  if not stepNamePmx in stepDict: stepDict[stepNamePmx] = {}
2339  stepDict[stepNamePmx][k] = merge([
2340  {
2341  '-s': 'GEN,SIM,DIGI:pdigi_valid',
2342  '--datatier': 'PREMIX',
2343  '--eventcontent': 'PREMIX',
2344  '--procModifiers': 'premix_stage1'
2345  },
2346  stepDict[stepName][k]
2347  ])
2348  if "ProdLike" in self.suffix:
2349  stepDict[stepNamePmx][k] = merge([{'-s': 'GEN,SIM,DIGI'},stepDict[stepNamePmx][k]])
2350  # setup for stage 2
2351  elif "Digi" in step or "Reco" in step:
2352  # go back to non-PU step version
2353  d = merge([stepDict[self.getStepName(step)][k]])
2354  if d is None: return
2355  if "Digi" in step:
2356  tmpsteps = []
2357  for s in d["-s"].split(","):
2358  if s == "DIGI" or "DIGI:" in s:
2359  tmpsteps.extend([s, "DATAMIX"])
2360  else:
2361  tmpsteps.append(s)
2362  d = merge([{"-s" : ",".join(tmpsteps),
2363  "--datamix" : "PreMix",
2364  "--procModifiers": "premix_stage2"},
2365  d])
2366  # for combined stage1+stage2
2367  if "_PMXS1S2" in self.suffix:
2368  d = merge([digiPremixLocalPileup, d])
2369  elif "Reco" in step:
2370  if "--procModifiers" in d:
2371  d["--procModifiers"] += ",premix_stage2"
2372  else:
2373  d["--procModifiers"] = "premix_stage2"
2374  stepDict[stepName][k] = d
2375  # Increase the input file step number by one for Nano in combined stage1+stage2
2376  elif "Nano"==step:
2377  # go back to non-PU step version
2378  d = merge([stepDict[self.getStepName(step)][k]])
2379  if "--filein" in d:
2380  filein = d["--filein"]
2381  m = re.search("step(?P<ind>\d+)_", filein)
2382  if m:
2383  d["--filein"] = filein.replace(m.group(), "step%d_"%(int(m.group("ind"))+1))
2384  stepDict[stepName][k] = d
2385  # run2/3 WFs use Nano (not NanoPU) in PU WF
2386  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 2395 of file upgradeWorkflowComponents.py.

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

2395  def workflow_(self, workflows, num, fragment, stepList, key):
2396  fragmentTmp = fragment
2397  if self.suffix.endswith("S1"):
2398  fragmentTmp = 'PREMIXUP' + key[2:].replace("PU", "").replace("Design", "") + '_PU25'
2399  super(UpgradeWorkflowPremix,self).workflow_(workflows, num, fragmentTmp, stepList, key)
2400 # Premix stage1
2401 upgradeWFs['PMXS1'] = UpgradeWorkflowPremix(
def replace(string, replacements)

Member Data Documentation

◆ offset

upgradeWorkflowComponents.UpgradeWorkflowPremix.offset
static

Definition at line 2410 of file upgradeWorkflowComponents.py.

◆ PU

upgradeWorkflowComponents.UpgradeWorkflowPremix.PU
static

Definition at line 2404 of file upgradeWorkflowComponents.py.

◆ steps

upgradeWorkflowComponents.UpgradeWorkflowPremix.steps
static

Definition at line 2402 of file upgradeWorkflowComponents.py.

◆ suffix

upgradeWorkflowComponents.UpgradeWorkflowPremix.suffix
static

Definition at line 2409 of file upgradeWorkflowComponents.py.