I am trying to solve the following problem with Roofit/RooStats. I have a counting experiment, made by independent runs. In each run, there is a “beam-ON” time, with measured number of events n_ON^i, and a “beam-OFF” time, with measured numbers of events n_OFF^i. The overall likelihood reads:
where f_i is the luminosity for run i over the total luminosity, and tau is the beam-OFF/beam-ON ratio for the run i. I want to set a limit on S, Bi are the nuisance parameters, and nON_i and nOFF_i the observables.
I tried to implement this model in roofit. The code I am using is attached (the first part is to read the data from a txt file). In particular, the overall PDF is a RooProdPDF of many terms, one per run - each term being a product of two Poisson PDFs.
I noticed that, when using this code, if the number of runs I am considering is more than 15, the code I use to find the upper limit (HipoTestInverter) crashes. Maybe there is a limit on the number of terms I can use in this product?
I attach to this message the 3 files necessary to reproduce the problem: the root macro to create the model, the root macro for Hypothesis inversion, and the file with data.