I have a question regarding the function RooAbsPdf::createNLL, especially the Optimize(Bool_t flag) argument. What exactly is happening when setting it to true?
In the documentation it is said that it is turned on by default, but if I interpret the code correctly, its turned off. Is that correct? And is it recommended to turn it on?
All terms that do not depend on parameters you are interested in will be calculated only once, and not be evaluated again. An example would be a Gaussian(x, mean, sigma), but you set mean and sigma constant such that the probability of this Gaussian will never change. It would be precalculated, and not be evaluated again.
Optimize in createNLL() is indeed switched off, but in fitTo(), it’s on by default.