How to change the range of a variable after declaring it

Hi,

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

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

wspace->factory(“Gaussian::constraint_b(nuisance_b[0.,400.],mean_b[0.,1000.],sigma_b[0.2])”);

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

Hi,

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

Lorenzo