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.ak4JTA_cff import ak4JetTracksAssociatorAtVertex
21 from RecoBTag.ImpactParameter.impactParameterTagInfos_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.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 pfJetTrackAssociatorEI = ak4JetTracksAssociatorAtVertex.clone (
138  src = cms.InputTag("pfJetsEI")
139  )
140 impactParameterTagInfosEI = impactParameterTagInfos.clone(
141  jetTracks = cms.InputTag( 'pfJetTrackAssociatorEI' )
142  )
143 secondaryVertexTagInfosEI = secondaryVertexTagInfos.clone(
144  trackIPTagInfos = cms.InputTag( 'impactParameterTagInfosEI' )
145  )
146 combinedSecondaryVertexBJetTagsEI = combinedSecondaryVertexBJetTags.clone(
147  tagInfos = cms.VInputTag(cms.InputTag("impactParameterTagInfosEI"),
148  cms.InputTag("secondaryVertexTagInfosEI"))
149  )
150 
151 
152 
153 #### MET ####
154 pfMetEI = pfMET.clone(jets=cms.InputTag("pfJetsEI"))
155 
156 #EITopPAG = cms.Sequence(
157 EIsequence = cms.Sequence(
158  pfPileUpEI +
159  pfPileUpJMEEI +
160  pfNoPileUpEI +
161  pfNoPileUpJMEEI +
162  pfAllMuonsEI +
163  pfMuonsFromVertexEI +
164  pfIsolatedMuonsEI +
165  pfNoMuon +
166  pfNoMuonJME +
167  pfAllElectronsEI +
168  pfElectronsFromVertexEI +
169  pfIsolatedElectronsEI +
170  pfNoElectron +
171  pfNoElectronJME +
172  pfJetSequenceEI +
173  pfNoJetEI +
174  pfTauEISequence +
175  pfNoTauEI +
176  pfMetEI+
177  pfJetTrackAssociatorEI+
178  impactParameterTagInfosEI+
179  secondaryVertexTagInfosEI+
180  combinedSecondaryVertexBJetTagsEI
181  )
182