I am new at RooFit and I would like to have a few precision about the normalization procedure during a fit. It seems to me that the integral of the fit function is adjusted to the integral of the histogram. It is then not possible to constrain the amplitude of the fitting function, is it ?

In that case, how does it work when you want to fit an histogram containing two gaussian for example ? How does RooFit adjust the proportion of each gaussian ?

I am new at RooFit and I would like to have a few precision about the normalization procedure during a fit.

I believe there is a reasonable documentation on that topic in the RooFit manual which is ‘hidden’ at the bottom of the page root.cern.ch/drupal/content/users-guide

It seems to me that the integral of the fit function is adjusted to the integral of the histogram. It is then
not possible to constrain the amplitude of the fitting function, is it ?

If you want to add the amplitude as a fit parameter you need to create an Extended pdf; for example using RooExtendPdf

In that case, how does it work when you want to fit an histogram containing two gaussian for example ?
How does RooFit adjust the proportion of each gaussian ?

You can make a RooAddPdf of the 2 gaussian with one RooRealVar for the fraction of each PDF or with 2 RooRealVar representing the normalisation of each PDF; in the first case you automatically normalise to the number of events while in the second case you have an extended PDF and fit for both normalisations.