Hello, I’m having a strange problem with roofit. I’m trying to do a simultaneous fit to 3 different variables. The PDF is is rather complex, being built up from 6 individual components. The PDF is constructed in the following manner:
comp1 = comp1_var1comp1_var2comp1_var3;
comp2 = comp2_var1comp2_var2comp2_var3;
comp3 = comp3_var1comp3_var2comp3_var3;
comp4 = comp4_var1comp4_var2comp4_var3;
comp5 = comp5_var1comp5_var2comp5_var3;
comp6 = comp6_var1comp6_var2comp6_var3;
where each component would stand for signal shape, background shape 1, background shape2… etc.
I then add each component together to form the final extended PDF:
sigbkg = N1comp1+N2comp2+N3comp3+N4comp4+N5comp5+N6comp6;
Everything seemed fine and the fits looked very reasonable, but when I went to do a quick sanity check things started to fall apart.
I have truth matched MC for each of the 6 components outlined above, and as such I know the exact number in each distribution. When I perform an extended maximum liklihood fit to the signal MC I would expect to be able to make a reasonable comparison between the numbers returned from the fit to the known numbers from the truth matched sets. However, I’m off by several sigma even as high as 7 in some cases. I know the individual components aren’t to blame. I do describe a couple of the shapes with my own functions rather than the built in roofit functions, could this have a strange impact on the normalization? Do I need to provide a mechanism to force my functions to return 0 outside of their respective ranges? I’ve been up and down this problem and I can’t seem to figure out what is going on.
One other thing. When I turn off the extended option I get much more reasonable values, however the errors go rampant returning values of the same order of magnitude as the fit values themselves.