The easiest way to do this is to absorb the shift as bias in your resolution gaussmodel,
e.g set the 'mean' parameter of you RooGaussModel not to zero but to 't_shift'
Alternatively, here is a complete example constructing your p.d.f. using the workspace&factory (requires ROOT >= 5.24)
Wouter, thanks for quick reply!
It works but i can’t understand one moment in adding p.d.f.s with RooAddPdf object. Could you please clear it too?
I’d like to sum 3 exponential decays and a background provided that I set number of events in each component.
I make RooAddPdf object according to users manual:
RooAddPdf dec_bkg (“dec_s”,“dec.sum”,RooArgList(dec_1,dec_2,dec_3,bkg),RooArgList(I1_c,I2_c,I3_c,bg)) ;
where I1_c is a fraction of 1-st decay multiplied by number of all events in experiment and so on, bg is a fraction of background which may be extracted from experiment (mean number of background events for one temporal channel).
As a result I get also normalized (or it only seems to be normalized ?) function, but I need scaled model for fitting my data.
How do I do it?
As far as I understand all RooDecay are normalized on unity (i.e. their integral over all x axis is 1), but RooAddPdf can be done without such normalization?
Thanks in advance for your reply.
which is easily seen to be unit-normalized if F1-4 are and all coefficients
are in the range [0,1]. (When you draw such a p.d.f, on a frame with a dataset,
it is always automatically rescaled to match the number of events in that dataset)
If, on the other hand you define 4 p.d.f. and 4 coefficients, you define an
extended p.d, constructed as
where fsum=f1+f2+f3+f4 and an extended likelihood term is automatically
added to the fit with Nexp = f1+f2+f3+f4, so that f1-f4 --when fitted-- automatically
represent the event yields associated with the four p.d.f. components.