Hi VukanJ,
the documentation is unfortunately broken. I fixed it, but it will take at least a day to regenerate it. I will just copy&paste the fixed documentation below.
The RooSimWSTool is a tool operating on [RooWorkspace] objects that can clone PDFs into a series of variations that are joined together into a RooSimultanous PDF.
Splitting a single PDF
The simplest use case is to take a workspace PDF as prototype and “split” a parameter of that PDF into two specialized parameters depending on a category in the dataset.
For example, given a Gaussian PDF G(x|m,s) we want to construct a Ga(x|ma,s) and a Gb(x|mb,s) with different mean parameters to be fit to a dataset with observables (x,c) where c is a category with states ‘a’ and ‘b’.
Using [RooSimWSTool], one can create a simultaneous PDF from Ga and Gb from G with the following commands:
RooSimWSTool wst(wspace);
wst.build(“G_sim”, “G”, SplitParam)(“m”,“c”));
Splitting using a product category
From this simple example one can go to builds of arbitrary complexity by specifying multiple SplitParam arguments on multiple parameters involving multiple splitting categories. Splits can also be performed in the product of multiple categories, i.e. ,
wst.build(“G_sim”, “G”, SplitParam(“m”,“c,d”));
splits the parameter m in the product of the states of c and d.
Constrained split
Another possibility is the “constrained” split, which clones the parameter for all but one state and inserts a formula specialization in a chosen state that evaluates to 1−∑i(ai) where ai are all other specializations. For example, given a category c with the states "A","B","C","D"
, the specification
SplitParamConstrained(“m”,“c”,“D”)
will create the parameters mA,mB,mC and a formula expression mD that evaluates to (1−(mA+mB+mC)). Constrained splits can also be specified in the product of categories. In that case, the name of the remainder state follows the syntax "{State1;State2}"
, where State1
and State2
are the state names of the two spitting categories.
Splitting multiple PDFs
The examples so far deal with a single prototype PDF. It is also possible to build with multiple prototype PDFs by specifying a mapping between the prototype to use and the names of states of a “master” splitting category. To specify these configurations, an intermediate MultiBuildConfig
must be composed with all the necessary specifications. This, for example,
RooSimWSTool::MultiBuildConfig mbc(“mc”);
mbc.addPdf(“I”,“G”,SplitParam(“m,s”,“c”));
mbc.addPdf(“II,III”,“F”,SplitParam(“a”,“c,d”));
configures a build with two prototype PDFs G and F. Prototype G is used for state "I"
of the master split category mc
and prototype F is used for states "II"
and "III"
of the master split category mc
. Furthermore, the parameters m,s of prototype G are split in category c while the parameter a of prototype F is split in the product of the categories c and d. The actual build is then performed by passing the build configuration to RooSimWSTool, e.g. ,
wst.build(“MASTER”, mbc);
By default, a specialisation is built for each permutation of states of the splitting categories that are used. It is possible to restrict the building of specialised PDFs to a subset of states by adding a restriction on the number of states to build as follows:
mbc.restrictBuild(“c”,“A,B”);
The restrictBuild method can be called multiple times, but at most once for each splitting category in use. For simple builds with a single prototype, restriction can be specified with a Restrict() argument on the build command line.