Fitting over different ranges in a simultaneous fit

Hi all,

I am struggling with an issue with simultaneous fitting over different ranges. I have attached a macro to demonstrate the issue I am encountering. Essentially, I have two gaussians with different linear backgrounds. However, these backgrounds each go to zero within the range of my observable at some point. This causes an issue when applying the fit, as it attempts to normalize each pdf across the entire region of the observable. I was hoping for any help on how to address this issue, and how to restrict the fit of each pdf to the ranges in which they are valid.

Thanks for any and all help!
macro.py (4.3 KB)

I think @moneta can help you.

@couet @moneta that would be amazing, thank you!

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