CMS 3D CMS Logo

reducedRecHitsSequence_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 import RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi
4 
5 interestingEcalDetIdEB = RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi.interestingDetIdCollectionProducer.clone(
6  basicClustersLabel = "hybridSuperClusters:hybridBarrelBasicClusters",
7  recHitsLabel = "ecalRecHit:EcalRecHitsEB"
8  )
9 
10 interestingEcalDetIdEBU = RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi.interestingDetIdCollectionProducer.clone(
11  basicClustersLabel = "hybridSuperClusters:uncleanOnlyHybridBarrelBasicClusters",
12  recHitsLabel = "ecalRecHit:EcalRecHitsEB"
13  )
14 
15 interestingEcalDetIdEE = RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi.interestingDetIdCollectionProducer.clone(
16  basicClustersLabel = "multi5x5SuperClusters:multi5x5EndcapBasicClusters",
17  recHitsLabel = "ecalRecHit:EcalRecHitsEE"
18  )
19 
20 interestingEcalDetIdPFEB = RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi.interestingDetIdCollectionProducer.clone(
21  basicClustersLabel = "particleFlowSuperClusterECAL:particleFlowBasicClusterECALBarrel",
22  recHitsLabel = "ecalRecHit:EcalRecHitsEB"
23  )
24 
25 interestingEcalDetIdPFEE = RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi.interestingDetIdCollectionProducer.clone(
26  basicClustersLabel = "particleFlowSuperClusterECAL:particleFlowBasicClusterECALEndcap",
27  recHitsLabel = "ecalRecHit:EcalRecHitsEE"
28  )
29 
30 interestingEcalDetIdPFES = RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi.interestingDetIdCollectionProducer.clone(
31  basicClustersLabel = "particleFlowSuperClusterECAL:particleFlowBasicClusterECALPreshower",
32  recHitsLabel = "ecalPreshowerRecHit:EcalRecHitsES",
33  severityLevel = -1,
34  keepNextToDead = False,
35  keepNextToBoundary = False
36  )
37 
38 interestingEcalDetIdOOTPFEB = RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi.interestingDetIdCollectionProducer.clone(
39  basicClustersLabel = "particleFlowSuperClusterOOTECAL:particleFlowBasicClusterOOTECALBarrel",
40  recHitsLabel = "ecalRecHit:EcalRecHitsEB"
41  )
42 
43 interestingEcalDetIdOOTPFEE = RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi.interestingDetIdCollectionProducer.clone(
44  basicClustersLabel = "particleFlowSuperClusterOOTECAL:particleFlowBasicClusterOOTECALEndcap",
45  recHitsLabel = "ecalRecHit:EcalRecHitsEE"
46  )
47 
48 interestingEcalDetIdOOTPFES = RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi.interestingDetIdCollectionProducer.clone(
49  basicClustersLabel = "particleFlowSuperClusterOOTECAL:particleFlowBasicClusterOOTECALPreshower",
50  recHitsLabel = "ecalPreshowerRecHit:EcalRecHitsES",
51  severityLevel = -1,
52  keepNextToDead = False,
53  keepNextToBoundary = False
54  )
55 
56 interestingEcalDetIdRefinedEB = RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi.interestingDetIdCollectionProducer.clone(
57  basicClustersLabel = "particleFlowEGamma:EBEEClusters",
58  recHitsLabel = "ecalRecHit:EcalRecHitsEB"
59  )
60 
61 interestingEcalDetIdRefinedEE = RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi.interestingDetIdCollectionProducer.clone(
62  basicClustersLabel = "particleFlowEGamma:EBEEClusters",
63  recHitsLabel = "ecalRecHit:EcalRecHitsEE"
64  )
65 
66 interestingEcalDetIdRefinedES = RecoEcal.EgammaClusterProducers.interestingDetIdCollectionProducer_cfi.interestingDetIdCollectionProducer.clone(
67  basicClustersLabel = "particleFlowEGamma:ESClusters",
68  recHitsLabel = "ecalPreshowerRecHit:EcalRecHitsES",
69  severityLevel = -1,
70  keepNextToDead = False,
71  keepNextToBoundary = False
72  )
73 
74 # rechits associated to high pt tracks for HSCP
75 
76 from TrackingTools.TrackAssociator.default_cfi import TrackAssociatorParameterBlock
77 
78 interestingTrackEcalDetIds = cms.EDProducer('InterestingTrackEcalDetIdProducer',
79  TrackAssociatorParameterBlock,
80  TrackCollection = cms.InputTag("generalTracks"),
81  MinTrackPt = cms.double(50.0)
82 )
83 
84 reducedEcalRecHitsEB = cms.EDProducer("ReducedRecHitCollectionProducer",
85  recHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
86  interestingDetIdCollections = cms.VInputTag(
87  # ecal
88  cms.InputTag("interestingEcalDetIdEB"),
89  cms.InputTag("interestingEcalDetIdEBU"),
90  #ged
91  cms.InputTag("interestingEcalDetIdPFEB"),
92  cms.InputTag("interestingEcalDetIdRefinedEB"),
93  # oot
94  cms.InputTag("interestingEcalDetIdOOTPFEB"),
95  # egamma
96  cms.InputTag("interestingGedEleIsoDetIdEB"),
97  cms.InputTag("interestingGedGamIsoDetIdEB"),
98  cms.InputTag("interestingOotGamIsoDetIdEB"),
99  cms.InputTag("interestingGamIsoDetIdEB"),
100  # tau
101  #cms.InputTag("caloRecoTauProducer"),
102  # muons
103  cms.InputTag("muonEcalDetIds"),
104  # high pt tracks
105  cms.InputTag("interestingTrackEcalDetIds")
106  ),
107  reducedHitsCollection = cms.string('')
108 )
109 
110 reducedEcalRecHitsEE = cms.EDProducer("ReducedRecHitCollectionProducer",
111  recHitsLabel = cms.InputTag("ecalRecHit","EcalRecHitsEE"),
112  interestingDetIdCollections = cms.VInputTag(
113  # ecal
114  cms.InputTag("interestingEcalDetIdEE"),
115  #ged
116  cms.InputTag("interestingEcalDetIdPFEE"),
117  cms.InputTag("interestingEcalDetIdRefinedEE"),
118  # oot
119  cms.InputTag("interestingEcalDetIdOOTPFEE"),
120  # egamma
121  cms.InputTag("interestingGedEleIsoDetIdEE"),
122  cms.InputTag("interestingGedGamIsoDetIdEE"),
123  cms.InputTag("interestingOotGamIsoDetIdEE"),
124  cms.InputTag("interestingGamIsoDetIdEE"),
125  # tau
126  #cms.InputTag("caloRecoTauProducer"),
127  # muons
128  cms.InputTag("muonEcalDetIds"),
129  # high pt tracks
130  cms.InputTag("interestingTrackEcalDetIds")
131  ),
132  reducedHitsCollection = cms.string('')
133 )
134 
135 reducedEcalRecHitsES = cms.EDProducer("ReducedESRecHitCollectionProducer",
136  scEtThreshold = cms.double(15),
137  EcalRecHitCollectionES = cms.InputTag('ecalPreshowerRecHit','EcalRecHitsES'),
138  EndcapSuperClusterCollection = cms.InputTag('correctedMulti5x5SuperClustersWithPreshower'),
139  OutputLabel_ES = cms.string(''),
140  interestingDetIds = cms.VInputTag(
141  cms.InputTag("interestingEcalDetIdPFES"),
142  cms.InputTag("interestingEcalDetIdRefinedES"),
143  cms.InputTag("interestingEcalDetIdOOTPFES"),
144  ),
145  interestingDetIdsNotToClean = cms.VInputTag(
146  cms.InputTag("interestingOotEgammaIsoESDetId"),
147  )
148 )
149 
150 #selected digis
152 
153 reducedEcalRecHitsTask = cms.Task(interestingEcalDetIdEB,interestingEcalDetIdEBU,
154  interestingEcalDetIdEE,
155  interestingEcalDetIdPFEB,interestingEcalDetIdPFEE,interestingEcalDetIdPFES,
156  interestingEcalDetIdOOTPFEB,interestingEcalDetIdOOTPFEE,interestingEcalDetIdOOTPFES,
157  interestingEcalDetIdRefinedEB,interestingEcalDetIdRefinedEE,interestingEcalDetIdRefinedES,
158  interestingTrackEcalDetIds,
159  reducedEcalRecHitsEB,
160  reducedEcalRecHitsEE,
161  seldigisTask,
162  reducedEcalRecHitsES)
163 reducedEcalRecHitsSequence = cms.Sequence(reducedEcalRecHitsTask)
164 
165 reducedEcalRecHitsSequenceEcalOnlyTask = cms.Task(interestingEcalDetIdEB,interestingEcalDetIdEBU,
166  interestingEcalDetIdEE,
167  reducedEcalRecHitsEB,
168  reducedEcalRecHitsEE,
169  seldigisTask)
170 reducedEcalRecHitsSequenceEcalOnly = cms.Sequence(reducedEcalRecHitsSequenceEcalOnlyTask)
171 
172 _phase2_reducedEcalRecHitsTask = reducedEcalRecHitsTask.copy()
173 _phase2_reducedEcalRecHitsTask.remove(reducedEcalRecHitsES)
174 
175 from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
176 phase2_common.toReplaceWith( reducedEcalRecHitsTask , _phase2_reducedEcalRecHitsTask )
177 
178 
179 _fastSim_reducedEcalRecHitsTask = reducedEcalRecHitsTask.copyAndExclude(seldigisTask)
180 from Configuration.Eras.Modifier_fastSim_cff import fastSim
181 fastSim.toReplaceWith( reducedEcalRecHitsTask, _fastSim_reducedEcalRecHitsTask)
182 
183 _pp_on_AA_reducedEcalRecHitsTask = reducedEcalRecHitsTask.copy()
184 _pp_on_AA_reducedEcalRecHitsTask.remove(interestingEcalDetIdOOTPFEB)
185 _pp_on_AA_reducedEcalRecHitsTask.remove(interestingEcalDetIdOOTPFEE)
186 _pp_on_AA_reducedEcalRecHitsTask.remove(interestingEcalDetIdOOTPFES)
187 
188 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
189 pp_on_AA.toReplaceWith(reducedEcalRecHitsTask, _pp_on_AA_reducedEcalRecHitsTask)
190 
191 pp_on_AA.toModify(reducedEcalRecHitsEB.interestingDetIdCollections, func = lambda list: list.remove(cms.InputTag("interestingEcalDetIdOOTPFEB")) )
192 pp_on_AA.toModify(reducedEcalRecHitsEB.interestingDetIdCollections, func = lambda list: list.remove(cms.InputTag("interestingOotGamIsoDetIdEB")) )
193 pp_on_AA.toModify(reducedEcalRecHitsEE.interestingDetIdCollections, func = lambda list: list.remove(cms.InputTag("interestingEcalDetIdOOTPFEE")) )
194 pp_on_AA.toModify(reducedEcalRecHitsEE.interestingDetIdCollections, func = lambda list: list.remove(cms.InputTag("interestingOotGamIsoDetIdEE")) )
195 pp_on_AA.toModify(reducedEcalRecHitsES.interestingDetIds, func = lambda list: list.remove(cms.InputTag("interestingEcalDetIdOOTPFES")) )
196 pp_on_AA.toModify(reducedEcalRecHitsES.interestingDetIdsNotToClean, func = lambda list: list.remove(cms.InputTag("interestingOotEgammaIsoESDetId")) )
197 
198 from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive
199 egamma_lowPt_exclusive.toModify(reducedEcalRecHitsES,
200  scEtThreshold = 1.0)