CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
 
def setup_
 
def setupPU_
 
def workflow_
 
- Public Member Functions inherited from upgradeWorkflowComponents.UpgradeWorkflow
def __init__
 
def condition
 
def getStepName
 
def getStepNamePU
 
def init
 
def preventReuse
 
def setup
 
def setup_
 
def setupPU
 
def setupPU_
 
def workflow
 
def workflow_
 

Static Public Attributes

float offset = 0.97
 
list PU
 
list steps
 
string suffix = '_PMXS1'
 

Additional Inherited Members

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

Detailed Description

Definition at line 977 of file upgradeWorkflowComponents.py.

Member Function Documentation

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

Definition at line 1034 of file upgradeWorkflowComponents.py.

References any().

1035  def condition(self, fragment, stepList, key, hasHarvest):
1036  if not 'PU' in key:
1037  return False
1038  if not any(y in key for y in ['2021', '2023', '2024', '2026']):
1039  return False
1040  if self.suffix.endswith("S1"):
1041  return "NuGun" in fragment
return True
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:37
def upgradeWorkflowComponents.UpgradeWorkflowPremix.setup_ (   self,
  step,
  stepName,
  stepDict,
  k,
  properties 
)

Definition at line 978 of file upgradeWorkflowComponents.py.

979  def setup_(self, step, stepName, stepDict, k, properties):
980  # just copy steps
stepDict[stepName][k] = merge([stepDict[step][k]])
Definition: merge.py:1
def upgradeWorkflowComponents.UpgradeWorkflowPremix.setupPU_ (   self,
  step,
  stepName,
  stepDict,
  k,
  properties 
)

Definition at line 981 of file upgradeWorkflowComponents.py.

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

982  def setupPU_(self, step, stepName, stepDict, k, properties):
983  # setup for stage 1
984  if "GenSim" in stepName:
985  stepNamePmx = stepName.replace('GenSim','Premix')
986  if not stepNamePmx in stepDict: stepDict[stepNamePmx] = {}
987  stepDict[stepNamePmx][k] = merge([
988  {
989  '-s': 'GEN,SIM,DIGI:pdigi_valid',
990  '--datatier': 'PREMIX',
991  '--eventcontent': 'PREMIX',
992  '--procModifiers': 'premix_stage1'
993  },
994  stepDict[stepName][k]
995  ])
996  if "ProdLike" in self.suffix:
997  stepDict[stepNamePmx][k] = merge([{'-s': 'GEN,SIM,DIGI'},stepDict[stepNamePmx][k]])
998  # setup for stage 2
999  elif "Digi" in step or "Reco" in step:
1000  # go back to non-PU step version
1001  d = merge([stepDict[self.getStepName(step)][k]])
1002  if d is None: return
1003  if "Digi" in step:
1004  tmpsteps = []
1005  for s in d["-s"].split(","):
1006  if s == "DIGI" or "DIGI:" in s:
1007  tmpsteps.extend([s, "DATAMIX"])
1008  else:
1009  tmpsteps.append(s)
1010  d = merge([{"-s" : ",".join(tmpsteps),
1011  "--datamix" : "PreMix",
1012  "--procModifiers": "premix_stage2"},
1013  d])
1014  # for combined stage1+stage2
1015  if "_PMXS1S2" in self.suffix:
1016  d = merge([digiPremixLocalPileup, d])
1017  elif "Reco" in step:
1018  if "--procModifiers" in d:
1019  d["--procModifiers"] += ",premix_stage2"
1020  else:
1021  d["--procModifiers"] = "premix_stage2"
1022  stepDict[stepName][k] = d
1023  # Increase the input file step number by one for Nano in combined stage1+stage2
1024  elif "Nano"==step:
1025  # go back to non-PU step version
1026  d = merge([stepDict[self.getStepName(step)][k]])
1027  if "--filein" in d:
1028  filein = d["--filein"]
1029  m = re.search("step(?P<ind>\d+)_", filein)
1030  if m:
1031  d["--filein"] = filein.replace(m.group(), "step%d_"%(int(m.group("ind"))+1))
1032  stepDict[stepName][k] = d
1033  # run2/3 WFs use Nano (not NanoPU) in PU WF
stepDict[self.getStepName(step)][k] = merge([d])
Definition: merge.py:1
static std::string join(char **cmd)
Definition: RemoteFile.cc:19
def upgradeWorkflowComponents.UpgradeWorkflowPremix.workflow_ (   self,
  workflows,
  num,
  fragment,
  stepList,
  key 
)

Definition at line 1042 of file upgradeWorkflowComponents.py.

References python.rootplot.root2matplotlib.replace().

1043  def workflow_(self, workflows, num, fragment, stepList, key):
1044  fragmentTmp = fragment
1045  if self.suffix.endswith("S1"):
1046  fragmentTmp = 'PREMIXUP' + key[2:].replace("PU", "").replace("Design", "") + '_PU25'
1047  super(UpgradeWorkflowPremix,self).workflow_(workflows, num, fragmentTmp, stepList, key)
1048 # Premix stage1
upgradeWFs['PMXS1'] = UpgradeWorkflowPremix(

Member Data Documentation

float upgradeWorkflowComponents.UpgradeWorkflowPremix.offset = 0.97
static

Definition at line 1057 of file upgradeWorkflowComponents.py.

list upgradeWorkflowComponents.UpgradeWorkflowPremix.PU
static
Initial value:
1 = [
2  'GenSim',
3  'GenSimHLBeamSpot',
4  'GenSimHLBeamSpot14',
5  ]

Definition at line 1051 of file upgradeWorkflowComponents.py.

list upgradeWorkflowComponents.UpgradeWorkflowPremix.steps
static
Initial value:
1 = [
2  ]

Definition at line 1049 of file upgradeWorkflowComponents.py.

string upgradeWorkflowComponents.UpgradeWorkflowPremix.suffix = '_PMXS1'
static

Definition at line 1056 of file upgradeWorkflowComponents.py.