Dear Roofit experts,

I have a model depending on few parameters. Among the parameters I have alpha and beta which are constrained.

I am trying to plot the profile NLL for alpha and beta: when profiling over alpha I constrain beta, and viceversa when profiling beta:

```
RooAbsReal *nll1 = model->createNLL(*data, RooFit::Extended(kTRUE), RooFit::Constrain(RooArgSet(*beta)), RooFit::NumCPU(2));
RooAbsReal *pll_alpha = nll1->createProfile(*alpha);
```

```
RooAbsReal *nll2 = model->createNLL(*data, RooFit::Extended(kTRUE), RooFit::Constrain(RooArgSet(*alpha)), RooFit::NumCPU(2));
RooAbsReal *pll_beta = nll2->createProfile(*beta);
```

From the output I get, it seems that the constrained parameters is alpha in both cases:

```
[#1] INFO:Minization -- createNLL: caching constraint set under name CONSTR_OF_PDF_model_FOR_OBS_evis:z with 1 entries
[#1] INFO:Minization -- Including the following constraint terms in minimization: (gaus_beta)
[#1] INFO:Minization -- RooProfileLL::evaluate(nll_model_genDataToy0_with_constr_Profile[alpha]) Creating instance of MINUIT
[#1] INFO:Fitting -- RooAddition::defaultErrorLevel(nll_model_genDataToy0_with_constr) Summation contains a RooNLLVar, using its error level
[#1] INFO:Minization -- RooProfileLL::evaluate(nll_model_genDataToy0_with_constr_Profile[alpha]) determining minimum likelihood for current configurations w.r.t all observable
[#1] INFO:Eval -- RooAbsTestStatistic::initMPMode: started 2 remote server process.
[#1] INFO:Minization -- RooProfileLL::evaluate(nll_model_genDataToy0_with_constr_Profile[alpha]) minimum found at (alpha=0.635529)
..........................................................................................................................................................................................................
[#1] INFO:Minization -- createNLL picked up cached consraints from workspace with 1 entries
[#1] INFO:Minization -- Including the following constraint terms in minimization: (gaus_beta)
[#1] INFO:Minization -- RooProfileLL::evaluate(nll_model_genDataToy0_with_constr_Profile[beta]) Creating instance of MINUIT
[#1] INFO:Fitting -- RooAddition::defaultErrorLevel(nll_model_genDataToy0_with_constr) Summation contains a RooNLLVar, using its error level
[#1] INFO:Minization -- RooProfileLL::evaluate(nll_model_genDataToy0_with_constr_Profile[beta]) determining minimum likelihood for current configurations w.r.t all observable
[#1] INFO:Eval -- RooAbsTestStatistic::initMPMode: started 2 remote server process.
[#1] INFO:Minization -- RooProfileLL::evaluate(nll_model_genDataToy0_with_constr_Profile[beta]) minimum found at (beta=-0.762351)
```

It seems like the first NLL configuration is cached and then used again.

Is there something I am missing? Should I use another aproach?

Thanks for your help.

Antonio