CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  embedTrack = True,
31  embedGsfElectronCore = True,
32  embedGsfTrack = True,
33  embedSuperCluster = True,
34  embedSeedCluster = True,
35  embedBasicClusters = True,
36  embedPreshowerClusters = False,
37  embedRecHits = False,
38  embedPflowSuperCluster = False,
39  embedPflowBasicClusters = False,
40  embedPflowPreshowerClusters = False,
41  embedPFCandidate = False,
42 
43  # Miscellaneous flags
44  addMVAVariables = False,
45  embedHighLevelSelection = False,
46  isoDeposits = cms.PSet(),
47  isolationValues = cms.PSet(),
48  isolationValuesNoPFId = cms.PSet(),
49 
50 )
51 
52 makePatLowPtElectronsTask = cms.Task(
53  lowPtElectronMatch,
54  patLowPtElectrons,
55  )
56 
57 makePatLowPtElectrons = cms.Sequence(makePatLowPtElectronsTask)
58 
59 
60 # Modifiers
61 from Configuration.Eras.Modifier_fastSim_cff import fastSim
62 fastSim.toModify(patLowPtElectrons, embedTrack = False)
63 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
64 from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff import run2_miniAOD_94XFall17
65 (run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17).toModify(patLowPtElectrons,
66  electronSource = "gedGsfElectrons",
67  genParticleMatch = "electronMatch"
68  )
69 
70 # For run2_miniAOD_UL: (1) rekey, (2) rerun ID, (3) apply energy regression
71 from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
72 from Configuration.Eras.Modifier_bParking_cff import bParking
73 from RecoEgamma.EgammaElectronProducers.lowPtGsfElectronSeedValueMaps_cff import rekeyLowPtGsfElectronSeedValueMaps
74 from RecoEgamma.EgammaElectronProducers.lowPtGsfElectronID_cfi import lowPtGsfElectronID
76 _makePatLowPtElectronsTask = makePatLowPtElectronsTask.copy()
77 _makePatLowPtElectronsTask.add(rekeyLowPtGsfElectronSeedValueMaps)
78 _makePatLowPtElectronsTask.add(lowPtGsfElectronID)
79 _makePatLowPtElectronsTask.add(lowPtGsfElectrons)
80 run2_miniAOD_UL.toReplaceWith(makePatLowPtElectronsTask,_makePatLowPtElectronsTask)