CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
dqmAnalyzer_cff.py
Go to the documentation of this file.
2 
4 calobTagAnalysis = bTagAnalysis.clone()
5 bTagPlots = cms.Sequence(calobTagAnalysis)
6 calobTagAnalysis.finalizePlots = False
7 calobTagAnalysis.finalizeOnly = False
8 
9 
10 #Jet collection
11 JetCut=cms.string("neutralHadronEnergyFraction < 0.99 && neutralEmEnergyFraction < 0.99 && nConstituents > 1 && chargedHadronEnergyFraction > 0.0 && chargedMultiplicity > 0.0 && chargedEmEnergyFraction < 0.99")
12 
13 from JetMETCorrections.Configuration.JetCorrectionServices_cff import ak5PFL2L3,ak5PFL2Relative,ak5PFL3Absolute
14 newAk5PFL2L3 = ak5PFL2L3.clone()
15 
16 from JetMETCorrections.Configuration.DefaultJEC_cff import ak5PFJetsL2L3
17 ak5PFJetsJEC = ak5PFJetsL2L3.clone(
18  correctors = ['newAk5PFL2L3']
19  )
20 
21 PFJetsFilter = cms.EDFilter("PFJetSelector",
22  src = cms.InputTag("ak5PFJetsJEC"),
23  cut = JetCut,
24  filter = cms.bool(False)
25  )
26 
27 jetID = cms.InputTag("PFJetsFilter")
28 
29 #JTA
31 pfAk5JetTracksAssociatorAtVertex = ak5JetTracksAssociatorAtVertex.clone(jets = jetID)
32 
33 #btag sequence
35 
36 pfImpactParameterTagInfos = impactParameterTagInfos.clone(jetTracks = cms.InputTag("pfAk5JetTracksAssociatorAtVertex"))
37 pfSecondaryVertexTagInfos = secondaryVertexTagInfos.clone(trackIPTagInfos = "pfImpactParameterTagInfos")
38 
39 pfTrackCountingHighEffBJetTags = trackCountingHighEffBJetTags.clone(tagInfos = cms.VInputTag(cms.InputTag("pfImpactParameterTagInfos")))
40 pfTrackCountingHighPurBJetTags = trackCountingHighPurBJetTags.clone(tagInfos = cms.VInputTag(cms.InputTag("pfImpactParameterTagInfos")))
41 
42 pfJetProbabilityBJetTags = jetProbabilityBJetTags.clone(tagInfos = cms.VInputTag(cms.InputTag("pfImpactParameterTagInfos")))
43 pfJetBProbabilityBJetTags = jetBProbabilityBJetTags.clone(tagInfos = cms.VInputTag(cms.InputTag("pfImpactParameterTagInfos")))
44 
45 pfSimpleSecondaryVertexHighEffBJetTags = simpleSecondaryVertexHighEffBJetTags.clone(tagInfos = cms.VInputTag(cms.InputTag("pfSecondaryVertexTagInfos")))
46 pfSimpleSecondaryVertexHighPurBJetTags = simpleSecondaryVertexHighPurBJetTags.clone(tagInfos = cms.VInputTag(cms.InputTag("pfSecondaryVertexTagInfos")))
47 
48 pfGhostTrackVertexTagInfos = pfSecondaryVertexTagInfos.clone()
49 pfGhostTrackVertexTagInfos.vertexReco = ghostTrackVertexRecoBlock.vertexReco
50 pfGhostTrackVertexTagInfos.vertexCuts.multiplicityMin = 1
51 pfGhostTrackBJetTags = ghostTrackBJetTags.clone(
52  tagInfos = cms.VInputTag(cms.InputTag("pfImpactParameterTagInfos"),
53  cms.InputTag("pfGhostTrackVertexTagInfos"))
54  )
55 
56 pfCombinedSecondaryVertexBJetTags = combinedSecondaryVertexBJetTags.clone(
57  tagInfos = cms.VInputTag(cms.InputTag("pfImpactParameterTagInfos"),
58  cms.InputTag("pfSecondaryVertexTagInfos"))
59  )
60 pfCombinedSecondaryVertexMVABJetTags = combinedSecondaryVertexMVABJetTags.clone(
61  tagInfos = cms.VInputTag(cms.InputTag("pfImpactParameterTagInfos"),
62  cms.InputTag("pfSecondaryVertexTagInfos"))
63  )
64 
65 pfSoftPFMuonsTagInfos = softPFMuonsTagInfos.clone(jets = jetID)
66 pfSoftPFElectronsTagInfos = softPFElectronsTagInfos.clone(jets = jetID)
67 pfSoftPFMuonBJetTags = softPFMuonBJetTags.clone(tagInfos = cms.VInputTag(cms.InputTag("pfSoftPFMuonsTagInfos")))
68 pfSoftPFElectronBJetTags = softPFElectronBJetTags.clone(tagInfos = cms.VInputTag(cms.InputTag("pfSoftPFElectronsTagInfos")))
69 
70 pfbtagging = cms.Sequence(
71  pfImpactParameterTagInfos *
72  ( pfTrackCountingHighEffBJetTags +
73  pfTrackCountingHighPurBJetTags +
74  pfJetProbabilityBJetTags +
75  pfJetBProbabilityBJetTags +
76 
77  pfSecondaryVertexTagInfos *
78  ( pfSimpleSecondaryVertexHighEffBJetTags +
79  pfSimpleSecondaryVertexHighPurBJetTags +
80  pfCombinedSecondaryVertexBJetTags +
81  pfCombinedSecondaryVertexMVABJetTags
82  ) +
83  pfGhostTrackVertexTagInfos *
84  pfGhostTrackBJetTags
85  ) +
86 
87  #softPFLeptonsTagInfos*
88  pfSoftPFMuonsTagInfos*
89  pfSoftPFElectronsTagInfos*
90  pfSoftPFElectronBJetTags*
91  pfSoftPFMuonBJetTags
92 )
93 
94 
95 #preSeq
96 prebTagSequence = cms.Sequence(ak5PFJetsJEC*PFJetsFilter*pfAk5JetTracksAssociatorAtVertex*pfbtagging)
97 
98 # Module execution for data
99 #from DQMOffline.RecoB.bTagAnalysisData_cfi import *
100 pfbTagAnalysis = bTagAnalysis.clone(
101  tagConfig = cms.VPSet(
102  cms.PSet(
103  bTagTrackIPAnalysisBlock,
104  type = cms.string('TrackIP'),
105  label = cms.InputTag("pfImpactParameterTagInfos"),
106  folder = cms.string("IPTag")
107  ),
108  cms.PSet(
109  bTagCombinedSVAnalysisBlock,
110  ipTagInfos = cms.InputTag("pfImpactParameterTagInfos"),
111  type = cms.string('GenericMVA'),
112  svTagInfos = cms.InputTag("pfSecondaryVertexTagInfos"),
113  label = cms.InputTag("combinedSecondaryVertex"),
114  folder = cms.string("CSVTag")
115  ),
116  cms.PSet(
117  bTagTrackCountingAnalysisBlock,
118  label = cms.InputTag("pfTrackCountingHighEffBJetTags"),
119  folder = cms.string("TCHE")
120  ),
121  cms.PSet(
122  bTagTrackCountingAnalysisBlock,
123  label = cms.InputTag("pfTrackCountingHighPurBJetTags"),
124  folder = cms.string("TCHP")
125  ),
126  cms.PSet(
127  bTagProbabilityAnalysisBlock,
128  label = cms.InputTag("pfJetProbabilityBJetTags"),
129  folder = cms.string("JP")
130  ),
131  cms.PSet(
132  bTagBProbabilityAnalysisBlock,
133  label = cms.InputTag("pfJetBProbabilityBJetTags"),
134  folder = cms.string("JBP")
135  ),
136  cms.PSet(
137  bTagSimpleSVAnalysisBlock,
138  label = cms.InputTag("pfSimpleSecondaryVertexHighEffBJetTags"),
139  folder = cms.string("SSVHE")
140  ),
141  cms.PSet(
142  bTagSimpleSVAnalysisBlock,
143  label = cms.InputTag("pfSimpleSecondaryVertexHighPurBJetTags"),
144  folder = cms.string("SSVHP")
145  ),
146  cms.PSet(
147  bTagGenericAnalysisBlock,
148  label = cms.InputTag("pfCombinedSecondaryVertexBJetTags"),
149  folder = cms.string("CSV")
150  ),
151  cms.PSet(
152  bTagGenericAnalysisBlock,
153  label = cms.InputTag("pfCombinedSecondaryVertexMVABJetTags"),
154  folder = cms.string("CSVMVA")
155  ),
156  cms.PSet(
157  bTagGenericAnalysisBlock,
158  label = cms.InputTag("pfGhostTrackBJetTags"),
159  folder = cms.string("GhTrk")
160  ),
161  cms.PSet(
162  bTagSoftLeptonAnalysisBlock,
163  label = cms.InputTag("pfSoftPFMuonBJetTags"),
164  folder = cms.string("SMT")
165  ),
166  cms.PSet(
167  bTagSoftLeptonAnalysisBlock,
168  label = cms.InputTag("pfSoftPFElectronBJetTags"),
169  folder = cms.string("SET")
170  ),
171  ),
172  )
173 pfbTagAnalysis.finalizePlots = False
174 pfbTagAnalysis.finalizeOnly = False
175 pfbTagAnalysis.ptRanges = cms.vdouble(0.0)
176 bTagPlotsDATA = cms.Sequence(pfbTagAnalysis)
177 
178 
179 ########## MC ############
180 #Matching
182 AK5byRef.jets = jetID
183 
184 # Module execution for MC
186 pfbTagValidation = bTagValidation.clone(
187  tagConfig = cms.VPSet(
188  cms.PSet(
189  bTagTrackIPAnalysisBlock,
190  type = cms.string('TrackIP'),
191  label = cms.InputTag("pfImpactParameterTagInfos"),
192  folder = cms.string("IPTag")
193  ),
194  cms.PSet(
195  bTagCombinedSVAnalysisBlock,
196  ipTagInfos = cms.InputTag("pfImpactParameterTagInfos"),
197  type = cms.string('GenericMVA'),
198  svTagInfos = cms.InputTag("pfSecondaryVertexTagInfos"),
199  label = cms.InputTag("combinedSecondaryVertex"),
200  folder = cms.string("CSVTag")
201  ),
202  cms.PSet(
203  bTagTrackCountingAnalysisBlock,
204  label = cms.InputTag("pfTrackCountingHighEffBJetTags"),
205  folder = cms.string("TCHE")
206  ),
207  cms.PSet(
208  bTagTrackCountingAnalysisBlock,
209  label = cms.InputTag("pfTrackCountingHighPurBJetTags"),
210  folder = cms.string("TCHP")
211  ),
212  cms.PSet(
213  bTagProbabilityAnalysisBlock,
214  label = cms.InputTag("pfJetProbabilityBJetTags"),
215  folder = cms.string("JP")
216  ),
217  cms.PSet(
218  bTagBProbabilityAnalysisBlock,
219  label = cms.InputTag("pfJetBProbabilityBJetTags"),
220  folder = cms.string("JBP")
221  ),
222  cms.PSet(
223  bTagSimpleSVAnalysisBlock,
224  label = cms.InputTag("pfSimpleSecondaryVertexHighEffBJetTags"),
225  folder = cms.string("SSVHE")
226  ),
227  cms.PSet(
228  bTagSimpleSVAnalysisBlock,
229  label = cms.InputTag("pfSimpleSecondaryVertexHighPurBJetTags"),
230  folder = cms.string("SSVHP")
231  ),
232  cms.PSet(
233  bTagGenericAnalysisBlock,
234  label = cms.InputTag("pfCombinedSecondaryVertexBJetTags"),
235  folder = cms.string("CSV")
236  ),
237  cms.PSet(
238  bTagGenericAnalysisBlock,
239  label = cms.InputTag("pfCombinedSecondaryVertexMVABJetTags"),
240  folder = cms.string("CSVMVA")
241  ),
242  cms.PSet(
243  bTagGenericAnalysisBlock,
244  label = cms.InputTag("pfGhostTrackBJetTags"),
245  folder = cms.string("GhTrk")
246  ),
247  cms.PSet(
248  bTagSoftLeptonAnalysisBlock,
249  label = cms.InputTag("pfSoftPFMuonBJetTags"),
250  folder = cms.string("SMT")
251  ),
252  cms.PSet(
253  bTagSoftLeptonAnalysisBlock,
254  label = cms.InputTag("pfSoftPFElectronBJetTags"),
255  folder = cms.string("SET")
256  ),
257  ),
258  )
259 pfbTagValidation.finalizePlots = False
260 pfbTagValidation.finalizeOnly = False
261 pfbTagValidation.jetMCSrc = 'AK5byValAlgo'
262 pfbTagValidation.ptRanges = cms.vdouble(0.0)
263 pfbTagValidation.etaRanges = cms.vdouble(0.0)
264 #to run on fastsim
265 bTagPlotsMC = cms.Sequence(myPartons*AK5Flavour*pfbTagValidation)
266 
267 #to run on fullsim in the validation sequence, all histograms produced in the dqmoffline sequence
268 pfbTagValidationNoall = pfbTagValidation.clone(flavPlots="noall")
269 bTagPlotsMCbcl = cms.Sequence(myPartons*AK5Flavour*pfbTagValidationNoall)