CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EITopPAG_cff.py
Go to the documentation of this file.
2 
10 
11 
12 # sequential top projection cleaning
17 
18 
19 # b-tagging
20 from RecoJets.JetAssociationProducers.ak5JTA_cff import ak5JetTracksAssociatorAtVertex
21 from RecoBTag.ImpactParameter.impactParameter_cfi import impactParameterTagInfos
22 from RecoBTag.SecondaryVertex.secondaryVertexTagInfos_cfi import secondaryVertexTagInfos
23 from RecoBTag.SecondaryVertex.combinedSecondaryVertexBJetTags_cfi import combinedSecondaryVertexBJetTags
24 
25 
26 #### PU Again... need to do this twice because the "linking" stage of PF reco ####
27 #### condenses information into the new "particleFlow" collection. ####
28 
29 
30 pfPileUpEI = pfPileUp.clone( PFCandidates = cms.InputTag('particleFlowPtrs') )
31 pfNoPileUpEI = pfNoPileUp.clone( bottomCollection = cms.InputTag('particleFlowPtrs'),
32  topCollection = cms.InputTag('pfPileUpEI') )
33 
34 pfPileUpJMEEI = pfPileUpJME.clone( PFCandidates = cms.InputTag('particleFlowPtrs') )
35 pfNoPileUpJMEEI = pfNoPileUpJME.clone( bottomCollection = cms.InputTag('particleFlowPtrs'),
36  topCollection = cms.InputTag('pfPileUpJMEEI') )
37 
38 
39 #### Muons ####
40 
41 pfAllMuonsEI = cms.EDFilter(
42  "PFCandidateFwdPtrCollectionStringFilter",
43  src = cms.InputTag("pfNoPileUpEI"),
44  cut = cms.string("abs(pdgId())==13"
45  ),
46  makeClones = cms.bool(True)
47 )
48 
49 pfMuonsFromVertexEI = pfMuonsFromVertex.clone( src = cms.InputTag('pfAllMuonsEI') )
50 
51 pfIsolatedMuonsEI = cms.EDFilter(
52  "PFCandidateFwdPtrCollectionStringFilter",
53  src = cms.InputTag("pfMuonsFromVertexEI"),
54  cut = cms.string("pt > 5 & muonRef.isAvailable() & "\
55  "muonRef.pfIsolationR04().sumChargedHadronPt + "\
56  "muonRef.pfIsolationR04().sumNeutralHadronEt + "\
57  "muonRef.pfIsolationR04().sumPhotonEt "\
58  " < 0.15 * pt "
59  ),
60  makeClones = cms.bool(True)
61 )
62 
63 pfNoMuon.topCollection = 'pfIsolatedMuonsEI'
64 pfNoMuon.bottomCollection = 'pfNoPileUpEI'
65 
66 
67 pfNoMuonJME.topCollection = 'pfIsolatedMuonsEI'
68 pfNoMuonJME.bottomCollection = 'pfNoPileUpJMEEI'
69 
70 
71 
72 #### Electrons ####
73 
74 pfAllElectronsEI = cms.EDFilter(
75  "PFCandidateFwdPtrCollectionStringFilter",
76  src = cms.InputTag("pfNoMuon"),
77  cut = cms.string("abs(pdgId())==11"
78  ),
79  makeClones = cms.bool(True)
80 )
81 
82 pfElectronsFromVertexEI = pfElectronsFromVertex.clone( src = cms.InputTag('pfAllElectronsEI') )
83 
84 
85 pfIsolatedElectronsEI = cms.EDFilter(
86  "PFCandidateFwdPtrCollectionStringFilter",
87  src = cms.InputTag("pfElectronsFromVertexEI"),
88  cut = cms.string(" pt > 5 & gsfElectronRef.isAvailable() & gsfTrackRef.trackerExpectedHitsInner.numberOfLostHits<2 & "\
89  "gsfElectronRef.pfIsolationVariables().chargedHadronIso + "\
90  "gsfElectronRef.pfIsolationVariables().neutralHadronIso + "\
91  "gsfElectronRef.pfIsolationVariables().photonIso "\
92  " < 0.2 * pt "
93  ),
94  makeClones = cms.bool(True)
95 )
96 
97 
98 pfNoElectron.topCollection = 'pfIsolatedElectronsEI'
99 pfNoElectron.bottomCollection = 'pfNoMuon'
100 
101 pfNoElectronJME.topCollection = 'pfIsolatedElectronsEI'
102 pfNoElectronJME.bottomCollection = 'pfNoMuonJME'
103 
104 
105 #### Jets ####
106 
107 pfJetsEI = pfJets.clone()
108 pfJetsPtrsEI = pfJetsPtrs.clone(src=cms.InputTag("pfJetsEI"))
109 
110 pfJetSequenceEI = cms.Sequence( pfJetsEI+ pfJetsPtrsEI )
111 
112 pfNoJetEI = pfNoJet.clone(
113  topCollection = 'pfJetsPtrsEI',
114  bottomCollection = 'pfNoElectronJME'
115  )
116 
117 #### Taus ####
118 pfTausEI = pfTaus.clone()
119 pfTausPtrsEI = pfTausPtrs.clone(src=cms.InputTag("pfTausEI") )
120 pfNoTauEI = pfNoTau.clone(
121  topCollection = cms.InputTag('pfTausPtrsEI'),
122  bottomCollection = cms.InputTag('pfJetsPtrsEI')
123  )
124 
125 pfTauEISequence = cms.Sequence(
126  pfTausPreSequence+
127  pfTausBaseSequence+
128  pfTausEI+
129  pfTausPtrsEI
130  )
131 
132 #### B-tagging ####
133 pfJetTrackAssociatorEI = ak5JetTracksAssociatorAtVertex.clone (
134  src = cms.InputTag("pfJetsEI")
135  )
136 impactParameterTagInfosEI = impactParameterTagInfos.clone(
137  jetTracks = cms.InputTag( 'pfJetTrackAssociatorEI' )
138  )
139 secondaryVertexTagInfosEI = secondaryVertexTagInfos.clone(
140  trackIPTagInfos = cms.InputTag( 'impactParameterTagInfosEI' )
141  )
142 combinedSecondaryVertexBJetTagsEI = combinedSecondaryVertexBJetTags.clone(
143  tagInfos = cms.VInputTag(cms.InputTag("impactParameterTagInfosEI"),
144  cms.InputTag("secondaryVertexTagInfosEI"))
145  )
146 
147 
148 
149 #### MET ####
150 pfMetEI = pfMET.clone(jets=cms.InputTag("pfJetsEI"))
151 
152 #EITopPAG = cms.Sequence(
153 EIsequence = cms.Sequence(
154  pfPileUpEI +
155  pfPileUpJMEEI +
156  pfNoPileUpEI +
157  pfNoPileUpJMEEI +
158  pfAllMuonsEI +
159  pfMuonsFromVertexEI +
160  pfIsolatedMuonsEI +
161  pfNoMuon +
162  pfNoMuonJME +
163  pfAllElectronsEI +
164  pfElectronsFromVertexEI +
165  pfIsolatedElectronsEI +
166  pfNoElectron +
167  pfNoElectronJME +
168  pfJetSequenceEI +
169  pfNoJetEI +
170  pfTauEISequence +
171  pfNoTauEI +
172  pfMetEI+
173  pfJetTrackAssociatorEI+
174  impactParameterTagInfosEI+
175  secondaryVertexTagInfosEI+
176  combinedSecondaryVertexBJetTagsEI
177  )
178