11.2.3.7. Drawing the residuals
This method is used to visualize the residuals of the output variables, i.e. the discrepancies between the model predictions and the reference outputs. Two types of residuals are typically considered:
A priori residuals – based on the initial parameter values or the prior distribution;
A posteriori residuals – obtained after the calibration procedure.
The prototype is:
void drawResiduals(TString sTitre, const char *variable = "*", const char *select="1>0", Option_t * option = "");
It takes up to four arguments, three of which are optional:
sTitre: the title of the plot (an empty string is allowed);
variable (optional): a list of parameter names for which one wants to draw the residuals, separated by colons “:”. The default “*” draws all parameters;
select (optional): a selection expression that filters out configurations. For example, it can be used to exclude the burn-in period or to apply lag procedures in the MCMC algorithms (see Markov chain Monte Carlo approach);
option (optional): a list of options, separated by commas “,” to adjust the plotting behavior:
“nonewcanvas”: draw on the current canvas (instead of creating a new one);
“vertical”: if multiple parameters are plotted, display them stacked vertically (one per row). By default, plots are arranged horizontally, side by side;
“apriori/aposteriori”: draw only the a priori residuals or only the a posteriori residuals. If neither option is specified, both are displayed;
“custom=XXX”: also draw custom residuals computed with
estimateCustomResiduals.
For example, using the custom set “set1” defined earlier (see Estimate custom residuals), one can compare a priori, a posteriori, and custom residuals:
mycal->drawResiduals("Residuals title", "*", "", "nonewcanvas,apriori,aposteriori,custom=set1");