CMS 3D CMS Logo

EITopPAG_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
11 
12 
13 # sequential top projection cleaning
18 
19 
20 # b-tagging
21 from RecoBTag.ImpactParameter.pfImpactParameterTagInfos_cfi import pfImpactParameterTagInfos
22 from RecoBTag.SecondaryVertex.pfInclusiveSecondaryVertexFinderTagInfos_cfi import pfInclusiveSecondaryVertexFinderTagInfos
23 from RecoBTag.SecondaryVertex.pfCombinedInclusiveSecondaryVertexV2BJetTags_cfi import pfCombinedInclusiveSecondaryVertexV2BJetTags
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('''abs(eta)<2.5 && pt>10. && muonRef.isAvailable() &&
55  (muonRef.pfIsolationR04().sumChargedHadronPt+
56  max(0.,muonRef.pfIsolationR04().sumNeutralHadronEt+
57  muonRef.pfIsolationR04().sumPhotonEt-
58  0.50*muonRef.pfIsolationR04().sumPUPt))/pt < 0.20 &&
59  (muonRef.isPFMuon && (muonRef.isGlobalMuon || muonRef.isTrackerMuon) )'''
60  ),
61  makeClones = cms.bool(True)
62 )
63 
64 
65 
66 pfNoMuon.topCollection = 'pfIsolatedMuonsEI'
67 pfNoMuon.bottomCollection = 'pfNoPileUpEI'
68 
69 
70 pfNoMuonJME.topCollection = 'pfIsolatedMuonsEI'
71 pfNoMuonJME.bottomCollection = 'pfNoPileUpJMEEI'
72 
73 
74 
75 #### Electrons ####
76 
77 pfAllElectronsEI = cms.EDFilter(
78  "PFCandidateFwdPtrCollectionStringFilter",
79  src = cms.InputTag("pfNoMuon"),
80  cut = cms.string("abs(pdgId())==11"
81  ),
82  makeClones = cms.bool(True)
83 )
84 
85 pfElectronsFromVertexEI = pfElectronsFromVertex.clone( src = cms.InputTag('pfAllElectronsEI') )
86 
87 pfIsolatedElectronsEI = cms.EDFilter(
88  "PFCandidateFwdPtrCollectionStringFilter",
89  src = cms.InputTag("pfElectronsFromVertexEI"),
90  cut = cms.string('''abs(eta)<2.5 && pt>20. &&
91  gsfTrackRef.isAvailable() &&
92  gsfTrackRef.hitPattern().numberOfLostHits('MISSING_INNER_HITS')<2 &&
93  (gsfElectronRef.pfIsolationVariables().sumChargedHadronPt+
94  max(0.,gsfElectronRef.pfIsolationVariables().sumNeutralHadronEt+
95  gsfElectronRef.pfIsolationVariables().sumPhotonEt-
96  0.5*gsfElectronRef.pfIsolationVariables().sumPUPt))/pt < 0.15
97  '''),
98  makeClones = cms.bool(True)
99 )
100 
101 
102 pfNoElectron.topCollection = 'pfIsolatedElectronsEI'
103 pfNoElectron.bottomCollection = 'pfNoMuon'
104 
105 pfNoElectronJME.topCollection = 'pfIsolatedElectronsEI'
106 pfNoElectronJME.bottomCollection = 'pfNoMuonJME'
107 
108 
109 #### Jets ####
110 
111 pfJetsEI = pfJets.clone()
112 pfJetsPtrsEI = pfJetsPtrs.clone(src=cms.InputTag("pfJetsEI"))
113 
114 pfJetSequenceEI = cms.Sequence( pfJetsEI+ pfJetsPtrsEI )
115 
116 pfNoJetEI = pfNoJet.clone(
117  topCollection = 'pfJetsPtrsEI',
118  bottomCollection = 'pfNoElectronJME'
119  )
120 
121 #### Taus ####
122 pfTausEI = pfTaus.clone()
123 pfTausPtrsEI = pfTausPtrs.clone(src=cms.InputTag("pfTausEI") )
124 pfNoTauEI = pfNoTau.clone(
125  topCollection = cms.InputTag('pfTausPtrsEI'),
126  bottomCollection = cms.InputTag('pfJetsPtrsEI')
127  )
128 
129 pfTauEISequence = cms.Sequence(
130  pfTausPreSequence+
131  pfTausBaseSequence+
132  pfTausEI+
133  pfTausPtrsEI
134  )
135 
136 #### B-tagging ####
137 pfImpactParameterTagInfosEI = pfImpactParameterTagInfos.clone(
138  jets = cms.InputTag( 'pfJetsEI' )
139  )
140 pfInclusiveSecondaryVertexFinderTagInfosEI = pfInclusiveSecondaryVertexFinderTagInfos.clone(
141  trackIPTagInfos = cms.InputTag( 'pfImpactParameterTagInfosEI' )
142  )
143 pfCombinedInclusiveSecondaryVertexV2BJetTagsEI = pfCombinedInclusiveSecondaryVertexV2BJetTags.clone(
144  tagInfos = cms.VInputTag(cms.InputTag("pfImpactParameterTagInfosEI"),
145  cms.InputTag("pfInclusiveSecondaryVertexFinderTagInfosEI"))
146  )
147 
148 
149 
150 #### MET ####
151 pfMetEI = pfMET.clone(jets=cms.InputTag("pfJetsEI"))
152 
153 #EITopPAG = cms.Sequence(
154 EIsequence = cms.Sequence(
155  goodOfflinePrimaryVertices +
156  pfPileUpEI +
157  pfPileUpJMEEI +
158  pfNoPileUpEI +
159  pfNoPileUpJMEEI +
160  pfAllMuonsEI +
161  pfMuonsFromVertexEI +
162  pfIsolatedMuonsEI +
163  pfNoMuon +
164  pfNoMuonJME +
165  pfAllElectronsEI +
166  pfElectronsFromVertexEI +
167  pfIsolatedElectronsEI +
168  pfNoElectron +
169  pfNoElectronJME +
170  pfJetSequenceEI +
171  pfNoJetEI +
172  pfTauEISequence +
173  pfNoTauEI +
174  pfMetEI+
175  pfImpactParameterTagInfosEI+
176  pfInclusiveSecondaryVertexFinderTagInfosEI+
177  pfCombinedInclusiveSecondaryVertexV2BJetTagsEI
178  )