FillRandom for the fit

Hi all,
could you help to recognize what is wrong when I use FillRandom?

I have an original hist and need to ‘simulate’ another ones (based on this ‘original’) with changed statistics in bins in order to study systematic of my fit.

I’m doing
origcont = original->GetSumOfWeights();
and then as many times as I need, I fill another hist to put it to the fit
datamass->FillRandom(original,origcont);

and I see that these randomly generated hists always provide permanently higher yield
of mesons I took from the fit

     thanks in advance,
     Valeri

Hi,

This is strange. I would need to see your histograms and your code doing this study.

Cheers

Lorenzo

Hi Lorenzo,
it is a couple of root-hist files.
I could put them and a script on public area of AFS.
is it ok for you?
cheers,
Valeri

Hi Valeri,
Are you sure that GetSumOfWeights() in your case is the same as GetEntries(),
because the signature of FillRandom is

void FillRandom(TH1* h, Int_t ntimes = 5000)

So, it uses nTimes, but not Sum of weights.

Boris :slight_smile: