test
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.
1 import FWCore.ParameterSet.Config as cms
2 
10 
11 
12 # sequential top projection cleaning
17 
18 
19 # b-tagging
20 from RecoBTag.ImpactParameter.pfImpactParameterTagInfos_cfi import pfImpactParameterTagInfos
21 from RecoBTag.SecondaryVertex.pfInclusiveSecondaryVertexFinderTagInfos_cfi import pfInclusiveSecondaryVertexFinderTagInfos
22 from RecoBTag.SecondaryVertex.pfCombinedInclusiveSecondaryVertexV2BJetTags_cfi import pfCombinedInclusiveSecondaryVertexV2BJetTags
23 
24 
25 #### PU Again... need to do this twice because the "linking" stage of PF reco ####
26 #### condenses information into the new "particleFlow" collection. ####
27 
28 
29 pfPileUpEI = pfPileUp.clone( PFCandidates = cms.InputTag('particleFlowPtrs') )
30 pfNoPileUpEI = pfNoPileUp.clone( bottomCollection = cms.InputTag('particleFlowPtrs'),
31  topCollection = cms.InputTag('pfPileUpEI') )
32 
33 pfPileUpJMEEI = pfPileUpJME.clone( PFCandidates = cms.InputTag('particleFlowPtrs') )
34 pfNoPileUpJMEEI = pfNoPileUpJME.clone( bottomCollection = cms.InputTag('particleFlowPtrs'),
35  topCollection = cms.InputTag('pfPileUpJMEEI') )
36 
37 
38 #### Muons ####
39 
40 pfAllMuonsEI = cms.EDFilter(
41  "PFCandidateFwdPtrCollectionStringFilter",
42  src = cms.InputTag("pfNoPileUpEI"),
43  cut = cms.string("abs(pdgId())==13"
44  ),
45  makeClones = cms.bool(True)
46 )
47 
48 pfMuonsFromVertexEI = pfMuonsFromVertex.clone( src = cms.InputTag('pfAllMuonsEI') )
49 
50 pfIsolatedMuonsEI = cms.EDFilter(
51  "PFCandidateFwdPtrCollectionStringFilter",
52  src = cms.InputTag("pfMuonsFromVertexEI"),
53  cut = cms.string('''abs(eta)<2.5 && pt>10. && muonRef.isAvailable() &&
54  (muonRef.pfIsolationR04().sumChargedHadronPt+
55  max(0.,muonRef.pfIsolationR04().sumNeutralHadronEt+
56  muonRef.pfIsolationR04().sumPhotonEt-
57  0.50*muonRef.pfIsolationR04().sumPUPt))/pt < 0.20 &&
58  (muonRef.isPFMuon && (muonRef.isGlobalMuon || muonRef.isTrackerMuon) )'''
59  ),
60  makeClones = cms.bool(True)
61 )
62 
63 
64 
65 pfNoMuon.topCollection = 'pfIsolatedMuonsEI'
66 pfNoMuon.bottomCollection = 'pfNoPileUpEI'
67 
68 
69 pfNoMuonJME.topCollection = 'pfIsolatedMuonsEI'
70 pfNoMuonJME.bottomCollection = 'pfNoPileUpJMEEI'
71 
72 
73 
74 #### Electrons ####
75 
76 pfAllElectronsEI = cms.EDFilter(
77  "PFCandidateFwdPtrCollectionStringFilter",
78  src = cms.InputTag("pfNoMuon"),
79  cut = cms.string("abs(pdgId())==11"
80  ),
81  makeClones = cms.bool(True)
82 )
83 
84 pfElectronsFromVertexEI = pfElectronsFromVertex.clone( src = cms.InputTag('pfAllElectronsEI') )
85 
86 pfIsolatedElectronsEI = cms.EDFilter(
87  "PFCandidateFwdPtrCollectionStringFilter",
88  src = cms.InputTag("pfElectronsFromVertexEI"),
89  cut = cms.string('''abs(eta)<2.5 && pt>20. &&
90  gsfTrackRef.isAvailable() &&
91  gsfTrackRef.hitPattern().numberOfLostHits('MISSING_INNER_HITS')<2 &&
92  (gsfElectronRef.pfIsolationVariables().sumChargedHadronPt+
93  max(0.,gsfElectronRef.pfIsolationVariables().sumNeutralHadronEt+
94  gsfElectronRef.pfIsolationVariables().sumPhotonEt-
95  0.5*gsfElectronRef.pfIsolationVariables().sumPUPt))/pt < 0.15
96  '''),
97  makeClones = cms.bool(True)
98 )
99 
100 
101 pfNoElectron.topCollection = 'pfIsolatedElectronsEI'
102 pfNoElectron.bottomCollection = 'pfNoMuon'
103 
104 pfNoElectronJME.topCollection = 'pfIsolatedElectronsEI'
105 pfNoElectronJME.bottomCollection = 'pfNoMuonJME'
106 
107 
108 #### Jets ####
109 
110 pfJetsEI = pfJets.clone()
111 pfJetsPtrsEI = pfJetsPtrs.clone(src=cms.InputTag("pfJetsEI"))
112 
113 pfJetSequenceEI = cms.Sequence( pfJetsEI+ pfJetsPtrsEI )
114 
115 pfNoJetEI = pfNoJet.clone(
116  topCollection = 'pfJetsPtrsEI',
117  bottomCollection = 'pfNoElectronJME'
118  )
119 
120 #### Taus ####
121 pfTausEI = pfTaus.clone()
122 pfTausPtrsEI = pfTausPtrs.clone(src=cms.InputTag("pfTausEI") )
123 pfNoTauEI = pfNoTau.clone(
124  topCollection = cms.InputTag('pfTausPtrsEI'),
125  bottomCollection = cms.InputTag('pfJetsPtrsEI')
126  )
127 
128 pfTauEISequence = cms.Sequence(
129  pfTausPreSequence+
130  pfTausBaseSequence+
131  pfTausEI+
132  pfTausPtrsEI
133  )
134 
135 #### B-tagging ####
136 pfImpactParameterTagInfosEI = pfImpactParameterTagInfos.clone(
137  jets = cms.InputTag( 'pfJetsEI' )
138  )
139 pfInclusiveSecondaryVertexFinderTagInfosEI = pfInclusiveSecondaryVertexFinderTagInfos.clone(
140  trackIPTagInfos = cms.InputTag( 'pfImpactParameterTagInfosEI' )
141  )
142 pfCombinedInclusiveSecondaryVertexV2BJetTagsEI = pfCombinedInclusiveSecondaryVertexV2BJetTags.clone(
143  tagInfos = cms.VInputTag(cms.InputTag("pfImpactParameterTagInfosEI"),
144  cms.InputTag("pfInclusiveSecondaryVertexFinderTagInfosEI"))
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  pfImpactParameterTagInfosEI+
174  pfInclusiveSecondaryVertexFinderTagInfosEI+
175  pfCombinedInclusiveSecondaryVertexV2BJetTagsEI
176  )
177