Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-06-04 06:14:43

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from PhysicsTools.PatAlgos.mcMatchLayer0.electronMatch_cfi import *
0004 from TrackingTools.TransientTrack.TransientTrackBuilder_cfi import *
0005 from PhysicsTools.PatAlgos.producersLayer1.electronProducer_cfi import *
0006 
0007 sourceElectrons = cms.InputTag("lowPtGsfElectrons")
0008 
0009 lowPtElectronMatch = electronMatch.clone(
0010    src = sourceElectrons,
0011 )
0012 
0013 patLowPtElectrons = patElectrons.clone(
0014 
0015     # Input collection
0016     electronSource = sourceElectrons,
0017 
0018     # MC matching
0019     genParticleMatch = "lowPtElectronMatch",
0020 
0021     # Electron ID
0022     addElectronID = True,
0023     electronIDSources = dict(
0024         unbiased = cms.InputTag("rekeyLowPtGsfElectronSeedValueMaps:unbiased"),
0025         ptbiased = cms.InputTag("rekeyLowPtGsfElectronSeedValueMaps:ptbiased"),
0026         ID       = cms.InputTag("lowPtGsfElectronID"),
0027     ),
0028 
0029     # Embedding of RECO/AOD items
0030     embedTrack                  = True,
0031     embedGsfElectronCore        = True,
0032     embedGsfTrack               = True,
0033     embedSuperCluster           = True,
0034     embedSeedCluster            = True,
0035     embedBasicClusters          = True,
0036     embedPreshowerClusters      = False,
0037     embedRecHits                = False,
0038     embedPflowSuperCluster      = False,
0039     embedPflowBasicClusters     = False,
0040     embedPflowPreshowerClusters = False,
0041     embedPFCandidate            = False,
0042 
0043     # Miscellaneous flags
0044     addMVAVariables         = False,
0045     embedHighLevelSelection = False,
0046     isoDeposits             = cms.PSet(),
0047     isolationValues         = cms.PSet(),
0048     isolationValuesNoPFId   = cms.PSet(),
0049 
0050 )
0051 
0052 makePatLowPtElectronsTask = cms.Task(
0053     lowPtElectronMatch,
0054     patLowPtElectrons,
0055     )
0056 
0057 makePatLowPtElectrons = cms.Sequence(makePatLowPtElectronsTask)
0058 
0059 
0060 # Modifiers
0061 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0062 fastSim.toModify(patLowPtElectrons, embedTrack = False)
0063 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
0064 from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff import run2_miniAOD_94XFall17
0065 (run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17).toModify(patLowPtElectrons,
0066                                                            electronSource = "gedGsfElectrons",
0067                                                            genParticleMatch = "electronMatch"
0068                                                            )
0069 
0070 # For run2_miniAOD_UL: (1) rekey, (2) rerun ID, (3) apply energy regression
0071 from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
0072 from Configuration.Eras.Modifier_bParking_cff import bParking
0073 from RecoEgamma.EgammaElectronProducers.lowPtGsfElectronSeedValueMaps_cff import rekeyLowPtGsfElectronSeedValueMaps
0074 from RecoEgamma.EgammaElectronProducers.lowPtGsfElectronID_cfi import lowPtGsfElectronID
0075 from RecoEgamma.EgammaElectronProducers.lowPtGsfElectrons_cfi import lowPtGsfElectrons
0076 _makePatLowPtElectronsTask = makePatLowPtElectronsTask.copy()
0077 _makePatLowPtElectronsTask.add(rekeyLowPtGsfElectronSeedValueMaps)
0078 _makePatLowPtElectronsTask.add(lowPtGsfElectronID)
0079 _makePatLowPtElectronsTask.add(lowPtGsfElectrons)
0080 run2_miniAOD_UL.toReplaceWith(makePatLowPtElectronsTask,_makePatLowPtElectronsTask)