CMS 3D CMS Logo

customiseEarlyDeleteForSeeding.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 import collections
4 
5 def customiseEarlyDeleteForSeeding(process, products):
6  # Find the producers
7  references = collections.defaultdict(list)
8 
9  def _branchName(productType, moduleLabel, instanceLabel=""):
10  return "%s_%s_%s_%s" % (productType, moduleLabel, instanceLabel, process.name_())
11 
12  for name, module in process.producers_().items():
13  cppType = module._TypedParameterizable__type
14  if cppType == "HitPairEDProducer":
15  if module.produceSeedingHitSets:
16  products[name].append(_branchName("RegionsSeedingHitSets", name))
17  if module.produceIntermediateHitDoublets:
18  products[name].append(_branchName("IntermediateHitDoublets", name))
19  elif cppType in ["PixelTripletHLTEDProducer", "PixelTripletLargeTipEDProducer"]:
20  # LayerHitMapCache of the doublets is forwarded to both
21  # products, hence the dependency
22  b = _branchName('IntermediateHitDoublets', module.doublets.getModuleLabel())
23  if module.produceSeedingHitSets:
24  pBranch = _branchName("RegionsSeedingHitSets", name)
25  products[name].append(pBranch)
26  references[pBranch]=[b]
27  if module.produceIntermediateHitTriplets:
28  pBranch = _branchName("IntermediateHitTriplets", name)
29  products[name].append(pBranch)
30  references[pBranch]=[b]
31  elif cppType in ["MultiHitFromChi2EDProducer"]:
32  products[name].extend([
33  _branchName("RegionsSeedingHitSets", name),
34  _branchName("BaseTrackerRecHitsOwned", name)
35  ])
36  references[_branchName("RegionsSeedingHitSets", name)]=[_branchName("BaseTrackerRecHitsOwned", name)]
37  elif cppType in ["CAHitQuadrupletEDProducer", "CAHitTripletEDProducer"]:
38  products[name].append(_branchName("RegionsSeedingHitSets", name))
39 
40  return (products, references)
def customiseEarlyDeleteForSeeding(process, products)