Dear RooFit users and experts,
I am scanning an invariant mass spectrum using a background+signal model. I would like to introduce a nuisance parameter modelling the amount of spurious signal events induced by an imperfect background model. Assuming the spurious signal is equally present across the entire spectrum, I could construct my model as follows:
RooWorkspace* wksp = new RooWorkspace("wksp")
//The background model
//The signal model
//The gaussian constraint on spurSigSize
//The constrained bkg+sig model
As I understand it, the factory interface will interpret the two numbers
0,10 in the Gaussian constructor as
RooConst objects, and this indeed works for me. Now, my question is: what if the constraint on
spurSigSize is tighter at certain signal pole masses? Then the width of the constraint gaussian should be variable:
So I could change the constraint at a whim using
But will RooFit still interpret the last argument as a
RooConst? If not, is there some other way to implement a variable constraint?
The only alternative I see is to create a new constraint pdf (and hence a new background+signal model) for each pole mass, but this seems rather tedious, especially when scanning a large range of signal hypotheses.