1 from Validation.RecoTrack.plotting.plotting
import Plot, PlotGroup, PlotFolder, Plotter
2 import Validation.RecoTrack.plotting.validation
as validation
3 from Validation.RecoTrack.plotting.html
import PlotPurpose
9 _maxFake = [0.05, 0.1, 0.2, 0.5, 0.7, 1.025]
11 _common = {
"xlabel":
"Pileup interactions",
"xmax": _maxPU,
"ymax": _maxVtx}
12 _recovsgen = PlotGroup(
"recovsgen", [
13 Plot(
"RecoVtx_vs_GenVtx", ytitle=
"Reco vertices", **_common),
14 Plot(
"MatchedRecoVtx_vs_GenVtx", ytitle=
"Matched reco vertices", **_common),
15 Plot(
"merged_vs_ClosestVertexInZ", xtitle=
"Closest distance in Z (cm)", ytitle=
"Merge rate", xlog=
True),
19 _pvtagging = PlotGroup(
"pvtagging", [
20 Plot(
"TruePVLocationIndexCumulative", xtitle=
"Signal PV status in reco collection", ytitle=
"Fraction of events", drawStyle=
"hist", normalizeToUnitArea=
True, xbinlabels=[
"Not reconstructed",
"Reco and identified",
"Reco, not identified"], xbinlabelsize=15, xbinlabeloption=
"h", xgrid=
False, ylog=
True, ymin=1e-3),
21 Plot(
"TruePVLocationIndex", xtitle=
"Index of signal PV in reco collection", ytitle=
"Fraction of events", drawStyle=
"hist", normalizeToUnitArea=
True, ylog=
True, ymin=1e-5),
22 Plot(
"MisTagRate_vs_PU", xtitle=
"PU", ytitle=
"Mistag rate vs. PU", title=
"", xmax=_maxPU, ymax=_maxFake),
23 Plot(
"MisTagRate_vs_sum-pt2", xtitle=
"#Sigmap_{T}^{2}", ytitle=
"Mistag rate vs. #Sigmap_{T}^{2}", title=
"", xlog=
True, ymax=_maxFake),
27 _effandfake = PlotGroup(
"effandfake", [
28 Plot(
"effic_vs_NumVertices", xtitle=
"Reco vertices", ytitle=
"Efficiency vs. N vertices", xmax=_maxVtx, ymax=_maxEff),
29 Plot(
"fakerate_vs_PU", xtitle=
"Pileup interactions", ytitle=
"Fake rate vs. PU", xmax=_maxPU, ymax=_maxFake),
30 Plot(
"effic_vs_NumTracks", xtitle=
"Tracks", ytitle=
"Efficiency vs. N tracks", title=
"", ymax=_maxEff),
31 Plot(
"fakerate_vs_NumTracks", xtitle=
"Tracks", ytitle=
"Fake rate vs. N tracks", title=
"", ymax=_maxFake),
32 Plot(
"effic_vs_Pt2", xtitle=
"Sum p_{T}^{2} ", ytitle=
"Efficiency vs. sum p_{T}^{2}", xlog=
True, ymax=_maxEff),
33 Plot(
"fakerate_vs_Pt2", xtitle=
"Sum p_{T}^{2} ", ytitle=
"Fake rate vs. sum p_{T}^{2}", xlog=
True, ymax=_maxFake),
35 _common = {
"title":
"",
"xtitle":
"Number of tracks",
"scale": 1e4,
"ylog":
True,
"ymin": 5,
"ymax": 500}
36 _resolution = PlotGroup(
"resolution", [
37 Plot(
"RecoAllAssoc2GenMatched_ResolX_vs_NumTracks_Sigma", ytitle=
"Resolution in x (#mum)", **_common),
38 Plot(
"RecoAllAssoc2GenMatchedMerged_ResolX_vs_NumTracks_Sigma", ytitle=
"Resolution in x for merged vertices (#mum)", **_common),
39 Plot(
"RecoAllAssoc2GenMatched_ResolY_vs_NumTracks_Sigma", ytitle=
"Resolution in y (#mum)", **_common),
40 Plot(
"RecoAllAssoc2GenMatchedMerged_ResolY_vs_NumTracks_Sigma", ytitle=
"Resolution in y for merged vertices (#mum)", **_common),
41 Plot(
"RecoAllAssoc2GenMatched_ResolZ_vs_NumTracks_Sigma", ytitle=
"Resolution in z (#mum)", **_common),
42 Plot(
"RecoAllAssoc2GenMatchedMerged_ResolZ_vs_NumTracks_Sigma", ytitle=
"Resolution in z for merged vertices (#mum)", **_common),
44 _common = {
"stat":
True,
"fit":
True,
"normalizeToUnitArea":
True,
"drawStyle":
"hist",
"drawCommand":
"",
"xmin": -6,
"xmax": 6,
"ylog":
True,
"ymin": 5e-5,
"ymax": [0.01, 0.05, 0.1, 0.2, 0.5, 0.8, 1.025]}
45 _pull = PlotGroup(
"pull", [
46 Plot(
"RecoAllAssoc2GenMatched_PullX", xtitle=
"x", ytitle=
"Pull vs. x", **_common),
47 Plot(
"RecoAllAssoc2GenMatched_PullY", xtitle=
"y", ytitle=
"Pull vs. y", **_common),
48 Plot(
"RecoAllAssoc2GenMatched_PullZ", xtitle=
"z", ytitle=
"Pull vs. z", **_common),
52 _common={
"drawStyle":
"HIST",
"normalizeToUnitArea":
True}
53 _puritymissing = PlotGroup(
"puritymissing", [
54 Plot(
"RecoPVAssoc2GenPVMatched_Purity", xtitle=
"Purity", ytitle=
"Number of reco PVs matched to gen PVs", ylog=
True, ymin=1e-4, **_common),
55 Plot(
"RecoPVAssoc2GenPVNotMatched_Purity", xtitle=
"Purity", ytitle=
"Number of reco PVs not matcched to gen PVs", ylog=
True, ymin=1e-3, **_common),
56 Plot(
"RecoPVAssoc2GenPVMatched_Missing", xtitle=
"Fraction of reco p_{T} associated to gen PV \"missing\" from reco PV", ytitle=
"Number of reco PVs matched to gen PVs", ylog=
True, ymin=1e-4, **_common),
57 Plot(
"RecoPVAssoc2GenPVNotMatched_Missing", xtitle=
"Fraction of reco p_{T} associated to gen PV \"missing\" from reco PV", ytitle=
"Number of reco PVs not matcched to gen PVs", ylog=
True, ymin=1e-3, **_common),
61 _common={
"drawStyle":
"HIST",
"xlog":
True,
"ylog":
True,
"ymin": 0.5}
62 _sumpt2 = PlotGroup(
"sumpt2", [
63 Plot(
"RecoAssoc2GenPVMatched_Pt2", xtitle=
"#sum^{}p_{T}^{2}", ytitle=
"Reco vertices matched to gen PV", **_common),
64 Plot(
"RecoAssoc2GenPVMatchedNotHighest_Pt2", xtitle=
"#sum^{}p_{T}^{2}", ytitle=
"Reco non-PV-vertices matched to gen PV", **_common),
65 Plot(
"RecoAssoc2GenPVNotMatched_Pt2", xtitle=
"#sum^{}p_{T}^{2}", ytitle=
"Reco vertices not matched to gen PV", **_common),
66 Plot(
"RecoAssoc2GenPVNotMatched_GenPVTracksRemoved_Pt2", xtitle=
"#sum^{}p_{T}^{2}, gen PV tracks removed", ytitle=
"Reco vertices not matched to gen PV", **_common),
71 _common = {
"drawStyle":
"HIST"}
72 _genpos = PlotGroup(
"genpos", [
73 Plot(
"GenAllV_X", xtitle=
"Gen AllV pos x", ytitle=
"N", **_common),
74 Plot(
"GenPV_X", xtitle=
"Gen PV pos x", ytitle=
"N", **_common),
75 Plot(
"GenAllV_Y", xtitle=
"Gen AllV pos y", ytitle=
"N", **_common),
76 Plot(
"GenPV_Y", xtitle=
"Gen PV pos y", ytitle=
"N", **_common),
77 Plot(
"GenAllV_Z", xtitle=
"Gen AllV pos z", ytitle=
"N", **_common),
78 Plot(
"GenPV_Z", xtitle=
"Gen PV pos z", ytitle=
"N", **_common),
82 "DQMData/Run 1/Vertexing/Run summary/PrimaryVertex",
83 "DQMData/Vertexing/PrimaryVertex",
84 "DQMData/Run 1/Vertexing/Run summary/PrimaryVertexV",
85 "DQMData/Vertexing/PrimaryVertexV",
88 plotter.append(
"", _vertexFolders, PlotFolder(
96 purpose=PlotPurpose.Vertexing,
99 plotterGen = Plotter()
100 plotterGen.append(
"", _vertexFolders, PlotFolder(
106 super(TrackingValidation, self).
__init__(*args, **kwargs)