Beispiel #1
0
def addPlots(plotter, folder, name, section, histograms, opts, Offset=False):
    folders = [folder]
    #plots = [PlotGroup(name, [Plot(h, **opts) for h in histograms])]
    #KH print plots
    if Offset:
        plots = [PlotGroup(name, [Plot(h, **opts) for h in histograms])]
        plotter.append(
            "Offset", folders,
            PlotFolder(*plots,
                       loopSubFolders=False,
                       page="offset",
                       section=section))
    elif "JetResponse" in folder:
        plots = [PlotGroup(name, [Plot(h, **opts) for h in histograms])]
        plotter.append(
            "ParticleFlow/" + section, folders,
            PlotFolder(*plots,
                       loopSubFolders=False,
                       page="pf",
                       section=section))
        for plot in plots:
            plot.setProperties(ncols=3)
            plot.setProperties(legendDw=-0.68)
            plot.setProperties(legendDh=0.005)
            plot.setProperties(legendDy=0.24)
            plot.setProperties(legendDx=0.05)
    elif "JetMET" in folder:
        for h in histograms:
            plots = [PlotGroup(h, [Plot(h, **opts)])]
        for plot in plots:
            plot.setProperties(legendDw=-0.5)
            plot.setProperties(legendDh=0.01)
            plot.setProperties(legendDy=0.24)
            plot.setProperties(legendDx=0.05)
        plotter.append(
            "JetMET" + section, folders,
            PlotFolder(*plots,
                       loopSubFolders=False,
                       page="JetMET",
                       section=section))
    if "PackedCandidates" in folder:
        for h in histograms:
            if ("PtMid" in h or "PtHigh" in h):
                plots = [PlotGroup(h, [Plot(h, ymin=pow(10, -1), ylog=True)])]
            else:
                plots = [PlotGroup(h, [Plot(h, **opts)])]
        for plot in plots:
            plot.setProperties(legendDw=-0.5)
            plot.setProperties(legendDh=0.01)
            plot.setProperties(legendDy=0.24)
            plot.setProperties(legendDx=0.05)
        plotter.append(
            "ParticleFlow/PackedCandidates/" + section, folders,
            PlotFolder(*plots,
                       loopSubFolders=False,
                       page="PackedCandidates",
                       section=section))
Beispiel #2
0
def addPlots(plotter, folder, name, section, histograms, opts, offset=False):
    folders = [folder]
    plots = [PlotGroup(name, [Plot(h, **opts) for h in histograms])]
    #KH print plots
    if offset:
        plotter.append(
            "Offset", folders,
            PlotFolder(*plots,
                       loopSubFolders=False,
                       page="offset",
                       section=section))
    else:
        plotter.append(
            "ParticleFlow", folders,
            PlotFolder(*plots,
                       loopSubFolders=False,
                       page="pf",
                       section=section))
        for plot in plots:
            plot.setProperties(ncols=3)
            plot.setProperties(legendDw=-0.68)
            plot.setProperties(legendDh=0.005)
            plot.setProperties(legendDy=0.24)
            plot.setProperties(legendDx=0.05)
Beispiel #3
0
_common = {
    "xtitle": "Simulated interactions",
    "xmin": _minPU,
    "xmax": _maxPU,
    "ymin": _minVtx,
    "ymax": _maxVtx
}
_recovsgen = PlotGroup("recovsgen", [
    Plot("RecoVtx_vs_GenVtx", ytitle="Reco vertices", **_common),
    Plot("MatchedRecoVtx_vs_GenVtx", ytitle="Matched reco vertices", **
         _common),
    Plot("merged_vs_ClosestVertexInZ",
         xtitle="Closest distance in Z (cm)",
         ytitle="Merge rate",
         xlog=True,
         ymax=_maxFake),
    Plot("merged_vs_Z",
         xtitle="Z (cm)",
         ytitle="Merge rate",
         xmin=-20,
         xmax=20,
         ymax=_maxFake),
],
                       legendDy=-0.025)
_pvtagging = PlotGroup("pvtagging", [
    Plot("TruePVLocationIndexCumulative",
         xtitle="Signal PV status in reco collection",
         ytitle="Fraction of events",
         drawStyle="hist",
         normalizeToUnitArea=True,
         xbinlabels=[
Beispiel #4
0
_common = {
    "xtitle": "Simulated interactions",
    "xmin": _minPU,
    "xmax": _maxPU,
    "ymin": _minVtx,
    "ymax": _maxVtx
}
_recovsgen = PlotGroup("recovsgen", [
    Plot("RecoVtx_vs_GenVtx", ytitle="Reco vertices", **_common),
    Plot("MatchedRecoVtx_vs_GenVtx", ytitle="Matched reco vertices", **
         _common),
    Plot("merged_vs_ClosestVertexInZ",
         xtitle="Closest distance in Z (cm)",
         ytitle="Merge rate",
         xlog=True,
         xmin=1e-3,
         ymax=_maxFake),
    Plot("merged_vs_Z",
         xtitle="Z (cm)",
         ytitle="Merge rate",
         xmin=-20,
         xmax=20,
         ymax=_maxFake),
],
                       legendDy=_legendDy_2rows)
_pvtagging = PlotGroup("pvtagging", [
    Plot("TruePVLocationIndexCumulative",
         xtitle="Signal PV status in reco collection",
         ytitle="Fraction of events",
         drawStyle="hist",
         normalizeToUnitArea=True,
         xbinlabels=[
Beispiel #5
0
_recovsgen = PlotGroup("recovsgen", [
    Plot("RecoVtx_vs_GenVtx", ytitle="Reco vertices", **_common),
    Plot("MatchedRecoVtx_vs_GenVtx", ytitle="Matched reco vertices", **
         _common),
    Plot("merged_vs_ClosestVertexInZ",
         xtitle="Closest distance in Z (cm)",
         ytitle="Merge rate",
         xlog=True),
    Plot("TruePVLocationIndexCumulative",
         xtitle="Signal PV status in Reco collection",
         ytitle="Fraction of events",
         title="",
         drawStyle="hist",
         normalizeToUnitArea=True,
         xbinlabels=[
             "Not reconstructed", "Reco and identified", "Reco, not identified"
         ],
         xbinlabelsize=0.045,
         xbinlabeloption="h",
         xgrid=False,
         ylog=True,
         ymin=1e-3),
    Plot("MisTagRate_vs_PU",
         xtitle="PU",
         ytitle="Mistag rate vs. PU",
         xmax=_maxPU,
         ymax=_maxFake),
    Plot("MisTagRate_vs_sum-pt2",
         xtitle="#Sigmap_{T}^{2}",
         ytitle="Mistag rate vs. #Sigmap_{T}^{2}",
         xlog=True,
         ymax=_maxFake)
])