Plot a likelihood scan. This action supports plotting
The following is an example for a single 1D curve.
+PlotLikelihoodScan {
+HWWRun2GGF {
<arrangement="$TQPATH/../SFramework/share/templates/PlotLikelihoodScanSignificance.txt">
<outputFile="workspaces/run2-ggf-$(fitLabel)/likelihood.pdf">
+asmGGF {
<source = "LikelihoodScans/ScanLikelihood.asmGGF/Scan">
<style.lineColor=kRed, style.title="#mu_{GGF}">
}
<style.title.xAxis = "#mu_{ggF} (profiled)">
<style.showLegend = true>
}
}
The following is an example for two 2D contours (asimov and observed) plotted together.
+PlotLikelihoodScan {
+Run2GGF2j {
<outputFile="./workspaces/run2-comb-$(fitLabel)/likelihood.pdf">
+2Dasm {
<source = "/HWWRun2/LikelihoodScans/ScanLikelihood.2Dasm/Scan">
<style.lineColor=kBlue>
<style.markerColor=kBlue>
<style.markerStyle=34>
<style.showPoints = true>
}
+2Dobs {
<source = "/HWWRun2/LikelihoodScans/ScanLikelihood.2Dobs/Scan">
<style.lineColor=kRed>
<style.markerColor=kRed>
<style.markerStyle=47>
<style.showPoints = true>
}
<style.title.xAxis = "#mu_{ggH}">
<style.title.yAxis = "#mu_{VBF}">
<style.showLegend = false>
}
}
The name of the output file can be determined with the outputFile
tag globally.
The curves are added as subfolders to the action. The source of
each scan is identified with the source
tag for each curve
separately. The source can either point to a result of a
ScanLikelihood action, or to the result of a ScanContour action.
Some global options exist to control the styling:
style.title.xAxis
, style.title.yAxis
: choose titles for the axes.style.showLegend
, enable/disable showing the legend.
Additionally, style options can be set for each curve separately:style.lineColor
, style.lineStyle
Control the color and style of the lines.style.showPoints
Control whether points will be drawn to indicate the anchors used for interpolating the smooth curve.style.markerColor
, style.markerStyle
Control the color and style of the markers drawn with style.showPoints=true
.style.title
Set the title of the curve to be displayed in the legend (if drawn).showMinimum
Draw a marker to indicate the minimum.lineOption
Choose the draw option used for the line ("C" or "L")yTag
instead of using the defalt y
tag of the scan result,
use some other tag to extract the result. The result can be
scaled using the yScale
option. One typical use case is to
plot the non-sanitized, not minimum-subtracted ("raw") curve with the
combination yTag="minNll", yScale=.5
.
Some specific options exist for 1D plots:outlierThreshold
control at which threshold (above the
minimum) outliers should be removed from the plot. Can be
helpful to get rid of points from failed fits.plotWalk=x
If given, in addition to the likelihood curve, an
additional curve will be shown, indicating how far the
individual best-fit-values of the points in the likelihood curve
are away from each other -- showing the walking distance
from
one point to the next. As the total value of this is
meaningless, the curve can be scaled freely, for which the value
of this tag can be used.
Some specific options exist for 2D contour plots:style.shading
select whether contours should be progressively
faded out (such that, e.g., the 2-sigma contour has a less
strong color than the 1-sigma contour).contours.x=y
Define a contour x
at value y
. If not given,
the default values for the 1,2,3,4,5 sigma contours in 2D will
be used.colormap
Choose a color in which to overlay the area of the curveinterpolate.x,interpolate.y
By default, the graph triangulation will be used,
which can sometimes lead to sub-optimal plotting results (wiggly
lines). With this option, the scan will first be converted into
a 2D histogram with a defined, regular grid before the contours
are computed. This tag can be used to decide the number of bins
in x and y direction to choose.binPrecision
By default, the graph triangulation will be used,
which can sometimes lead to sub-optimal plotting results (wiggly
lines). With this option, the scan will first be converted into
a 2D histogram with a defined, regular grid before the contours
are computed. This tag is an integer defining the number of
significant digits used to identify the grid lines (a useful
choice for scans with less than 100 points is 2)binPrecision
tag, the resulting histogram can
be auto-sanitized by filling empty bins (i.e., failed fits) from
their neighbors. The tag binSmoothing
defines the radius of
the smoothing to be applied in number of bins (i.e., how large
the neighborhood is from which values can be
taken). Additionally, binSmoothingSources
can be used to
identify how many bins in a neighborhood need to be filled (at
least) in order to proceed with the smoothing in that
neighborhood.