# Combining Channels with Unbinned EML fits for Upper Limits

Hello all,

I’ve followed the RooFit/RooStats tutorials and have some code that fits a signal and background PDF to data using an extended unbinned maximum likelihood fit. One of the parameters it returns is the yield on the number of signal events, nsig. I take that fit and find the 90% confidence level upper limit on nsig with BayesianCalculator and use this to determine an upper limit on a branching ratio. This has worked well in one channel, but now I want to combine information from two channels to find an upper limit. I’ve seen that I can use RooSimultaneousPdf, but I do not know what to do after I’ve combined the channels.

I know that in both channels the value of nsig is proportional to the branching ratio. Can I somehow write an extended maximum likelihood function in terms of the branching ratio (instead of nsig) and then use the branching ratio as my parameter of interest in the BayesianCalculator? Is there some way of creating another RooRealVar after the fit procedure, making it a function of nsig, and using that new variable in the BayesianCalculator? Does RooFit have better ways of determining a combined upper limit with the BayesianCalculator that I just haven’t thought of?

I’d like to avoid methods that require the generation of large sets of Toy MC.

Thanks!

Hi,

I am not sure I have fully understood your problem. In RooFit you can parametrize your number of signal events as a function of the branching ratio and some other parameters (e.g. production cross section). You can then fit,
or set a limit or determine its posterior distribution using the Bayesian calculator on this parameter.
I remind you also, that you can also use the Asymptotic calculator to set a frequentist limit if the asymptotic approximation is valid

Best Regards

Lorenzo

Hello Lorenzo,

It sounds like your suggestion is to parameterize my fit in terms of the branching ratio and then apply the RooStats calculators. My question is then how one should go about doing that in an extended likelihood fit. I followed rf202_extendedmlfit.C in my code; the relevant section of my actual code is as follows:

``````	//Make model for fitting
//Polynomial background
RooRealVar c1("c1", "c1", c1_poly, c1_poly_min, c1_poly_max);
RooRealVar c2("c2", "c2", c2_poly, c2_poly_min,	c2_poly_max);
RooRealVar c3("c3", "c3", c3_poly, c3_poly_min,	c3_poly_max);
RooPolynomial bkg("bkg", "bkg", e_cm, RooArgList(c1, c2, c3));

//Gaussian signal parameters
RooRealVar m_G("mean_G", "mean_G", mean_G, mean_G_min, mean_G_max);
RooRealVar s_G("sigma_G", "sigma_G", sigma_G, sigma_G_min, sigma_G_max);
RooGaussian gauss("gauss", "Generic Gaussian Fit", e_cm, m_G, s_G);

//Lock in constants
m_G.setVal(mean_G);
c1.setVal(-0.79884);
c2.setVal(0.2355);
c3.setVal(-0.024309);

//Combine signal and background
RooRealVar nsig("nsig","signal fraction",seed_sig_evts, min_sig_evts, max_sig_evts);
RooRealVar nbkg("nbkg","background fraction",seed_bkg_evts,min_bkg_evts,max_bkg_evts);

//Fit model to data and check output
RooFitResult* fitres = model.fitTo(data, Extended(kTRUE), Save()); //used with nsig``````

So it seems that I would need to make nsig a function of the branching ratio and known quantities like the reconstruction efficiency and initial number of events. Is that the case; would my code change to look like the following?

``````RooRealVar nsig("nsig","signal fraction",seed_sig_evts, min_sig_evts, max_sig_evts);
RooRealVar nbkg("nbkg","background fraction",seed_bkg_evts,min_bkg_evts,max_bkg_evts);

//Transform between nsig and other parameters goes
//here, creating a new RooRealVar named "NEW_PARAMETER"

If so, how would I go about doing that? I’ve tried making nsig a function of other variables before with no success. The closest source I could find for creating a RooRealVar from other RooRealVars is
[url]Product of two random variable but it has no answer.

I’m sorry if this is a really basic question, that’s probably why I’m stumped. If there’s a tutorial that I missed, I’d appreciate a link to it!

Thank you,

J. Rorie

Hi,

You can use “RooProduct” for making the product of two RooAbsReal( i.e. also two RooRealVar) or RooFormulaVar. I have an example of parametrizing the number of signal events using a cross-section and an
efficiency in this tutorial of RooStats, described here
twiki.cern.ch/twiki/bin/view/Ro … ting_model

Cheers

Lorenzo

Hello Lorenzo,

Thank you, this sounds like exactly what I need. I will try it as soon as I can.

Thanks again,

J. Rorie

Again, thanks for your help! My code was written outside of the RooFactory framework, but I was able to follow the example you provided with slight modifications to make a simultaneous fit. It works as expected!

Now I’m having trouble with the BayesianCalculator, but I think I should open another topic for that once I have exhausted all attempts at debugging on my own.

J. Rorie

edit: Forgot to say “solved”.