CMS 3D CMS Logo

lowPtElectronProducer_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
6 
7 sourceElectrons = cms.InputTag("lowPtGsfElectrons")
8 
9 lowPtElectronMatch = electronMatch.clone(
10  src = sourceElectrons,
11 )
12 
13 patLowPtElectrons = patElectrons.clone(
14 
15  # Input collection
16  electronSource = sourceElectrons,
17 
18  # MC matching
19  genParticleMatch = "lowPtElectronMatch",
20 
21  # Electron ID
22  addElectronID = True,
23  electronIDSources = dict(
24  unbiased = cms.InputTag("rekeyLowPtGsfElectronSeedValueMaps:unbiased"),
25  ptbiased = cms.InputTag("rekeyLowPtGsfElectronSeedValueMaps:ptbiased"),
26  ID = cms.InputTag("lowPtGsfElectronID"),
27  ),
28 
29  # Embedding of RECO/AOD items
30 
31  # Embedding of RECO/AOD items
32  embedTrack = True,
33  embedGsfElectronCore = True,
34  embedGsfTrack = True,
35  embedSuperCluster = True,
36  embedSeedCluster = True,
37  embedBasicClusters = True,
38  embedPreshowerClusters = False,
39  embedRecHits = False,
40  embedPflowSuperCluster = False,
41  embedPflowBasicClusters = False,
42  embedPflowPreshowerClusters = False,
43  embedPFCandidate = False,
44 
45  # Miscellaneous flags
46  addMVAVariables = False,
47  embedHighLevelSelection = False,
48  isoDeposits = cms.PSet(),
49  isolationValues = cms.PSet(),
50  isolationValuesNoPFId = cms.PSet(),
51 
52 )
53 
54 makePatLowPtElectronsTask = cms.Task(
55  lowPtElectronMatch,
56  patLowPtElectrons,
57  )
58 
59 makePatLowPtElectrons = cms.Sequence(makePatLowPtElectronsTask)
60 
61 
62 # Modifiers
63 from Configuration.Eras.Modifier_fastSim_cff import fastSim
64 fastSim.toModify(patLowPtElectrons, embedTrack = False)
65 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
66 from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff import run2_miniAOD_94XFall17
67 (run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17).toModify(patLowPtElectrons,
68  electronSource = "gedGsfElectrons",
69  genParticleMatch = "electronMatch"
70  )
71 
72 # Schedule rekeying of seed BDT ValueMaps by reco::GsfElectron for run2_miniAOD_UL and bParking
73 from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
74 from Configuration.Eras.Modifier_bParking_cff import bParking
75 from RecoEgamma.EgammaElectronProducers.lowPtGsfElectronSeedValueMaps_cff import rekeyLowPtGsfElectronSeedValueMaps
76 from RecoEgamma.EgammaElectronProducers.lowPtGsfElectronID_cff import lowPtGsfElectronID
77 _makePatLowPtElectronsTask = makePatLowPtElectronsTask.copy()
78 _makePatLowPtElectronsTask.add(rekeyLowPtGsfElectronSeedValueMaps)
79 _makePatLowPtElectronsTask.add(lowPtGsfElectronID)
80 (bParking | run2_miniAOD_UL).toReplaceWith(makePatLowPtElectronsTask,_makePatLowPtElectronsTask)