CMS 3D CMS Logo

Functions
customizeHLTforAlpaka Namespace Reference

Functions

def _rename_container (process, oldContainerLabel, newContainerLabel)
 
def _rename_containers (process, matchExpr, oldStr, newStr)
 
def _rename_edmodule (process, oldModuleLabel, newModuleLabel, typeBlackList)
 
def _rename_edmodules (process, matchExpr, oldStr, newStr, typeBlackList)
 
def _replace_object (process, target, obj)
 
def customizeHLTforAlpaka (process)
 
def customizeHLTforAlpakaEcalLocalReco (process)
 ECAL HLT in Alpaka. More...
 
def customizeHLTforAlpakaHcalLocalReco (process)
 
def customizeHLTforAlpakaParticleFlowClustering (process)
 PF HLT in Alpaka. More...
 
def customizeHLTforAlpakaPFSoA (process)
 
def customizeHLTforAlpakaPixelReco (process)
 
def customizeHLTforAlpakaPixelRecoLocal (process)
 
def customizeHLTforAlpakaPixelRecoTracking (process)
 
def customizeHLTforAlpakaPixelRecoVertexing (process)
 
def customizeHLTforAlpakaRename (process)
 
def customizeHLTforAlpakaStatus (process)
 
def customizeHLTforDQMGPUvsCPUPixel (process)
 Pixel HLT in Alpaka. More...
 

Function Documentation

◆ _rename_container()

def customizeHLTforAlpaka._rename_container (   process,
  oldContainerLabel,
  newContainerLabel 
)
private

Definition at line 1349 of file customizeHLTforAlpaka.py.

References _replace_object().

Referenced by _rename_containers().

1349 def _rename_container(process, oldContainerLabel, newContainerLabel):
1350  if not hasattr(process, oldContainerLabel) or hasattr(process, newContainerLabel) or oldContainerLabel == newContainerLabel:
1351  return process
1352  oldObj = getattr(process, oldContainerLabel)
1353  setattr(process, newContainerLabel, oldObj.copy())
1354  newObj = getattr(process, newContainerLabel)
1355  process = _replace_object(process, oldObj, newObj)
1356  process.__delattr__(oldContainerLabel)
1357  return process
1358 
def _replace_object(process, target, obj)
def _rename_container(process, oldContainerLabel, newContainerLabel)

◆ _rename_containers()

def customizeHLTforAlpaka._rename_containers (   process,
  matchExpr,
  oldStr,
  newStr 
)
private

Definition at line 1359 of file customizeHLTforAlpaka.py.

References _rename_container(), nano_mu_local_reco_cff.bool, and relativeConstraints.keys.

Referenced by customizeHLTforAlpakaRename().

1359 def _rename_containers(process, matchExpr, oldStr, newStr):
1360  for containerName in itertools.chain(
1361  process.sequences_().keys(),
1362  process.tasks_().keys(),
1363  process.conditionaltasks_().keys()
1364  ):
1365  if bool(re.match(matchExpr, containerName)):
1366  containerNameNew = containerName.replace(oldStr, '') + newStr
1367  process = _rename_container(process, containerName, containerNameNew)
1368  return process
1369 
def _rename_containers(process, matchExpr, oldStr, newStr)
def _rename_container(process, oldContainerLabel, newContainerLabel)

◆ _rename_edmodule()

def customizeHLTforAlpaka._rename_edmodule (   process,
  oldModuleLabel,
  newModuleLabel,
  typeBlackList 
)
private

Definition at line 1321 of file customizeHLTforAlpaka.py.

References _replace_object(), and MassReplace.massReplaceInputTag().

Referenced by _rename_edmodules().

1321 def _rename_edmodule(process, oldModuleLabel, newModuleLabel, typeBlackList):
1322  if not hasattr(process, oldModuleLabel) or hasattr(process, newModuleLabel) or oldModuleLabel == newModuleLabel:
1323  return process
1324  oldObj = getattr(process, oldModuleLabel)
1325  if oldObj.type_() in typeBlackList:
1326  return process
1327  setattr(process, newModuleLabel, oldObj.clone())
1328  newObj = getattr(process, newModuleLabel)
1329  process = _replace_object(process, oldObj, newObj)
1330  process.__delattr__(oldModuleLabel)
1331  process = massReplaceInputTag(process, oldModuleLabel, newModuleLabel, False, True, False)
1332  for outputModuleLabel in process.outputModules_():
1333  outputModule = getattr(process, outputModuleLabel)
1334  if not hasattr(outputModule, 'outputCommands'):
1335  continue
1336  for outputCmdIdx, outputCmd in enumerate(outputModule.outputCommands):
1337  outputModule.outputCommands[outputCmdIdx] = outputCmd.replace(f'_{oldModuleLabel}_', f'_{newModuleLabel}_')
1338  return process
1339 
def _replace_object(process, target, obj)
def massReplaceInputTag(process, old="rawDataCollector", new="rawDataRepacker", verbose=False, moduleLabelOnly=False, skipLabelTest=False)
Definition: MassReplace.py:83
def _rename_edmodule(process, oldModuleLabel, newModuleLabel, typeBlackList)

◆ _rename_edmodules()

def customizeHLTforAlpaka._rename_edmodules (   process,
  matchExpr,
  oldStr,
  newStr,
  typeBlackList 
)
private

Definition at line 1340 of file customizeHLTforAlpaka.py.

References _rename_edmodule(), and nano_mu_local_reco_cff.bool.

Referenced by customizeHLTforAlpakaRename().

1340 def _rename_edmodules(process, matchExpr, oldStr, newStr, typeBlackList):
1341  for moduleDict in [process.producers_(), process.filters_(), process.analyzers_()]:
1342  moduleLabels = list(moduleDict.keys())
1343  for moduleLabel in moduleLabels:
1344  if bool(re.match(matchExpr, moduleLabel)):
1345  moduleLabelNew = moduleLabel.replace(oldStr, '') + newStr
1346  process = _rename_edmodule(process, moduleLabel, moduleLabelNew, typeBlackList)
1347  return process
1348 
def _rename_edmodules(process, matchExpr, oldStr, newStr, typeBlackList)
def _rename_edmodule(process, oldModuleLabel, newModuleLabel, typeBlackList)

◆ _replace_object()

def customizeHLTforAlpaka._replace_object (   process,
  target,
  obj 
)
private

Definition at line 1296 of file customizeHLTforAlpaka.py.

References contentValuesCheck.values.

Referenced by _rename_container(), and _rename_edmodule().

1296 def _replace_object(process, target, obj):
1297  for container in itertools.chain(
1298  process.sequences_().values(),
1299  process.paths_().values(),
1300  process.endpaths_().values()
1301  ):
1302  if target.label() in [bar for foo,bar in container.directDependencies()]:
1303  try:
1304  position = container.index(target)
1305  container.insert(position, obj)
1306  container.remove(target)
1307  except ValueError:
1308  container.associate(obj)
1309  container.remove(target)
1310 
1311  for container in itertools.chain(
1312  process.tasks_().values(),
1313  process.conditionaltasks_().values(),
1314  ):
1315  if target.label() in [bar for foo,bar in container.directDependencies()]:
1316  container.add(obj)
1317  container.remove(target)
1318 
1319  return process
1320 
def _replace_object(process, target, obj)

◆ customizeHLTforAlpaka()

def customizeHLTforAlpaka.customizeHLTforAlpaka (   process)

Definition at line 1385 of file customizeHLTforAlpaka.py.

References customizeHLTforAlpakaEcalLocalReco(), customizeHLTforAlpakaHcalLocalReco(), customizeHLTforAlpakaParticleFlowClustering(), customizeHLTforAlpakaPFSoA(), customizeHLTforAlpakaPixelReco(), customizeHLTforAlpakaRename(), and customizeHLTforAlpakaStatus().

1385 def customizeHLTforAlpaka(process):
1386  process.load('Configuration.StandardSequences.Accelerators_cff')
1387 
1388  process = customizeHLTforAlpakaStatus(process)
1389  process = customizeHLTforAlpakaPixelReco(process)
1390  process = customizeHLTforAlpakaEcalLocalReco(process)
1391  process = customizeHLTforAlpakaHcalLocalReco(process)
1393  process = customizeHLTforAlpakaPFSoA(process)
1394  process = customizeHLTforAlpakaRename(process)
1395 
1396  return process
1397 
def customizeHLTforAlpakaPFSoA(process)
def customizeHLTforAlpakaStatus(process)
def customizeHLTforAlpakaPixelReco(process)
def customizeHLTforAlpakaEcalLocalReco(process)
ECAL HLT in Alpaka.
def customizeHLTforAlpakaHcalLocalReco(process)
def customizeHLTforAlpakaRename(process)
def customizeHLTforAlpakaParticleFlowClustering(process)
PF HLT in Alpaka.

◆ customizeHLTforAlpakaEcalLocalReco()

def customizeHLTforAlpaka.customizeHLTforAlpakaEcalLocalReco (   process)

ECAL HLT in Alpaka.

Definition at line 895 of file customizeHLTforAlpaka.py.

References functions.makeSerialClone(), and customizeForNoTrackerDCS.producers_by_type().

Referenced by customizeHLTforAlpaka().

896 
897  if not hasattr(process, 'hltEcalDigisGPU'):
898  return process
899 
900  for prod in producers_by_type(process, 'EcalRawToDigiPortable@alpaka'):
901  return process
902 
903  # remove existing ECAL GPU-related ES modules
904  for foo in [foo for foo in process.es_producers_() if ('ecal' in foo and 'GPU' in foo)]:
905  process.__delattr__(foo)
906 
907  for foo in [foo for foo in process.es_sources_() if ('ecal' in foo and 'GPU' in foo)]:
908  process.__delattr__(foo)
909 
910  # redefine ECAL local reconstruction sequence
911  process.hltEcalDigisPortableSoA = cms.EDProducer("EcalRawToDigiPortable@alpaka",
912  FEDs = process.hltEcalDigisGPU.FEDs,
913  InputLabel = process.hltEcalDigisGPU.InputLabel,
914  digisLabelEB = process.hltEcalDigisGPU.digisLabelEB,
915  digisLabelEE = process.hltEcalDigisGPU.digisLabelEE,
916  maxChannelsEB = process.hltEcalDigisGPU.maxChannelsEB,
917  maxChannelsEE = process.hltEcalDigisGPU.maxChannelsEE,
918  # autoselect the alpaka backend
919  alpaka = cms.untracked.PSet(
920  backend = cms.untracked.string('')
921  )
922  )
923 
924  from EventFilter.EcalRawToDigi.ecalElectronicsMappingHostESProducer_cfi import ecalElectronicsMappingHostESProducer as _ecalElectronicsMappingHostESProducer
925  process.ecalElectronicsMappingHostESProducer = _ecalElectronicsMappingHostESProducer.clone()
926 
927  process.hltEcalDigis = cms.EDProducer("EcalDigisFromPortableProducer",
928  digisInLabelEB = cms.InputTag('hltEcalDigisPortableSoA', 'ebDigis'),
929  digisInLabelEE = cms.InputTag('hltEcalDigisPortableSoA', 'eeDigis'),
930  digisOutLabelEB = cms.string("ebDigis"),
931  digisOutLabelEE = cms.string("eeDigis"),
932  produceDummyIntegrityCollections = cms.bool(False)
933  )
934 
935  process.hltEcalUncalibRecHitPortableSoA = cms.EDProducer("EcalUncalibRecHitProducerPortable@alpaka",
936  EBtimeConstantTerm = process.hltEcalUncalibRecHitGPU.EBtimeConstantTerm,
937  EBtimeFitLimits_Lower = process.hltEcalUncalibRecHitGPU.EBtimeFitLimits_Lower,
938  EBtimeFitLimits_Upper = process.hltEcalUncalibRecHitGPU.EBtimeFitLimits_Upper,
939  EBtimeNconst = process.hltEcalUncalibRecHitGPU.EBtimeNconst,
940  EEtimeConstantTerm = process.hltEcalUncalibRecHitGPU.EEtimeConstantTerm,
941  EEtimeFitLimits_Lower = process.hltEcalUncalibRecHitGPU.EEtimeFitLimits_Lower,
942  EEtimeFitLimits_Upper = process.hltEcalUncalibRecHitGPU.EEtimeFitLimits_Upper,
943  EEtimeNconst = process.hltEcalUncalibRecHitGPU.EEtimeNconst,
944  amplitudeThresholdEB = process.hltEcalUncalibRecHitGPU.amplitudeThresholdEB,
945  amplitudeThresholdEE = process.hltEcalUncalibRecHitGPU.amplitudeThresholdEE,
946  digisLabelEB = cms.InputTag("hltEcalDigisPortableSoA", "ebDigis"),
947  digisLabelEE = cms.InputTag("hltEcalDigisPortableSoA", "eeDigis"),
948  kernelMinimizeThreads = process.hltEcalUncalibRecHitGPU.kernelMinimizeThreads,
949  outOfTimeThresholdGain12mEB = process.hltEcalUncalibRecHitGPU.outOfTimeThresholdGain12mEB,
950  outOfTimeThresholdGain12mEE = process.hltEcalUncalibRecHitGPU.outOfTimeThresholdGain12mEE,
951  outOfTimeThresholdGain12pEB = process.hltEcalUncalibRecHitGPU.outOfTimeThresholdGain12pEB,
952  outOfTimeThresholdGain12pEE = process.hltEcalUncalibRecHitGPU.outOfTimeThresholdGain12pEE,
953  outOfTimeThresholdGain61mEB = process.hltEcalUncalibRecHitGPU.outOfTimeThresholdGain61mEB,
954  outOfTimeThresholdGain61mEE = process.hltEcalUncalibRecHitGPU.outOfTimeThresholdGain61mEE,
955  outOfTimeThresholdGain61pEB = process.hltEcalUncalibRecHitGPU.outOfTimeThresholdGain61pEB,
956  outOfTimeThresholdGain61pEE = process.hltEcalUncalibRecHitGPU.outOfTimeThresholdGain61pEE,
957  recHitsLabelEB = process.hltEcalUncalibRecHitGPU.recHitsLabelEB,
958  recHitsLabelEE = process.hltEcalUncalibRecHitGPU.recHitsLabelEE,
959  shouldRunTimingComputation = process.hltEcalUncalibRecHitGPU.shouldRunTimingComputation,
960  # autoselect the alpaka backend
961  alpaka = cms.untracked.PSet(
962  backend = cms.untracked.string('')
963  )
964  )
965 
966  if hasattr(process, 'hltEcalUncalibRecHitGPU'):
967  del process.hltEcalUncalibRecHitGPU
968 
969  process.ecalMultifitParametersSource = cms.ESSource("EmptyESSource",
970  firstValid = cms.vuint32(1),
971  iovIsRunNotTime = cms.bool(True),
972  recordName = cms.string('EcalMultifitParametersRcd')
973  )
974 
975  from RecoLocalCalo.EcalRecProducers.ecalMultifitConditionsHostESProducer_cfi import ecalMultifitConditionsHostESProducer as _ecalMultifitConditionsHostESProducer
976  process.ecalMultifitConditionsHostESProducer = _ecalMultifitConditionsHostESProducer.clone()
977 
978  from RecoLocalCalo.EcalRecProducers.ecalMultifitParametersHostESProducer_cfi import ecalMultifitParametersHostESProducer as _ecalMultifitParametersHostESProducer
979  process.ecalMultifitParametersHostESProducer = _ecalMultifitParametersHostESProducer.clone()
980 
981  process.hltEcalUncalibRecHit = cms.EDProducer("EcalUncalibRecHitSoAToLegacy",
982  isPhase2 = process.hltEcalUncalibRecHitFromSoA.isPhase2,
983  recHitsLabelCPUEB = process.hltEcalUncalibRecHitFromSoA.recHitsLabelCPUEB,
984  recHitsLabelCPUEE = process.hltEcalUncalibRecHitFromSoA.recHitsLabelCPUEE,
985  uncalibRecHitsPortableEB = cms.InputTag("hltEcalUncalibRecHitPortableSoA", "EcalUncalibRecHitsEB"),
986  uncalibRecHitsPortableEE = cms.InputTag("hltEcalUncalibRecHitPortableSoA", "EcalUncalibRecHitsEE")
987  )
988 
989  if hasattr(process, 'hltEcalUncalibRecHitSoA'):
990  delattr(process, 'hltEcalUncalibRecHitSoA')
991 
992  process.hltEcalDetIdToBeRecovered = cms.EDProducer("EcalDetIdToBeRecoveredProducer",
993  integrityBlockSizeErrors = cms.InputTag('hltEcalDigisLegacy', 'EcalIntegrityBlockSizeErrors'),
994  integrityTTIdErrors = cms.InputTag('hltEcalDigisLegacy', 'EcalIntegrityTTIdErrors'),
995 
996  ebIntegrityGainErrors = cms.InputTag('hltEcalDigisLegacy', 'EcalIntegrityGainErrors'),
997  eeIntegrityGainErrors = cms.InputTag('hltEcalDigisLegacy', 'EcalIntegrityGainErrors'),
998 
999  ebIntegrityGainSwitchErrors = cms.InputTag('hltEcalDigisLegacy', 'EcalIntegrityGainSwitchErrors'),
1000  eeIntegrityGainSwitchErrors = cms.InputTag('hltEcalDigisLegacy', 'EcalIntegrityGainSwitchErrors'),
1001 
1002  ebIntegrityChIdErrors = cms.InputTag('hltEcalDigisLegacy', 'EcalIntegrityChIdErrors'),
1003  eeIntegrityChIdErrors = cms.InputTag('hltEcalDigisLegacy', 'EcalIntegrityChIdErrors'),
1004 
1005  ebSrFlagCollection = cms.InputTag("hltEcalDigisLegacy"),
1006  eeSrFlagCollection = cms.InputTag("hltEcalDigisLegacy"),
1007 
1008  ebDetIdToBeRecovered = cms.string("ebDetId"),
1009  eeDetIdToBeRecovered = cms.string("eeDetId"),
1010 
1011  ebFEToBeRecovered = cms.string("ebFE"),
1012  eeFEToBeRecovered = cms.string("eeFE"),
1013  )
1014 
1015  process.hltEcalRecHit.triggerPrimitiveDigiCollection = 'hltEcalDigisLegacy:EcalTriggerPrimitives'
1016 
1017  process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerSequence = cms.Sequence(
1018  process.hltEcalDigisLegacy +
1019  process.hltEcalDigisPortableSoA +
1020  process.hltEcalDigis + # conversion of PortableSoA to legacy format
1021  process.hltEcalUncalibRecHitPortableSoA +
1022  process.hltEcalUncalibRecHit + # conversion of PortableSoA to legacy format
1023  process.hltEcalDetIdToBeRecovered +
1024  process.hltEcalRecHit
1025  )
1026 
1027  process.HLTPreshowerSequence = cms.Sequence(process.hltEcalPreshowerDigis + process.hltEcalPreshowerRecHit)
1028 
1029  process.HLTDoFullUnpackingEgammaEcalSequence = cms.Sequence(
1030  process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerSequence +
1031  process.HLTPreshowerSequence
1032  )
1033 
1034  process.HLTDoFullUnpackingEgammaEcalMFSequence = cms.Sequence(process.HLTDoFullUnpackingEgammaEcalSequence)
1035 
1036  process.hltEcalDigisCPUSerialSoA = makeSerialClone(process.hltEcalDigisPortableSoA)
1037 
1038  process.hltEcalDigisCPUSerial = process.hltEcalDigis.clone(
1039  digisInLabelEB = 'hltEcalDigisCPUSerialSoA:ebDigis',
1040  digisInLabelEE = 'hltEcalDigisCPUSerialSoA:eeDigis',
1041  )
1042 
1043  process.hltEcalUncalibRecHitCPUSerialSoA = makeSerialClone(process.hltEcalUncalibRecHitPortableSoA,
1044  digisLabelEB = "hltEcalDigisCPUSerialSoA:ebDigis",
1045  digisLabelEE = "hltEcalDigisCPUSerialSoA:eeDigis",
1046  )
1047 
1048  process.hltEcalUncalibRecHitCPUSerial = process.hltEcalUncalibRecHit.clone(
1049  uncalibRecHitsPortableEB = "hltEcalUncalibRecHitCPUSerialSoA:EcalUncalibRecHitsEB",
1050  uncalibRecHitsPortableEE = "hltEcalUncalibRecHitCPUSerialSoA:EcalUncalibRecHitsEE",
1051  )
1052 
1053  process.hltEcalRecHitCPUOnly = process.hltEcalRecHit.clone(
1054  EBuncalibRecHitCollection = 'hltEcalUncalibRecHitCPUSerial:EcalUncalibRecHitsEB',
1055  EEuncalibRecHitCollection = 'hltEcalUncalibRecHitCPUSerial:EcalUncalibRecHitsEE',
1056  )
1057 
1058  process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerCPUOnlySequence = cms.Sequence(
1059  process.hltEcalDigisLegacy +
1060  process.hltEcalDigisCPUSerialSoA +
1061  process.hltEcalDigisCPUSerial + # conversion of CPUSerialSoA to legacy format
1062  process.hltEcalUncalibRecHitCPUSerialSoA +
1063  process.hltEcalUncalibRecHitCPUSerial + # conversion of CPUSerialSoA to legacy format
1064  process.hltEcalDetIdToBeRecovered +
1065  process.hltEcalRecHitCPUOnly
1066  )
1067 
1068  for prod in producers_by_type(process, 'HLTRechitsToDigis'):
1069  prod.srFlagsIn = 'hltEcalDigisLegacy'
1070 
1071  for prod in producers_by_type(process, 'CorrectedECALPFClusterProducer'):
1072  try:
1073  prod.energyCorrector.ebSrFlagLabel = 'hltEcalDigisLegacy'
1074  prod.energyCorrector.eeSrFlagLabel = 'hltEcalDigisLegacy'
1075  except:
1076  pass
1077 
1078  for pathNameMatch in ['DQM_EcalReconstruction_v', 'DQM_HIEcalReconstruction_v']:
1079  dqmEcalRecoPathName = None
1080  for pathName in process.paths_():
1081  if pathName.startswith(pathNameMatch):
1082  dqmEcalRecoPath = getattr(process, pathName)
1083  dqmEcalRecoPath.insert(dqmEcalRecoPath.index(process.HLTEndSequence), getattr(process, 'HLTDoFullUnpackingEgammaEcalWithoutPreshowerCPUOnlySequence'))
1084  for delmod in ['hltEcalConsumerCPU', 'hltEcalConsumerGPU']:
1085  if hasattr(process, delmod):
1086  process.__delattr__(delmod)
1087 
1088  for hltOutModMatch in ['hltOutputDQMGPUvsCPU', 'hltOutputHIDQMGPUvsCPU']:
1089  if hasattr(process, hltOutModMatch):
1090  outMod = getattr(process, hltOutModMatch)
1091  outCmds_new = [foo for foo in outMod.outputCommands if 'Ecal' not in foo]
1092  outCmds_new += [
1093  'keep *_hltEcalDigis_*_*',
1094  'keep *_hltEcalDigisCPUSerial_*_*',
1095  'keep *_hltEcalUncalibRecHit_*_*',
1096  'keep *_hltEcalUncalibRecHitCPUSerial_*_*',
1097  ]
1098  outMod.outputCommands = outCmds_new[:]
1099 
1100  return process
1101 
1102 
def producers_by_type(process, types)
def makeSerialClone(module, kwargs)
Definition: functions.py:1
def customizeHLTforAlpakaEcalLocalReco(process)
ECAL HLT in Alpaka.

◆ customizeHLTforAlpakaHcalLocalReco()

def customizeHLTforAlpaka.customizeHLTforAlpakaHcalLocalReco (   process)

Definition at line 1103 of file customizeHLTforAlpaka.py.

References functions.makeSerialClone(), and customizeForNoTrackerDCS.producers_by_type().

Referenced by customizeHLTforAlpaka().

1104 
1105 
1106  if not hasattr(process, 'HLTDoLocalHcalSequence'):
1107  return process
1108 
1109 
1110  for prod in producers_by_type(process, 'HcalDigisSoAProducer@alpaka'):
1111  return process
1112 
1113  # EventSetup modules
1114  process.load('RecoLocalCalo.HcalRecProducers.hcalMahiConditionsESProducer_cfi')
1115  process.load('RecoLocalCalo.HcalRecProducers.hcalMahiPulseOffsetsESProducer_cfi')
1116  process.load('RecoLocalCalo.HcalRecProducers.hcalSiPMCharacteristicsESProducer_cfi')
1117  process.load('RecoLocalCalo.HcalRecAlgos.hcalRecoParamWithPulseShapeESProducer_cfi')
1118 
1119  # the JobConfigurationGPURecord is provided by the hltESSJobConfigurationGPURecord ESSource
1120 
1121  # convert the HCAL digis to SoA format
1122  from EventFilter.HcalRawToDigi.hcalDigisSoAProducer_cfi import hcalDigisSoAProducer as _hcalDigisSoAProducer
1123 
1124  # convert the HCAL digis to SoA format, and copies them to the device
1125  process.hltHcalDigisSoA = _hcalDigisSoAProducer.clone(
1126  hbheDigisLabel = 'hltHcalDigis',
1127  qie11DigiLabel = 'hltHcalDigis'
1128  )
1129 
1130  # convert the HCAL digis to SoA format, and copies them to the host
1131  process.hltHcalDigisSoASerialSync = makeSerialClone(process.hltHcalDigisSoA)
1132 
1133 
1134  # run the HCAL local reconstruction (MAHI) and produce the rechits in SoA format
1135  from RecoLocalCalo.HcalRecProducers.hbheRecHitProducerPortable_cfi import hbheRecHitProducerPortable as _hbheRecHitProducerPortable
1136 
1137  # run the HCAL local reconstruction (MAHI) and produce the rechits in SoA format on the device, and optionally copy the rechits to the host
1138  process.hltHbheRecoSoA = _hbheRecHitProducerPortable.clone(
1139  digisLabelF01HE = ('hltHcalDigisSoA', 'f01HEDigis'),
1140  digisLabelF5HB = ('hltHcalDigisSoA', 'f5HBDigis'),
1141  digisLabelF3HB = ('hltHcalDigisSoA', 'f3HBDigis'),
1142  recHitsLabelM0HBHE = '',
1143  mahiPulseOffSets = 'hcalMahiPulseOffsetsESProducer:'
1144  )
1145 
1146  # run the HCAL local reconstruction (MAHI) and produce the rechits in SoA format on the host
1147  process.hltHbheRecoSoASerialSync = makeSerialClone(process.hltHbheRecoSoA,
1148  digisLabelF01HE = ('hltHcalDigisSoASerialSync', 'f01HEDigis'),
1149  digisLabelF5HB = ('hltHcalDigisSoASerialSync', 'f5HBDigis'),
1150  digisLabelF3HB = ('hltHcalDigisSoASerialSync', 'f3HBDigis'),
1151  )
1152 
1153 
1154  # convert the rechits in SoA format on the host to legacy format
1155  from RecoLocalCalo.HcalRecProducers.hcalRecHitSoAToLegacy_cfi import hcalRecHitSoAToLegacy as _hcalRecHitSoAToLegacy
1156 
1157  # convert the rechits in SoA format on the host to legacy format
1158  process.hltHbhereco = _hcalRecHitSoAToLegacy.clone(
1159  src = 'hltHbheRecoSoA'
1160  )
1161 
1162  # convert the rechits in SoA format on the host to legacy format
1163  process.hltHbherecoSerialSync = process.hltHbhereco.clone(
1164  src = 'hltHbheRecoSoASerialSync'
1165  )
1166 
1167  # update the label of the rechits produced on the host
1168  process.hltTowerMakerForAllSerialSync.hbheInput = "hltHbherecoSerialSync"
1169  process.hltAK4CaloJetsIDPassedSerialSync.JetIDParams.hbheRecHitsColl = "hltHbherecoSerialSync"
1170  process.hltHbheRecHitSoASerialSync.src = "hltHbherecoSerialSync"
1171  process.hltMuonsSerialSync.TrackAssociatorParameters.HBHERecHitCollectionLabel = "hltHbherecoSerialSync"
1172  process.hltMuonsSerialSync.CaloExtractorPSet.TrackAssociatorParameters.HBHERecHitCollectionLabel = "hltHbherecoSerialSync"
1173  process.hltMuonsSerialSync.JetExtractorPSet.TrackAssociatorParameters.HBHERecHitCollectionLabel = "hltHbherecoSerialSync"
1174 
1175  # run the HCAL local reconstruction, potentially offloading the MHI step to the device
1176  process.HLTDoLocalHcalSequence = cms.Sequence(
1177  process.hltHcalDigis +
1178  process.hltHcalDigisSoA +
1179  process.hltHbheRecoSoA +
1180  process.hltHbhereco +
1181  process.hltHfprereco +
1182  process.hltHfreco +
1183  process.hltHoreco )
1184 
1185  # run the HCAL local reconstruction on the host
1186  process.HLTDoLocalHcalSequenceSerialSync = cms.Sequence(
1187  process.hltHcalDigis +
1188  process.hltHcalDigisSoASerialSync +
1189  process.hltHbheRecoSoASerialSync +
1190  process.hltHbherecoSerialSync +
1191  process.hltHfprereco +
1192  process.hltHfreco +
1193  process.hltHoreco )
1194 
1195  process.HLTDoCaloSequenceSerialSync = cms.Sequence(
1196  process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerSequenceSerialSync +
1197  process.HLTDoLocalHcalSequenceSerialSync +
1198  process.hltTowerMakerForAllSerialSync )
1199 
1200  process.HLTDoCaloSequencePFSerialSync = cms.Sequence(
1201  process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerSequenceSerialSync +
1202  process.HLTDoLocalHcalSequenceSerialSync +
1203  process.hltTowerMakerForAllSerialSync )
1204 
1205  # run the HBHE local reconstruction, potentially offloading the MHI step to the device
1206  process.HLTStoppedHSCPLocalHcalReco = cms.Sequence(
1207  process.hltHcalDigis +
1208  process.hltHcalDigisSoA +
1209  process.hltHbheRecoSoA +
1210  process.hltHbhereco )
1211 
1212  # PFJet reconstruction running on the host
1213  process.HLTPFHcalClusteringSerialSync = cms.Sequence(
1214  process.hltHbheRecHitSoASerialSync +
1215  process.hltParticleFlowRecHitHBHESoASerialSync +
1216  process.hltParticleFlowRecHitHBHESerialSync +
1217  process.hltParticleFlowClusterHBHESoASerialSync +
1218  process.hltParticleFlowClusterHBHESerialSync +
1219  process.hltParticleFlowClusterHCALSerialSync )
1220 
1221  # compare the HCAL local reconstruction running on the device and on the host
1222  for pathNameMatch in ['DQM_HcalReconstruction_v', 'DQM_HIHcalReconstruction_v']:
1223  dqmHcalRecoPathName = None
1224  for pathName in process.paths_():
1225  if pathName.startswith(pathNameMatch):
1226  dqmHcalRecoPath = getattr(process, pathName)
1227  dqmHcalRecoPath.insert(dqmHcalRecoPath.index(process.HLTPFHcalClustering), getattr(process, 'HLTDoLocalHcalSequenceSerialSync'))
1228  for delmod in ['hltHcalConsumerCPU', 'hltHcalConsumerGPU']:
1229  if hasattr(process, delmod):
1230  process.__delattr__(delmod)
1231 
1232  # modify EventContent of *DQMGPUvsCPU streams
1233  for hltOutModMatch in ['hltOutputDQMGPUvsCPU', 'hltOutputHIDQMGPUvsCPU']:
1234  if hasattr(process, hltOutModMatch):
1235  outMod = getattr(process, hltOutModMatch)
1236  outCmds_new = [foo for foo in outMod.outputCommands if 'Hbhe' not in foo]
1237  outCmds_new += [
1238  'keep *_hltHbhereco_*_*',
1239  'keep *_hltHbherecoSerialSync_*_*',
1240  ]
1241  outMod.outputCommands = outCmds_new[:]
1242 
1243  # delete the obsolete modules and tasks
1244  del process.hcalMahiPulseOffsetsGPUESProducer
1245  del process.hcalChannelQualityGPUESProducer
1246  del process.hcalConvertedEffectivePedestalWidthsGPUESProducer
1247  del process.hcalConvertedEffectivePedestalsGPUESProducer
1248  del process.hcalConvertedPedestalWidthsGPUESProducer
1249  del process.hcalConvertedPedestalsGPUESProducer
1250  del process.hcalElectronicsMappingGPUESProducer
1251  del process.hcalGainWidthsGPUESProducer
1252  del process.hcalGainsGPUESProducer
1253  del process.hcalLUTCorrsGPUESProducer
1254  del process.hcalQIECodersGPUESProducer
1255  del process.hcalQIETypesGPUESProducer
1256  del process.hcalRecoParamsWithPulseShapesGPUESProducer
1257  del process.hcalRespCorrsGPUESProducer
1258  del process.hcalSiPMCharacteristicsGPUESProducer
1259  del process.hcalSiPMParametersGPUESProducer
1260  del process.hcalTimeCorrsGPUESProducer
1261 
1262  del process.hltHbherecoLegacy
1263  del process.hltHcalDigisGPU
1264  del process.hltHbherecoGPU
1265  del process.hltHbherecoFromGPU
1266 
1267  del process.HLTDoLocalHcalTask
1268  del process.HLTStoppedHSCPLocalHcalRecoTask
1269 
1270  return process
1271 
def producers_by_type(process, types)
def makeSerialClone(module, kwargs)
Definition: functions.py:1
def customizeHLTforAlpakaHcalLocalReco(process)

◆ customizeHLTforAlpakaParticleFlowClustering()

def customizeHLTforAlpaka.customizeHLTforAlpakaParticleFlowClustering (   process)

PF HLT in Alpaka.

Customization to introduce Particle Flow Reconstruction in Alpaka

Definition at line 10 of file customizeHLTforAlpaka.py.

References functions.makeSerialClone(), and customizeForNoTrackerDCS.producers_by_type().

Referenced by customizeHLTforAlpaka().

11  '''Customization to introduce Particle Flow Reconstruction in Alpaka
12  '''
13 
14  if not hasattr(process, 'hltParticleFlowClusterHBHE'):
15  return process
16 
17  for prod in producers_by_type(process, 'HCALRecHitSoAProducer@alpaka'):
18  return process
19 
20  process.hltESSPFRecHitHCALParamsRecord = cms.ESSource('EmptyESSource',
21  recordName = cms.string('PFRecHitHCALParamsRecord'),
22  iovIsRunNotTime = cms.bool(True),
23  firstValid = cms.vuint32(1)
24  )
25 
26  process.hltESSPFRecHitHCALTopologyRecord = cms.ESSource('EmptyESSource',
27  recordName = cms.string('PFRecHitHCALTopologyRecord'),
28  iovIsRunNotTime = cms.bool(True),
29  firstValid = cms.vuint32(1)
30  )
31 
32  process.hltESSJobConfigurationGPURecord = cms.ESSource('EmptyESSource',
33  recordName = cms.string('JobConfigurationGPURecord'),
34  iovIsRunNotTime = cms.bool(True),
35  firstValid = cms.vuint32(1)
36  )
37 
38  process.hltHbheRecHitSoA = cms.EDProducer("HCALRecHitSoAProducer@alpaka",
39  src = cms.InputTag("hltHbhereco"),
40  synchronise = cms.untracked.bool(False),
41  # autoselect the alpaka backend
42  alpaka = cms.untracked.PSet(
43  backend = cms.untracked.string('')
44  )
45  )
46 
47  process.hltESPPFRecHitHCALTopology = cms.ESProducer('PFRecHitHCALTopologyESProducer@alpaka',
48  usePFThresholdsFromDB = cms.bool(True),
49  appendToDataLabel = cms.string(''),
50  # autoselect the alpaka backend
51  alpaka = cms.untracked.PSet(
52  backend = cms.untracked.string('')
53  )
54  )
55 
56  process.hltESPPFRecHitHCALParams = cms.ESProducer('PFRecHitHCALParamsESProducer@alpaka',
57  energyThresholdsHB = cms.vdouble(0.1, 0.2, 0.3, 0.3),
58  energyThresholdsHE = cms.vdouble(0.1, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2),
59  appendToDataLabel = cms.string(''),
60  # autoselect the alpaka backend
61  alpaka = cms.untracked.PSet(
62  backend = cms.untracked.string('')
63  )
64  )
65 
66  process.hltParticleFlowRecHitHBHESoA = cms.EDProducer("PFRecHitSoAProducerHCAL@alpaka",
67  producers = cms.VPSet(
68  cms.PSet(
69  src = cms.InputTag("hltHbheRecHitSoA"),
70  params = cms.ESInputTag("hltESPPFRecHitHCALParams:"),
71  )
72  ),
73  topology = cms.ESInputTag("hltESPPFRecHitHCALTopology:"),
74  synchronise = cms.untracked.bool(False),
75  # autoselect the alpaka backend
76  alpaka = cms.untracked.PSet(
77  backend = cms.untracked.string('')
78  )
79  )
80 
81  process.hltParticleFlowRecHitHBHE = cms.EDProducer("LegacyPFRecHitProducer",
82  src = cms.InputTag("hltParticleFlowRecHitHBHESoA")
83  )
84 
85  process.hltESPPFClusterParams = cms.ESProducer("PFClusterParamsESProducer@alpaka",
86  seedFinder = cms.PSet(
87  nNeighbours = cms.int32(4),
88  thresholdsByDetector = cms.VPSet(
89  cms.PSet(
90  detector = cms.string('HCAL_BARREL1'),
91  seedingThreshold = cms.vdouble(0.125, 0.25, 0.35, 0.35),
92  seedingThresholdPt = cms.double(0)
93  ),
94  cms.PSet(
95  detector = cms.string('HCAL_ENDCAP'),
96  seedingThreshold = cms.vdouble(0.1375, 0.275, 0.275, 0.275, 0.275, 0.275, 0.275),
97  seedingThresholdPt = cms.double(0)
98  )
99  )
100  ),
101  initialClusteringStep = cms.PSet(
102  thresholdsByDetector = cms.VPSet(
103  cms.PSet(
104  detector = cms.string('HCAL_BARREL1'),
105  gatheringThreshold = cms.vdouble(0.1, 0.2, 0.3, 0.3)
106  ),
107  cms.PSet(
108  detector = cms.string('HCAL_ENDCAP'),
109  gatheringThreshold = cms.vdouble(0.1, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2)
110  )
111  )
112  ),
113  pfClusterBuilder = cms.PSet(
114  maxIterations = cms.uint32(5),
115  minFracTot = cms.double(1e-20),
116  minFractionToKeep = cms.double(1e-07),
117  excludeOtherSeeds = cms.bool(True),
118  showerSigma = cms.double(10),
119  stoppingTolerance = cms.double(1e-08),
120  recHitEnergyNorms = cms.VPSet(
121  cms.PSet(
122  detector = cms.string('HCAL_BARREL1'),
123  recHitEnergyNorm = cms.vdouble(0.1, 0.2, 0.3, 0.3)
124  ),
125  cms.PSet(
126  detector = cms.string('HCAL_ENDCAP'),
127  recHitEnergyNorm = cms.vdouble(0.1, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2)
128  )
129  ),
130  positionCalc = cms.PSet(
131  minFractionInCalc = cms.double(1e-09),
132  minAllowedNormalization = cms.double(1e-09)
133  ),
134  timeResolutionCalcBarrel = cms.PSet(
135  corrTermLowE = cms.double(0),
136  threshLowE = cms.double(6),
137  noiseTerm = cms.double(21.86),
138  constantTermLowE = cms.double(4.24),
139  noiseTermLowE = cms.double(8),
140  threshHighE = cms.double(15),
141  constantTerm = cms.double(2.82)
142  ),
143  timeResolutionCalcEndcap = cms.PSet(
144  corrTermLowE = cms.double(0),
145  threshLowE = cms.double(6),
146  noiseTerm = cms.double(21.86),
147  constantTermLowE = cms.double(4.24),
148  noiseTermLowE = cms.double(8),
149  threshHighE = cms.double(15),
150  constantTerm = cms.double(2.82)
151  )
152  ),
153  # autoselect the alpaka backend
154  alpaka = cms.untracked.PSet(
155  backend = cms.untracked.string('')
156  )
157  )
158 
159  process.hltParticleFlowClusterHBHESoA = cms.EDProducer("PFClusterSoAProducer@alpaka",
160  pfRecHits = cms.InputTag("hltParticleFlowRecHitHBHESoA"),
161  topology = cms.ESInputTag("hltESPPFRecHitHCALTopology:"),
162  pfClusterParams = cms.ESInputTag("hltESPPFClusterParams:"),
163  synchronise = cms.bool(False),
164  # autoselect the alpaka backend
165  alpaka = cms.untracked.PSet(
166  backend = cms.untracked.string('')
167  )
168  )
169 
170  process.hltParticleFlowClusterHBHE = cms.EDProducer("LegacyPFClusterProducer",
171  src = cms.InputTag("hltParticleFlowClusterHBHESoA"),
172  pfClusterBuilder = process.hltParticleFlowClusterHBHE.pfClusterBuilder,
173  usePFThresholdsFromDB = cms.bool(True),
174  recHitsSource = cms.InputTag("hltParticleFlowRecHitHBHE"),
175  PFRecHitsLabelIn = cms.InputTag("hltParticleFlowRecHitHBHESoA")
176  )
177 
178  process.HLTPFHcalClustering = cms.Sequence(
179  process.hltHbheRecHitSoA +
180  process.hltParticleFlowRecHitHBHESoA +
181  process.hltParticleFlowRecHitHBHE +
182  process.hltParticleFlowClusterHBHESoA +
183  process.hltParticleFlowClusterHBHE +
184  process.hltParticleFlowClusterHCAL
185  )
186 
187  # Some Sequences contain all the modules of process.HLTPFHcalClustering Sequence instead of the Sequence itself
188  # find these Sequences and replace all the modules with the Sequence
189  def replaceItemsInSequence(process, seqNames, itemsToReplace, replacingSequence):
190  for seqName in seqNames:
191  if not hasattr(process, seqName):
192  continue
193  seq = getattr(process, seqName)
194  for item in itemsToReplace:
195  # remove items that will be replaced by replacingSequence
196  if (item != itemsToReplace[-1]):
197  seq.remove(item)
198  else:
199  # if last item, replace it with the Sequence
200  seq.replace(item, replacingSequence)
201  return process
202 
203  process = replaceItemsInSequence(
204  process, [
205  'HLTParticleFlowSequence',
206  'HLTParticleFlowSequenceForTaus',
207  'HLTParticleFlowSequenceForDisplTaus',
208  'HLTParticleFlowSequencePPOnAA',
209  'HLTPixelOnlyParticleFlowSequence',
210  ], [
211  process.hltParticleFlowRecHitHBHE,
212  process.hltParticleFlowClusterHBHE,
213  process.hltParticleFlowClusterHCAL
214  ],
215  process.HLTPFHcalClustering
216  )
217 
218  process.hltHbheRecHitSoACPUSerial = makeSerialClone(process.hltHbheRecHitSoA)
219 
220  process.hltParticleFlowRecHitHBHESoACPUSerial = makeSerialClone(process.hltParticleFlowRecHitHBHESoA)
221  process.hltParticleFlowRecHitHBHESoACPUSerial.producers[0].src = 'hltHbheRecHitSoACPUSerial'
222 
223  process.hltParticleFlowRecHitHBHECPUOnly = process.hltParticleFlowRecHitHBHE.clone(
224  src = 'hltParticleFlowRecHitHBHESoACPUSerial',
225  )
226 
227  process.hltParticleFlowClusterHBHESoACPUSerial = makeSerialClone(process.hltParticleFlowClusterHBHESoA,
228  pfRecHits = 'hltParticleFlowRecHitHBHESoACPUSerial',
229  )
230 
231  process.hltParticleFlowClusterHBHECPUOnly = process.hltParticleFlowClusterHBHE.clone(
232  src = 'hltParticleFlowClusterHBHESoACPUSerial',
233  recHitsSource = 'hltParticleFlowRecHitHBHECPUOnly',
234  PFRecHitsLabelIn = 'hltParticleFlowRecHitHBHESoACPUSerial',
235  )
236 
237  process.HLTPFHcalClusteringCPUOnly = cms.Sequence(
238  process.hltHbheRecHitSoACPUSerial +
239  process.hltParticleFlowRecHitHBHESoACPUSerial +
240  process.hltParticleFlowRecHitHBHECPUOnly +
241  process.hltParticleFlowClusterHBHESoACPUSerial +
242  process.hltParticleFlowClusterHBHECPUOnly +
243  process.hltParticleFlowClusterHCALCPUOnly
244  )
245 
246  process = replaceItemsInSequence(process, ['HLTParticleFlowCPUOnlySequence'],
247  [process.hltParticleFlowRecHitHBHECPUOnly, process.hltParticleFlowClusterHBHECPUOnly, process.hltParticleFlowClusterHCALCPUOnly],
248  process.HLTPFHcalClusteringCPUOnly)
249 
250  # modify EventContent of *DQMGPUvsCPU streams
251  for hltOutModMatch in ['hltOutputDQMGPUvsCPU', 'hltOutputHIDQMGPUvsCPU']:
252  if hasattr(process, hltOutModMatch):
253  outMod = getattr(process, hltOutModMatch)
254  outMod.outputCommands.extend([
255  'keep *_hltParticleFlowClusterHBHESoA_*_*',
256  'keep *_hltParticleFlowClusterHBHESoACPUSerial_*_*',
257  ])
258 
259  # Add PF sequences to DQM_*HcalReconstruction_v Path
260  for pathNameMatch in ['DQM_HcalReconstruction_v', 'DQM_HIHcalReconstruction_v']:
261  dqmHcalRecoPathName = None
262  for pathName in process.paths_():
263  if pathName.startswith(pathNameMatch):
264  dqmHcalRecoPathName = pathName
265  break
266  if dqmHcalRecoPathName == None:
267  continue
268  dqmHcalPath = getattr(process, dqmHcalRecoPathName)
269  dqmHcalRecoPathIndex = dqmHcalPath.index(process.hltHcalConsumerGPU) + 1
270  dqmHcalPath.insert(dqmHcalRecoPathIndex, process.HLTPFHcalClusteringCPUOnly)
271  dqmHcalPath.insert(dqmHcalRecoPathIndex, process.HLTPFHcalClustering)
272 
273  return process
274 
def producers_by_type(process, types)
def makeSerialClone(module, kwargs)
Definition: functions.py:1
def customizeHLTforAlpakaParticleFlowClustering(process)
PF HLT in Alpaka.

◆ customizeHLTforAlpakaPFSoA()

def customizeHLTforAlpaka.customizeHLTforAlpakaPFSoA (   process)

Definition at line 275 of file customizeHLTforAlpaka.py.

Referenced by customizeHLTforAlpaka().

275 def customizeHLTforAlpakaPFSoA(process):
276 
277  # avoid the conversion from SoA to legacy to SoA for the HCAL rechits
278  process.hltParticleFlowRecHitHBHESoA.producers[0].src = 'hltHbheRecoSoA'
279  process.hltParticleFlowRecHitHBHESoASerialSync.producers[0].src = 'hltHbheRecoSoASerialSync'
280 
281  del process.hltHbheRecHitSoA
282  del process.hltHbheRecHitSoASerialSync
283 
284  return process
285 
def customizeHLTforAlpakaPFSoA(process)

◆ customizeHLTforAlpakaPixelReco()

def customizeHLTforAlpaka.customizeHLTforAlpakaPixelReco (   process)
Customisation to introduce the Pixel Local+Track+Vertex Reconstruction in Alpaka

Definition at line 883 of file customizeHLTforAlpaka.py.

References customizeHLTforAlpakaPixelRecoLocal(), customizeHLTforAlpakaPixelRecoTracking(), customizeHLTforAlpakaPixelRecoVertexing(), and customizeHLTforDQMGPUvsCPUPixel().

Referenced by customizeHLTforAlpaka().

883 def customizeHLTforAlpakaPixelReco(process):
884  '''Customisation to introduce the Pixel Local+Track+Vertex Reconstruction in Alpaka
885  '''
886  process = customizeHLTforAlpakaPixelRecoLocal(process)
887  process = customizeHLTforAlpakaPixelRecoTracking(process)
888  process = customizeHLTforAlpakaPixelRecoVertexing(process)
889  process = customizeHLTforDQMGPUvsCPUPixel(process)
890 
891  return process
892 
893 
def customizeHLTforDQMGPUvsCPUPixel(process)
Pixel HLT in Alpaka.
def customizeHLTforAlpakaPixelRecoVertexing(process)
def customizeHLTforAlpakaPixelRecoTracking(process)
def customizeHLTforAlpakaPixelRecoLocal(process)
def customizeHLTforAlpakaPixelReco(process)

◆ customizeHLTforAlpakaPixelRecoLocal()

def customizeHLTforAlpaka.customizeHLTforAlpakaPixelRecoLocal (   process)
Customisation to introduce the Local Pixel Reconstruction in Alpaka

Definition at line 404 of file customizeHLTforAlpaka.py.

References functions.makeSerialClone(), and customizeForNoTrackerDCS.producers_by_type().

Referenced by customizeHLTforAlpakaPixelReco().

405  '''Customisation to introduce the Local Pixel Reconstruction in Alpaka
406  '''
407 
408  if not hasattr(process, 'HLTDoLocalPixelSequence'):
409  return process
410 
411  for prod in producers_by_type(process, 'SiPixelRawToClusterPhase1@alpaka'):
412  return process
413 
414  process.hltESPSiPixelCablingSoA = cms.ESProducer('SiPixelCablingSoAESProducer@alpaka',
415  CablingMapLabel = cms.string(''),
416  UseQualityInfo = cms.bool(False),
417  appendToDataLabel = cms.string(''),
418  alpaka = cms.untracked.PSet(
419  backend = cms.untracked.string('')
420  )
421  )
422 
423  process.hltESPSiPixelGainCalibrationForHLTSoA = cms.ESProducer('SiPixelGainCalibrationForHLTSoAESProducer@alpaka',
424  appendToDataLabel = cms.string(''),
425  alpaka = cms.untracked.PSet(
426  backend = cms.untracked.string('')
427  )
428  )
429 
430  process.hltESPPixelCPEFastParamsPhase1 = cms.ESProducer('PixelCPEFastParamsESProducerAlpakaPhase1@alpaka',
431  appendToDataLabel = cms.string(''),
432  alpaka = cms.untracked.PSet(
433  backend = cms.untracked.string('')
434  )
435  )
436 
437  if hasattr(process, 'hltESPPixelCPEFast'):
438  del process.hltESPPixelCPEFast
439 
440  # alpaka EDProducer
441  # consumes
442  # - reco::BeamSpot
443  # produces
444  # - BeamSpotDevice
445  process.hltOnlineBeamSpotDevice = cms.EDProducer('BeamSpotDeviceProducer@alpaka',
446  src = cms.InputTag('hltOnlineBeamSpot'),
447  alpaka = cms.untracked.PSet(
448  backend = cms.untracked.string('')
449  )
450  )
451 
452  if hasattr(process, 'hltOnlineBeamSpotToGPU'):
453  # hltOnlineBeamSpotToGPU is currently still used in HIon menu,
454  # remove it only if the relevant ConditionalTask of the HIon menu is not present
455  # (this check mainly applies to the HLT combined table)
456  if not (hasattr(process, 'HLTDoLocalPixelPPOnAATask') and process.HLTDoLocalPixelPPOnAATask.contains(process.hltOnlineBeamSpotToGPU)):
457  del process.hltOnlineBeamSpotToGPU
458 
459  # alpaka EDProducer
460  # consumes
461  # - FEDRawDataCollection
462  # produces (* optional)
463  # - SiPixelClustersSoA
464  # - SiPixelDigisSoACollection
465  # - SiPixelDigiErrorsSoACollection *
466  # - SiPixelFormatterErrors *
467  process.hltSiPixelClustersSoA = cms.EDProducer('SiPixelRawToClusterPhase1@alpaka',
468  IncludeErrors = cms.bool(True),
469  UseQualityInfo = cms.bool(False),
470  clusterThreshold_layer1 = cms.int32(4000),
471  clusterThreshold_otherLayers = cms.int32(4000),
472  VCaltoElectronGain = cms.double(1), # all gains=1, pedestals=0
473  VCaltoElectronGain_L1 = cms.double(1),
474  VCaltoElectronOffset = cms.double(0),
475  VCaltoElectronOffset_L1 = cms.double(0),
476  InputLabel = cms.InputTag('rawDataCollector'),
477  Regions = cms.PSet(),
478  CablingMapLabel = cms.string(''),
479  # autoselect the alpaka backend
480  alpaka = cms.untracked.PSet(
481  backend = cms.untracked.string('')
482  )
483  )
484 
485  if hasattr(process, 'hltSiPixelClustersGPU'):
486  del process.hltSiPixelClustersGPU
487 
488  process.hltSiPixelClusters = cms.EDProducer('SiPixelDigisClustersFromSoAAlpakaPhase1',
489  src = cms.InputTag('hltSiPixelClustersSoA'),
490  clusterThreshold_layer1 = cms.int32(4000),
491  clusterThreshold_otherLayers = cms.int32(4000),
492  produceDigis = cms.bool(False),
493  storeDigis = cms.bool(False)
494  )
495 
496  # used only in the PPRef menu for the legacy pixel track reconstruction
497  process.hltSiPixelClustersCache = cms.EDProducer('SiPixelClusterShapeCacheProducer',
498  src = cms.InputTag('hltSiPixelClusters'),
499  onDemand = cms.bool(False)
500  )
501 
502  # legacy EDProducer
503  # consumes
504  # - SiPixelDigiErrorsHost
505  # - SiPixelFormatterErrors
506  # produces
507  # - edm::DetSetVector<SiPixelRawDataError>
508  # - DetIdCollection
509  # - DetIdCollection, 'UserErrorModules'
510  # - edmNew::DetSetVector<PixelFEDChannel>
511  process.hltSiPixelDigiErrors = cms.EDProducer('SiPixelDigiErrorsFromSoAAlpaka',
512  digiErrorSoASrc = cms.InputTag('hltSiPixelClustersSoA'),
513  fmtErrorsSoASrc = cms.InputTag('hltSiPixelClustersSoA'),
514  CablingMapLabel = cms.string(''),
515  UsePhase1 = cms.bool(True),
516  ErrorList = cms.vint32(29),
517  UserErrorList = cms.vint32(40)
518  )
519 
520  if hasattr(process, 'hltSiPixelDigisSoA'):
521  del process.hltSiPixelDigisSoA
522  if hasattr(process, 'hltSiPixelDigiErrorsSoA'):
523  del process.hltSiPixelDigiErrorsSoA
524 
525  # alpaka EDProducer
526  # consumes
527  # - BeamSpotDevice
528  # - SiPixelClustersSoA
529  # - SiPixelDigisSoACollection
530  # produces
531  # - TrackingRecHitsSoACollection<TrackerTraits>
532  process.hltSiPixelRecHitsSoA = cms.EDProducer('SiPixelRecHitAlpakaPhase1@alpaka',
533  beamSpot = cms.InputTag('hltOnlineBeamSpotDevice'),
534  src = cms.InputTag('hltSiPixelClustersSoA'),
535  CPE = cms.string('PixelCPEFastParams'),
536  # autoselect the alpaka backend
537  alpaka = cms.untracked.PSet(
538  backend = cms.untracked.string('')
539  )
540  )
541 
542  if hasattr(process, 'hltSiPixelRecHitsGPU'):
543  del process.hltSiPixelRecHitsGPU
544  if hasattr(process, 'hltSiPixelRecHitsFromGPU'):
545  del process.hltSiPixelRecHitsFromGPU
546  if hasattr(process, 'hltSiPixelRecHitsSoAFromGPU'):
547  del process.hltSiPixelRecHitsSoAFromGPU
548 
549  process.hltSiPixelRecHits = cms.EDProducer('SiPixelRecHitFromSoAAlpakaPhase1',
550  pixelRecHitSrc = cms.InputTag('hltSiPixelRecHitsSoA'),
551  src = cms.InputTag('hltSiPixelClusters'),
552  )
553 
554 
557  process.HLTDoLocalPixelSequence = cms.Sequence(
558  process.hltOnlineBeamSpotDevice +
559  process.hltSiPixelClustersSoA +
560  process.hltSiPixelClusters +
561  process.hltSiPixelDigiErrors + # renamed from hltSiPixelDigis
562  process.hltSiPixelRecHitsSoA +
563  process.hltSiPixelRecHits
564  )
565 
566  # The module hltSiPixelClustersCache is only used in the PRef menu.
567  # Previously, it being included in the GRun menu had no effect
568  # because it was included in a ConditionalTask, which meant that
569  # it was not executed in the GRun menu, since no other modules
570  # in any Path of that menu were consuming it.
571  # Since this customisation effectively replaces ConditionalTasks in the HLT menus with Sequences,
572  # leaving hltSiPixelClustersCache in a Sequence of the GRun menu would lead to it being unnecessarily executed.
573  # On the other hand, hltSiPixelClustersCache must be kept in the PRef menu,
574  # as the latter does have reconstruction modules which consume it.
575  # The solution implemented here is
576  # (a) not to include hltSiPixelClustersCache in the Sequence HLTDoLocalPixelSequence used in the GRun menu, and
577  # (b) include hltSiPixelClustersCache in a separate Sequence to be used only as part of the PRef menu.
578  if hasattr(process, 'HLTPixelClusterSplittingForPFPPRefForDmeson') \
579  and not hasattr(process, 'HLTDoLocalPixelSequenceForPFPPRefForDmeson') \
580  and process.HLTPixelClusterSplittingForPFPPRefForDmeson.contains(process.HLTDoLocalPixelSequence):
581 
582  process.HLTDoLocalPixelSequenceForPFPPRefForDmeson = cms.Sequence(
583  process.HLTDoLocalPixelSequence +
584  process.hltSiPixelClustersCache
585  )
586 
587  process.HLTPixelClusterSplittingForPFPPRefForDmeson.insert(
588  process.HLTPixelClusterSplittingForPFPPRefForDmeson.index(process.HLTDoLocalPixelSequence),
589  process.HLTDoLocalPixelSequenceForPFPPRefForDmeson
590  )
591 
592  # remove HLTDoLocalPixelTask (not needed anymore)
593  if hasattr(process, 'HLTDoLocalPixelTask'):
594  del process.HLTDoLocalPixelTask
595 
596 
599  process.hltOnlineBeamSpotDeviceSerialSync = makeSerialClone(process.hltOnlineBeamSpotDevice)
600 
601  process.hltSiPixelClustersSoASerialSync = makeSerialClone(process.hltSiPixelClustersSoA)
602 
603  process.hltSiPixelClustersSerialSync = process.hltSiPixelClusters.clone(
604  src = 'hltSiPixelClustersSoASerialSync'
605  )
606 
607  process.hltSiPixelDigiErrorsSerialSync = process.hltSiPixelDigiErrors.clone(
608  digiErrorSoASrc = 'hltSiPixelClustersSoASerialSync',
609  fmtErrorsSoASrc = 'hltSiPixelClustersSoASerialSync',
610  )
611 
612  process.hltSiPixelRecHitsSoASerialSync = makeSerialClone(process.hltSiPixelRecHitsSoA,
613  beamSpot = 'hltOnlineBeamSpotDeviceSerialSync',
614  src = 'hltSiPixelClustersSoASerialSync',
615  )
616 
617  process.hltSiPixelRecHitsSerialSync = process.hltSiPixelRecHits.clone(
618  pixelRecHitSrc = 'hltSiPixelRecHitsSoASerialSync',
619  src = 'hltSiPixelClustersSerialSync',
620  )
621 
622  process.HLTDoLocalPixelCPUOnlySequence = cms.Sequence(
623  process.hltOnlineBeamSpotDeviceSerialSync +
624  process.hltSiPixelClustersSoASerialSync +
625  process.hltSiPixelClustersSerialSync +
626  process.hltSiPixelDigiErrorsSerialSync +
627  process.hltSiPixelRecHitsSoASerialSync +
628  process.hltSiPixelRecHitsSerialSync
629  )
630 
631  if hasattr(process, 'HLTDoLocalPixelCPUOnlyTask'):
632  del process.HLTDoLocalPixelCPUOnlyTask
633 
634  if hasattr(process, 'hltMeasurementTrackerEventCPUOnly'):
635  process.hltMeasurementTrackerEventCPUOnly.pixelClusterProducer = "hltSiPixelClustersSerialSync"
636  process.hltMeasurementTrackerEventCPUOnly.inactivePixelDetectorLabels = ["hltSiPixelDigiErrorsSerialSync"]
637  process.hltMeasurementTrackerEventCPUOnly.badPixelFEDChannelCollectionLabels = ["hltSiPixelDigiErrorsSerialSync"]
638 
639  if hasattr(process, 'hltDoubletRecoveryClustersRefRemovalCPUOnly'):
640  process.hltDoubletRecoveryClustersRefRemovalCPUOnly.pixelClusters = "hltSiPixelClustersSerialSync"
641 
642  if hasattr(process, 'hltDoubletRecoveryPFlowPixelClusterCheckCPUOnly'):
643  process.hltDoubletRecoveryPFlowPixelClusterCheckCPUOnly.PixelClusterCollectionLabel = "hltSiPixelClustersSerialSync"
644 
645  if hasattr(process, 'hltDoubletRecoveryPixelLayersAndRegionsCPUOnly'):
646  process.hltDoubletRecoveryPixelLayersAndRegionsCPUOnly.inactivePixelDetectorLabels = ['hltSiPixelDigiErrorsSerialSync']
647  process.hltDoubletRecoveryPixelLayersAndRegionsCPUOnly.badPixelFEDChannelCollectionLabels = ['hltSiPixelDigiErrorsSerialSync']
648  process.hltDoubletRecoveryPixelLayersAndRegionsCPUOnly.BPix.HitProducer = "hltSiPixelRecHitsSerialSync"
649  process.hltDoubletRecoveryPixelLayersAndRegionsCPUOnly.FPix.HitProducer = "hltSiPixelRecHitsSerialSync"
650 
651  if hasattr(process, 'hltIter3IterL3FromL1MuonClustersRefRemovalCPUOnly'):
652  process.hltIter3IterL3FromL1MuonClustersRefRemovalCPUOnly.pixelClusters = "hltSiPixelClustersSerialSync"
653 
654  if hasattr(process, 'hltIter3IterL3FromL1MuonPixelClusterCheckCPUOnly'):
655  process.hltIter3IterL3FromL1MuonPixelClusterCheckCPUOnly.PixelClusterCollectionLabel = "hltSiPixelClustersSerialSync"
656 
657  if hasattr(process, 'hltIter3IterL3FromL1MuonPixelLayersAndRegionsCPUOnly'):
658  process.hltIter3IterL3FromL1MuonPixelLayersAndRegionsCPUOnly.inactivePixelDetectorLabels = ['hltSiPixelDigiErrorsSerialSync']
659  process.hltIter3IterL3FromL1MuonPixelLayersAndRegionsCPUOnly.badPixelFEDChannelCollectionLabels = ['hltSiPixelDigiErrorsSerialSync']
660  process.hltIter3IterL3FromL1MuonPixelLayersAndRegionsCPUOnly.BPix.HitProducer = "hltSiPixelRecHitsSerialSync"
661  process.hltIter3IterL3FromL1MuonPixelLayersAndRegionsCPUOnly.FPix.HitProducer = "hltSiPixelRecHitsSerialSync"
662 
663  for modLabel in [
664  'hltDoubletRecoveryPixelLayersAndRegions',
665  'hltFullIter6PixelTrackingRegionSeedLayersBPPRef',
666  'hltIter3IterL3FromL1MuonPixelLayersAndRegions',
667  'hltMeasurementTrackerEvent',
668  ]:
669  if hasattr(process, modLabel):
670  mod = getattr(process, modLabel)
671  mod.inactivePixelDetectorLabels = ['hltSiPixelDigiErrors']
672  mod.badPixelFEDChannelCollectionLabels = ['hltSiPixelDigiErrors']
673 
674  return process
675 
676 
def producers_by_type(process, types)
def makeSerialClone(module, kwargs)
Definition: functions.py:1
def customizeHLTforAlpakaPixelRecoLocal(process)

◆ customizeHLTforAlpakaPixelRecoTracking()

def customizeHLTforAlpaka.customizeHLTforAlpakaPixelRecoTracking (   process)
Customisation to introduce the Pixel-Track Reconstruction in Alpaka

Definition at line 677 of file customizeHLTforAlpaka.py.

References functions.makeSerialClone(), and customizeForNoTrackerDCS.producers_by_type().

Referenced by customizeHLTforAlpakaPixelReco().

678  '''Customisation to introduce the Pixel-Track Reconstruction in Alpaka
679  '''
680 
681  if not hasattr(process, 'HLTRecoPixelTracksSequence'):
682  return process
683 
684  for prod in producers_by_type(process, 'CAHitNtupletAlpakaPhase1@alpaka'):
685  return process
686 
687  # alpaka EDProducer
688  # consumes
689  # - TrackingRecHitsSoACollection<TrackerTraits>
690  # produces
691  # - TkSoADevice
692  process.hltPixelTracksSoA = cms.EDProducer('CAHitNtupletAlpakaPhase1@alpaka',
693  pixelRecHitSrc = cms.InputTag('hltSiPixelRecHitsSoA'),
694  CPE = cms.string('PixelCPEFastParams'),
695  ptmin = cms.double(0.9),
696  CAThetaCutBarrel = cms.double(0.002),
697  CAThetaCutForward = cms.double(0.003),
698  hardCurvCut = cms.double(0.0328407225),
699  dcaCutInnerTriplet = cms.double(0.15),
700  dcaCutOuterTriplet = cms.double(0.25),
701  earlyFishbone = cms.bool(True),
702  lateFishbone = cms.bool(False),
703  fillStatistics = cms.bool(False),
704  minHitsPerNtuplet = cms.uint32(3),
705  phiCuts = cms.vint32(
706  522, 730, 730, 522, 626,
707  626, 522, 522, 626, 626,
708  626, 522, 522, 522, 522,
709  522, 522, 522, 522
710  ),
711  maxNumberOfDoublets = cms.uint32(524288),
712  minHitsForSharingCut = cms.uint32(10),
713  fitNas4 = cms.bool(False),
714  doClusterCut = cms.bool(True),
715  doZ0Cut = cms.bool(True),
716  doPtCut = cms.bool(True),
717  useRiemannFit = cms.bool(False),
718  doSharedHitCut = cms.bool(True),
719  dupPassThrough = cms.bool(False),
720  useSimpleTripletCleaner = cms.bool(True),
721  idealConditions = cms.bool(False),
722  includeJumpingForwardDoublets = cms.bool(True),
723  trackQualityCuts = cms.PSet(
724  chi2MaxPt = cms.double(10),
725  chi2Coeff = cms.vdouble(0.9, 1.8),
726  chi2Scale = cms.double(8),
727  tripletMinPt = cms.double(0.5),
728  tripletMaxTip = cms.double(0.3),
729  tripletMaxZip = cms.double(12),
730  quadrupletMinPt = cms.double(0.3),
731  quadrupletMaxTip = cms.double(0.5),
732  quadrupletMaxZip = cms.double(12)
733  ),
734  # autoselect the alpaka backend
735  alpaka = cms.untracked.PSet(
736  backend = cms.untracked.string('')
737  )
738  )
739 
740  if hasattr(process, 'hltL2TauTagNNProducer'):
741  process.hltL2TauTagNNProducer = cms.EDProducer("L2TauNNProducerAlpaka", **process.hltL2TauTagNNProducer.parameters_())
742 
743  process.hltPixelTracksSoASerialSync = makeSerialClone(process.hltPixelTracksSoA,
744  pixelRecHitSrc = 'hltSiPixelRecHitsSoASerialSync'
745  )
746 
747  process.hltPixelTracks = cms.EDProducer("PixelTrackProducerFromSoAAlpakaPhase1",
748  beamSpot = cms.InputTag("hltOnlineBeamSpot"),
749  minNumberOfHits = cms.int32(0),
750  minQuality = cms.string('loose'),
751  pixelRecHitLegacySrc = cms.InputTag("hltSiPixelRecHits"),
752  trackSrc = cms.InputTag("hltPixelTracksSoA")
753  )
754 
755  if hasattr(process, 'hltPixelTracksCPU'):
756  del process.hltPixelTracksCPU
757  if hasattr(process, 'hltPixelTracksCPUOnly'):
758  del process.hltPixelTracksCPUOnly
759  if hasattr(process, 'hltPixelTracksFromGPU'):
760  del process.hltPixelTracksFromGPU
761  if hasattr(process, 'hltPixelTracksGPU'):
762  del process.hltPixelTracksGPU
763 
764  process.hltPixelTracksSerialSync = process.hltPixelTracks.clone(
765  pixelRecHitLegacySrc = cms.InputTag("hltSiPixelRecHitsSerialSync"),
766  trackSrc = cms.InputTag("hltPixelTracksSoASerialSync")
767  )
768 
769  process.HLTRecoPixelTracksSequence = cms.Sequence(
770  process.hltPixelTracksSoA +
771  process.hltPixelTracks
772  )
773 
774  if hasattr(process, 'HLTRecoPixelTracksTask'):
775  del process.HLTRecoPixelTracksTask
776 
777  process.HLTRecoPixelTracksSerialSyncSequence = cms.Sequence(
778  process.hltPixelTracksSoASerialSync +
779  process.hltPixelTracksSerialSync
780  )
781 
782  if hasattr(process, 'HLTRecoPixelTracksCPUOnlyTask'):
783  del process.HLTRecoPixelTracksCPUOnlyTask
784 
785  process.hltPixelTracksInRegionL2CPUOnly.tracks = "hltPixelTracksSerialSync"
786 
787  process.hltPixelTracksInRegionL1CPUOnly.tracks = "hltPixelTracksSerialSync"
788 
789  process.hltIter0PFLowPixelSeedsFromPixelTracksCPUOnly.InputCollection = "hltPixelTracksSerialSync"
790 
791  return process
792 
793 
def producers_by_type(process, types)
def makeSerialClone(module, kwargs)
Definition: functions.py:1
def customizeHLTforAlpakaPixelRecoTracking(process)

◆ customizeHLTforAlpakaPixelRecoVertexing()

def customizeHLTforAlpaka.customizeHLTforAlpakaPixelRecoVertexing (   process)
Customisation to introduce the Pixel-Vertex Reconstruction in Alpaka

Definition at line 794 of file customizeHLTforAlpaka.py.

References functions.makeSerialClone(), and customizeForNoTrackerDCS.producers_by_type().

Referenced by customizeHLTforAlpakaPixelReco().

795  '''Customisation to introduce the Pixel-Vertex Reconstruction in Alpaka
796  '''
797 
798  if not hasattr(process, 'HLTRecopixelvertexingSequence'):
799  return process
800 
801  # do not apply the customisation if the menu is already using the alpaka pixel reconstruction
802  for prod in producers_by_type(process, 'PixelVertexProducerAlpakaPhase1@alpaka'):
803  return process
804 
805  # alpaka EDProducer
806  # consumes
807  # - TkSoADevice
808  # produces
809  # - ZVertexDevice
810  process.hltPixelVerticesSoA = cms.EDProducer('PixelVertexProducerAlpakaPhase1@alpaka',
811  oneKernel = cms.bool(True),
812  useDensity = cms.bool(True),
813  useDBSCAN = cms.bool(False),
814  useIterative = cms.bool(False),
815  minT = cms.int32(2),
816  eps = cms.double(0.07),
817  errmax = cms.double(0.01),
818  chi2max = cms.double(9),
819  PtMin = cms.double(0.5),
820  PtMax = cms.double(75),
821  pixelTrackSrc = cms.InputTag('hltPixelTracksSoA'),
822  # autoselect the alpaka backend
823  alpaka = cms.untracked.PSet(
824  backend = cms.untracked.string('')
825  )
826  )
827 
828  process.hltPixelVerticesSoASerialSync = makeSerialClone(process.hltPixelVerticesSoA,
829  pixelTrackSrc = 'hltPixelTracksSoASerialSync'
830  )
831 
832  process.hltPixelVertices = cms.EDProducer("PixelVertexProducerFromSoAAlpaka",
833  TrackCollection = cms.InputTag("hltPixelTracks"),
834  beamSpot = cms.InputTag("hltOnlineBeamSpot"),
835  src = cms.InputTag("hltPixelVerticesSoA")
836  )
837 
838  process.hltPixelVerticesSerialSync = process.hltPixelVertices.clone(
839  TrackCollection = cms.InputTag("hltPixelTracksSerialSync"),
840  src = cms.InputTag("hltPixelVerticesSoASerialSync")
841  )
842 
843  if hasattr(process, 'hltPixelVerticesCPU'):
844  del process.hltPixelVerticesCPU
845  if hasattr(process, 'hltPixelVerticesCPUOnly'):
846  del process.hltPixelVerticesCPUOnly
847  if hasattr(process, 'hltPixelVerticesFromGPU'):
848  del process.hltPixelVerticesFromGPU
849  if hasattr(process, 'hltPixelVerticesGPU'):
850  del process.hltPixelVerticesGPU
851 
852 
853  if not hasattr(process, 'hltTrimmedPixelVertices'):
854  return process
855 
856  process.HLTRecopixelvertexingSequence = cms.Sequence(
857  process.HLTRecoPixelTracksSequence +
858  process.hltPixelVerticesSoA +
859  process.hltPixelVertices +
860  process.hltTrimmedPixelVertices
861  )
862 
863  if hasattr(process, 'HLTRecopixelvertexingTask'):
864  del process.HLTRecopixelvertexingTask
865 
866  process.HLTRecopixelvertexingCPUOnlySequence = cms.Sequence(
867  process.HLTRecoPixelTracksSerialSyncSequence +
868  process.hltPixelVerticesSoASerialSync +
869  process.hltPixelVerticesSerialSync +
870  process.hltTrimmedPixelVerticesCPUOnly
871  )
872 
873  if hasattr(process, 'HLTRecopixelvertexingCPUOnlyTask'):
874  del process.HLTRecopixelvertexingCPUOnlyTask
875 
876  process.hltTrimmedPixelVerticesCPUOnly.src = 'hltPixelVerticesSerialSync'
877  process.hltParticleFlowCPUOnly.vertexCollection = 'hltPixelVerticesSerialSync'
878  process.hltAK4PFJetsCPUOnly.srcPVs = 'hltPixelVerticesSerialSync'
879 
880  return process
881 
882 
def producers_by_type(process, types)
def customizeHLTforAlpakaPixelRecoVertexing(process)
def makeSerialClone(module, kwargs)
Definition: functions.py:1

◆ customizeHLTforAlpakaRename()

def customizeHLTforAlpaka.customizeHLTforAlpakaRename (   process)

Definition at line 1370 of file customizeHLTforAlpaka.py.

References _rename_containers(), and _rename_edmodules().

Referenced by customizeHLTforAlpaka().

1370 def customizeHLTforAlpakaRename(process):
1371  # mass renaming of EDModules and Sequences:
1372  # if the label matches matchRegex, remove oldStr and append newStr
1373  for matchRegex, oldStr, newStr in [
1374  [".*Portable.*", "Portable", ""],
1375  [".*SerialSync.*", "SerialSync", "SerialSync"],
1376  [".*CPUSerial.*", "CPUSerial", "SerialSync"],
1377  [".*CPUOnly.*", "CPUOnly", "SerialSync"],
1378  ]:
1379  process = _rename_edmodules(process, matchRegex, oldStr, newStr, ['HLTPrescaler'])
1380  process = _rename_containers(process, matchRegex, oldStr, newStr)
1381 
1382  return process
1383 
1384 
def _rename_containers(process, matchExpr, oldStr, newStr)
def customizeHLTforAlpakaRename(process)
def _rename_edmodules(process, matchExpr, oldStr, newStr, typeBlackList)

◆ customizeHLTforAlpakaStatus()

def customizeHLTforAlpaka.customizeHLTforAlpakaStatus (   process)

Definition at line 1272 of file customizeHLTforAlpaka.py.

References common.insert_modules_before().

Referenced by customizeHLTforAlpaka().

1272 def customizeHLTforAlpakaStatus(process):
1273 
1274  if not hasattr(process, 'statusOnGPU'):
1275  return process
1276 
1277  process.hltBackend = cms.EDProducer('AlpakaBackendProducer@alpaka')
1278 
1279  insert_modules_before(process, process.statusOnGPU, process.hltBackend)
1280 
1281  del process.statusOnGPU
1282 
1283  process.hltStatusOnGPUFilter = cms.EDFilter('AlpakaBackendFilter',
1284  producer = cms.InputTag('hltBackend', 'backend'),
1285  backends = cms.vstring('CudaAsync', 'ROCmAsync')
1286  )
1287 
1288  insert_modules_before(process, process.statusOnGPUFilter, process.hltStatusOnGPUFilter)
1289  insert_modules_before(process, ~process.statusOnGPUFilter, ~process.hltStatusOnGPUFilter)
1290 
1291  del process.statusOnGPUFilter
1292 
1293  return process
1294 
1295 
def insert_modules_before(process, target, modules)
Definition: common.py:34
def customizeHLTforAlpakaStatus(process)

◆ customizeHLTforDQMGPUvsCPUPixel()

def customizeHLTforAlpaka.customizeHLTforDQMGPUvsCPUPixel (   process)

Pixel HLT in Alpaka.

Ad-hoc changes to test HLT config containing only DQM_PixelReconstruction_v and DQMGPUvsCPU stream
   only up to the Pixel Local Reconstruction

Definition at line 287 of file customizeHLTforAlpaka.py.

References customizeForNoTrackerDCS.producers_by_type().

Referenced by customizeHLTforAlpakaPixelReco().

288  '''Ad-hoc changes to test HLT config containing only DQM_PixelReconstruction_v and DQMGPUvsCPU stream
289  only up to the Pixel Local Reconstruction
290  '''
291  dqmPixelRecoPathName = None
292  for pathName in process.paths_():
293  if pathName.startswith('DQM_PixelReconstruction_v'):
294  dqmPixelRecoPathName = pathName
295  break
296 
297  if dqmPixelRecoPathName == None:
298  return process
299 
300  for prod in producers_by_type(process, 'SiPixelPhase1MonitorRecHitsSoAAlpaka'):
301  return process
302 
303  # modify EventContent of DQMGPUvsCPU stream
304  try:
305  outCmds_new = [foo for foo in process.hltOutputDQMGPUvsCPU.outputCommands if 'Pixel' not in foo]
306  outCmds_new += [
307  'keep *Cluster*_hltSiPixelClusters_*_*',
308  'keep *Cluster*_hltSiPixelClustersSerialSync_*_*',
309  'keep *_hltSiPixelDigiErrors_*_*',
310  'keep *_hltSiPixelDigiErrorsSerialSync_*_*',
311  'keep *RecHit*_hltSiPixelRecHits_*_*',
312  'keep *RecHit*_hltSiPixelRecHitsSerialSync_*_*',
313  'keep *_hltPixelTracks_*_*',
314  'keep *_hltPixelTracksSerialSync_*_*',
315  'keep *_hltPixelVertices_*_*',
316  'keep *_hltPixelVerticesSerialSync_*_*',
317  ]
318  process.hltOutputDQMGPUvsCPU.outputCommands = outCmds_new[:]
319  except:
320  pass
321 
322  # PixelRecHits: monitor of SerialSync product (Alpaka backend: 'serial_sync')
323  process.hltPixelRecHitsSoAMonitorCPU = cms.EDProducer('SiPixelPhase1MonitorRecHitsSoAAlpaka',
324  pixelHitsSrc = cms.InputTag('hltSiPixelRecHitsSoASerialSync'),
325  TopFolderName = cms.string('SiPixelHeterogeneous/PixelRecHitsCPU')
326  )
327 
328  # PixelRecHits: monitor of GPU product (Alpaka backend: '')
329  process.hltPixelRecHitsSoAMonitorGPU = cms.EDProducer('SiPixelPhase1MonitorRecHitsSoAAlpaka',
330  pixelHitsSrc = cms.InputTag('hltSiPixelRecHitsSoA'),
331  TopFolderName = cms.string('SiPixelHeterogeneous/PixelRecHitsGPU')
332  )
333 
334  # PixelRecHits: 'GPUvsCPU' comparisons
335  process.hltPixelRecHitsSoACompareGPUvsCPU = cms.EDProducer('SiPixelPhase1CompareRecHitsSoAAlpaka',
336  pixelHitsSrcHost = cms.InputTag('hltSiPixelRecHitsSoASerialSync'),
337  pixelHitsSrcDevice = cms.InputTag('hltSiPixelRecHitsSoA'),
338  topFolderName = cms.string('SiPixelHeterogeneous/PixelRecHitsCompareGPUvsCPU'),
339  minD2cut = cms.double(1.0e-4)
340  )
341 
342  process.hltPixelTracksSoAMonitorCPU = cms.EDProducer("SiPixelPhase1MonitorTrackSoAAlpaka",
343  minQuality = cms.string('loose'),
344  pixelTrackSrc = cms.InputTag('hltPixelTracksSoASerialSync'),
345  topFolderName = cms.string('SiPixelHeterogeneous/PixelTrackCPU'),
346  useQualityCut = cms.bool(True)
347  )
348 
349  process.hltPixelTracksSoAMonitorGPU = cms.EDProducer("SiPixelPhase1MonitorTrackSoAAlpaka",
350  minQuality = cms.string('loose'),
351  pixelTrackSrc = cms.InputTag('hltPixelTracksSoA'),
352  topFolderName = cms.string('SiPixelHeterogeneous/PixelTrackGPU'),
353  useQualityCut = cms.bool(True)
354  )
355 
356  process.hltPixelTracksSoACompareGPUvsCPU = cms.EDProducer("SiPixelPhase1CompareTrackSoAAlpaka",
357  deltaR2cut = cms.double(0.04),
358  minQuality = cms.string('loose'),
359  pixelTrackSrcHost = cms.InputTag("hltPixelTracksSoASerialSync"),
360  pixelTrackSrcDevice = cms.InputTag("hltPixelTracksSoA"),
361  topFolderName = cms.string('SiPixelHeterogeneous/PixelTrackCompareGPUvsCPU'),
362  useQualityCut = cms.bool(True)
363  )
364 
365  process.hltPixelVertexSoAMonitorCPU = cms.EDProducer("SiPixelMonitorVertexSoAAlpaka",
366  beamSpotSrc = cms.InputTag("hltOnlineBeamSpot"),
367  pixelVertexSrc = cms.InputTag("hltPixelVerticesSoASerialSync"),
368  topFolderName = cms.string('SiPixelHeterogeneous/PixelVertexCPU')
369  )
370 
371  process.hltPixelVertexSoAMonitorGPU = cms.EDProducer("SiPixelMonitorVertexSoAAlpaka",
372  beamSpotSrc = cms.InputTag("hltOnlineBeamSpot"),
373  pixelVertexSrc = cms.InputTag("hltPixelVerticesSoA"),
374  topFolderName = cms.string('SiPixelHeterogeneous/PixelVertexGPU')
375  )
376 
377  process.hltPixelVertexSoACompareGPUvsCPU = cms.EDProducer("SiPixelCompareVertexSoAAlpaka",
378  beamSpotSrc = cms.InputTag("hltOnlineBeamSpot"),
379  dzCut = cms.double(1),
380  pixelVertexSrcHost = cms.InputTag("hltPixelVerticesSoASerialSync"),
381  pixelVertexSrcDevice = cms.InputTag("hltPixelVerticesSoA"),
382  topFolderName = cms.string('SiPixelHeterogeneous/PixelVertexCompareGPUvsCPU')
383  )
384 
385  process.HLTDQMPixelReconstruction = cms.Sequence(
386  process.hltPixelRecHitsSoAMonitorCPU
387  + process.hltPixelRecHitsSoAMonitorGPU
388  + process.hltPixelRecHitsSoACompareGPUvsCPU
389  + process.hltPixelTracksSoAMonitorCPU
390  + process.hltPixelTracksSoAMonitorGPU
391  + process.hltPixelTracksSoACompareGPUvsCPU
392  + process.hltPixelVertexSoAMonitorCPU
393  + process.hltPixelVertexSoAMonitorGPU
394  + process.hltPixelVertexSoACompareGPUvsCPU
395  )
396 
397  for delMod in ['hltPixelConsumerCPU', 'hltPixelConsumerGPU']:
398  if hasattr(process, delMod):
399  process.__delattr__(delMod)
400 
401  return process
402 
403 
def customizeHLTforDQMGPUvsCPUPixel(process)
Pixel HLT in Alpaka.
def producers_by_type(process, types)