1 import FWCore.ParameterSet.Config
as cms
7 if "trackExtenderWithMTD" not in process.producerNames():
10 def _branchName(productType, moduleLabel, instanceLabel=""):
11 return "%s_%s_%s_%s" % (productType, moduleLabel, instanceLabel, process.name_())
15 def _addProduct(name):
16 products[name].
append(_branchName(
"Trajectorys", name))
17 products[name].
append(_branchName(
"TrajectorysToOnerecoTracksAssociation", name))
18 trajectoryLabels.append(name)
20 for name, module
in process.producers_().
items():
21 cppType = module.type_()
22 if cppType ==
"TrackProducer":
23 if module.TrajectoryInEvent:
25 elif cppType ==
"DuplicateListMerger":
26 if module.copyTrajectories:
28 elif cppType ==
"TrackListMerger":
29 trackListMergers.append(module)
34 def _containsTrajectory(vinputtag):
37 if not isinstance(t, cms.VInputTag):
39 for label
in trajectoryLabels:
40 if t2.getModuleLabel() == label:
48 for tlm
in trackListMergers:
49 if _containsTrajectory(tlm.TrackProducers):
50 _addProduct(tlm.label())
53 noTrajectoryYet.append(tlm)
54 trackListMergers = noTrajectoryYet
def customiseEarlyDeleteForCKF(process, products)