FrequentistCalculator problem with simultaneous pdf

Hi,

I’m trying to set a limit on a parameter using a simultaneous pdf and I have issues running the FrequentistCalculator. When I try to scan the range [0-600] of my POI the toy generation fails at POI=0:

[#1] INFO:InputArguments -- HypoTestInverter ---- Input models: 
		 using as S+B (null) model     : sbModel
		 using as B (alternate) model  : sbModel_with_poi_0

Doing a fixed scan in interval: [0:600]
[#1] INFO:Eval -- HypoTestInverter::GetInterval - run a fixed scan
[#1] INFO:ObjectHandling -- RooWorkspace::saveSnaphot(ws) replacing previous snapshot with name sbModel__snapshot
[#0] PROGRESS:Eval -- Running for Signal = 0

=== Using the following for sbModel ===
Observables:             RooArgSet:: = (x)
Parameters of Interest:  RooArgSet:: = (Signal)
Nuisance Parameters:     RooArgSet:: = (bkgRatio_11,bkgRatio_12,bkgRatio_15,bkgRatio_16,bkgRatio_17,bkgRatio_18)
Global Observables:      RooArgSet:: = (Cst_cont_frac,frac_11,frac_12,frac_15,frac_16,frac_17,frac_18)
PDF:                     RooSimultaneous::model[ indexCat=category 2011=PDF_11 2012=PDF_12 2015=PDF_15 2016=PDF_16 2017=PDF_17 2018=PDF_18 ] = 505.437
Snapshot:                
  1) 0x521ef90 RooRealVar:: Signal = 0 +/- (-148.468,149.442)  L(-700 - 700)  "Total signal yield"


=== Using the following for sbModel_with_poi_0 ===
Observables:             RooArgSet:: = (x)
Parameters of Interest:  RooArgSet:: = (Signal)
Nuisance Parameters:     RooArgSet:: = (bkgRatio_11,bkgRatio_12,bkgRatio_15,bkgRatio_16,bkgRatio_17,bkgRatio_18)
Global Observables:      RooArgSet:: = (Cst_cont_frac,frac_11,frac_12,frac_15,frac_16,frac_17,frac_18)
PDF:                     RooSimultaneous::model[ indexCat=category 2011=PDF_11 2012=PDF_12 2015=PDF_15 2016=PDF_16 2017=PDF_17 2018=PDF_18 ] = 505.437
Snapshot:                
  1) 0x521e720 RooRealVar:: Signal = 0 +/- (-148.468,149.442)  L(-700 - 700)  "Total signal yield"

[#0] PROGRESS:Generation -- Test Statistic on data: 0
[#1] INFO:InputArguments -- Profiling conditional MLEs for Null.
[#1] INFO:InputArguments -- Using a ToyMCSampler. Now configuring for Null.

 *** Break *** segmentation violation

If I try to perform the scan in [100-600] I get this output:

[#1] INFO:InputArguments -- HypoTestInverter ---- Input models: 
		 using as S+B (null) model     : sbModel
		 using as B (alternate) model  : sbModel_with_poi_0

Doing a fixed scan in interval: [100:600]
[#1] INFO:Eval -- HypoTestInverter::GetInterval - run a fixed scan
[#1] INFO:ObjectHandling -- RooWorkspace::saveSnaphot(ws) replacing previous snapshot with name sbModel__snapshot
[#0] PROGRESS:Eval -- Running for Signal = 100

=== Using the following for sbModel ===
Observables:             RooArgSet:: = (x)
Parameters of Interest:  RooArgSet:: = (Signal)
Nuisance Parameters:     RooArgSet:: = (bkgRatio_11,bkgRatio_12,bkgRatio_15,bkgRatio_16,bkgRatio_17,bkgRatio_18)
Global Observables:      RooArgSet:: = (Cst_cont_frac,frac_11,frac_12,frac_15,frac_16,frac_17,frac_18)
PDF:                     RooSimultaneous::model[ indexCat=category 2011=PDF_11 2012=PDF_12 2015=PDF_15 2016=PDF_16 2017=PDF_17 2018=PDF_18 ] = 507.572
Snapshot:                
  1) 0x5d59f80 RooRealVar:: Signal = 100 +/- (-148.468,149.442)  L(-700 - 700)  "Total signal yield"


=== Using the following for sbModel_with_poi_0 ===
Observables:             RooArgSet:: = (x)
Parameters of Interest:  RooArgSet:: = (Signal)
Nuisance Parameters:     RooArgSet:: = (bkgRatio_11,bkgRatio_12,bkgRatio_15,bkgRatio_16,bkgRatio_17,bkgRatio_18)
Global Observables:      RooArgSet:: = (Cst_cont_frac,frac_11,frac_12,frac_15,frac_16,frac_17,frac_18)
PDF:                     RooSimultaneous::model[ indexCat=category 2011=PDF_11 2012=PDF_12 2015=PDF_15 2016=PDF_16 2017=PDF_17 2018=PDF_18 ] = 507.572
Snapshot:                
  1) 0x5d59710 RooRealVar:: Signal = 0 +/- (-148.468,149.442)  L(-700 - 700)  "Total signal yield"

[#0] PROGRESS:Generation -- Test Statistic on data: 0
[#1] INFO:InputArguments -- Profiling conditional MLEs for Null.
[#1] INFO:InputArguments -- Using a ToyMCSampler. Now configuring for Null.
[#0] ERROR:InputArguments -- ToyMCSampler: Error : pdf is not extended and number of events per toy is zero

 *** Break *** segmentation violation

In the last but one line it seems that my pdf is not extended, however I do set the extended term in the likelihood.
I attach the workspace and a small script to reproduce the problem.

Cheers,
Jacopo
test_CLs_method.py (3.1 KB) ws.root (23.9 KB)

I think @StephanH can help you

Hi,
I think you need to have the category variables as observable of the model. This is probably the cause of the crash you see

Lorenzo

Thanks, I don’t see the crash anymore, however when I add the “category” variable to the observables it gets stuck in a loop:

[#1] INFO:InputArguments -- Using a ToyMCSampler. Now configuring for Null.
    ----> Doing a re-scan first
    ----> Doing a re-scan first
    ----> Doing a re-scan first
    ----> Doing a re-scan first

I managed to make it run properly by removing the global observables from the model. It is not clear to me then what these global observables are.

Jacopo

Hi,

Global observable are variables of constraint tern for some nuisance parameters. .For example if your mode las a parameter describing the signal fraction, frac (as in your case), you might have in the model a measurement of this fraction, or a prior knowledge of it, frac0 with some uncertainty. deltaf. You can describe this with a Gaussian constrain term, Gauss(frac0, frac, delta).
frac0 will be in this case your global observables. In your model I don’t see any constraint terms, but just parameters. If these parameters can be determined directly by the observed data, then you don’t need global observables. Or if you neglect their uncertainties and you set them as constant model parameters, then you don’t need also global observables.

Cheers

Lorenzo

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.