CMS 3D CMS Logo

genericTrackCandidates_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
5 
6 patAODTrackCandsUnfiltered = cms.EDProducer("ConcreteChargedCandidateProducer",
7  src = cms.InputTag("generalTracks"),
8  particleType = cms.string('mu+') # to fix mass hypothesis
9 )
10 
11 patAODTrackCands = cms.EDFilter("CandViewSelector",
12  src = cms.InputTag("patAODTrackCandsUnfiltered"),
13  cut = cms.string('pt > 15')
14 )
15 
16 
17 from RecoMuon.MuonIsolationProducers.trackExtractorBlocks_cff import MIsoTrackExtractorCtfBlock
18 patAODTrackIsoDepositCtfTk = cms.EDProducer("CandIsoDepositProducer",
19  src = cms.InputTag("patAODTrackCands"),
20  trackType = cms.string('best'),
21  MultipleDepositsFlag = cms.bool(False),
22  ExtractorPSet = cms.PSet( MIsoTrackExtractorCtfBlock )
23 )
24 
25 
27 patAODTrackIsoDepositCalByAssociatorTowers = cms.EDProducer("CandIsoDepositProducer",
28  src = cms.InputTag("patAODTrackCands"),
29  trackType = cms.string('best'),
30  MultipleDepositsFlag = cms.bool(True),
31  ExtractorPSet = cms.PSet( MIsoCaloExtractorByAssociatorTowersBlock )
32 )
33 patAODTrackIsoDepositCalByAssociatorHits = cms.EDProducer("CandIsoDepositProducer",
34  src = cms.InputTag("patAODTrackCands"),
35  trackType = cms.string('best'),
36  MultipleDepositsFlag = cms.bool(True),
37  ExtractorPSet = cms.PSet( MIsoCaloExtractorByAssociatorHitsBlock )
38 )
39 
40 
41 patAODTrackIsolationLabels = cms.VInputTag(
42  #cms.InputTag("patAODTrackIsoDepositCalByAssociatorTowers","ecal"),
43  #cms.InputTag("patAODTrackIsoDepositCalByAssociatorTowers","hcal"),
44  #cms.InputTag("patAODTrackIsoDepositCalByAssociatorTowers","ho"),
45  cms.InputTag("patAODTrackIsoDepositCtfTk")
46 )
47 
48 # Isolation converter module
49 patAODTrackIsolations = cms.EDFilter("MultipleIsoDepositsToValueMaps",
50  collection = cms.InputTag("patAODTrackCands"),
51  associations = patAODTrackIsolationLabels
52 )
53 
54 # Isolation re-keying to clean layer 0 output collection
55 layer0TrackIsolations = cms.EDFilter("CandManyValueMapsSkimmerIsoDeposits",
56  collection = cms.InputTag("allLayer0TrackCands"),
57  backrefs = cms.InputTag("allLayer0TrackCands"),
58  commonLabel = cms.InputTag("patAODTrackIsolations"),
59  associations = patAODTrackIsolationLabels
60 )
61 
62 # sequence to run on AOD before PAT cleaners
63 patAODTrackCandSequence = cms.Sequence(
64  patAODTrackCandsUnfiltered *
65  patAODTrackCands *
66  patAODTrackIsoDepositCalByAssociatorTowers *
67  patAODTrackIsoDepositCalByAssociatorHits *
68  patAODTrackIsoDepositCtfTk *
69  patAODTrackIsolations
70 )
71 
72 # sequence to run at end of layer 0
73 patLayer0TrackCandSequence = cms.Sequence( layer0TrackIsolations )
74