Hi all,

I have a problem which I have not been able to solve by browsing the documentation or googling. I want to make a simultaneous fit of 2 datasets which contain 2 different observables: B0 and B_s0. These correspond to 2 mass peaks, which I want to fit to one gaussian each. The trick is that I want the means of these 2 gaussians to be always exactly shifted by a certain value d.

Therefore, I have ntuple1 which contains B0 var and ntuple2 which contains B_s0. I want to simultaneously fit these 2 datasets to 2 gaussians, one with mean un mu0 and the other with mean (mu0-d). What I would do is just have one observable, and put a RooFormulaVar as the mean of the second gaussian (mu0-d), but the problem is that one dataset contains B0 and the other B_s0. As I understand it, the names of the variables must match the observable to perform the fit, so I am not sure if this is possible. I would like to avoid recreating the B_s0 ntuple just changing the name of the variable.

Is my approach correct, or should I do it in a completely different way?

Thanks a lot,

Albert