ScaleMCUncertainties
This action scales all MC uncertainties in a workspace by an arbitrary factor.
It assumes that these relevant parameters are named as they are named and
structured as in case the workspace was created using HistFactory:
- The names of the RooPoisson terms (Gaussian terms should work but have
not been extensively tested yet!) match "gammastat*"
- Their parameters 'x' and 'mean' are composed as follows:
- x : a RooRealVar parameter, nominal value 1/sigma^2
- mean: a RooProduct containing a RooConstVar ('tau') that represents the
scaling of another ("normalized") RooRealVar ('gamma') to match
a poisson distribution.
Note that this action will also modify all snapshots in the workspace! The
values of all parameters matching "nomgammastat*" are scaled by the same
value as the modified parameters above if they can be associated with a
RooPoisson constraint. This is needed to make sure when loading the snapshot
to perform a fit the likelihood doesn't start at extreme values that would
instantly cause the fit to fail (the LH parameters for the MC stat. NPs would
typically be many sigma off their mean value!)
Usage:
+ScaleMCUncertainties{
+NameOfWorkspace {
#reduce MC stat. uncertainties as if 10 times more (raw) MC events were
#available: sigma -> sigma/sqrt(10)
<scale=10.0, invert=true, sqrt=true> #defautl values for 'invert' and 'sqrt'
#other example:
#increase MC stat. uncertainties by a factor 2 (sigma-> 2*sigma):
#<scale = 2.0, invert=false, sqrt=false>
}
}