CMS 3D CMS Logo

lowPtGsfElectronSequence_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # PFRecTracks from generalTracks
5 lowPtGsfElePfTracks = pfTrack.clone()
6 lowPtGsfElePfTracks.TkColList = ['generalTracks']
7 lowPtGsfElePfTracks.GsfTracksInEvents = False
8 lowPtGsfElePfTracks.GsfTrackModuleLabel = ''
9 
10 # Low pT ElectronSeeds
12 
13 # Electron track candidates
15 lowPtGsfEleTrajectoryFilter = TrajectoryFilterForElectrons.clone()
16 lowPtGsfEleTrajectoryFilter.minPt = 0.
17 lowPtGsfEleTrajectoryFilter.minimumNumberOfHits = 3
18 lowPtGsfEleTrajectoryBuilder = TrajectoryBuilderForElectrons.clone()
19 lowPtGsfEleTrajectoryBuilder.trajectoryFilter.refToPSet_ = 'lowPtGsfEleTrajectoryFilter'
20 lowPtGsfEleCkfTrackCandidates = electronCkfTrackCandidates.clone()
21 lowPtGsfEleCkfTrackCandidates.TrajectoryBuilderPSet.refToPSet_ = 'lowPtGsfEleTrajectoryBuilder'
22 lowPtGsfEleCkfTrackCandidates.src = 'lowPtGsfElectronSeeds'
23 
24 # Modifiers for FastSim
26 fastLowPtGsfTkfTrackCandidates = FastSimulation.Tracking.electronCkfTrackCandidates_cff.electronCkfTrackCandidates.clone(src = cms.InputTag("lowPtGsfElectronSeeds"))
27 
28 # GsfTracks
30 lowPtGsfEleFittingSmoother = GsfElectronFittingSmoother.clone()
31 lowPtGsfEleFittingSmoother.ComponentName = 'lowPtGsfEleFittingSmoother'
32 lowPtGsfEleFittingSmoother.MinNumberOfHits = 2
34 lowPtGsfEleGsfTracks = electronGsfTracks.clone()
35 lowPtGsfEleGsfTracks.Fitter = 'lowPtGsfEleFittingSmoother'
36 lowPtGsfEleGsfTracks.src = 'lowPtGsfEleCkfTrackCandidates'
37 
38 # GsfPFRecTracks
40 lowPtGsfElePfGsfTracks = pfTrackElec.clone()
41 lowPtGsfElePfGsfTracks.GsfTrackModuleLabel = 'lowPtGsfEleGsfTracks'
42 lowPtGsfElePfGsfTracks.PFRecTrackLabel = 'lowPtGsfElePfTracks'
43 lowPtGsfElePfGsfTracks.applyGsfTrackCleaning = False
44 lowPtGsfElePfGsfTracks.useFifthStepForTrackerDrivenGsf = True
45 
46 # Full sequence
47 lowPtGsfElectronTask = cms.Task(lowPtGsfElePfTracks,
48  lowPtGsfElectronSeeds,
49  lowPtGsfEleCkfTrackCandidates,
50  lowPtGsfEleGsfTracks,
51  lowPtGsfElePfGsfTracks)
52 lowPtGsfElectronSequence = cms.Sequence(lowPtGsfElectronTask)
53 
54 # Modifiers for FastSim
55 from Configuration.Eras.Modifier_fastSim_cff import fastSim
56 _fastSim_lowPtGsfElectronTask = lowPtGsfElectronTask.copy()
57 _fastSim_lowPtGsfElectronTask.replace(lowPtGsfElectronSeeds, cms.Task(lowPtGsfElectronSeedsTmp,lowPtGsfElectronSeeds))
58 _fastSim_lowPtGsfElectronTask.replace(lowPtGsfEleCkfTrackCandidates, fastLowPtGsfTkfTrackCandidates)
59 fastSim.toReplaceWith(lowPtGsfElectronTask, _fastSim_lowPtGsfElectronTask)
60 fastSim.toModify(lowPtGsfElePfTracks,TkColList = ['generalTracksBeforeMixing'])
61 fastSim.toModify(lowPtGsfEleGsfTracks,src = cms.InputTag("fastLowPtGsfTkfTrackCandidates"))
62