CMS 3D CMS Logo

lowPtGsfElectronSequence_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # Modifier for FastSim
4 from Configuration.Eras.Modifier_fastSim_cff import fastSim
5 
6 # PFRecTracks from generalTracks
8 lowPtGsfElePfTracks = pfTrack.clone()
9 lowPtGsfElePfTracks.TkColList = ['generalTracks']
10 lowPtGsfElePfTracks.GsfTracksInEvents = False
11 lowPtGsfElePfTracks.GsfTrackModuleLabel = ''
12 
13 fastSim.toModify(lowPtGsfElePfTracks,TkColList = ['generalTracksBeforeMixing'])
14 
15 # Low pT ElectronSeeds
17 
18 # Electron track candidates
20 lowPtGsfEleTrajectoryFilter = TrajectoryFilterForElectrons.clone()
21 lowPtGsfEleTrajectoryFilter.minPt = 0.
22 lowPtGsfEleTrajectoryFilter.minimumNumberOfHits = 3
23 lowPtGsfEleTrajectoryBuilder = TrajectoryBuilderForElectrons.clone()
24 lowPtGsfEleTrajectoryBuilder.trajectoryFilter.refToPSet_ = 'lowPtGsfEleTrajectoryFilter'
25 lowPtGsfEleCkfTrackCandidates = electronCkfTrackCandidates.clone()
26 lowPtGsfEleCkfTrackCandidates.TrajectoryBuilderPSet.refToPSet_ = 'lowPtGsfEleTrajectoryBuilder'
27 lowPtGsfEleCkfTrackCandidates.src = 'lowPtGsfElectronSeeds'
28 
30 fastLowPtGsfTkfTrackCandidates = FastSimulation.Tracking.electronCkfTrackCandidates_cff.electronCkfTrackCandidates.clone(src = cms.InputTag("lowPtGsfElectronSeeds"))
31 
32 # GsfTracks
34 lowPtGsfEleFittingSmoother = GsfElectronFittingSmoother.clone()
35 lowPtGsfEleFittingSmoother.ComponentName = 'lowPtGsfEleFittingSmoother'
36 lowPtGsfEleFittingSmoother.MinNumberOfHits = 2
38 lowPtGsfEleGsfTracks = electronGsfTracks.clone()
39 lowPtGsfEleGsfTracks.Fitter = 'lowPtGsfEleFittingSmoother'
40 lowPtGsfEleGsfTracks.src = 'lowPtGsfEleCkfTrackCandidates'
41 
42 fastSim.toModify(lowPtGsfEleGsfTracks,src = cms.InputTag("fastLowPtGsfTkfTrackCandidates"))
43 
44 # GSFTrack to track association
46 
47 # GsfPFRecTracks
49 lowPtGsfElePfGsfTracks = pfTrackElec.clone()
50 lowPtGsfElePfGsfTracks.GsfTrackModuleLabel = 'lowPtGsfEleGsfTracks'
51 lowPtGsfElePfGsfTracks.PFRecTrackLabel = 'lowPtGsfElePfTracks'
52 lowPtGsfElePfGsfTracks.applyGsfTrackCleaning = False
53 lowPtGsfElePfGsfTracks.useFifthStepForTrackerDrivenGsf = True
54 
55 # SuperCluster generator and matching to GSF tracks
56 # Below relies on the following default configurations:
57 # RecoParticleFlow/PFClusterProducer/python/particleFlowClusterECALUncorrected_cfi.py
58 # RecoParticleFlow/PFClusterProducer/python/particleFlowClusterECAL_cff.py
59 # (particleFlowClusterECAL_cfi is generated automatically)
60 from RecoEgamma.EgammaElectronProducers.lowPtGsfElectronSuperClusters_cff import lowPtGsfElectronSuperClusters
61 
62 # Low pT electron cores
64 
65 # Low pT electrons
67 
68 # Low pT Electron value maps
69 from RecoEgamma.EgammaElectronProducers.lowPtGsfElectronSeedValueMaps_cff import lowPtGsfElectronSeedValueMaps
70 
71 # Low pT Electron ID
72 from RecoEgamma.EgammaElectronProducers.lowPtGsfElectronID_cff import lowPtGsfElectronID
73 
74 # Full sequence
75 lowPtGsfElectronTask = cms.Task(lowPtGsfElePfTracks,
76  lowPtGsfElectronSeeds,
77  lowPtGsfEleCkfTrackCandidates,
78  lowPtGsfEleGsfTracks,
79  lowPtGsfToTrackLinks,
80  lowPtGsfElePfGsfTracks,
81  lowPtGsfElectronSuperClusters,
82  lowPtGsfElectronCores,
83  lowPtGsfElectrons,
84  lowPtGsfElectronSeedValueMaps,
85  lowPtGsfElectronID
86  )
87 lowPtGsfElectronSequence = cms.Sequence(lowPtGsfElectronTask)
88 
89 _fastSim_lowPtGsfElectronTask = lowPtGsfElectronTask.copy()
90 _fastSim_lowPtGsfElectronTask.replace(lowPtGsfElectronSeeds, cms.Task(lowPtGsfElectronSeedsTmp,lowPtGsfElectronSeeds))
91 _fastSim_lowPtGsfElectronTask.replace(lowPtGsfEleCkfTrackCandidates, fastLowPtGsfTkfTrackCandidates)
92 fastSim.toReplaceWith(lowPtGsfElectronTask, _fastSim_lowPtGsfElectronTask)