Export histograms from a workspace.
+ExportHistograms{
+HWWRun2GGF {
# export a set of postfit histograms
+postfit {
<snapshot="SnSh_NuisPOI_Unconditional_observed_muhat">
<outputFile="workspaces/run2-ggf-$(fitLabel)/histograms-postFit.root">
<dataName="obsData">
<fitResult="HWWRun2GGF/Significance/observed/FitResults/observed_muhat">
}
# also export a set of prefit histograms
+prefit {
<snapshot="SnSh_AllVars_Nominal">
<outputFile="workspaces/run2-ggf-$(fitLabel)/histograms-preFit.root">
<dataName="obsData">
<constPars={"*_norm_*","muGGF"}>
}
@?{
<singleRegions=false>
+CombinedSamples{
+top {
<Components={"ttbar*","wt*"}>
}
+higgs {
<Components={"sig*","otherH*"}>
}
+VV {
<Components={"Vgamma*","*NonWW*"}>
}
+WW {
<Components={"ggWW*","*qqWW*"}>
}
}
+CombinedRegions{
+SR_0j_DF_all {
<Components="SR_*0j*">
}
+SR_1j_DF_all {
<Components="SR_*1j*">
}
+SR_DF_all {
<Components="SR_*">
}
+all {
<Components="*">
}
}
}
# <normPattern="ATLAS_HWWlvlvGGF_sampleNorm_$(SAMPLENAME)">
<cloneStyle="HWWRun2GGF/.Histograms/Nominal"> @?;
# <export.decorrelate={"theo_*"}> @?;
# <export.correlate={"*"}> @?;
}
}
Subfolders can be provided to the action to write more than one set of histograms. Each of these sets can be configured separately. The following configuration options are supported:
snapshot
: Give the name of the snapshot to be used. Uses the name of the subfolder as a default.outputFile
: Output file to write the histograms to.fitResult
: Define the fit result from which to take the correlation matrix. If not given, a diagonal matrix will be used.dataName
: One or more names of datasets to be written to the output file.constPars
: Set one or more parameters constant to have them removed from the uncertainty bands.export.decorrelate
list one or more parameters to be decorrelated for the uncertainty band.export.correlate
list one or more parameters to be correlated (with c=1) for the uncertainty band.normPattern
: Optionally provide a normalization pattern (see below).cloneStyle
: Provide a path to set of histograms in a model to clone histogram styles from.
Furthermore, the sample and channel list can be manually chosen:singleSamples=false
will disable all pre-defined samples from export.singleRegions=false
will disable all pre-defined regions from export.CombinedSamples
to list one or
more combinations of samples in the form of a subfolder with a
tag named Components
.CombinedRegions
to list one or
more combinations of regions in the form of a subfolder with a
tag named Components
.selectComponents
This action can use one of two strategies to extract histograms from a workspace, either of which has its own limitations. In order to extract histograms, some components of the pdf need to be activated/deactivated selectively, such that the different contributions (samples) can be isolated. For this, two mechanisms exist.
mechanism is the default. It works in all
cases and makes no specific assumptions about the
workspace. However, it is not fully functional in
ROOT` versions
prior to 6.12.normPattern
mechanism relies on specific normalization
factors being present in the workspace, following a certain naming
scheme. Each sample has to have an individual normalization
factor. The wildcard $(SAMPLENAME)
can and should be used as a
placeholder for the sample name in the expression. For example
<normPattern="ATLAS_HWWlvlvGGF_sampleNorm_$(SAMPLENAME)">
can be
provided as a normalization pattern to identify these
normalization factors. Prior, they can be added in the
CreateModels
step with an addition like this one:
@? {
# create normalization factors for each sample to allow easier extraction of postfit plots
# we set these constant, so they make no difference for the fit
+NormFactor.ATLAS_HWWlvlvGGF_sampleNorm_$(BASEFOLDERNAME) {
<Val = 1., Low = 0., High = 50., Const = true>
}
}