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

Member Function Documentation

◆ condition()

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

Definition at line 2385 of file upgradeWorkflowComponents.py.

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

2385  def condition(self, fragment, stepList, key, hasHarvest):
2386  if not 'PU' in key:
2387  return False
2388  if not any(y in key for y in ['2021', '2023', '2024', '2026']):
2389  return False
2390  if self.suffix.endswith("S1"):
2391  return "NuGun" in fragment
2392  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 2329 of file upgradeWorkflowComponents.py.

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

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

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

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

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

Member Data Documentation

◆ offset

upgradeWorkflowComponents.UpgradeWorkflowPremix.offset
static

Definition at line 2408 of file upgradeWorkflowComponents.py.

◆ PU

upgradeWorkflowComponents.UpgradeWorkflowPremix.PU
static

Definition at line 2402 of file upgradeWorkflowComponents.py.

◆ steps

upgradeWorkflowComponents.UpgradeWorkflowPremix.steps
static

Definition at line 2400 of file upgradeWorkflowComponents.py.

◆ suffix

upgradeWorkflowComponents.UpgradeWorkflowPremix.suffix
static

Definition at line 2407 of file upgradeWorkflowComponents.py.