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