1 import FWCore.ParameterSet.Config
as cms
8 for s
in process.paths_().
keys() + process.endpaths_().
keys():
9 if s.lower().
find(
"validation")>= 0
or s.lower().
find(
"dqm") >= 0:
10 massSearchReplaceAnyInputTag(getattr(process, s), cms.InputTag(
"mix",
"MergedTrackTruth"), cms.InputTag(
"mixData",
"MergedTrackTruth"), skipLabelTest=
True)
13 def replaceInputTag(tag, old, new):
14 if tag.value() == old:
17 def replacePixelDigiSimLink(tag):
18 replaceInputTag(tag,
"simSiPixelDigis",
"mixData:PixelDigiSimLink")
19 def replaceStripDigiSimLink(tag):
20 replaceInputTag(tag,
"simSiStripDigis",
"mixData:StripDigiSimLink")
22 for label, producer
in process.producers_().iteritems():
23 if producer.type_() ==
"ClusterTPAssociationProducer":
24 replacePixelDigiSimLink(producer.pixelSimLinkSrc)
25 replaceStripDigiSimLink(producer.stripSimLinkSrc)
26 if producer.type_() ==
"QuickTrackAssociatorByHitsProducer":
27 replacePixelDigiSimLink(producer.pixelSimLinkSrc)
28 replaceStripDigiSimLink(producer.stripSimLinkSrc)
29 if producer.type_() ==
"TrackAssociatorByHitsProducer":
30 replacePixelDigiSimLink(producer.pixelSimLinkSrc)
31 replaceStripDigiSimLink(producer.stripSimLinkSrc)
32 if producer.type_() ==
"MuonAssociatorEDProducer":
33 producer.DTdigisimlinkTag = cms.InputTag(
"mixData",
"simMuonDTDigis")
34 producer.CSClinksTag = cms.InputTag(
"mixData",
"MuonCSCStripDigiSimLinks")
35 producer.CSCwireLinksTag = cms.InputTag(
"mixData",
"MuonCSCWireDigiSimLinks")
36 producer.RPCdigisimlinkTag = cms.InputTag(
"mixData",
"RPCDigiSimLink")
37 replacePixelDigiSimLink(producer.pixelSimLinkSrc)
38 replaceStripDigiSimLink(producer.stripSimLinkSrc)
39 if producer.type_() ==
"MuonToTrackingParticleAssociatorEDProducer":
40 producer.DTdigisimlinkTag = cms.InputTag(
"mixData",
"simMuonDTDigis")
41 producer.CSClinksTag = cms.InputTag(
"mixData",
"MuonCSCStripDigiSimLinks")
42 producer.CSCwireLinksTag = cms.InputTag(
"mixData",
"MuonCSCWireDigiSimLinks")
43 producer.RPCdigisimlinkTag = cms.InputTag(
"mixData",
"RPCDigiSimLink")
44 replacePixelDigiSimLink(producer.pixelSimLinkSrc)
45 replaceStripDigiSimLink(producer.stripSimLinkSrc)
47 for label, analyzer
in process.analyzers_().iteritems():
48 if analyzer.type_() ==
"GlobalRecHitsAnalyzer":
49 replacePixelDigiSimLink(analyzer.pixelSimLinkSrc)
50 replaceStripDigiSimLink(analyzer.stripSimLinkSrc)
51 if analyzer.type_() ==
"SiPixelTrackingRecHitsValid":
52 replacePixelDigiSimLink(analyzer.pixelSimLinkSrc)
53 replaceStripDigiSimLink(analyzer.stripSimLinkSrc)
54 if analyzer.type_() ==
"SiStripTrackingRecHitsValid":
55 replacePixelDigiSimLink(analyzer.pixelSimLinkSrc)
56 replaceStripDigiSimLink(analyzer.stripSimLinkSrc)
57 if analyzer.type_() ==
"SiPixelRecHitsValid":
58 replacePixelDigiSimLink(analyzer.pixelSimLinkSrc)
59 replaceStripDigiSimLink(analyzer.stripSimLinkSrc)
60 if analyzer.type_() ==
"SiStripRecHitsValid":
61 replacePixelDigiSimLink(analyzer.pixelSimLinkSrc)
62 replaceStripDigiSimLink(analyzer.stripSimLinkSrc)
def massSearchReplaceAnyInputTag(sequence, oldInputTag, newInputTag, verbose=False, moduleLabelOnly=False, skipLabelTest=False)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)