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

Member Function Documentation

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

Definition at line 1446 of file upgradeWorkflowComponents.py.

References any().

1447  def condition(self, fragment, stepList, key, hasHarvest):
1448  if not 'PU' in key:
1449  return False
1450  if not any(y in key for y in ['2021', '2023', '2024', '2026']):
1451  return False
1452  if self.suffix.endswith("S1"):
1453  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 1390 of file upgradeWorkflowComponents.py.

1391  def setup_(self, step, stepName, stepDict, k, properties):
1392  # 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 1393 of file upgradeWorkflowComponents.py.

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

1394  def setupPU_(self, step, stepName, stepDict, k, properties):
1395  # setup for stage 1
1396  if "GenSim" in stepName:
1397  stepNamePmx = stepName.replace('GenSim','Premix')
1398  if not stepNamePmx in stepDict: stepDict[stepNamePmx] = {}
1399  stepDict[stepNamePmx][k] = merge([
1400  {
1401  '-s': 'GEN,SIM,DIGI:pdigi_valid',
1402  '--datatier': 'PREMIX',
1403  '--eventcontent': 'PREMIX',
1404  '--procModifiers': 'premix_stage1'
1405  },
1406  stepDict[stepName][k]
1407  ])
1408  if "ProdLike" in self.suffix:
1409  stepDict[stepNamePmx][k] = merge([{'-s': 'GEN,SIM,DIGI'},stepDict[stepNamePmx][k]])
1410  # setup for stage 2
1411  elif "Digi" in step or "Reco" in step:
1412  # go back to non-PU step version
1413  d = merge([stepDict[self.getStepName(step)][k]])
1414  if d is None: return
1415  if "Digi" in step:
1416  tmpsteps = []
1417  for s in d["-s"].split(","):
1418  if s == "DIGI" or "DIGI:" in s:
1419  tmpsteps.extend([s, "DATAMIX"])
1420  else:
1421  tmpsteps.append(s)
1422  d = merge([{"-s" : ",".join(tmpsteps),
1423  "--datamix" : "PreMix",
1424  "--procModifiers": "premix_stage2"},
1425  d])
1426  # for combined stage1+stage2
1427  if "_PMXS1S2" in self.suffix:
1428  d = merge([digiPremixLocalPileup, d])
1429  elif "Reco" in step:
1430  if "--procModifiers" in d:
1431  d["--procModifiers"] += ",premix_stage2"
1432  else:
1433  d["--procModifiers"] = "premix_stage2"
1434  stepDict[stepName][k] = d
1435  # Increase the input file step number by one for Nano in combined stage1+stage2
1436  elif "Nano"==step:
1437  # go back to non-PU step version
1438  d = merge([stepDict[self.getStepName(step)][k]])
1439  if "--filein" in d:
1440  filein = d["--filein"]
1441  m = re.search("step(?P<ind>\d+)_", filein)
1442  if m:
1443  d["--filein"] = filein.replace(m.group(), "step%d_"%(int(m.group("ind"))+1))
1444  stepDict[stepName][k] = d
1445  # 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 1454 of file upgradeWorkflowComponents.py.

References python.rootplot.root2matplotlib.replace().

1455  def workflow_(self, workflows, num, fragment, stepList, key):
1456  fragmentTmp = fragment
1457  if self.suffix.endswith("S1"):
1458  fragmentTmp = 'PREMIXUP' + key[2:].replace("PU", "").replace("Design", "") + '_PU25'
1459  super(UpgradeWorkflowPremix,self).workflow_(workflows, num, fragmentTmp, stepList, key)
1460 # Premix stage1
upgradeWFs['PMXS1'] = UpgradeWorkflowPremix(

Member Data Documentation

float upgradeWorkflowComponents.UpgradeWorkflowPremix.offset = 0.97
static

Definition at line 1469 of file upgradeWorkflowComponents.py.

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

Definition at line 1463 of file upgradeWorkflowComponents.py.

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

Definition at line 1461 of file upgradeWorkflowComponents.py.

string upgradeWorkflowComponents.UpgradeWorkflowPremix.suffix = '_PMXS1'
static

Definition at line 1468 of file upgradeWorkflowComponents.py.