CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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.candidateCombinedSecondaryVertexV2Computer_cfi import candidateCombinedSecondaryVertexV2Computer
24 from RecoBTag.SecondaryVertex.pfCombinedInclusiveSecondaryVertexV2BJetTags_cfi import pfCombinedInclusiveSecondaryVertexV2BJetTags
25 
26 
27 #### PU Again... need to do this twice because the "linking" stage of PF reco ####
28 #### condenses information into the new "particleFlow" collection. ####
29 
30 
31 pfPileUpEI = pfPileUp.clone( PFCandidates = 'particleFlowPtrs' )
32 pfNoPileUpEI = pfNoPileUp.clone( bottomCollection = 'particleFlowPtrs',
33  topCollection = 'pfPileUpEI' )
34 
35 pfPileUpJMEEI = pfPileUpJME.clone( PFCandidates = 'particleFlowPtrs' )
36 pfNoPileUpJMEEI = pfNoPileUpJME.clone( bottomCollection = 'particleFlowPtrs',
37  topCollection = 'pfPileUpJMEEI' )
38 
39 
40 #### Muons ####
41 
42 pfAllMuonsEI = cms.EDFilter(
43  "PFCandidateFwdPtrCollectionStringFilter",
44  src = cms.InputTag("pfNoPileUpEI"),
45  cut = cms.string("abs(pdgId())==13"
46  ),
47  makeClones = cms.bool(True)
48 )
49 
50 pfMuonsFromVertexEI = pfMuonsFromVertex.clone( src = 'pfAllMuonsEI' )
51 
52 pfIsolatedMuonsEI = cms.EDFilter(
53  "PFCandidateFwdPtrCollectionStringFilter",
54  src = cms.InputTag("pfMuonsFromVertexEI"),
55  cut = cms.string('''abs(eta)<2.5 && pt>10. && muonRef.isAvailable() &&
56  (muonRef.pfIsolationR04().sumChargedHadronPt+
57  max(0.,muonRef.pfIsolationR04().sumNeutralHadronEt+
58  muonRef.pfIsolationR04().sumPhotonEt-
59  0.50*muonRef.pfIsolationR04().sumPUPt))/pt < 0.20 &&
60  (muonRef.isPFMuon && (muonRef.isGlobalMuon || muonRef.isTrackerMuon) )'''
61  ),
62  makeClones = cms.bool(True)
63 )
64 
65 
66 
67 pfNoMuon.topCollection = 'pfIsolatedMuonsEI'
68 pfNoMuon.bottomCollection = 'pfNoPileUpEI'
69 
70 
71 pfNoMuonJME.topCollection = 'pfIsolatedMuonsEI'
72 pfNoMuonJME.bottomCollection = 'pfNoPileUpJMEEI'
73 
74 
75 
76 #### Electrons ####
77 
78 pfAllElectronsEI = cms.EDFilter(
79  "PFCandidateFwdPtrCollectionStringFilter",
80  src = cms.InputTag("pfNoMuon"),
81  cut = cms.string("abs(pdgId())==11"
82  ),
83  makeClones = cms.bool(True)
84 )
85 
86 pfElectronsFromVertexEI = pfElectronsFromVertex.clone( src = 'pfAllElectronsEI' )
87 
88 pfIsolatedElectronsEI = cms.EDFilter(
89  "PFCandidateFwdPtrCollectionStringFilter",
90  src = cms.InputTag("pfElectronsFromVertexEI"),
91  cut = cms.string('''abs(eta)<2.5 && pt>20. &&
92  gsfTrackRef.isAvailable() &&
93  gsfTrackRef.hitPattern().numberOfLostHits('MISSING_INNER_HITS')<2 &&
94  (gsfElectronRef.pfIsolationVariables().sumChargedHadronPt+
95  max(0.,gsfElectronRef.pfIsolationVariables().sumNeutralHadronEt+
96  gsfElectronRef.pfIsolationVariables().sumPhotonEt-
97  0.5*gsfElectronRef.pfIsolationVariables().sumPUPt))/pt < 0.15
98  '''),
99  makeClones = cms.bool(True)
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 = "pfJetsEI" )
114 
115 pfJetTaskEI = cms.Task( pfJetsEI, pfJetsPtrsEI )
116 pfJetSequenceEI = cms.Sequence( pfJetTaskEI )
117 
118 pfNoJetEI = pfNoJet.clone(
119  topCollection = 'pfJetsPtrsEI',
120  bottomCollection = 'pfNoElectronJME'
121 )
122 
123 #### Taus ####
124 pfTausEI = pfTaus.clone()
125 pfTausPtrsEI = pfTausPtrs.clone( src = "pfTausEI" )
126 pfNoTauEI = pfNoTau.clone(
127  topCollection = 'pfTausPtrsEI',
128  bottomCollection = 'pfJetsPtrsEI'
129 )
130 
131 pfTauEITask = cms.Task(
132  pfTausPreTask,
133  pfTausBaseTask,
134  pfTausEI,
135  pfTausPtrsEI
136  )
137 pfTauEISequence = cms.Sequence(pfTauEITask)
138 
139 #### B-tagging ####
140 pfImpactParameterTagInfosEI = pfImpactParameterTagInfos.clone(
141  jets = 'pfJetsEI'
142 )
143 pfInclusiveSecondaryVertexFinderTagInfosEI = pfInclusiveSecondaryVertexFinderTagInfos.clone(
144  trackIPTagInfos = 'pfImpactParameterTagInfosEI'
145 )
146 pfCombinedInclusiveSecondaryVertexV2BJetTagsEI = pfCombinedInclusiveSecondaryVertexV2BJetTags.clone(
147  tagInfos = ["pfImpactParameterTagInfosEI",
148  "pfInclusiveSecondaryVertexFinderTagInfosEI"]
149 )
150 
151 
152 
153 #### MET ####
154 pfMetEI = pfMET.clone(srcJets="pfJetsEI")
155 
156 #EITopPAG = cms.Task(
157 EITask = cms.Task(
158  goodOfflinePrimaryVertices ,
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  pfJetTaskEI ,
174  pfNoJetEI ,
175  pfTauEITask ,
176  pfNoTauEI ,
177  pfMetEI,
178  pfImpactParameterTagInfosEI,
179  pfInclusiveSecondaryVertexFinderTagInfosEI,
180  pfCombinedInclusiveSecondaryVertexV2BJetTagsEI
181  )
182 EIsequence = cms.Sequence(EITask)
183