How to set fit range in simultaneous fit?

Hello again,

Before this topic is closed, I just wanted to give a solution I found, as it might help others. It looks reasonable, but im not sure if what im doing is technically correct. This is the updated script:
fitComplete.cpp (9.4 KB)

The important part for fitting different ranges in each category / slice seems to be:

Range("fitRange"), EvalBackend("legacy")

in the fit statement.

I guess the Range("fitRange") lets RooFit internally searched for ranges with "fitRange" in the name and for example picks up "fitRange_t1_e1" for the respective slice / category "t1_e1".
With respect to this post I am not sure if SplitRange(true) should be used in this context, but from what I read its better not to use it here.

The EvalBackend("legacy") chose the likelihood evaluation method and without it the fit results look of. I can’t explain why this helps.

Thanks, Adrian