Constant Term Optimization in RooAbsPdf::createNLL

Dear experts,

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?

Many thanks,

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.

Many thanks for the quick reply!


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.