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

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 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 setupPU (self, stepDict, k, properties)
 
def workflow (self, workflows, num, fragment, stepList, key, hasHarvest)
 

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

Member Function Documentation

◆ condition()

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

Reimplemented from upgradeWorkflowComponents.UpgradeWorkflow.

Reimplemented in upgradeWorkflowComponents.UpgradeWorkflowAdjustPU.

Definition at line 807 of file upgradeWorkflowComponents.py.

807  def condition(self, fragment, stepList, key, hasHarvest):
808  if not 'PU' in key:
809  return False
810  if not any(y in key for y in ['2021', '2023', '2024', '2026']):
811  return False
812  if self.suffix.endswith("S1"):
813  return "NuGun" in fragment
814  return True

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

◆ setup_()

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

Reimplemented from upgradeWorkflowComponents.UpgradeWorkflow.

Definition at line 753 of file upgradeWorkflowComponents.py.

753  def setup_(self, step, stepName, stepDict, k, properties):
754  # just copy steps
755  stepDict[stepName][k] = merge([stepDict[step][k]])

◆ setupPU_()

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

Reimplemented from upgradeWorkflowComponents.UpgradeWorkflow.

Reimplemented in upgradeWorkflowComponents.UpgradeWorkflowAdjustPU.

Definition at line 756 of file upgradeWorkflowComponents.py.

756  def setupPU_(self, step, stepName, stepDict, k, properties):
757  # setup for stage 1
758  if "GenSim" in stepName:
759  stepNamePmx = stepName.replace('GenSim','Premix')
760  if not stepNamePmx in stepDict: stepDict[stepNamePmx] = {}
761  stepDict[stepNamePmx][k] = merge([
762  {
763  '-s': 'GEN,SIM,DIGI:pdigi_valid',
764  '--datatier': 'PREMIX',
765  '--eventcontent': 'PREMIX',
766  '--procModifiers': 'premix_stage1'
767  },
768  stepDict[stepName][k]
769  ])
770  # setup for stage 2
771  elif "Digi" in step or "Reco" in step:
772  # go back to non-PU step version
773  d = merge([stepDict[self.getStepName(step)][k]])
774  if d is None: return
775  if "Digi" in step:
776  tmpsteps = []
777  for s in d["-s"].split(","):
778  if s == "DIGI" or "DIGI:" in s:
779  tmpsteps.extend([s, "DATAMIX"])
780  else:
781  tmpsteps.append(s)
782  d = merge([{"-s" : ",".join(tmpsteps),
783  "--datamix" : "PreMix",
784  "--procModifiers": "premix_stage2"},
785  d])
786  # for combined stage1+stage2
787  if "_PMXS1S2" in self.suffix:
788  d = merge([digiPremixLocalPileup, d])
789  elif "Reco" in step:
790  if "--procModifiers" in d:
791  d["--procModifiers"] += ",premix_stage2"
792  else:
793  d["--procModifiers"] = "premix_stage2"
794  stepDict[stepName][k] = d
795  # Increase the input file step number by one for Nano in combined stage1+stage2
796  elif "Nano" in step:
797  # go back to non-PU step version
798  d = merge([stepDict[self.getStepName(step)][k]])
799  if "--filein" in d:
800  filein = d["--filein"]
801  m = re.search("step(?P<ind>\d+)_", filein)
802  if m:
803  d["--filein"] = filein.replace(m.group(), "step%d_"%(int(m.group("ind"))+1))
804  stepDict[stepName][k] = d
805  # run2/3 WFs use Nano (not NanoPU) in PU WF
806  stepDict[self.getStepName(step)][k] = merge([d])

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

◆ workflow_()

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

Reimplemented from upgradeWorkflowComponents.UpgradeWorkflow.

Definition at line 815 of file upgradeWorkflowComponents.py.

815  def workflow_(self, workflows, num, fragment, stepList, key):
816  fragmentTmp = fragment
817  if self.suffix.endswith("S1"):
818  fragmentTmp = 'PREMIXUP' + key[2:].replace("PU", "").replace("Design", "") + '_PU25'
819  super(UpgradeWorkflowPremix,self).workflow_(workflows, num, fragmentTmp, stepList, key)
820 # Premix stage1
821 upgradeWFs['PMXS1'] = UpgradeWorkflowPremix(

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

Member Data Documentation

◆ offset

upgradeWorkflowComponents.UpgradeWorkflowPremix.offset
static

Definition at line 830 of file upgradeWorkflowComponents.py.

◆ PU

upgradeWorkflowComponents.UpgradeWorkflowPremix.PU
static

Definition at line 824 of file upgradeWorkflowComponents.py.

◆ steps

upgradeWorkflowComponents.UpgradeWorkflowPremix.steps
static

Definition at line 822 of file upgradeWorkflowComponents.py.

◆ suffix

upgradeWorkflowComponents.UpgradeWorkflowPremix.suffix
static

Definition at line 829 of file upgradeWorkflowComponents.py.

join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
any
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:38
submitPVValidationJobs.split
def split(sequence, size)
Definition: submitPVValidationJobs.py:352
createfilelist.int
int
Definition: createfilelist.py:10
goodZToMuMu_cfi.condition
condition
Definition: goodZToMuMu_cfi.py:37
merge
Definition: merge.py:1
python.rootplot.root2matplotlib.replace
def replace(string, replacements)
Definition: root2matplotlib.py:444