27 : verbose_(iConfig.getUntrackedParameter<bool>(
"verbose",
false)),
28 use_only_charged_tracks_(iConfig.getUntrackedParameter<bool>(
29 "use_only_charged_tracks",
true)),
31 iConfig.getUntrackedParameter<bool>(
"use_TP_associator",
false)),
33 iConfig.getUntrackedParameter<double>(
"sigma_z_match", 3.0)),
35 iConfig.getUntrackedParameter<double>(
"abs_z_match", 0.1)),
37 iConfig.getUntrackedParameter<std::
string>(
"root_folder",
38 "Validation/Vertices")),
40 edm::InputTag(std::
string(
"addPileupInfo")))),
42 iConfig.getUntrackedParameter<std::
string>(
"recoTrackProducer")))),
43 edmView_recoTrack_Token_(consumes<edm::
View<
reco::Track> >(edm::InputTag(
44 iConfig.getUntrackedParameter<std::
string>(
"recoTrackProducer")))),
46 edm::InputTag(std::
string(
"mix"), std::
string(
"MergedTrackTruth")))),
48 edm::InputTag(std::
string(
"mix"), std::
string(
"MergedTrackTruth")))) {
50 "vertexRecoCollections");
54 consumes<reco::VertexCollection>(
l)));
68 float log_bins[31] = {
69 0.0, 0.0002, 0.0004, 0.0006, 0.0008, 0.001, 0.002,
70 0.004, 0.006, 0.008, 0.01, 0.02,
71 0.04, 0.06, 0.08, 0.1, 0.2,
72 0.4, 0.6, 0.8, 1.0, 2.0,
73 4.0, 6.0, 8.0, 10.0, 20.0,
74 40.0, 60.0, 80.0, 100.0
76 float log_mergez_bins[18] = {
77 0.0, 0.0025, 0.005, 0.0075, 0.01, 0.025, 0.05, 0.075, 0.1,
78 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0
80 float log_pt2_bins[16] = {
85 1000.0, 2000.0, 5000.0,10000.0
87 float log_ntrk_bins[25] = {
88 0., 2.0, 4.0, 6.0, 8.0, 10.,
89 12.0, 14.0, 16.0, 18.0, 22.0,
90 26.0, 30.0, 35.0, 40.0,
91 45.0, 50.0, 55.0, 60.0, 70.0,
92 80.0, 90.0, 100.0, 150.0, 200.0
98 double log_pt2_bins_double[16] = {
103 1000.0, 2000.0, 5000.0,10000.0
107 mes_[
"root_folder"][
"GenVtx_vs_BX"] =
108 i.
book2D(
"GenVtx_vs_BX",
"GenVtx_vs_BX", 16, -12.5, 3.5, 200, 0., 200.);
110 mes_[
"root_folder"][
"GenPV_X"] =
111 i.
book1D(
"GenPV_X",
"GeneratedPV_X", 120, -0.6, 0.6);
112 mes_[
"root_folder"][
"GenPV_Y"] =
113 i.
book1D(
"GenPV_Y",
"GeneratedPV_Y", 120, -0.6, 0.6);
114 mes_[
"root_folder"][
"GenPV_Z"] =
115 i.
book1D(
"GenPV_Z",
"GeneratedPV_Z", 120, -60., 60.);
116 mes_[
"root_folder"][
"GenPV_R"] =
117 i.
book1D(
"GenPV_R",
"GeneratedPV_R", 120, 0, 0.6);
118 mes_[
"root_folder"][
"GenPV_Pt2"] =
119 i.
book1D(
"GenPV_Pt2",
"GeneratedPV_Sum-pt2", 15, &log_pt2_bins[0]);
120 mes_[
"root_folder"][
"GenPV_NumTracks"] =
121 i.
book1D(
"GenPV_NumTracks",
"GeneratedPV_NumTracks", 24, &log_ntrk_bins[0]);
122 mes_[
"root_folder"][
"GenPV_ClosestDistanceZ"] =
123 i.
book1D(
"GenPV_ClosestDistanceZ",
"GeneratedPV_ClosestDistanceZ", 30,
127 mes_[
"root_folder"][
"GenAllV_NumVertices"] = i.
book1D(
128 "GenAllV_NumVertices",
"GeneratedAllV_NumVertices", 100, 0., 200.);
129 mes_[
"root_folder"][
"GenAllV_X"] =
130 i.
book1D(
"GenAllV_X",
"GeneratedAllV_X", 120, -0.6, 0.6);
131 mes_[
"root_folder"][
"GenAllV_Y"] =
132 i.
book1D(
"GenAllV_Y",
"GeneratedAllV_Y", 120, -0.6, 0.6);
133 mes_[
"root_folder"][
"GenAllV_Z"] =
134 i.
book1D(
"GenAllV_Z",
"GeneratedAllV_Z", 120, -60, 60);
135 mes_[
"root_folder"][
"GenAllV_R"] =
136 i.
book1D(
"GenAllV_R",
"GeneratedAllV_R", 120, 0, 0.6);
137 mes_[
"root_folder"][
"GenAllV_Pt2"] =
138 i.
book1D(
"GenAllV_Pt2",
"GeneratedAllV_Sum-pt2", 15, &log_pt2_bins[0]);
139 mes_[
"root_folder"][
"GenAllV_NumTracks"] =
140 i.
book1D(
"GenAllV_NumTracks",
"GeneratedAllV_NumTracks", 24, &log_ntrk_bins[0]);
141 mes_[
"root_folder"][
"GenAllV_ClosestDistanceZ"] =
142 i.
book1D(
"GenAllV_ClosestDistanceZ",
"GeneratedAllV_ClosestDistanceZ", 30,
144 mes_[
"root_folder"][
"GenAllV_PairDistanceZ"] =
145 i.
book1D(
"GenAllV_PairDistanceZ",
"GeneratedAllV_PairDistanceZ",
147 mes_[
"root_folder"][
"SignalIsHighestPt2"] =
148 i.
book1D(
"SignalIsHighestPt2",
"SignalIsHighestPt2", 2, -0.5, 1.5);
156 "RecoVtx_vs_GenVtx",
"RecoVtx_vs_GenVtx", 125, 0., 250., 250, 0., 250.);
157 mes_[
label][
"MatchedRecoVtx_vs_GenVtx"] =
158 i.
bookProfile(
"MatchedRecoVtx_vs_GenVtx",
"MatchedRecoVtx_vs_GenVtx",
159 125, 0., 250., 250, 0., 250.);
161 i.
book1D(
"KindOfSignalPV",
"KindOfSignalPV", 9, -0.5, 8.5);
162 mes_[
label][
"KindOfSignalPV"]->getTH1()->GetXaxis()->SetBinLabel(1,
"!Highest!Assoc2Any");
163 mes_[
label][
"KindOfSignalPV"]->getTH1()->GetXaxis()->SetBinLabel(2,
"Highest!Assoc2Any");
164 mes_[
label][
"KindOfSignalPV"]->getTH1()->GetXaxis()->SetBinLabel(3,
"!HighestAssoc2First");
165 mes_[
label][
"KindOfSignalPV"]->getTH1()->GetXaxis()->SetBinLabel(4,
"HighestAssoc2First");
166 mes_[
label][
"KindOfSignalPV"]->getTH1()->GetXaxis()->SetBinLabel(5,
"!HighestAssoc2!First");
167 mes_[
label][
"KindOfSignalPV"]->getTH1()->GetXaxis()->SetBinLabel(6,
"HighestAssoc2!First");
168 mes_[
label][
"KindOfSignalPV"]->getTH1()->GetXaxis()->SetBinLabel(7,
"!HighestAssoc2First");
169 mes_[
label][
"KindOfSignalPV"]->getTH1()->GetXaxis()->SetBinLabel(8,
"HighestAssoc2First");
171 i.
book1D(
"MisTagRate",
"MisTagRate", 2, -0.5, 1.5);
173 i.
bookProfile(
"MisTagRate_vs_PU",
"MisTagRate_vs_PU", 125, 0., 250.,
176 i.
bookProfile(
"MisTagRate_vs_sum-pt2",
"MisTagRate_vs_sum-pt2",
177 15, &log_pt2_bins_double[0], 2, 0., 1.);
179 i.
bookProfile(
"MisTagRate_vs_Z",
"MisTagRate_vs_Z",
180 120, -60., 60., 2, 0., 1.);
182 i.
bookProfile(
"MisTagRate_vs_R",
"MisTagRate_vs_R",
183 120, 0., 0.6, 2, 0., 1.);
185 i.
bookProfile(
"MisTagRate_vs_NumTracks",
"MisTagRate_vs_NumTracks",
186 100, 0., 200, 2, 0., 1.);
187 mes_[
label][
"MisTagRateSignalIsHighest"] =
188 i.
book1D(
"MisTagRateSignalIsHighest",
189 "MisTagRateSignalIsHighest", 2, -0.5, 1.5);
190 mes_[
label][
"MisTagRateSignalIsHighest_vs_PU"] =
192 "MisTagRateSignalIsHighest_vs_PU", 125, 0., 250.,
194 mes_[
label][
"MisTagRateSignalIsHighest_vs_sum-pt2"] =
195 i.
bookProfile(
"MisTagRateSignalIsHighest_vs_sum-pt2",
196 "MisTagRateSignalIsHighest_vs_sum-pt2",
197 15, &log_pt2_bins_double[0], 2, 0., 1.);
198 mes_[
label][
"MisTagRateSignalIsHighest_vs_Z"] =
200 "MisTagRateSignalIsHighest_vs_Z",
201 120, -60., 60., 2, 0., 1.);
202 mes_[
label][
"MisTagRateSignalIsHighest_vs_R"] =
204 "MisTagRateSignalIsHighest_vs_R",
205 120, 0., 0.6, 2, 0., 1.);
206 mes_[
label][
"MisTagRateSignalIsHighest_vs_NumTracks"] =
207 i.
bookProfile(
"MisTagRateSignalIsHighest_vs_NumTracks",
208 "MisTagRateSignalIsHighest_vs_NumTracks",
209 100, 0., 200, 2, 0., 1.);
210 mes_[
label][
"MisTagRateSignalIsNotHighest"] =
211 i.
book1D(
"MisTagRateSignalIsNotHighest",
212 "MisTagRateSignalIsNotHighest", 2, -0.5, 1.5);
213 mes_[
label][
"MisTagRateSignalIsNotHighest_vs_PU"] =
214 i.
bookProfile(
"MisTagRateSignalIsNotHighest_vs_PU",
215 "MisTagRateSignalIsNotHighest_vs_PU", 125, 0., 250.,
217 mes_[
label][
"MisTagRateSignalIsNotHighest_vs_sum-pt2"] =
218 i.
bookProfile(
"MisTagRateSignalIsNotHighest_vs_sum-pt2",
219 "MisTagRateSignalIsNotHighest_vs_sum-pt2",
220 15, &log_pt2_bins_double[0], 2, 0., 1.);
221 mes_[
label][
"MisTagRateSignalIsNotHighest_vs_Z"] =
223 "MisTagRateSignalIsNotHighest_vs_Z",
224 120, -60., 60., 2, 0., 1.);
225 mes_[
label][
"MisTagRateSignalIsNotHighest_vs_R"] =
227 "MisTagRateSignalIsNotHighest_vs_R",
228 120, 0., 0.6, 2, 0., 1.);
229 mes_[
label][
"MisTagRateSignalIsNotHighest_vs_NumTracks"] =
230 i.
bookProfile(
"MisTagRateSignalIsNotHighest_vs_NumTracks",
231 "MisTagRateSignalIsNotHighest_vs_NumTracks",
232 100, 0., 200, 2, 0., 1.);
234 i.
book1D(
"TruePVLocationIndex",
235 "TruePVLocationIndexInRecoVertexCollection", 12, -1.5, 10.5);
236 mes_[
label][
"TruePVLocationIndexCumulative"] =
237 i.
book1D(
"TruePVLocationIndexCumulative",
238 "TruePVLocationIndexInRecoVertexCollectionCumulative",
240 mes_[
label][
"TruePVLocationIndexSignalIsHighest"] =
241 i.
book1D(
"TruePVLocationIndexSignalIsHighest",
242 "TruePVLocationIndexSignalIsHighestInRecoVertexCollection",
244 mes_[
label][
"TruePVLocationIndexSignalIsNotHighest"] =
245 i.
book1D(
"TruePVLocationIndexSignalIsNotHighest",
246 "TruePVLocationIndexSignalIsNotHighestInRecoVertexCollection",
251 mes_[
label][
"GenAllAssoc2Reco_NumVertices"] =
252 i.
book1D(
"GenAllAssoc2Reco_NumVertices",
253 "GeneratedAllAssoc2Reco_NumVertices", 100, 0., 200.);
255 "GenAllAssoc2Reco_X",
"GeneratedAllAssoc2Reco_X", 120, -0.6, 0.6);
257 "GenAllAssoc2Reco_Y",
"GeneratedAllAssoc2Reco_Y", 120, -0.6, 0.6);
259 "GenAllAssoc2Reco_Z",
"GeneratedAllAssoc2Reco_Z", 120, -60, 60);
261 i.
book1D(
"GenAllAssoc2Reco_R",
"GeneratedAllAssoc2Reco_R", 120, 0, 0.6);
263 i.
book1D(
"GenAllAssoc2Reco_Pt2",
"GeneratedAllAssoc2Reco_Sum-pt2", 15,
265 mes_[
label][
"GenAllAssoc2Reco_NumTracks"] =
266 i.
book1D(
"GenAllAssoc2Reco_NumTracks",
267 "GeneratedAllAssoc2Reco_NumTracks", 24, &log_ntrk_bins[0]);
268 mes_[
label][
"GenAllAssoc2Reco_ClosestDistanceZ"] =
269 i.
book1D(
"GenAllAssoc2Reco_ClosestDistanceZ",
270 "GeneratedAllAssoc2Reco_ClosestDistanceZ", 30, &log_bins[0]);
274 mes_[
label][
"GenAllAssoc2RecoMatched_NumVertices"] =
275 i.
book1D(
"GenAllAssoc2RecoMatched_NumVertices",
276 "GeneratedAllAssoc2RecoMatched_NumVertices", 100, 0., 200.);
277 mes_[
label][
"GenAllAssoc2RecoMatched_X"] =
278 i.
book1D(
"GenAllAssoc2RecoMatched_X",
"GeneratedAllAssoc2RecoMatched_X",
280 mes_[
label][
"GenAllAssoc2RecoMatched_Y"] =
281 i.
book1D(
"GenAllAssoc2RecoMatched_Y",
"GeneratedAllAssoc2RecoMatched_Y",
283 mes_[
label][
"GenAllAssoc2RecoMatched_Z"] =
284 i.
book1D(
"GenAllAssoc2RecoMatched_Z",
"GeneratedAllAssoc2RecoMatched_Z",
286 mes_[
label][
"GenAllAssoc2RecoMatched_R"] =
287 i.
book1D(
"GenAllAssoc2RecoMatched_R",
"GeneratedAllAssoc2RecoMatched_R",
289 mes_[
label][
"GenAllAssoc2RecoMatched_Pt2"] =
290 i.
book1D(
"GenAllAssoc2RecoMatched_Pt2",
291 "GeneratedAllAssoc2RecoMatched_Sum-pt2", 15, &log_pt2_bins[0]);
292 mes_[
label][
"GenAllAssoc2RecoMatched_NumTracks"] =
293 i.
book1D(
"GenAllAssoc2RecoMatched_NumTracks",
294 "GeneratedAllAssoc2RecoMatched_NumTracks", 24, &log_ntrk_bins[0]);
296 "GenAllAssoc2RecoMatched_ClosestDistanceZ",
297 "GeneratedAllAssoc2RecoMatched_ClosestDistanceZ", 30, &log_bins[0]);
302 "GenAllAssoc2RecoMultiMatched_NumVertices",
303 "GeneratedAllAssoc2RecoMultiMatched_NumVertices", 100, 0., 200.);
304 mes_[
label][
"GenAllAssoc2RecoMultiMatched_X"] =
305 i.
book1D(
"GenAllAssoc2RecoMultiMatched_X",
306 "GeneratedAllAssoc2RecoMultiMatched_X", 120, -0.6, 0.6);
307 mes_[
label][
"GenAllAssoc2RecoMultiMatched_Y"] =
308 i.
book1D(
"GenAllAssoc2RecoMultiMatched_Y",
309 "GeneratedAllAssoc2RecoMultiMatched_Y", 120, -0.6, 0.6);
310 mes_[
label][
"GenAllAssoc2RecoMultiMatched_Z"] =
311 i.
book1D(
"GenAllAssoc2RecoMultiMatched_Z",
312 "GeneratedAllAssoc2RecoMultiMatched_Z", 120, -60, 60);
313 mes_[
label][
"GenAllAssoc2RecoMultiMatched_R"] =
314 i.
book1D(
"GenAllAssoc2RecoMultiMatched_R",
315 "GeneratedAllAssoc2RecoMultiMatched_R", 120, 0, 0.6);
316 mes_[
label][
"GenAllAssoc2RecoMultiMatched_Pt2"] =
317 i.
book1D(
"GenAllAssoc2RecoMultiMatched_Pt2",
318 "GeneratedAllAssoc2RecoMultiMatched_Sum-pt2",
319 15, &log_pt2_bins[0]);
320 mes_[
label][
"GenAllAssoc2RecoMultiMatched_NumTracks"] =
321 i.
book1D(
"GenAllAssoc2RecoMultiMatched_NumTracks",
322 "GeneratedAllAssoc2RecoMultiMatched_NumTracks", 24, &log_ntrk_bins[0]);
323 mes_[
label][
"GenAllAssoc2RecoMultiMatched_ClosestDistanceZ"] = i.
book1D(
324 "GenAllAssoc2RecoMultiMatched_ClosestDistanceZ",
325 "GeneratedAllAssoc2RecoMultiMatched_ClosestDistanceZ",
329 mes_[
label][
"RecoAllAssoc2Gen_NumVertices"] =
330 i.
book1D(
"RecoAllAssoc2Gen_NumVertices",
331 "ReconstructedAllAssoc2Gen_NumVertices", 100, 0., 200.);
333 "RecoAllAssoc2Gen_X",
"ReconstructedAllAssoc2Gen_X", 120, -0.6, 0.6);
335 "RecoAllAssoc2Gen_Y",
"ReconstructedAllAssoc2Gen_Y", 120, -0.6, 0.6);
337 "RecoAllAssoc2Gen_Z",
"ReconstructedAllAssoc2Gen_Z", 120, -60, 60);
339 "RecoAllAssoc2Gen_R",
"ReconstructedAllAssoc2Gen_R", 120, 0, 0.6);
341 i.
book1D(
"RecoAllAssoc2Gen_Pt2",
"ReconstructedAllAssoc2Gen_Sum-pt2",
342 15, &log_pt2_bins[0]);
344 i.
book1D(
"RecoAllAssoc2Gen_Ndof",
345 "ReconstructedAllAssoc2Gen_Ndof", 120, 0., 240.);
346 mes_[
label][
"RecoAllAssoc2Gen_NumTracks"] =
347 i.
book1D(
"RecoAllAssoc2Gen_NumTracks",
348 "ReconstructedAllAssoc2Gen_NumTracks", 24, &log_ntrk_bins[0]);
350 i.
book1D(
"RecoAllAssoc2Gen_PU",
351 "ReconstructedAllAssoc2Gen_PU", 125, 0., 250.);
352 mes_[
label][
"RecoAllAssoc2Gen_ClosestDistanceZ"] =
353 i.
book1D(
"RecoAllAssoc2Gen_ClosestDistanceZ",
354 "ReconstructedAllAssoc2Gen_ClosestDistanceZ",
356 mes_[
label][
"RecoAllAssoc2GenProperties"] =
357 i.
book1D(
"RecoAllAssoc2GenProperties",
358 "ReconstructedAllAssoc2Gen_Properties", 8, -0.5, 7.5);
359 mes_[
label][
"RecoAllAssoc2Gen_PairDistanceZ"] =
360 i.
book1D(
"RecoAllAssoc2Gen_PairDistanceZ",
361 "RecoAllAssoc2Gen_PairDistanceZ", 1000, 0, 20);
365 mes_[
label][
"RecoAllAssoc2GenMatched_NumVertices"] =
366 i.
book1D(
"RecoAllAssoc2GenMatched_NumVertices",
367 "ReconstructedAllAssoc2GenMatched_NumVertices", 100, 0., 200.);
368 mes_[
label][
"RecoAllAssoc2GenMatched_X"] =
369 i.
book1D(
"RecoAllAssoc2GenMatched_X",
370 "ReconstructedAllAssoc2GenMatched_X", 120, -0.6, 0.6);
371 mes_[
label][
"RecoAllAssoc2GenMatched_Y"] =
372 i.
book1D(
"RecoAllAssoc2GenMatched_Y",
373 "ReconstructedAllAssoc2GenMatched_Y", 120, -0.6, 0.6);
374 mes_[
label][
"RecoAllAssoc2GenMatched_Z"] =
375 i.
book1D(
"RecoAllAssoc2GenMatched_Z",
376 "ReconstructedAllAssoc2GenMatched_Z", 120, -60, 60);
377 mes_[
label][
"RecoAllAssoc2GenMatched_R"] =
378 i.
book1D(
"RecoAllAssoc2GenMatched_R",
379 "ReconstructedAllAssoc2GenMatched_R", 120, 0, 0.6);
380 mes_[
label][
"RecoAllAssoc2GenMatched_Pt2"] =
381 i.
book1D(
"RecoAllAssoc2GenMatched_Pt2",
382 "ReconstructedAllAssoc2GenMatched_Sum-pt2",
383 15, &log_pt2_bins[0]);
384 mes_[
label][
"RecoAllAssoc2GenMatched_Ndof"] =
385 i.
book1D(
"RecoAllAssoc2GenMatched_Ndof",
386 "ReconstructedAllAssoc2GenMatched_Ndof", 120, 0., 240.);
387 mes_[
label][
"RecoAllAssoc2GenMatched_NumTracks"] =
388 i.
book1D(
"RecoAllAssoc2GenMatched_NumTracks",
389 "ReconstructedAllAssoc2GenMatched_NumTracks", 24, &log_ntrk_bins[0]);
390 mes_[
label][
"RecoAllAssoc2GenMatched_PU"] =
391 i.
book1D(
"RecoAllAssoc2GenMatched_PU",
392 "ReconstructedAllAssoc2GenMatched_PU", 125, 0., 250.);
394 "RecoAllAssoc2GenMatched_ClosestDistanceZ",
395 "ReconstructedAllAssoc2GenMatched_ClosestDistanceZ", 30, &log_bins[0]);
400 "RecoAllAssoc2GenMultiMatched_NumVertices",
401 "ReconstructedAllAssoc2GenMultiMatched_NumVertices", 100, 0., 200.);
402 mes_[
label][
"RecoAllAssoc2GenMultiMatched_X"] =
403 i.
book1D(
"RecoAllAssoc2GenMultiMatched_X",
404 "ReconstructedAllAssoc2GenMultiMatched_X", 120, -0.6, 0.6);
405 mes_[
label][
"RecoAllAssoc2GenMultiMatched_Y"] =
406 i.
book1D(
"RecoAllAssoc2GenMultiMatched_Y",
407 "ReconstructedAllAssoc2GenMultiMatched_Y", 120, -0.6, 0.6);
408 mes_[
label][
"RecoAllAssoc2GenMultiMatched_Z"] =
409 i.
book1D(
"RecoAllAssoc2GenMultiMatched_Z",
410 "ReconstructedAllAssoc2GenMultiMatched_Z", 120, -60, 60);
411 mes_[
label][
"RecoAllAssoc2GenMultiMatched_R"] =
412 i.
book1D(
"RecoAllAssoc2GenMultiMatched_R",
413 "ReconstructedAllAssoc2GenMultiMatched_R", 120, 0, 0.6);
415 "RecoAllAssoc2GenMultiMatched_Pt2",
416 "ReconstructedAllAssoc2GenMultiMatched_Sum-pt2", 15, &log_pt2_bins[0]);
418 "RecoAllAssoc2GenMultiMatched_NumTracks",
419 "ReconstructedAllAssoc2GenMultiMatched_NumTracks", 24, &log_ntrk_bins[0]);
420 mes_[
label][
"RecoAllAssoc2GenMultiMatched_PU"] =
421 i.
book1D(
"RecoAllAssoc2GenMultiMatched_PU",
422 "ReconstructedAllAssoc2GenMultiMatched_PU", 125, 0., 250.);
423 mes_[
label][
"RecoAllAssoc2GenMultiMatched_ClosestDistanceZ"] =
424 i.
book1D(
"RecoAllAssoc2GenMultiMatched_ClosestDistanceZ",
425 "ReconstructedAllAssoc2GenMultiMatched_ClosestDistanceZ",
426 17, &log_mergez_bins[0]);
435 "RecoAllAssoc2MultiMatchedGen_NumVertices",
436 "RecoAllAssoc2MultiMatchedGen_NumVertices", 100, 0., 200.);
437 mes_[
label][
"RecoAllAssoc2MultiMatchedGen_X"] =
438 i.
book1D(
"RecoAllAssoc2MultiMatchedGen_X",
439 "RecoAllAssoc2MultiMatchedGen_X", 120, -0.6, 0.6);
440 mes_[
label][
"RecoAllAssoc2MultiMatchedGen_Y"] =
441 i.
book1D(
"RecoAllAssoc2MultiMatchedGen_Y",
442 "RecoAllAssoc2MultiMatchedGen_Y", 120, -0.6, 0.6);
443 mes_[
label][
"RecoAllAssoc2MultiMatchedGen_Z"] =
444 i.
book1D(
"RecoAllAssoc2MultiMatchedGen_Z",
445 "RecoAllAssoc2MultiMatchedGen_Z", 120, -60, 60);
446 mes_[
label][
"RecoAllAssoc2MultiMatchedGen_R"] =
447 i.
book1D(
"RecoAllAssoc2MultiMatchedGen_R",
448 "RecoAllAssoc2MultiMatchedGen_R", 120, 0, 0.6);
449 mes_[
label][
"RecoAllAssoc2MultiMatchedGen_Pt2"] =
450 i.
book1D(
"RecoAllAssoc2MultiMatchedGen_Pt2",
451 "RecoAllAssoc2MultiMatchedGen_Sum-pt2", 15, &log_pt2_bins[0]);
452 mes_[
label][
"RecoAllAssoc2MultiMatchedGen_NumTracks"] =
453 i.
book1D(
"RecoAllAssoc2MultiMatchedGen_NumTracks",
454 "RecoAllAssoc2MultiMatchedGen_NumTracks", 24, &log_ntrk_bins[0]);
455 mes_[
label][
"RecoAllAssoc2MultiMatchedGen_PU"] =
456 i.
book1D(
"RecoAllAssoc2MultiMatchedGen_PU",
457 "RecoAllAssoc2MultiMatchedGen_PU", 125, 0., 250.);
458 mes_[
label][
"RecoAllAssoc2MultiMatchedGen_ClosestDistanceZ"] = i.
book1D(
459 "RecoAllAssoc2MultiMatchedGen_ClosestDistanceZ",
460 "RecoAllAssoc2MultiMatchedGen_ClosestDistanceZ", 30, &log_bins[0]);
461 mes_[
label][
"RecoAllAssoc2GenSimForMerge_ClosestDistanceZ"] = i.
book1D(
462 "RecoAllAssoc2GenSimForMerge_ClosestDistanceZ",
463 "RecoAllAssoc2GenSimForMerge_ClosestDistanceZ",
464 17, &log_mergez_bins[0]);
471 mes_[
"root_folder"][
"GenPV_X"]->Fill(v.
x);
472 mes_[
"root_folder"][
"GenPV_Y"]->Fill(v.
y);
473 mes_[
"root_folder"][
"GenPV_Z"]->Fill(v.
z);
474 mes_[
"root_folder"][
"GenPV_R"]->Fill(v.
r);
475 mes_[
"root_folder"][
"GenPV_Pt2"]->Fill(v.
ptsq);
476 mes_[
"root_folder"][
"GenPV_NumTracks"]->Fill(v.
nGenTrk);
478 mes_[
"root_folder"][
"GenPV_ClosestDistanceZ"]
481 mes_[
"root_folder"][
"GenAllV_X"]->Fill(v.
x);
482 mes_[
"root_folder"][
"GenAllV_Y"]->Fill(v.
y);
483 mes_[
"root_folder"][
"GenAllV_Z"]->Fill(v.
z);
484 mes_[
"root_folder"][
"GenAllV_R"]->Fill(v.
r);
485 mes_[
"root_folder"][
"GenAllV_Pt2"]->Fill(v.
ptsq);
486 mes_[
"root_folder"][
"GenAllV_NumTracks"]->Fill(v.
nGenTrk);
488 mes_[
"root_folder"][
"GenAllV_ClosestDistanceZ"]
502 mes_[
label][
"GenAllAssoc2Reco_ClosestDistanceZ"]
505 mes_[
label][
"GenAllAssoc2RecoMatched_X"]->Fill(v.
x);
506 mes_[
label][
"GenAllAssoc2RecoMatched_Y"]->Fill(v.
y);
507 mes_[
label][
"GenAllAssoc2RecoMatched_Z"]->Fill(v.
z);
508 mes_[
label][
"GenAllAssoc2RecoMatched_R"]->Fill(v.
r);
512 mes_[
label][
"GenAllAssoc2RecoMatched_ClosestDistanceZ"]
516 mes_[
label][
"GenAllAssoc2RecoMultiMatched_X"]->Fill(v.
x);
517 mes_[
label][
"GenAllAssoc2RecoMultiMatched_Y"]->Fill(v.
y);
518 mes_[
label][
"GenAllAssoc2RecoMultiMatched_Z"]->Fill(v.
z);
519 mes_[
label][
"GenAllAssoc2RecoMultiMatched_R"]->Fill(v.
r);
520 mes_[
label][
"GenAllAssoc2RecoMultiMatched_Pt2"]->Fill(v.
ptsq);
523 mes_[
label][
"GenAllAssoc2RecoMultiMatched_ClosestDistanceZ"]
530 int num_pileup_vertices,
539 mes_[
label][
"RecoAllAssoc2Gen_PU"]->Fill(num_pileup_vertices);
541 mes_[
label][
"RecoAllAssoc2Gen_ClosestDistanceZ"]
545 mes_[
label][
"RecoAllAssoc2GenMatched_X"]->Fill(v.
x);
546 mes_[
label][
"RecoAllAssoc2GenMatched_Y"]->Fill(v.
y);
547 mes_[
label][
"RecoAllAssoc2GenMatched_Z"]->Fill(v.
z);
548 mes_[
label][
"RecoAllAssoc2GenMatched_R"]->Fill(v.
r);
552 mes_[
label][
"RecoAllAssoc2GenMatched_PU"]->Fill(num_pileup_vertices);
554 mes_[
label][
"RecoAllAssoc2GenMatched_ClosestDistanceZ"]
561 mes_[
label][
"RecoAllAssoc2MultiMatchedGen_X"]->Fill(v.
x);
562 mes_[
label][
"RecoAllAssoc2MultiMatchedGen_Y"]->Fill(v.
y);
563 mes_[
label][
"RecoAllAssoc2MultiMatchedGen_Z"]->Fill(v.
z);
564 mes_[
label][
"RecoAllAssoc2MultiMatchedGen_R"]->Fill(v.
r);
565 mes_[
label][
"RecoAllAssoc2MultiMatchedGen_Pt2"]->Fill(v.
ptsq);
567 mes_[
label][
"RecoAllAssoc2MultiMatchedGen_PU"]->Fill(num_pileup_vertices);
569 mes_[
label][
"RecoAllAssoc2MultiMatchedGen_ClosestDistanceZ"]
579 mes_[
label][
"RecoAllAssoc2GenSimForMerge_ClosestDistanceZ"]
585 mes_[
label][
"RecoAllAssoc2GenMultiMatched_X"]->Fill(v.
x);
586 mes_[
label][
"RecoAllAssoc2GenMultiMatched_Y"]->Fill(v.
y);
587 mes_[
label][
"RecoAllAssoc2GenMultiMatched_Z"]->Fill(v.
z);
588 mes_[
label][
"RecoAllAssoc2GenMultiMatched_R"]->Fill(v.
r);
589 mes_[
label][
"RecoAllAssoc2GenMultiMatched_Pt2"]->Fill(v.
ptsq);
591 mes_[
label][
"RecoAllAssoc2GenMultiMatched_PU"]->Fill(num_pileup_vertices);
593 mes_[
label][
"RecoAllAssoc2GenMultiMatched_ClosestDistanceZ"]
602 std::vector<PrimaryVertexAnalyzer4PUSlimmed::simPrimaryVertex>
605 std::vector<PrimaryVertexAnalyzer4PUSlimmed::simPrimaryVertex> simpv;
606 int current_event = -1;
609 std::cout <<
"getSimPVs TrackingVertexCollection " << std::endl;
612 for (TrackingVertexCollection::const_iterator
v = tVC->begin();
613 v != tVC->end(); ++
v) {
615 std::cout <<
"BunchX.EventId: " <<
v->eventId().bunchCrossing() <<
"."
616 << (
v->eventId()).
event() <<
" Position: " <<
v->position()
617 <<
" G4/HepMC Vertices: " <<
v->g4Vertices().size() <<
"/"
618 <<
v->genVertices().size()
619 <<
" t = " <<
v->position().t() * 1.e12
620 <<
" == 0:" << (
v->position().t() > 0) << std::endl;
622 gv !=
v->g4Vertices_end(); gv++) {
631 if (
v->eventId().bunchCrossing() != 0)
continue;
632 if (
v->eventId().event() != current_event) {
633 current_event =
v->eventId().event();
638 if (fabs(
v->position().z()) > 1000)
continue;
645 sv.sim_vertex = &(*v);
648 iTrack !=
v->daughterTracks_end(); ++iTrack) {
652 assert((**iTrack).eventId().bunchCrossing() == 0);
657 for (std::vector<simPrimaryVertex>::iterator v0 = simpv.begin();
658 v0 != simpv.end(); v0++) {
659 if ((sv.eventId == v0->eventId) && (fabs(sv.x - v0->x) < 1
e-5) &&
660 (fabs(sv.y - v0->y) < 1
e-5) && (fabs(sv.z - v0->z) < 1
e-5)) {
670 std::cout <<
"this is a new vertex " << sv.eventId.event() <<
" "
671 << sv.x <<
" " << sv.y <<
" " << sv.z << std::endl;
675 std::cout <<
"this is not a new vertex" << sv.x <<
" " << sv.y <<
" "
676 << sv.z << std::endl;
682 iTP !=
v->daughterTracks_end(); ++iTP) {
683 auto momentum = (*(*iTP)).momentum();
684 const reco::Track* matched_best_reco_track =
nullptr;
685 double match_quality = -1;
689 matched_best_reco_track =
s2r_[*iTP][0].first.get();
690 match_quality =
s2r_[*iTP][0].second;
693 std::cout <<
" Daughter momentum: " << momentum;
695 std::cout <<
" matched: " << (matched_best_reco_track !=
nullptr);
696 std::cout <<
" match-quality: " << match_quality;
699 vp->
ptot.setPx(vp->
ptot.x() + momentum.x());
700 vp->
ptot.setPy(vp->
ptot.y() + momentum.y());
701 vp->
ptot.setPz(vp->
ptot.z() + momentum.z());
702 vp->
ptot.setE(vp->
ptot.e() + (**iTP).energy());
703 vp->
ptsq += ((**iTP).pt() * (**iTP).pt());
706 if (matched_best_reco_track) {
714 if (((**iTP).pt() > 0.2) && (fabs((**iTP).eta()) < 2.5) &&
715 (**iTP).charge() != 0) {
723 std::cout <<
"average number of associated tracks: "
731 std::cout <<
"------- PrimaryVertexAnalyzer4PUSlimmed simPVs from "
733 "-------" << std::endl;
734 for (std::vector<simPrimaryVertex>::iterator v0 = simpv.begin();
735 v0 != simpv.end(); v0++) {
736 std::cout <<
"z=" << v0->z <<
" event=" << v0->eventId.event()
739 std::cout <<
"-----------------------------------------------" << std::endl;
743 for (std::vector<simPrimaryVertex>::iterator vsim = simpv.begin();
744 vsim != simpv.end(); vsim++) {
745 std::vector<simPrimaryVertex>::iterator vsim2 = vsim;
747 for (; vsim2 != simpv.end(); vsim2++) {
748 double distance_z = fabs(vsim->z - vsim2->z);
751 if (vsim->closest_vertex_distance_z < 0) {
752 vsim->closest_vertex_distance_z = distance_z;
755 if (distance_z < vsim->closest_vertex_distance_z)
756 vsim->closest_vertex_distance_z = distance_z;
764 std::vector<PrimaryVertexAnalyzer4PUSlimmed::recoPrimaryVertex>
767 std::vector<PrimaryVertexAnalyzer4PUSlimmed::recoPrimaryVertex> recopv;
770 std::cout <<
"getRecoPVs TrackingVertexCollection " << std::endl;
773 for (std::vector<reco::Vertex>::const_iterator
v = tVC->begin();
774 v != tVC->end(); ++
v) {
776 std::cout <<
" Position: " <<
v->position() << std::endl;
780 if (fabs(
v->z()) > 1000)
continue;
781 if (
v->isFake() || !
v->isValid())
continue;
787 recopv.push_back(sv);
791 for (
auto iTrack =
v->tracks_begin(); iTrack !=
v->tracks_end(); ++iTrack) {
792 auto momentum = (*(*iTrack)).innerMomentum();
796 if (momentum.mag2() == 0)
797 momentum = (*(*iTrack)).momentum();
799 std::cout <<
" Daughter momentum: " << momentum;
802 vp->
ptsq += (momentum.perp2());
808 std::cout <<
"------- PrimaryVertexAnalyzer4PUSlimmed recoPVs from "
810 "-------" << std::endl;
811 for (std::vector<recoPrimaryVertex>::iterator v0 = recopv.begin();
812 v0 != recopv.end(); v0++) {
815 std::cout <<
"-----------------------------------------------" << std::endl;
819 for (std::vector<recoPrimaryVertex>::iterator vreco = recopv.begin();
820 vreco != recopv.end(); vreco++) {
821 std::vector<recoPrimaryVertex>::iterator vreco2 = vreco;
823 for (; vreco2 != recopv.end(); vreco2++) {
824 double distance_z = fabs(vreco->z - vreco2->z);
827 if (vreco->closest_vertex_distance_z < 0) {
828 vreco->closest_vertex_distance_z = distance_z;
831 if (distance_z < vreco->closest_vertex_distance_z)
832 vreco->closest_vertex_distance_z = distance_z;
839 std::vector<simPrimaryVertex> & simpv) {
840 for (
auto &
v : simpv) {
841 v.num_matched_reco_tracks = 0;
842 v.average_match_quality = 0;
843 v.rec_vertices.clear();
849 std::vector<simPrimaryVertex>& simpv,
852 std::cout <<
"PrimaryVertexAnalyzer4PUSlimmed::matchSim2RecoVertices "
853 << reco_vertices.size() << std::endl;
855 for (std::vector<simPrimaryVertex>::iterator vsim = simpv.begin();
856 vsim != simpv.end(); vsim++) {
857 for (std::vector<reco::Vertex>::const_iterator vrec = reco_vertices.begin();
858 vrec != reco_vertices.end(); vrec++) {
859 if (vrec->isFake() || vrec->ndof() < 0.) {
863 std::cout <<
"Considering reconstructed vertex at Z:" << vrec->z()
866 if (((fabs(vrec->z() - vsim->z) / vrec->zError()) <
sigma_z_match_)
868 vsim->rec_vertices.push_back(&(*vrec));
870 std::cout <<
"Trying a matching vertex for " << vsim->z <<
" at "
871 << vrec->z() <<
" with sign: "
872 << fabs(vrec->z() - vsim->z) / vrec->zError() << std::endl;
877 if (vsim->rec_vertices.size()) {
878 for (
auto const&
v : vsim->rec_vertices) {
879 std::cout <<
"Found a matching vertex for genVtx "
880 << vsim->z <<
" at " <<
v->z()
881 <<
" with sign: " << fabs(
v->z() - vsim->z) /
v->zError()
885 std::cout <<
"No matching vertex for " << vsim->z << std::endl;
890 std::cout <<
"Done with matching sim vertices" << std::endl;
895 std::vector<recoPrimaryVertex>& recopv,
897 const std::vector<simPrimaryVertex>& simpv) {
898 for (std::vector<recoPrimaryVertex>::iterator vrec = recopv.begin();
899 vrec != recopv.end(); vrec++) {
900 int current_event = -1;
901 for (std::vector<TrackingVertex>::const_iterator vsim =
902 gen_vertices.begin();
903 vsim != gen_vertices.end(); vsim++) {
905 if (vsim->eventId().bunchCrossing() != 0)
continue;
908 if (vsim->eventId().event() != current_event) {
909 current_event = vsim->eventId().event();
919 if (((fabs(vrec->z - vsim->position().z()) / vrec->recVtx->zError()) <
921 && (fabs(vrec->z - vsim->position().z()) <
abs_z_match_)) {
922 vrec->sim_vertices.push_back(&(*vsim));
923 for (std::vector<simPrimaryVertex>::const_iterator vv = simpv.begin();
924 vv != simpv.end(); vv++) {
925 if (vv->sim_vertex == &(*vsim)) {
926 vrec->sim_vertices_internal.push_back(&(*vv));
931 std::cout <<
"Matching Reco vertex for " << vrec->z
932 <<
" at Sim Vertex " << vsim->position().z()
933 <<
" with sign: " << fabs(vsim->position().z() - vrec->z) /
934 vrec->recVtx->zError()
940 for (
auto v : vrec->sim_vertices) {
941 std::cout <<
"Found a matching vertex for reco: " << vrec->z
942 <<
" at gen:" <<
v->position().z() <<
" with sign: "
943 << fabs(vrec->z -
v->position().z()) / vrec->recVtx->zError()
958 using namespace reco;
960 std::vector<float> pileUpInfo_z;
965 for (
auto const& pu_info : *puinfoH.product()) {
966 mes_[
"root_folder"][
"GenVtx_vs_BX"]
967 ->Fill(pu_info.getBunchCrossing(), pu_info.getPU_NumInteractions());
968 if (pu_info.getBunchCrossing() == 0) {
969 pileUpInfo_z = pu_info.getPU_zpositions();
971 for (
auto const&
p : pileUpInfo_z) {
972 std::cout <<
"PileUpInfo on Z vertex: " <<
p << std::endl;
980 Handle<reco::TrackCollection> recTrks;
984 Handle<View<Track> > trackCollectionH;
1008 trackCollectionH, TPCollectionH, &iEvent, &iSetup);
1010 trackCollectionH, TPCollectionH, &iEvent, &iSetup);
1014 std::vector<simPrimaryVertex> simpv;
1020 int kind_of_signal_vertex = 0;
1021 int num_pileup_vertices = simpv.size();
1022 mes_[
"root_folder"][
"GenAllV_NumVertices"]->Fill(simpv.size());
1023 bool signal_is_highest_pt = std::max_element(simpv.begin(), simpv.end(),
1026 return lhs.ptsq < rhs.ptsq;
1027 }) == simpv.begin();
1028 kind_of_signal_vertex = (kind_of_signal_vertex & ~(1<<
HIGHEST_PT)) |
1030 mes_[
"root_folder"][
"SignalIsHighestPt2"]->Fill(
1031 signal_is_highest_pt ? 1. : 0.);
1033 mes_[
"root_folder"][
"GenAllV_PairDistanceZ"]);
1035 int label_index = -1;
1037 std::vector<recoPrimaryVertex> recopv;
1040 Handle<reco::VertexCollection> recVtxs;
1041 if (!iEvent.
getByToken(vertex_token, recVtxs)) {
1042 LogInfo(
"PrimaryVertexAnalyzer4PUSlimmed")
1043 <<
"Skipping vertex collection: " << label <<
" since it is missing."
1052 mes_[label][
"RecoAllAssoc2Gen_PairDistanceZ"]);
1056 int num_total_gen_vertices_assoc2reco = 0;
1057 int num_total_reco_vertices_assoc2gen = 0;
1058 int num_total_gen_vertices_multiassoc2reco = 0;
1059 int num_total_reco_vertices_multiassoc2gen = 0;
1060 int num_total_reco_vertices_duplicate = 0;
1061 for (
auto const&
v : simpv) {
1064 if (
v.eventId.event() == 0) {
1065 if (
std::find(
v.rec_vertices.begin(),
v.rec_vertices.end(),
1066 &((*recVtxs.product())[0])) !=
v.rec_vertices.end()) {
1068 kind_of_signal_vertex =
1072 if (
v.rec_vertices.size()) {
1073 kind_of_signal_vertex =
1078 mes_[
label][
"KindOfSignalPV"]->Fill(kind_of_signal_vertex);
1079 mes_[
label][
"MisTagRate"]->Fill(mistag);
1080 mes_[
label][
"MisTagRate_vs_PU"]->Fill(simpv.size(), mistag);
1081 mes_[
label][
"MisTagRate_vs_sum-pt2"]->Fill(
v.ptsq, mistag);
1082 mes_[
label][
"MisTagRate_vs_Z"]->Fill(
v.z, mistag);
1083 mes_[
label][
"MisTagRate_vs_R"]->Fill(
v.r, mistag);
1084 mes_[
label][
"MisTagRate_vs_NumTracks"]->Fill(
v.nGenTrk, mistag);
1085 if (signal_is_highest_pt) {
1086 mes_[
label][
"MisTagRateSignalIsHighest"]->Fill(mistag);
1087 mes_[
label][
"MisTagRateSignalIsHighest_vs_PU"]->Fill(simpv.size(),
1089 mes_[
label][
"MisTagRateSignalIsHighest_vs_sum-pt2"]->Fill(
v.ptsq,
1091 mes_[
label][
"MisTagRateSignalIsHighest_vs_Z"]->Fill(
v.z, mistag);
1092 mes_[
label][
"MisTagRateSignalIsHighest_vs_R"]->Fill(
v.r, mistag);
1093 mes_[
label][
"MisTagRateSignalIsHighest_vs_NumTracks"]->Fill(
v.nGenTrk,
1096 mes_[
label][
"MisTagRateSignalIsNotHighest"]->Fill(mistag);
1097 mes_[
label][
"MisTagRateSignalIsNotHighest_vs_PU"]->Fill(simpv.size(),
1099 mes_[
label][
"MisTagRateSignalIsNotHighest_vs_sum-pt2"]->Fill(
v.ptsq,
1101 mes_[
label][
"MisTagRateSignalIsNotHighest_vs_Z"]->Fill(
v.z, mistag);
1102 mes_[
label][
"MisTagRateSignalIsNotHighest_vs_R"]->Fill(
v.r, mistag);
1103 mes_[
label][
"MisTagRateSignalIsNotHighest_vs_NumTracks"]->
1104 Fill(
v.nGenTrk, mistag);
1111 auto iv = (*recVtxs.product()).
begin();
1112 for (
int pv_position_in_reco_collection = 0;
1113 iv != (*recVtxs.product()).
end();
1114 ++pv_position_in_reco_collection, ++iv) {
1115 if (
std::find(
v.rec_vertices.begin(),
v.rec_vertices.end(),
1116 &(*iv)) !=
v.rec_vertices.end()) {
1118 ->Fill(pv_position_in_reco_collection);
1119 mes_[
label][
"TruePVLocationIndexCumulative"]
1120 ->Fill(pv_position_in_reco_collection > 0 ? 1 : 0);
1121 if (signal_is_highest_pt) {
1122 mes_[
label][
"TruePVLocationIndexSignalIsHighest"]
1123 ->Fill(pv_position_in_reco_collection);
1125 mes_[
label][
"TruePVLocationIndexSignalIsNotHighest"]
1126 ->Fill(pv_position_in_reco_collection);
1136 if (iv == (*recVtxs.product()).
end()) {
1137 mes_[
label][
"TruePVLocationIndex"]->Fill(-1.);
1138 if (signal_is_highest_pt)
1139 mes_[
label][
"TruePVLocationIndexSignalIsHighest"]->Fill(-1.);
1141 mes_[
label][
"TruePVLocationIndexSignalIsNotHighest"]->Fill(-1.);
1145 if (
v.rec_vertices.size()) num_total_gen_vertices_assoc2reco++;
1146 if (
v.rec_vertices.size() > 1) num_total_gen_vertices_multiassoc2reco++;
1152 mes_[
label][
"GenAllAssoc2Reco_NumVertices"]
1153 ->Fill(simpv.size(), simpv.size());
1154 mes_[
label][
"GenAllAssoc2RecoMatched_NumVertices"]
1155 ->Fill(simpv.size(), num_total_gen_vertices_assoc2reco);
1156 mes_[
label][
"GenAllAssoc2RecoMultiMatched_NumVertices"]
1157 ->Fill(simpv.size(), num_total_gen_vertices_multiassoc2reco);
1158 for (
auto &
v : recopv) {
1160 if (
v.sim_vertices.size()) {
1161 num_total_reco_vertices_assoc2gen++;
1162 if (
v.sim_vertices_internal[0]->rec_vertices.size() > 1) {
1163 num_total_reco_vertices_duplicate++;
1166 if (
v.sim_vertices.size() > 1) num_total_reco_vertices_multiassoc2gen++;
1168 mes_[
label][
"RecoAllAssoc2Gen_NumVertices"]
1169 ->Fill(recopv.size(), recopv.size());
1170 mes_[
label][
"RecoAllAssoc2GenMatched_NumVertices"]
1171 ->Fill(recopv.size(), num_total_reco_vertices_assoc2gen);
1172 mes_[
label][
"RecoAllAssoc2GenMultiMatched_NumVertices"]
1173 ->Fill(recopv.size(), num_total_reco_vertices_multiassoc2gen);
1174 mes_[
label][
"RecoAllAssoc2MultiMatchedGen_NumVertices"]
1175 ->Fill(recopv.size(), num_total_reco_vertices_duplicate);
1176 mes_[
label][
"RecoVtx_vs_GenVtx"]->Fill(simpv.size(), recopv.size());
1178 ->Fill(simpv.size(), num_total_reco_vertices_assoc2gen);
1185 for (
unsigned int i = 0;
i < collection.size(); ++
i) {
1186 for (
unsigned int j =
i+1;
j < collection.size(); ++
j) {
void matchSim2RecoVertices(std::vector< simPrimaryVertex > &, const reco::VertexCollection &)
T getParameter(std::string const &) const
void fillGenAssociatedRecoVertexHistograms(const std::string &, int, recoPrimaryVertex &v)
double closest_vertex_distance_z
edm::EDGetTokenT< edm::View< reco::Track > > edmView_recoTrack_Token_
int event() const
get the contents of the subdetector field (should be protected?)
void resetSimPVAssociation(std::vector< simPrimaryVertex > &)
std::vector< const simPrimaryVertex * > sim_vertices_internal
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > vecPileupSummaryInfoToken_
std::vector< TrackingParticle > TrackingParticleCollection
void computePairDistance(const T &collection, MonitorElement *me)
const_iterator end() const
last iterator over the map (read only)
MonitorElement * bookProfile(Args &&...args)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< SimVertex >::const_iterator g4v_iterator
std::vector< const TrackingVertex * > sim_vertices
bool use_only_charged_tracks_
const_iterator find(const key_type &k) const
find element with specified reference key
virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
std::vector< Track > TrackCollection
collection of Tracks
PrimaryVertexAnalyzer4PUSlimmed(const edm::ParameterSet &)
std::vector< Vertex > VertexCollection
collection of Vertex objects
edm::EDGetTokenT< reco::TrackCollection > recoTrackCollectionToken_
edm::EDGetTokenT< TrackingVertexCollection > trackingVertexCollectionToken_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::vector< PrimaryVertexAnalyzer4PUSlimmed::simPrimaryVertex > getSimPVs(const edm::Handle< TrackingVertexCollection >)
std::vector< PrimaryVertexAnalyzer4PUSlimmed::recoPrimaryVertex > getRecoPVs(const edm::Handle< reco::VertexCollection >)
std::vector< edm::EDGetTokenT< reco::VertexCollection > > reco_vertex_collection_tokens_
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
double closest_vertex_distance_z
virtual reco::RecoToSimCollection associateRecoToSim(edm::Handle< edm::View< reco::Track > > &tCH, edm::Handle< TrackingParticleCollection > &tPCH, const edm::Event *event, const edm::EventSetup *setup) const
compare reco to sim the handle of reco::Track and TrackingParticle collections
void fillGenericGenVertexHistograms(const simPrimaryVertex &v)
reco::SimToRecoCollection s2r_
virtual reco::SimToRecoCollection associateSimToReco(edm::Handle< edm::View< reco::Track > > &tCH, edm::Handle< TrackingParticleCollection > &tPCH, const edm::Event *event, const edm::EventSetup *setup) const
compare reco to sim the handle of reco::Track and TrackingParticle collections
void setCurrentFolder(const std::string &fullpath)
const TrackAssociatorBase * associatorByHits_
void matchReco2SimVertices(std::vector< recoPrimaryVertex > &, const TrackingVertexCollection &, const std::vector< simPrimaryVertex > &)
MonitorElement * book2D(Args &&...args)
std::vector< TrackingVertex > TrackingVertexCollection
T const * product() const
~PrimaryVertexAnalyzer4PUSlimmed()
reco::RecoToSimCollection r2s_
void fillRecoAssociatedGenVertexHistograms(const std::string &, const simPrimaryVertex &v)
std::vector< edm::InputTag > reco_vertex_collections_
std::map< std::string, std::map< std::string, MonitorElement * > > mes_
const reco::Vertex * recVtx
float average_match_quality
volatile std::atomic< bool > shutdown_flag false
int num_matched_reco_tracks
std::vector< const reco::Vertex * > rec_vertices
virtual void analyze(const edm::Event &, const edm::EventSetup &)
edm::EDGetTokenT< TrackingParticleCollection > trackingParticleCollectionToken_