Skip to content

Commit

Permalink
Add early delete customisation for mkFit temporary data products
Browse files Browse the repository at this point in the history
  • Loading branch information
makortel committed Dec 10, 2021
1 parent ad04da7 commit 1984de5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import FWCore.ParameterSet.Config as cms

from RecoTracker.Configuration.customiseEarlyDeleteForSeeding import customiseEarlyDeleteForSeeding
from RecoTracker.Configuration.customiseEarlyDeleteForMkFit import customiseEarlyDeleteForMkFit
from CommonTools.ParticleFlow.Isolation.customiseEarlyDeleteForCandIsoDeposits import customiseEarlyDeleteForCandIsoDeposits

def _hasInputTagModuleLabel(process, pset, psetModLabel, moduleLabels, result):
Expand Down Expand Up @@ -43,6 +44,7 @@ def customiseEarlyDelete(process):
products = collections.defaultdict(list)

products = customiseEarlyDeleteForSeeding(process, products)
products = customiseEarlyDeleteForMkFit(process, products)

products = customiseEarlyDeleteForCandIsoDeposits(process, products)

Expand Down
29 changes: 29 additions & 0 deletions RecoTracker/Configuration/python/customiseEarlyDeleteForMkFit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import FWCore.ParameterSet.Config as cms

import collections

def customiseEarlyDeleteForMkFit(process, products):
def _branchName(productType, moduleLabel, instanceLabel=""):
return "%s_%s_%s_%s" % (productType, moduleLabel, instanceLabel, process.name_())

for name, module in process.producers_().items():
cppType = module.type_()
if cppType == "MkFitSiPixelHitConverter":
products[name].extend([
_branchName("MkFitHitWrapper", name),
_branchName("MkFitClusterIndexToHit", name),
])
elif cppType == "MkFitSiStripHitConverter":
products[name].extend([
_branchName("MkFitHitWrapper", name),
_branchName("MkFitClusterIndexToHit", name),
_branchName("floats", name)
])
elif cppType == "MkFitEventOfHitsProducer":
products[name].append(_branchName("MkFitEventOfHits", name))
elif cppType == "MkFitSeedConverter":
products[name].append(_branchName("MkFitSeedWrapper", name))
elif cppType == "MkFitProducer":
products[name].append(_branchName("MkFitOutputWrapper", name))

return products

0 comments on commit 1984de5

Please sign in to comment.