After the fit, just create two NLL instances for the subranges and evaluate them, without fitting them.
Like:
// After doing fitTo for the full FitRange:
std::unique_ptr<RooAbsReal> nllLeft{model.createNLL(data, Range("R1"))};
std::unique_ptr<RooAbsReal> nllRight{model.createNLL(data, Range("R2"))};
std::cout << nllLeft->getVal() << std::endl;;
std::cout << nllRight->getVal() << std::endl;
Note that the NLL values of the subranges will not add up to the NLL of the total range, because for each NLL the pdf will be normalized to the given subrange. That’s why you can’t compare them without accounting for the different normalization integrals.
That being said, you can totally compare and NLL object from createNLL(Range("name")) with the NLL at the minimum stored in the fit result, if the fit was done in the same range! Which is I think what you want to do, so that’s good.