How to change the range of a variable after declaring it


I have a simple question, I am constructing a model in RooWorkspace like so:

RooWorkspace* wspace = new RooWorkspace(“wspace”);


what I would like to know is, is there a way to change the range of nuisance_b after this declaration?

I have doing something like wspace->var(“nuisance_b”)->setMin(value)/setMax(value) but this doesn’t seem to do anything, which is strange because wspace->var(“nuisance_b”)->setVal(value) works fine.

Thank You,

Kuhan Wang


It should work by setting setMin/SetMax. Do you have an example of running code showing this ?