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")
21 def replaceHcalTp(tag):
22 replaceInputTag(tag,
"simHcalTriggerPrimitiveDigis",
"DMHcalTriggerPrimitiveDigis")
24 for label, producer
in process.producers_().iteritems():
25 if producer.type_() ==
"ClusterTPAssociationProducer":
26 replacePixelDigiSimLink(producer.pixelSimLinkSrc)
27 replaceStripDigiSimLink(producer.stripSimLinkSrc)
28 if producer.type_() ==
"QuickTrackAssociatorByHitsProducer":
29 replacePixelDigiSimLink(producer.pixelSimLinkSrc)
30 replaceStripDigiSimLink(producer.stripSimLinkSrc)
31 if producer.type_() ==
"TrackAssociatorByHitsProducer":
32 replacePixelDigiSimLink(producer.pixelSimLinkSrc)
33 replaceStripDigiSimLink(producer.stripSimLinkSrc)
34 if producer.type_() ==
"MuonAssociatorEDProducer":
35 producer.DTdigisimlinkTag = cms.InputTag(
"mixData",
"simMuonDTDigis")
36 producer.CSClinksTag = cms.InputTag(
"mixData",
"MuonCSCStripDigiSimLinks")
37 producer.CSCwireLinksTag = cms.InputTag(
"mixData",
"MuonCSCWireDigiSimLinks")
38 producer.RPCdigisimlinkTag = cms.InputTag(
"mixData",
"RPCDigiSimLink")
39 replacePixelDigiSimLink(producer.pixelSimLinkSrc)
40 replaceStripDigiSimLink(producer.stripSimLinkSrc)
41 if producer.type_() ==
"MuonToTrackingParticleAssociatorEDProducer":
42 producer.DTdigisimlinkTag = cms.InputTag(
"mixData",
"simMuonDTDigis")
43 producer.CSClinksTag = cms.InputTag(
"mixData",
"MuonCSCStripDigiSimLinks")
44 producer.CSCwireLinksTag = cms.InputTag(
"mixData",
"MuonCSCWireDigiSimLinks")
45 producer.RPCdigisimlinkTag = cms.InputTag(
"mixData",
"RPCDigiSimLink")
46 replacePixelDigiSimLink(producer.pixelSimLinkSrc)
47 replaceStripDigiSimLink(producer.stripSimLinkSrc)
49 for label, analyzer
in process.analyzers_().iteritems():
50 if analyzer.type_() ==
"GlobalRecHitsAnalyzer":
51 replacePixelDigiSimLink(analyzer.pixelSimLinkSrc)
52 replaceStripDigiSimLink(analyzer.stripSimLinkSrc)
53 if analyzer.type_() ==
"SiPixelTrackingRecHitsValid":
54 replacePixelDigiSimLink(analyzer.pixelSimLinkSrc)
55 replaceStripDigiSimLink(analyzer.stripSimLinkSrc)
56 if analyzer.type_() ==
"SiStripTrackingRecHitsValid":
57 replacePixelDigiSimLink(analyzer.pixelSimLinkSrc)
58 replaceStripDigiSimLink(analyzer.stripSimLinkSrc)
59 if analyzer.type_() ==
"SiPixelRecHitsValid":
60 replacePixelDigiSimLink(analyzer.pixelSimLinkSrc)
61 replaceStripDigiSimLink(analyzer.stripSimLinkSrc)
62 if analyzer.type_() ==
"SiStripRecHitsValid":
63 replacePixelDigiSimLink(analyzer.pixelSimLinkSrc)
64 replaceStripDigiSimLink(analyzer.stripSimLinkSrc)
65 if analyzer.type_() ==
"HcalDigisValidation":
66 replaceHcalTp(analyzer.dataTPs)
71 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)