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('''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.trackerExpectedHitsInner.numberOfLostHits<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 
103 pfNoElectron.topCollection = 'pfIsolatedElectronsEI'
104 pfNoElectron.bottomCollection = 'pfNoMuon'
105 
106 pfNoElectronJME.topCollection = 'pfIsolatedElectronsEI'
107 pfNoElectronJME.bottomCollection = 'pfNoMuonJME'
108 
109 
110 #### Jets ####
111 
112 pfJetsEI = pfJets.clone()
113 pfJetsPtrsEI = pfJetsPtrs.clone(src=cms.InputTag("pfJetsEI"))
114 
115 pfJetSequenceEI = cms.Sequence( pfJetsEI+ pfJetsPtrsEI )
116 
117 pfNoJetEI = pfNoJet.clone(
118  topCollection = 'pfJetsPtrsEI',
119  bottomCollection = 'pfNoElectronJME'
120  )
121 
122 #### Taus ####
123 pfTausEI = pfTaus.clone()
124 pfTausPtrsEI = pfTausPtrs.clone(src=cms.InputTag("pfTausEI") )
125 pfNoTauEI = pfNoTau.clone(
126  topCollection = cms.InputTag('pfTausPtrsEI'),
127  bottomCollection = cms.InputTag('pfJetsPtrsEI')
128  )
129 
130 pfTauEISequence = cms.Sequence(
131  pfTausPreSequence+
132  pfTausBaseSequence+
133  pfTausEI+
134  pfTausPtrsEI
135  )
136 
137 #### B-tagging ####
138 pfJetTrackAssociatorEI = ak5JetTracksAssociatorAtVertex.clone (
139  src = cms.InputTag("pfJetsEI")
140  )
141 impactParameterTagInfosEI = impactParameterTagInfos.clone(
142  jetTracks = cms.InputTag( 'pfJetTrackAssociatorEI' )
143  )
144 secondaryVertexTagInfosEI = secondaryVertexTagInfos.clone(
145  trackIPTagInfos = cms.InputTag( 'impactParameterTagInfosEI' )
146  )
147 combinedSecondaryVertexBJetTagsEI = combinedSecondaryVertexBJetTags.clone(
148  tagInfos = cms.VInputTag(cms.InputTag("impactParameterTagInfosEI"),
149  cms.InputTag("secondaryVertexTagInfosEI"))
150  )
151 
152 
153 
154 #### MET ####
155 pfMetEI = pfMET.clone(jets=cms.InputTag("pfJetsEI"))
156 
157 #EITopPAG = cms.Sequence(
158 EIsequence = cms.Sequence(
159  pfPileUpEI +
160  pfPileUpJMEEI +
161  pfNoPileUpEI +
162  pfNoPileUpJMEEI +
163  pfAllMuonsEI +
164  pfMuonsFromVertexEI +
165  pfIsolatedMuonsEI +
166  pfNoMuon +
167  pfNoMuonJME +
168  pfAllElectronsEI +
169  pfElectronsFromVertexEI +
170  pfIsolatedElectronsEI +
171  pfNoElectron +
172  pfNoElectronJME +
173  pfJetSequenceEI +
174  pfNoJetEI +
175  pfTauEISequence +
176  pfNoTauEI +
177  pfMetEI+
178  pfJetTrackAssociatorEI+
179  impactParameterTagInfosEI+
180  secondaryVertexTagInfosEI+
181  combinedSecondaryVertexBJetTagsEI
182  )
183