CMS 3D CMS Logo

gsfElectrons_cfi.py
Go to the documentation of this file.
1 
2 import FWCore.ParameterSet.Config as cms
5 
6 from RecoEgamma.EgammaIsolationAlgos.electronTrackIsolations_cfi import trkIsol03CfgV1,trkIsol04CfgV1
7 
8 #==============================================================================
9 # Producer of transient ecal driven gsf electrons
10 #==============================================================================
11 
12 ecalDrivenGsfElectrons = cms.EDProducer("GsfElectronEcalDrivenProducer",
13 
14  # input collections
15  previousGsfElectronsTag = cms.InputTag(""),
16  pflowGsfElectronsTag = cms.InputTag(""),
17  gsfElectronCoresTag = cms.InputTag("ecalDrivenGsfElectronCores"),
18  barrelRecHitCollectionTag = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
19  endcapRecHitCollectionTag = cms.InputTag("ecalRecHit","EcalRecHitsEE"),
20  hcalTowers = cms.InputTag("towerMaker"),
21  checkHcalStatus = cms.bool(True),
22  pfMvaTag = cms.InputTag(""),
23  seedsTag = cms.InputTag("ecalDrivenElectronSeeds"),
24  beamSpotTag = cms.InputTag("offlineBeamSpot"),
25  gsfPfRecTracksTag = cms.InputTag("pfTrackElec"),
26  vtxTag = cms.InputTag('offlinePrimaryVertices'),
27 
28  # backward compatibility mechanism for ctf tracks
29  ctfTracksCheck = cms.bool(True),
30  ctfTracksTag = cms.InputTag("generalTracks"),
31 
32  gedElectronMode= cms.bool(False),
33  PreSelectMVA = cms.double(-0.1),
34  MaxElePtForOnlyMVA = cms.double(50.0),
35 
36  # steering
37  useGsfPfRecTracks = cms.bool(True),
38  applyPreselection = cms.bool(False),
39  ecalDrivenEcalEnergyFromClassBasedParameterization = cms.bool(True),
40  ecalDrivenEcalErrorFromClassBasedParameterization = cms.bool(True),
41  pureTrackerDrivenEcalErrorFromSimpleParameterization = cms.bool(True),
42  applyAmbResolution = cms.bool(False),
43  ambSortingStrategy = cms.uint32(1),
44  ambClustersOverlapStrategy = cms.uint32(1),
45  addPflowElectrons = cms.bool(True), # this one should be transfered to the "core" level
46  useEcalRegression = cms.bool(False),
47  useCombinationRegression = cms.bool(False),
48 
49  # preselection parameters (ecal driven electrons)
50  minSCEtBarrel = cms.double(4.0),
51  minSCEtEndcaps = cms.double(4.0),
52  minEOverPBarrel = cms.double(0.0),
53  maxEOverPBarrel = cms.double(999999999.),
54  minEOverPEndcaps = cms.double(0.0),
55  maxEOverPEndcaps = cms.double(999999999.),
56  maxDeltaEtaBarrel = cms.double(0.02),
57  maxDeltaEtaEndcaps = cms.double(0.02),
58  maxDeltaPhiBarrel = cms.double(0.15),
59  maxDeltaPhiEndcaps = cms.double(0.15),
60  #useHcalTowers = cms.bool(True),
61  #useHcalRecHits = cms.bool(False),
62  hOverEConeSize = cms.double(0.15),
63  hOverEPtMin = cms.double(0.),
64  #maxHOverEDepth1Barrel = cms.double(0.1),
65  #maxHOverEDepth1Endcaps = cms.double(0.1),
66  #maxHOverEDepth2 = cms.double(0.1),
67  maxHOverEBarrel = cms.double(0.15),
68  maxHOverEEndcaps = cms.double(0.15),
69  maxHBarrel = cms.double(0.0),
70  maxHEndcaps = cms.double(0.0),
71  maxSigmaIetaIetaBarrel = cms.double(999999999.),
72  maxSigmaIetaIetaEndcaps = cms.double(999999999.),
73  maxFbremBarrel = cms.double(999999999.),
74  maxFbremEndcaps = cms.double(999999999.),
75  isBarrel = cms.bool(False),
76  isEndcaps = cms.bool(False),
77  isFiducial = cms.bool(False),
78  maxTIP = cms.double(999999999.),
79  seedFromTEC = cms.bool(True),
80  minMVA = cms.double(-0.4),
81  minMvaByPassForIsolated = cms.double(-0.4),
82 
83  # preselection parameters (tracker driven only electrons)
84  minSCEtBarrelPflow = cms.double(0.0),
85  minSCEtEndcapsPflow = cms.double(0.0),
86  minEOverPBarrelPflow = cms.double(0.0),
87  maxEOverPBarrelPflow = cms.double(999999999.),
88  minEOverPEndcapsPflow = cms.double(0.0),
89  maxEOverPEndcapsPflow = cms.double(999999999.),
90  maxDeltaEtaBarrelPflow = cms.double(999999999.),
91  maxDeltaEtaEndcapsPflow = cms.double(999999999.),
92  maxDeltaPhiBarrelPflow = cms.double(999999999.),
93  maxDeltaPhiEndcapsPflow = cms.double(999999999.),
94  hOverEConeSizePflow = cms.double(0.15),
95  hOverEPtMinPflow = cms.double(0.),
96  #maxHOverEDepth1BarrelPflow = cms.double(999999999.),
97  #maxHOverEDepth1EndcapsPflow = cms.double(999999999.),
98  #maxHOverEDepth2Pflow = cms.double(999999999.),
99  maxHOverEBarrelPflow = cms.double(999999999.),
100  maxHOverEEndcapsPflow = cms.double(999999999.),
101  maxHBarrelPflow = cms.double(0.0),
102  maxHEndcapsPflow = cms.double(0.0),
103  maxSigmaIetaIetaBarrelPflow = cms.double(999999999.),
104  maxSigmaIetaIetaEndcapsPflow = cms.double(999999999.),
105  maxFbremBarrelPflow = cms.double(999999999.),
106  maxFbremEndcapsPflow = cms.double(999999999.),
107  isBarrelPflow = cms.bool(False),
108  isEndcapsPflow = cms.bool(False),
109  isFiducialPflow = cms.bool(False),
110  maxTIPPflow = cms.double(999999999.),
111  minMVAPflow = cms.double(-0.4),
112  minMvaByPassForIsolatedPflow = cms.double(-0.4),
113 
114  # Ecal rec hits configuration
115  recHitFlagsToBeExcludedBarrel = cleanedHybridSuperClusters.RecHitFlagToBeExcluded,
116  recHitFlagsToBeExcludedEndcaps = multi5x5BasicClustersCleaned.RecHitFlagToBeExcluded,
117  recHitSeverityToBeExcludedBarrel = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded,
118  recHitSeverityToBeExcludedEndcaps = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded,
119  #severityLevelCut = cms.int32(4),
120 
121  # Isolation algos configuration
122  trkIsol03Cfg = trkIsol03CfgV1,
123  trkIsol04Cfg = trkIsol04CfgV1,
124  intRadiusHcal = cms.double(0.15),
125  etMinHcal = cms.double(0.0),
126  intRadiusEcalBarrel = cms.double(3.0),
127  intRadiusEcalEndcaps = cms.double(3.0),
128  jurassicWidth = cms.double(1.5),
129  etMinBarrel = cms.double(0.0),
130  eMinBarrel = cms.double(0.095),
131  etMinEndcaps = cms.double(0.110),
132  eMinEndcaps = cms.double(0.0),
133  vetoClustered = cms.bool(False),
134  useNumCrystals = cms.bool(True),
135  TransientInitialStateEstimatorParameters = cms.PSet(
136  propagatorAlongTISE = cms.string('PropagatorWithMaterial'),
137  propagatorOppositeTISE = cms.string('PropagatorWithMaterialOpposite')
138  ),
139 
140  # Corrections
141  superClusterErrorFunction = cms.string("EcalClusterEnergyUncertaintyObjectSpecific"),
142  crackCorrectionFunction = cms.string("EcalClusterCrackCorrection"),
143 
144  # Regression. The labels are needed in all cases
145  ecalRefinedRegressionWeightLabels = cms.vstring(),
146  combinationRegressionWeightLabels = cms.vstring(),
147 
148  ecalWeightsFromDB = cms.bool(True),
149  # if not from DB. Otherwise, keep empty
150  ecalRefinedRegressionWeightFiles = cms.vstring(),
151  combinationWeightsFromDB = cms.bool(True),
152  # if not from DB. Otherwise, keep empty
153  combinationRegressionWeightFile = cms.vstring(),
154 
155 
156  # Iso Values
157  useIsolationValues = cms.bool(False),
158  SoftElecMVAFilesString = cms.vstring(
159  "RecoEgamma/ElectronIdentification/data/TMVA_BDTSoftElectrons_9Dec2013.weights.xml"
160  ),
161  ElecMVAFilesString = cms.vstring(
162  "RecoEgamma/ElectronIdentification/data/TMVA_Category_BDTSimpleCat_10_17Feb2011.weights.xml",
163  "RecoEgamma/ElectronIdentification/data/TMVA_Category_BDTSimpleCat_12_17Feb2011.weights.xml",
164  "RecoEgamma/ElectronIdentification/data/TMVA_Category_BDTSimpleCat_20_17Feb2011.weights.xml",
165  "RecoEgamma/ElectronIdentification/data/TMVA_Category_BDTSimpleCat_22_17Feb2011.weights.xml"
166  ),
167 
168 )
169 
170 from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
171 pp_on_AA_2018.toModify(ecalDrivenGsfElectrons, minSCEtBarrel = 15.0)
172 pp_on_AA_2018.toModify(ecalDrivenGsfElectrons, minSCEtEndcaps = 15.0)
173 
174 #==============================================================================
175 # Final producer of persistent gsf electrons
176 #==============================================================================
177 
178 gsfElectrons = cms.EDProducer("GsfElectronProducer",
179 
180  # input collections
181  previousGsfElectronsTag = cms.InputTag("ecalDrivenGsfElectrons"),
182  pflowGsfElectronsTag = cms.InputTag("pfElectronTranslator:pf"),
183  gsfElectronCoresTag = cms.InputTag("gsfElectronCores"),
184  hcalTowers = cms.InputTag("towerMaker"),
185  checkHcalStatus = cms.bool(True),
186  barrelRecHitCollectionTag = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
187  endcapRecHitCollectionTag = cms.InputTag("ecalRecHit","EcalRecHitsEE"),
188  pfMvaTag = cms.InputTag("pfElectronTranslator:pf"),
189  seedsTag = cms.InputTag("ecalDrivenElectronSeeds"),
190  beamSpotTag = cms.InputTag("offlineBeamSpot"),
191  gsfPfRecTracksTag = cms.InputTag("pfTrackElec"),
192  vtxTag = cms.InputTag('offlinePrimaryVertices'),
193 
194  # backward compatibility mechanism for ctf tracks
195  ctfTracksCheck = cms.bool(True),
196  ctfTracksTag = cms.InputTag("generalTracks"),
197 
198  gedElectronMode= cms.bool(False),
199  PreSelectMVA = cms.double(-0.1),
200 
201  # steering
202  useGsfPfRecTracks = cms.bool(True),
203  applyPreselection = cms.bool(True),
204  ecalDrivenEcalEnergyFromClassBasedParameterization = cms.bool(True),
205  ecalDrivenEcalErrorFromClassBasedParameterization = cms.bool(True),
206  pureTrackerDrivenEcalErrorFromSimpleParameterization = cms.bool(True),
207  applyAmbResolution = cms.bool(True),
208  ambSortingStrategy = cms.uint32(1),
209  ambClustersOverlapStrategy = cms.uint32(1),
210  addPflowElectrons = cms.bool(True),
211  useEcalRegression = cms.bool(False),
212  useCombinationRegression = cms.bool(False),
213 
214  # preselection parameters (ecal driven electrons)
215  minSCEtBarrel = cms.double(4.0),
216  minSCEtEndcaps = cms.double(4.0),
217  minEOverPBarrel = cms.double(0.0),
218  maxEOverPBarrel = cms.double(999999999.),
219  minEOverPEndcaps = cms.double(0.0),
220  maxEOverPEndcaps = cms.double(999999999.),
221  maxDeltaEtaBarrel = cms.double(0.02),
222  maxDeltaEtaEndcaps = cms.double(0.02),
223  maxDeltaPhiBarrel = cms.double(0.15),
224  maxDeltaPhiEndcaps = cms.double(0.15),
225  #useHcalTowers = cms.bool(True),
226  #useHcalRecHits = cms.bool(False),
227  hOverEConeSize = cms.double(0.15),
228  hOverEPtMin = cms.double(0.),
229  #maxHOverEDepth1Barrel = cms.double(0.1),
230  #maxHOverEDepth1Endcaps = cms.double(0.1),
231  #maxHOverEDepth2 = cms.double(0.1),
232  maxHOverEBarrel = cms.double(0.15),
233  maxHOverEEndcaps = cms.double(0.15),
234  maxHBarrel = cms.double(0.0),
235  maxHEndcaps = cms.double(0.0),
236  maxSigmaIetaIetaBarrel = cms.double(999999999.),
237  maxSigmaIetaIetaEndcaps = cms.double(999999999.),
238  maxFbremBarrel = cms.double(999999999.),
239  maxFbremEndcaps = cms.double(999999999.),
240  isBarrel = cms.bool(False),
241  isEndcaps = cms.bool(False),
242  isFiducial = cms.bool(False),
243  seedFromTEC = cms.bool(True),
244  maxTIP = cms.double(999999999.),
245  minMVA = cms.double(-0.1),
246  minMvaByPassForIsolated = cms.double(-0.1),
247 
248  # preselection parameters (tracker driven only electrons)
249  minSCEtBarrelPflow = cms.double(0.0),
250  minSCEtEndcapsPflow = cms.double(0.0),
251  minEOverPBarrelPflow = cms.double(0.0),
252  maxEOverPBarrelPflow = cms.double(999999999.),
253  minEOverPEndcapsPflow = cms.double(0.0),
254  maxEOverPEndcapsPflow = cms.double(999999999.),
255  maxDeltaEtaBarrelPflow = cms.double(999999999.),
256  maxDeltaEtaEndcapsPflow = cms.double(999999999.),
257  maxDeltaPhiBarrelPflow = cms.double(999999999.),
258  maxDeltaPhiEndcapsPflow = cms.double(999999999.),
259  hOverEConeSizePflow = cms.double(0.15),
260  hOverEPtMinPflow = cms.double(0.),
261  #maxHOverEDepth1BarrelPflow = cms.double(999999999.),
262  #maxHOverEDepth1EndcapsPflow = cms.double(999999999.),
263  #maxHOverEDepth2Pflow = cms.double(999999999.),
264  maxHOverEBarrelPflow = cms.double(999999999.),
265  maxHOverEEndcapsPflow = cms.double(999999999.),
266  maxHBarrelPflow = cms.double(0.0),
267  maxHEndcapsPflow = cms.double(0.0),
268  maxSigmaIetaIetaBarrelPflow = cms.double(999999999.),
269  maxSigmaIetaIetaEndcapsPflow = cms.double(999999999.),
270  maxFbremBarrelPflow = cms.double(999999999.),
271  maxFbremEndcapsPflow = cms.double(999999999.),
272  isBarrelPflow = cms.bool(False),
273  isEndcapsPflow = cms.bool(False),
274  isFiducialPflow = cms.bool(False),
275  maxTIPPflow = cms.double(999999999.),
276  minMVAPflow = cms.double(-0.1),
277  minMvaByPassForIsolatedPflow = cms.double(-0.1),
278 
279  # Ecal rec hits configuration
280  recHitFlagsToBeExcludedBarrel = cleanedHybridSuperClusters.RecHitFlagToBeExcluded,
281  recHitFlagsToBeExcludedEndcaps = multi5x5BasicClustersCleaned.RecHitFlagToBeExcluded,
282  recHitSeverityToBeExcludedBarrel = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded,
283  recHitSeverityToBeExcludedEndcaps = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded,
284  #severityLevelCut = cms.int32(4),
285 
286  # Isolation algos configuration
287  intRadiusBarrelTk = cms.double(0.015),
288  intRadiusEndcapTk = cms.double(0.015),
289  stripBarrelTk = cms.double(0.015),
290  stripEndcapTk = cms.double(0.015),
291  ptMinTk = cms.double(0.7),
292  maxVtxDistTk = cms.double(0.2),
293  maxDrbTk = cms.double(999999999.),
294  intRadiusHcal = cms.double(0.15),
295  etMinHcal = cms.double(0.0),
296  intRadiusEcalBarrel = cms.double(3.0),
297  intRadiusEcalEndcaps = cms.double(3.0),
298  jurassicWidth = cms.double(1.5),
299  etMinBarrel = cms.double(0.0),
300  eMinBarrel = cms.double(0.095),
301  etMinEndcaps = cms.double(0.110),
302  eMinEndcaps = cms.double(0.0),
303  vetoClustered = cms.bool(False),
304  useNumCrystals = cms.bool(True),
305  TransientInitialStateEstimatorParameters = cms.PSet(
306  propagatorAlongTISE = cms.string('PropagatorWithMaterial'),
307  propagatorOppositeTISE = cms.string('PropagatorWithMaterialOpposite')
308  ),
309 
310  # Corrections
311  superClusterErrorFunction = cms.string("EcalClusterEnergyUncertaintyObjectSpecific"),
312  crackCorrectionFunction = cms.string("EcalClusterCrackCorrection"),
313 
314  # Regression. The labels are needed in all cases
315  ecalRefinedRegressionWeightLabels = cms.vstring(),
316  combinationRegressionWeightLabels = cms.vstring(),
317 
318  ecalWeightsFromDB = cms.bool(True),
319  # if not from DB. Otherwise, keep empty
320  ecalRefinedRegressionWeightFiles = cms.vstring(),
321  combinationWeightsFromDB = cms.bool(True),
322  # if not from DB. Otherwise, keep empty
323  combinationRegressionWeightFile = cms.vstring(),
324 
325 
326 
327  # Iso Values (PF and EcalDriven)
328  useIsolationValues = cms.bool(True),
329  pfIsolationValues = cms.PSet(
330  pfSumChargedHadronPt = cms.InputTag('elPFIsoValueCharged04'),
331  pfSumPhotonEt = cms.InputTag('elPFIsoValueGamma04'),
332  pfSumNeutralHadronEt= cms.InputTag('elPFIsoValueNeutral04')),
333 
334  edIsolationValues = cms.PSet(
335  edSumChargedHadronPt = cms.InputTag('elEDIsoValueCharged04'),
336  edSumPhotonEt = cms.InputTag('elEDIsoValueGamma04'),
337  edSumNeutralHadronEt= cms.InputTag('elEDIsoValueNeutral04')),
338 
339  SoftElecMVAFilesString = cms.vstring(
340  "RecoEgamma/ElectronIdentification/data/TMVA_BDTSoftElectrons_7Feb2014.weights.xml"
341  ),
342  ElecMVAFilesString = cms.vstring(
343  "RecoEgamma/ElectronIdentification/data/TMVA_Category_BDTSimpleCat_10_17Feb2011.weights.xml",
344  "RecoEgamma/ElectronIdentification/data/TMVA_Category_BDTSimpleCat_12_17Feb2011.weights.xml",
345  "RecoEgamma/ElectronIdentification/data/TMVA_Category_BDTSimpleCat_20_17Feb2011.weights.xml",
346  "RecoEgamma/ElectronIdentification/data/TMVA_Category_BDTSimpleCat_22_17Feb2011.weights.xml"
347  ),
348 )
349 
350 ecalDrivenGsfElectronsFromMultiCl = ecalDrivenGsfElectrons.clone(
351  gsfElectronCoresTag = 'ecalDrivenGsfElectronCoresFromMultiCl'
352 )
353