Mean of RooGaussian to be twice a RooRealVar

Hello all,

I am trying to fit a distribution with two peaks with gaussians in RooFit, and I know that their mean positions are related by mean_2 = 2*mean_1.
I have tried to find a way to create two RooGaussians with means related to each other in this way… without success.

Does anyone know how to do this? Perhaps this would be easy to solve if I knew the “name” of what I want to do!

Thank you :slight_smile:


It was easy!
RooFormulaVar mean2(“mean2”, “2*mean”, RooArgList(mean));

Thanks for reading my monologue :slight_smile: