One Sided Frequentist Upper Limit With Bands

OneSidedFrequentistUpperLimitWithBands

This is a standard demo that can be used with any ROOT file prepared in the standard way. You specify:

  • name for input ROOT file
  • name of workspace inside ROOT file that holds model and data
  • name of ModelConfig that specifies details for calculator tools
  • name of dataset

With default parameters the macro will attempt to run the standard hist2workspace example and read the ROOT file that it produces.

The first ~100 lines define a new test statistic, then the main macro starts. You may want to control:

double confidenceLevel=0.95;
  int nPointsToScan = 12;
  int nToyMC = 150;

This uses a modified version of the profile likelihood ratio as a test statistic for upper limits (eg. test stat = 0 if muhat>mu).

Based on the observed data, one defines a set of parameter points to be tested based on the value of the parameter of interest and the conditional MLE (eg. profiled) values of the nuisance parameters.

At each parameter point, pseudo-experiments are generated using this fixed reference model and then the test statistic is evaluated. Note, the nuisance parameters are floating in the fits. For each point, the threshold that defines the 95% acceptance region is found. This forms a "Confidence Belt".

After constructing the confidence belt, one can find the confidence interval for any particular dataset by finding the intersection of the observed test statistic and the confidence belt. First this is done on the observed data to get an observed 1-sided upper limt.

Finally, there expected limit and bands (from background-only) are formed by generating background-only data and finding the upper limit. This is done by hand for now, will later be part of the RooStats tools.

On a technical note, this technique is NOT the Feldman-Cousins technique, because that is a 2-sided interval BY DEFINITION. However, like the Feldman-Cousins technique this is a Neyman-Construction. For technical reasons the easiest way to implement this right now is to use the FeldmanCousins tool and then change the test statistic that it is using.

Building the confidence belt can be computationally expensive. Once it is built, one could save it to a file and use it in a separate step.

We can use PROOF to speed things along in parallel, however, the test statistic has to be installed on the workers so either turn off PROOF or include the modified test statistic in your $ROOTSYS/roofit/roostats/inc directory, add the additional line to the LinkDef.h file, and recompile root.

Note, if you have a boundary on the parameter of interest (eg. cross-section) the threshold on the one-sided test statistic starts off very small because we are only including downward fluctuations. You can see the threshold in these printouts:

[#0] PROGRESS:Generation -- generated toys: 500 / 999
NeymanConstruction: Prog: 12/50 total MC = 39 this test stat = 0
 SigXsecOverSM=0.69 alpha_syst1=0.136515 alpha_syst3=0.425415 beta_syst2=1.08496 [-1e+30, 0.011215]  in interval = 1

this tells you the values of the parameters being used to generate the pseudo-experiments and the threshold in this case is 0.011215. One would expect for 95% that the threshold would be ~1.35 once the cross-section is far enough away from 0 that it is essentially unaffected by the boundary. As one reaches the last points in the scan, the theshold starts to get artificially high. This is because the range of the parameter in the fit is the same as the range in the scan. In the future, these should be independently controlled, but they are not now. As a result the ~50% of pseudo-experiments that have an upward fluctuation end up with muhat = muMax. Because of this, the upper range of the parameter should be well above the expected upper limit... but not too high or one will need a very large value of nPointsToScan to resolve the relevant region. This can be improved, but this is the first version of this script.

Important note: when the model includes external constraint terms, like a Gaussian constraint to a nuisance parameter centered around some nominal value there is a subtlety. The asymptotic results are all based on the assumption that all the measurements fluctuate... including the nominal values from auxiliary measurements. If these do not fluctuate, this corresponds to an "conditional ensemble". The result is that the distribution of the test statistic can become very non-chi^2. This results in thresholds that become very large. This can be seen in the following thought experiment. Say the model is where $ G(b0|b,sigma) $ is the external constraint and b0 is 100. If N is also 100 then the profiled value of b given s is going to be some trade off between 100-s and b0. If sigma is $ \sqrt(N) $, then the profiled value of b is probably 100 - s/2 So for s=60 we are going to have a profiled value of b~70. Now when we generate pseudo-experiments for s=60, b=70 we will have N~130 and the average shat will be 30, not 60. In practice, this is only an issue for values of s that are very excluded. For values of s near the 95% limit this should not be a big effect. This can be avoided if the nominal values of the constraints also fluctuate, but that requires that those parameters are RooRealVars in the model. This version does not deal with this issue, but it will be addressed in a future version.

Author: Kyle Cranmer Haichen Wang Daniel Whiteson
This notebook tutorial was automatically generated with ROOTBOOK-izer from the macro found in the ROOT repository on Monday, February 24, 2020 at 03:15 AM.

In [1]:
%%cpp -d
#include "TFile.h"
#include "TROOT.h"
#include "TH1F.h"
#include "TCanvas.h"
#include "TSystem.h"

#include "RooWorkspace.h"
#include "RooSimultaneous.h"
#include "RooAbsData.h"

#include "RooStats/ModelConfig.h"
#include "RooStats/FeldmanCousins.h"
#include "RooStats/ToyMCSampler.h"
#include "RooStats/PointSetInterval.h"
#include "RooStats/ConfidenceBelt.h"

#include "RooStats/RooStatsUtils.h"
#include "RooStats/ProfileLikelihoodTestStat.h"
In [2]:
%%cpp -d
// This is a workaround to make sure the namespace is used inside functions
using namespace RooFit;
using namespace RooStats;
In [3]:
bool useProof = false; // flag to control whether to use Proof
int nworkers = 0;      // number of workers (default use all available cores)

The actual macro

Arguments are defined.

In [4]:
const char *infile = "";
const char *workspaceName = "combined";
const char *modelConfigName = "ModelConfig";
const char *dataName = "obsData";
In [5]:
double confidenceLevel = 0.95;
int nPointsToScan = 12;
int nToyMC = 150;

First part is just to access a user-defined file or create the standard example file if it doesn't exist

In [6]:
const char *filename = "";
if (!strcmp(infile, "")) {
   filename = "results/example_combined_GaussExample_model.root";
   bool fileExist = !gSystem->AccessPathName(filename); // note opposite return code
   // if file does not exists generate with histfactory
   if (!fileExist) {
#ifdef _WIN32
      cout << "HistFactory file cannot be generated on Windows - exit" << endl;
      return;
#endif
      // Normally this would be run on the command line
      cout << "will run standard hist2workspace example" << endl;
      gROOT->ProcessLine(".! prepareHistFactory .");
      gROOT->ProcessLine(".! hist2workspace config/example.xml");
      cout << "\n\n---------------------" << endl;
      cout << "Done creating example input" << endl;
      cout << "---------------------\n\n" << endl;
   }

} else
   filename = infile;
will run standard hist2workspace example
Using etcdir /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/etc
Using tutorials dir /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/tutorials
HistFactory workplace will be created in:  .
Creating directory structure...
Copying skeleton configuration files...
   ------------------------------------------------------------------
  | Welcome to ROOT 6.21/01                        https://root.cern |
  | (c) 1995-2019, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Feb 24 2020, 00:39:21                 |
  | From heads/[email protected]                      |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |
   ------------------------------------------------------------------


Processing /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/tutorials/histfactory/makeExample.C...
Done!

RooFit v3.60 -- Developed by Wouter Verkerke and David Kirkby 
                Copyright (C) 2000-2013 NIKHEF, University of California & Stanford University
                All rights reserved, please read http://roofit.sourceforge.net/license.txt

reading input : config/example.xml
output file prefix is : ./results/example
Found Channels:  ./config/example_channel.xml

Creating new measurement: 
Measurement Name: GaussExample	 OutputFilePrefix: 	 POI: SigXsecOverSM	 Lumi: 1	 LumiRelErr: 0.1	 BinLow: 0	 BinHigh: 1	 ExportOnly: 0
Constant Params:  Lumi alpha_syst1
End Measurement: GaussExample

Creating new measurement: 
Measurement Name: GammaExample	 OutputFilePrefix: 	 POI: SigXsecOverSM	 Lumi: 1	 LumiRelErr: 0.1	 BinLow: 0	 BinHigh: 1	 ExportOnly: 1
Constant Params:  Lumi alpha_syst1
End Measurement: GammaExample

Creating new measurement: 
Measurement Name: LogNormExample	 OutputFilePrefix: 	 POI: SigXsecOverSM	 Lumi: 1	 LumiRelErr: 0.1	 BinLow: 0	 BinHigh: 1	 ExportOnly: 1
Constant Params:  Lumi alpha_syst1
End Measurement: LogNormExample

Creating new measurement: 
Measurement Name: ConstExample	 OutputFilePrefix: 	 POI: SigXsecOverSM	 Lumi: 1	 LumiRelErr: 0.1	 BinLow: 0	 BinHigh: 1	 ExportOnly: 1
Constant Params:  Lumi alpha_syst1
End Measurement: ConstExample

Done Processing Measurements
Found Measurements:  GaussExample GammaExample LogNormExample ConstExample
Parsing Channel: ./config/example_channel.xml
Parsing file: ./config/example_channel.xml : creating a channel named channel1
Setting InputFile for this channel: ./data/example.root
Creating Data Element
Created Data Node with InputFile: ./data/example.root HistoName: data HistoPath: 
Creating StatErrorConfig Element
Created StatErrorConfig Element with Constraint type: 1 RelError Threshold: 0.05
Creating Sample Element
Making OverallSys:
	 	 Name: syst1	 Low: 0.95	 High: 1.05
Making NormFactor:
	 	 Name: SigXsecOverSM	 Val: 1	 Low: 0	 High: 3	 Const: 1
Created Sample Node with Name: signal InputFile: ./data/example.root HistoName: signal HistoPath: 
Creating Sample Element
Activating StatError
	 	 Activate: 1	 InputFile: ./data/example.root	 HistoName: background1_statUncert	 histoPath: 
Making OverallSys:
	 	 Name: syst2	 Low: 0.95	 High: 1.05
Created Sample Node with Name: background1 InputFile: ./data/example.root HistoName: background1 HistoPath: 
Creating Sample Element
Activating StatError
	 	 Activate: 1	 InputFile: 	 HistoName: 	 histoPath: 
Making OverallSys:
	 	 Name: syst3	 Low: 0.95	 High: 1.05
Created Sample Node with Name: background2 InputFile: ./data/example.root HistoName: background2 HistoPath: 
Created Channel: 
	 Channel Name: channel1	 InputFile: ./data/example.root
	 Data:
	 	 InputFile: ./data/example.root	 HistoName: data	 HistoPath: 	 HistoAddress: 0
	 statErrorConfig:
	 	 RelErrorThreshold: 0.05	 ConstraintType: Poisson
	 Samples: 
	 	 Name: signal	 	 Channel: channel1	 NormalizeByTheory: True	 StatErrorActivate: False
	 	 	 	 	 InputFile: ./data/example.root	 HistName: signal	 HistoPath: 	 HistoAddress: 0
	 	 Name: background1	 	 Channel: channel1	 NormalizeByTheory: True	 StatErrorActivate: False
	 	 	 	 	 InputFile: ./data/example.root	 HistName: background1	 HistoPath: 	 HistoAddress: 0
	 	 	 StatError Activate: 1	 InputFile: ./data/example.root	 HistName: background1_statUncert	 HistoPath: 	 HistoAddress: 0
	 	 Name: background2	 	 Channel: channel1	 NormalizeByTheory: True	 StatErrorActivate: False
	 	 	 	 	 InputFile: ./data/example.root	 HistName: background2	 HistoPath: 	 HistoAddress: 0
	 	 	 StatError Activate: 1	 InputFile: ./data/example.root	 HistName: 	 HistoPath: 	 HistoAddress: 0
	 End of Channel channel1
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName data
Opened input file: ./data/example.root: 0x2d563f0
Collecting Nominal Histogram
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName signal
Opened input file: ./data/example.root: 0x310dd10
Collecting Nominal Histogram
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName background1
Opened input file: ./data/example.root: 0x310ebe0
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName background1_statUncert
Opened input file: ./data/example.root: 0x3309180
Collecting Nominal Histogram
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName background2
Opened input file: ./data/example.root: 0x330aa50
Making Model and Measurements (Fast) for measurement: GaussExample
using lumi = 1 and lumiError = 0.1 including bins between 0 and 1
fixing the following parameters:
   Lumi
   alpha_syst1
Checking if output directory : ./results -  exists
Creating the output file: ./results/example_GaussExample.root
Creating the table file: ./results/example_results.table
Creating the HistoToWorkspaceFactoryFast factory
Setting preprocess functions
Starting to process channel: channel1


-------------------
Starting to process channel1 channel with 1 observables
lumi str = [1,0,10]
lumi Error str = nominalLumi[1,0,2],0.1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooStats::HistFactory::FlexibleInterpVar::signal_channel1_epsilon
making normFactor: SigXsecOverSM
WARNING: Const attribute to <NormFactor> tag is deprecated, will ignore. Instead, add 
	<ParamSetting Const="True">SigXsecOverSM</ParamSetting>
 to your top-level XML's <Measurment> entry
signal_channel1 has no variation histograms 
processing hist signal
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset signal_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooHistFunc::signal_channel1_nominal
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon
background1_channel1 has no variation histograms 
processing hist background1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset background1_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooHistFunc::background1_channel1_nominal
Sample: background1 to be included in Stat Error for channel channel1
Using external histogram for Stat Errors for  Channel: channel1 Sample: background1
Error Histogram: background1_statUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealVar::gamma_stat_channel1_bin_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealVar::gamma_stat_channel1_bin_1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::obs_x_channel1 for import of ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of ParamHistFunc::mc_stat_channel1 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::obs_x_channel1 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background1_channel1_overallSyst_x_Exp for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::background1_channel1_nominal for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::alpha_syst2 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon
background2_channel1 has no variation histograms 
processing hist background2
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset background2_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooHistFunc::background2_channel1_nominal
Sample: background2 to be included in Stat Error for channel channel1
Making Statistical Uncertainty Hist for  Channel: channel1 Sample: background2
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of ParamHistFunc::mc_stat_channel1 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::obs_x_channel1 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background2_channel1_overallSyst_x_Exp for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::background2_channel1_nominal for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::alpha_syst3 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
Making Total Uncertainty for bin 1 Error = 5 Val = 100 RelativeError = 0.05
Making Total Uncertainty for bin 2 Error = 10 Val = 100 RelativeError = 0.1
About to create Constraint Terms from: mc_stat_channel1 params: (gamma_stat_channel1_bin_0,gamma_stat_channel1_bin_1)
Using Poisson StatErrors in channel: channel1
Creating constraint for: gamma_stat_channel1_bin_0. Type of constraint: 1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooPoisson::gamma_stat_channel1_bin_0_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealVar::nom_gamma_stat_channel1_bin_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProduct::gamma_stat_channel1_bin_0_poisMean
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of RooPoisson::gamma_stat_channel1_bin_0_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooConstVar::gamma_stat_channel1_bin_0_tau
Creating constraint for: gamma_stat_channel1_bin_1. Type of constraint: 1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooPoisson::gamma_stat_channel1_bin_1_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealVar::nom_gamma_stat_channel1_bin_1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProduct::gamma_stat_channel1_bin_1_poisMean
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of RooPoisson::gamma_stat_channel1_bin_1_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooConstVar::gamma_stat_channel1_bin_1_tau
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealSumPdf::channel1_model
-----------------------------------------
import model into workspace
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooGaussian::lumiConstraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::0.1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::Lumi for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nominalLumi for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooGaussian::alpha_syst1Constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::alpha_syst1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_alpha_syst1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooGaussian::alpha_syst2Constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::alpha_syst2 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_alpha_syst2 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooGaussian::alpha_syst3Constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::alpha_syst3 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_alpha_syst3 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooPoisson::gamma_stat_channel1_bin_0_constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_gamma_stat_channel1_bin_0 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::gamma_stat_channel1_bin_0_poisMean for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::gamma_stat_channel1_bin_0_tau for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooPoisson::gamma_stat_channel1_bin_1_constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_gamma_stat_channel1_bin_1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::gamma_stat_channel1_bin_1_poisMean for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::gamma_stat_channel1_bin_1_tau for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealSumPdf::channel1_model for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::L_x_signal_channel1_overallSyst_x_Exp for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::signal_channel1_overallSyst_x_Exp for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::signal_channel1_nominal for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::obs_x_channel1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::signal_channel1_overallNorm_x_sigma_epsilon for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::SigXsecOverSM for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::signal_channel1_epsilon for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::binWidth_obs_x_channel1_0 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::L_x_background1_channel1_overallSyst_x_StatUncert for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background1_channel1_overallSyst_x_StatUncert for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of ParamHistFunc::mc_stat_channel1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background1_channel1_overallSyst_x_Exp for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::background1_channel1_nominal for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::binWidth_obs_x_channel1_1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::L_x_background2_channel1_overallSyst_x_StatUncert for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background2_channel1_overallSyst_x_StatUncert for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background2_channel1_overallSyst_x_Exp for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::background2_channel1_nominal for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::binWidth_obs_x_channel1_2 for import of RooProdPdf::model_channel1
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
RooDataSet::AsimovData[obs_x_channel1,weight:binWeightAsimov] = 2 entries (230 weighted)
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset AsimovData
[#1] INFO:ObjectHandling -- RooWorkSpace::import(channel1) changing name of dataset from  AsimovData to asimovData
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset obsData

RooWorkspace(channel1) channel1 workspace contents

variables
---------
(Lumi,SigXsecOverSM,alpha_syst1,alpha_syst2,alpha_syst3,binWidth_obs_x_channel1_0,binWidth_obs_x_channel1_1,binWidth_obs_x_channel1_2,gamma_stat_channel1_bin_0,gamma_stat_channel1_bin_1,nom_alpha_syst1,nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1,nominalLumi,obs_x_channel1,weightVar)

p.d.f.s
-------
RooGaussian::alpha_syst1Constraint[ x=alpha_syst1 mean=nom_alpha_syst1 sigma=1 ] = 1
RooGaussian::alpha_syst2Constraint[ x=alpha_syst2 mean=nom_alpha_syst2 sigma=1 ] = 1
RooGaussian::alpha_syst3Constraint[ x=alpha_syst3 mean=nom_alpha_syst3 sigma=1 ] = 1
RooRealSumPdf::channel1_model[ binWidth_obs_x_channel1_0 * L_x_signal_channel1_overallSyst_x_Exp + binWidth_obs_x_channel1_1 * L_x_background1_channel1_overallSyst_x_StatUncert + binWidth_obs_x_channel1_2 * L_x_background2_channel1_overallSyst_x_StatUncert ] = 220/230
RooPoisson::gamma_stat_channel1_bin_0_constraint[ x=nom_gamma_stat_channel1_bin_0 mean=gamma_stat_channel1_bin_0_poisMean ] = 0.019943
RooPoisson::gamma_stat_channel1_bin_1_constraint[ x=nom_gamma_stat_channel1_bin_1 mean=gamma_stat_channel1_bin_1_poisMean ] = 0.039861
RooGaussian::lumiConstraint[ x=Lumi mean=nominalLumi sigma=0.1 ] = 1
RooProdPdf::model_channel1[ lumiConstraint * alpha_syst1Constraint * alpha_syst2Constraint * alpha_syst3Constraint * gamma_stat_channel1_bin_0_constraint * gamma_stat_channel1_bin_1_constraint * channel1_model(obs_x_channel1) ] = 0.174888

functions
--------
RooProduct::L_x_background1_channel1_overallSyst_x_StatUncert[ Lumi * background1_channel1_overallSyst_x_StatUncert ] = 0
RooProduct::L_x_background2_channel1_overallSyst_x_StatUncert[ Lumi * background2_channel1_overallSyst_x_StatUncert ] = 100
RooProduct::L_x_signal_channel1_overallSyst_x_Exp[ Lumi * signal_channel1_overallSyst_x_Exp ] = 10
RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon[ paramList=(alpha_syst2) ] = 1
RooHistFunc::background1_channel1_nominal[ depList=(obs_x_channel1) ] = 0
RooProduct::background1_channel1_overallSyst_x_Exp[ background1_channel1_nominal * background1_channel1_epsilon ] = 0
RooProduct::background1_channel1_overallSyst_x_StatUncert[ mc_stat_channel1 * background1_channel1_overallSyst_x_Exp ] = 0
RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon[ paramList=(alpha_syst3) ] = 1
RooHistFunc::background2_channel1_nominal[ depList=(obs_x_channel1) ] = 100
RooProduct::background2_channel1_overallSyst_x_Exp[ background2_channel1_nominal * background2_channel1_epsilon ] = 100
RooProduct::background2_channel1_overallSyst_x_StatUncert[ mc_stat_channel1 * background2_channel1_overallSyst_x_Exp ] = 100
RooProduct::gamma_stat_channel1_bin_0_poisMean[ gamma_stat_channel1_bin_0 * gamma_stat_channel1_bin_0_tau ] = 400
RooProduct::gamma_stat_channel1_bin_1_poisMean[ gamma_stat_channel1_bin_1 * gamma_stat_channel1_bin_1_tau ] = 100
ParamHistFunc::mc_stat_channel1[ ] = 1
RooStats::HistFactory::FlexibleInterpVar::signal_channel1_epsilon[ paramList=(alpha_syst1) ] = 1
RooHistFunc::signal_channel1_nominal[ depList=(obs_x_channel1) ] = 10
RooProduct::signal_channel1_overallNorm_x_sigma_epsilon[ SigXsecOverSM * signal_channel1_epsilon ] = 1
RooProduct::signal_channel1_overallSyst_x_Exp[ signal_channel1_nominal * signal_channel1_overallNorm_x_sigma_epsilon ] = 10

datasets
--------
RooDataSet::asimovData(obs_x_channel1)
RooDataSet::obsData(obs_x_channel1)

embedded datasets (in pdfs and functions)
-----------------------------------------
RooDataHist::signal_channel1nominalDHist(obs_x_channel1)
RooDataHist::background1_channel1nominalDHist(obs_x_channel1)
RooDataHist::background2_channel1nominalDHist(obs_x_channel1)

named sets
----------
ModelConfig_GlobalObservables:(nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
ModelConfig_Observables:(obs_x_channel1)
coefList:(binWidth_obs_x_channel1_0,binWidth_obs_x_channel1_1,binWidth_obs_x_channel1_2)
constraintTerms:(lumiConstraint,alpha_syst1Constraint,alpha_syst2Constraint,alpha_syst3Constraint,gamma_stat_channel1_bin_0_constraint,gamma_stat_channel1_bin_1_constraint)
globalObservables:(nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
likelihoodTerms:(channel1_model)
obsAndWeight:(weightVar,obs_x_channel1)
observables:(obs_x_channel1)
observablesSet:(obs_x_channel1)
shapeList:(L_x_signal_channel1_overallSyst_x_Exp,L_x_background1_channel1_overallSyst_x_StatUncert,L_x_background2_channel1_overallSyst_x_StatUncert)

generic objects
---------------
RooStats::ModelConfig::ModelConfig

Setting Parameter(s) of Interest as: SigXsecOverSM 

=== Using the following for ModelConfig ===
Observables:             RooArgSet:: = (obs_x_channel1)
Parameters of Interest:  RooArgSet:: = (SigXsecOverSM)
Nuisance Parameters:     RooArgSet:: = (alpha_syst2,alpha_syst3,gamma_stat_channel1_bin_0,gamma_stat_channel1_bin_1)
Global Observables:      RooArgSet:: = (nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
PDF:                     RooProdPdf::model_channel1[ lumiConstraint * alpha_syst1Constraint * alpha_syst2Constraint * alpha_syst3Constraint * gamma_stat_channel1_bin_0_constraint * gamma_stat_channel1_bin_1_constraint * channel1_model(obs_x_channel1) ] = 0.174888

Opening File to hold channel: ./results/example_channel1_GaussExample_model.root
About to write channel measurement to file
Writing sample: signal
Writing sample: background1
Writing sample: background2
Saved all histograms
Saved Measurement
Successfully wrote channel to file


---------------
---------------- Doing channel1 Fit
---------------


[#1] INFO:Minization -- p.d.f. provides expected number of events, including extended term in likelihood.
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
[#1] INFO:Minization -- createNLL: caching constraint set under name CONSTR_OF_PDF_model_channel1_FOR_OBS_obs_x_channel1 with 6 entries
[#1] INFO:Minization --  Including the following constraint terms in minimization: (lumiConstraint,alpha_syst1Constraint,alpha_syst2Constraint,alpha_syst3Constraint,gamma_stat_channel1_bin_0_constraint,gamma_stat_channel1_bin_1_constraint)
[#1] INFO:Fitting -- RooAddition::defaultErrorLevel(nll_model_channel1_obsData_with_constr) Summation contains a RooNLLVar, using its error level
[#1] INFO:Minization -- RooMinimizer::optimizeConst: activating const optimization
[#1] INFO:Minization --  The following expressions have been identified as constant and will be precalculated and cached: (signal_channel1_nominal,background1_channel1_nominal,background2_channel1_nominal)
[#1] INFO:Minization --  The following expressions will be evaluated in cache-and-track mode: (mc_stat_channel1)
 **********
 **    1 **SET PRINT           1
 **********
 **********
 **    2 **SET NOGRAD
 **********
 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 SigXsecOverSM   1.00000e+00  3.00000e-01    0.00000e+00  3.00000e+00
     2 alpha_syst2   0.00000e+00  1.00000e+00   -5.00000e+00  5.00000e+00
     3 alpha_syst3   0.00000e+00  1.00000e+00   -5.00000e+00  5.00000e+00
     4 gamma_stat_channel1_bin_0   1.00000e+00  5.00000e-02    0.00000e+00  1.25000e+00
     5 gamma_stat_channel1_bin_1   1.00000e+00  1.00000e-01    0.00000e+00  1.50000e+00
 **********
 **    3 **SET ERR         0.5
 **********
 **********
 **    4 **SET PRINT           1
 **********
 **********
 **    5 **SET STR           1
 **********
 NOW USING STRATEGY  1: TRY TO BALANCE SPEED AGAINST RELIABILITY
 **********
 **    6 **MIGRAD        2500           1
 **********
 FIRST CALL TO USER FUNCTION AT NEW START POINT, WITH IFLAG=4.
[#1] INFO:NumericIntegration -- RooRealIntegral::init(gamma_stat_channel1_bin_0_constraint_Int[gamma_stat_channel1_bin_0]) using numeric integrator RooIntegrator1D to calculate Int(gamma_stat_channel1_bin_0)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(gamma_stat_channel1_bin_1_constraint_Int[gamma_stat_channel1_bin_1]) using numeric integrator RooIntegrator1D to calculate Int(gamma_stat_channel1_bin_1)
 START MIGRAD MINIMIZATION.  STRATEGY  1.  CONVERGENCE WHEN EDM .LT. 1.00e-03
 FCN=-1044.81 FROM MIGRAD    STATUS=INITIATE       12 CALLS          13 TOTAL
                     EDM= unknown      STRATEGY= 1      NO ERROR MATRIX       
  EXT PARAMETER               CURRENT GUESS       STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  SigXsecOverSM   1.00000e+00   3.00000e-01   2.14402e-01  -7.28473e-01
   2  alpha_syst2   0.00000e+00   1.00000e+00   2.01358e-01  -4.16828e-01
   3  alpha_syst3   0.00000e+00   1.00000e+00   2.01358e-01  -4.54721e-01
   4  gamma_stat_channel1_bin_0   1.00000e+00   5.00000e-02   1.00456e-01  -8.33497e-01
   5  gamma_stat_channel1_bin_1   1.00000e+00   1.00000e-01   1.42080e-01  -1.28584e+00
                               ERR DEF= 0.5
 MIGRAD MINIMIZATION HAS CONVERGED.
 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 COVARIANCE MATRIX CALCULATED SUCCESSFULLY
 FCN=-1044.84 FROM MIGRAD    STATUS=CONVERGED      79 CALLS          80 TOTAL
                     EDM=3.27869e-05    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  SigXsecOverSM   1.11502e+00   5.86100e-01   7.54848e-03   7.39488e-04
   2  alpha_syst2  -7.65568e-03   9.82184e-01   4.06870e-03   7.64597e-03
   3  alpha_syst3   1.30156e-02   9.47542e-01   4.03080e-03  -2.57958e-02
   4  gamma_stat_channel1_bin_0   9.99623e-01   4.93234e-02   2.03189e-03   1.64274e-02
   5  gamma_stat_channel1_bin_1   1.00380e+00   8.00861e-02   2.30372e-03   1.15772e-02
                               ERR DEF= 0.5
 EXTERNAL ERROR MATRIX.    NDIM=  25    NPAR=  5    ERR DEF=0.5
  3.641e-01 -2.108e-01 -7.712e-02 -1.052e-02 -1.544e-02 
 -2.108e-01  9.774e-01  4.466e-02 -1.168e-03  8.943e-03 
 -7.712e-02  4.466e-02  9.088e-01  2.228e-03 -1.792e-02 
 -1.052e-02 -1.168e-03  2.228e-03  2.441e-03  4.462e-04 
 -1.544e-02  8.943e-03 -1.792e-02  4.462e-04  6.441e-03 
 PARAMETER  CORRELATION COEFFICIENTS  
       NO.  GLOBAL      1      2      3      4      5
        1  0.58365   1.000 -0.353 -0.134 -0.353 -0.319
        2  0.38745  -0.353  1.000  0.047 -0.024  0.113
        3  0.32155  -0.134  0.047  1.000  0.047 -0.234
        4  0.38693  -0.353 -0.024  0.047  1.000  0.113
        5  0.42409  -0.319  0.113 -0.234  0.113  1.000
 **********
 **    7 **SET ERR         0.5
 **********
 **********
 **    8 **SET PRINT           1
 **********
 **********
 **    9 **HESSE        2500
 **********
 COVARIANCE MATRIX CALCULATED SUCCESSFULLY
 FCN=-1044.84 FROM HESSE     STATUS=OK             31 CALLS         111 TOTAL
                     EDM=3.2801e-05    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME      VALUE            ERROR       STEP SIZE       VALUE   
   1  SigXsecOverSM   1.11502e+00   5.86554e-01   1.50970e-03  -2.59558e-01
   2  alpha_syst2  -7.65568e-03   9.82482e-01   8.13739e-04  -1.53114e-03
   3  alpha_syst3   1.30156e-02   9.47601e-01   8.06159e-04   2.60311e-03
   4  gamma_stat_channel1_bin_0   9.99623e-01   4.93408e-02   4.06379e-04   6.42748e-01
   5  gamma_stat_channel1_bin_1   1.00380e+00   8.01088e-02   4.60745e-04   3.45220e-01
                               ERR DEF= 0.5
 EXTERNAL ERROR MATRIX.    NDIM=  25    NPAR=  5    ERR DEF=0.5
  3.647e-01 -2.115e-01 -7.728e-02 -1.055e-02 -1.549e-02 
 -2.115e-01  9.780e-01  4.481e-02 -1.142e-03  8.985e-03 
 -7.728e-02  4.481e-02  9.089e-01  2.237e-03 -1.792e-02 
 -1.055e-02 -1.142e-03  2.237e-03  2.442e-03  4.485e-04 
 -1.549e-02  8.985e-03 -1.792e-02  4.485e-04  6.445e-03 
 PARAMETER  CORRELATION COEFFICIENTS  
       NO.  GLOBAL      1      2      3      4      5
        1  0.58459   1.000 -0.354 -0.134 -0.354 -0.320
        2  0.38812  -0.354  1.000  0.048 -0.023  0.113
        3  0.32173  -0.134  0.048  1.000  0.047 -0.234
        4  0.38771  -0.354 -0.023  0.047  1.000  0.113
        5  0.42463  -0.320  0.113 -0.234  0.113  1.000
 **********
 **   10 **MINOS        2500           1
 **********
 FCN=-1044.84 FROM MINOS     STATUS=SUCCESSFUL     90 CALLS         201 TOTAL
                     EDM=3.2801e-05    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                  PARABOLIC         MINOS ERRORS        
  NO.   NAME      VALUE            ERROR      NEGATIVE      POSITIVE   
   1  SigXsecOverSM   1.11502e+00   5.86554e-01  -5.96829e-01   6.11590e-01
   2  alpha_syst2  -7.65568e-03   9.82482e-01                            
   3  alpha_syst3   1.30156e-02   9.47601e-01                            
   4  gamma_stat_channel1_bin_0   9.99623e-01   4.93408e-02                            
   5  gamma_stat_channel1_bin_1   1.00380e+00   8.01088e-02                            
                               ERR DEF= 0.5
 **********
 **   11 **MINOS        2500           2
 **********
 FCN=-1044.84 FROM MINOS     STATUS=SUCCESSFUL     73 CALLS         274 TOTAL
                     EDM=3.2801e-05    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                  PARABOLIC         MINOS ERRORS        
  NO.   NAME      VALUE            ERROR      NEGATIVE      POSITIVE   
   1  SigXsecOverSM   1.11502e+00   5.86554e-01  -5.96829e-01   6.11590e-01
   2  alpha_syst2  -7.65568e-03   9.82482e-01  -9.90051e-01   9.87631e-01
   3  alpha_syst3   1.30156e-02   9.47601e-01                            
   4  gamma_stat_channel1_bin_0   9.99623e-01   4.93408e-02                            
   5  gamma_stat_channel1_bin_1   1.00380e+00   8.01088e-02                            
                               ERR DEF= 0.5
 **********
 **   12 **MINOS        2500           3
 **********
 FCN=-1044.84 FROM MINOS     STATUS=SUCCESSFUL     55 CALLS         329 TOTAL
                     EDM=3.2801e-05    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                  PARABOLIC         MINOS ERRORS        
  NO.   NAME      VALUE            ERROR      NEGATIVE      POSITIVE   
   1  SigXsecOverSM   1.11502e+00   5.86554e-01  -5.96829e-01   6.11590e-01
   2  alpha_syst2  -7.65568e-03   9.82482e-01  -9.90051e-01   9.87631e-01
   3  alpha_syst3   1.30156e-02   9.47601e-01  -9.47047e-01   9.60252e-01
   4  gamma_stat_channel1_bin_0   9.99623e-01   4.93408e-02                            
   5  gamma_stat_channel1_bin_1   1.00380e+00   8.01088e-02                            
                               ERR DEF= 0.5
 **********
 **   13 **MINOS        2500           4
 **********
 FCN=-1044.84 FROM MINOS     STATUS=SUCCESSFUL     74 CALLS         403 TOTAL
                     EDM=3.2801e-05    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                  PARABOLIC         MINOS ERRORS        
  NO.   NAME      VALUE            ERROR      NEGATIVE      POSITIVE   
   1  SigXsecOverSM   1.11502e+00   5.86554e-01  -5.96829e-01   6.11590e-01
   2  alpha_syst2  -7.65568e-03   9.82482e-01  -9.90051e-01   9.87631e-01
   3  alpha_syst3   1.30156e-02   9.47601e-01  -9.47047e-01   9.60252e-01
   4  gamma_stat_channel1_bin_0   9.99623e-01   4.93408e-02  -4.86933e-02   5.01526e-02
   5  gamma_stat_channel1_bin_1   1.00380e+00   8.01088e-02                            
                               ERR DEF= 0.5
 **********
 **   14 **MINOS        2500           5
 **********
 FCN=-1044.84 FROM MINOS     STATUS=SUCCESSFUL     74 CALLS         477 TOTAL
                     EDM=3.2801e-05    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                  PARABOLIC         MINOS ERRORS        
  NO.   NAME      VALUE            ERROR      NEGATIVE      POSITIVE   
   1  SigXsecOverSM   1.11502e+00   5.86554e-01  -5.96829e-01   6.11590e-01
   2  alpha_syst2  -7.65568e-03   9.82482e-01  -9.90051e-01   9.87631e-01
   3  alpha_syst3   1.30156e-02   9.47601e-01  -9.47047e-01   9.60252e-01
   4  gamma_stat_channel1_bin_0   9.99623e-01   4.93408e-02  -4.86933e-02   5.01526e-02
   5  gamma_stat_channel1_bin_1   1.00380e+00   8.01088e-02  -7.85700e-02   8.20232e-02
                               ERR DEF= 0.5
[#1] INFO:Minization -- RooMinimizer::optimizeConst: deactivating const optimization
printing results for SigXsecOverSM at 1.11502 high -0.596829 low 0.61159
[#1] INFO:Minization -- p.d.f. provides expected number of events, including extended term in likelihood.
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
[#1] INFO:Minization -- createNLL picked up cached consraints from workspace with 6 entries
[#1] INFO:Minization --  Including the following constraint terms in minimization: (lumiConstraint,alpha_syst1Constraint,alpha_syst2Constraint,alpha_syst3Constraint,gamma_stat_channel1_bin_0_constraint,gamma_stat_channel1_bin_1_constraint)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(lumiConstraint_Int[Lumi,nominalLumi]) using numeric integrator RooIntegrator1D to calculate Int(nominalLumi)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(alpha_syst1Constraint_Int[alpha_syst1,nom_alpha_syst1]) using numeric integrator RooIntegrator1D to calculate Int(nom_alpha_syst1)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(alpha_syst2Constraint_Int[alpha_syst2,nom_alpha_syst2]) using numeric integrator RooIntegrator1D to calculate Int(nom_alpha_syst2)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(alpha_syst3Constraint_Int[alpha_syst3,nom_alpha_syst3]) using numeric integrator RooIntegrator1D to calculate Int(nom_alpha_syst3)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(gamma_stat_channel1_bin_0_constraint_Int[gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_0]) using numeric integrator RooIntegrator1D to calculate Int(gamma_stat_channel1_bin_0)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(gamma_stat_channel1_bin_1_constraint_Int[gamma_stat_channel1_bin_1,nom_gamma_stat_channel1_bin_1]) using numeric integrator RooIntegrator1D to calculate Int(gamma_stat_channel1_bin_1)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
[#1] INFO:Minization -- RooProfileLL::evaluate(nll_model_channel1_obsData_with_constr_Profile[SigXsecOverSM]) Creating instance of MINUIT
[#1] INFO:Fitting -- RooAddition::defaultErrorLevel(nll_model_channel1_obsData_with_constr) Summation contains a RooNLLVar, using its error level
[#1] INFO:Minization -- RooProfileLL::evaluate(nll_model_channel1_obsData_with_constr_Profile[SigXsecOverSM]) determining minimum likelihood for current configurations w.r.t all observable
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(lumiConstraint_Int[Lumi,nominalLumi]) using numeric integrator RooIntegrator1D to calculate Int(nominalLumi)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(alpha_syst1Constraint_Int[alpha_syst1,nom_alpha_syst1]) using numeric integrator RooIntegrator1D to calculate Int(nom_alpha_syst1)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(alpha_syst2Constraint_Int[alpha_syst2,nom_alpha_syst2]) using numeric integrator RooIntegrator1D to calculate Int(nom_alpha_syst2)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(alpha_syst3Constraint_Int[alpha_syst3,nom_alpha_syst3]) using numeric integrator RooIntegrator1D to calculate Int(nom_alpha_syst3)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(gamma_stat_channel1_bin_0_constraint_Int[gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_0]) using numeric integrator RooIntegrator1D to calculate Int(gamma_stat_channel1_bin_0)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(gamma_stat_channel1_bin_1_constraint_Int[gamma_stat_channel1_bin_1,nom_gamma_stat_channel1_bin_1]) using numeric integrator RooIntegrator1D to calculate Int(gamma_stat_channel1_bin_1)
[#1] INFO:Minization -- RooProfileLL::evaluate(nll_model_channel1_obsData_with_constr_Profile[SigXsecOverSM]) minimum found at (SigXsecOverSM=1.11488)
..........................................................................................................................................................................................................
[#1] INFO:NumericIntegration -- RooRealIntegral::init(lumiConstraint_Int[Lumi,nominalLumi]) using numeric integrator RooIntegrator1D to calculate Int(nominalLumi)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(alpha_syst1Constraint_Int[alpha_syst1,nom_alpha_syst1]) using numeric integrator RooIntegrator1D to calculate Int(nom_alpha_syst1)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(alpha_syst2Constraint_Int[alpha_syst2,nom_alpha_syst2]) using numeric integrator RooIntegrator1D to calculate Int(nom_alpha_syst2)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(alpha_syst3Constraint_Int[alpha_syst3,nom_alpha_syst3]) using numeric integrator RooIntegrator1D to calculate Int(nom_alpha_syst3)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(gamma_stat_channel1_bin_0_constraint_Int[gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_0]) using numeric integrator RooIntegrator1D to calculate Int(gamma_stat_channel1_bin_0)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(gamma_stat_channel1_bin_1_constraint_Int[gamma_stat_channel1_bin_1,nom_gamma_stat_channel1_bin_1]) using numeric integrator RooIntegrator1D to calculate Int(gamma_stat_channel1_bin_1)
full list of observables:
RooArgList:: = (obs_x_channel1)


------------------
 Entering combination
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_alpha_syst2
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_alpha_syst3
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_gamma_stat_channel1_bin_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_gamma_stat_channel1_bin_1
-----------------------------------------
create toy data for channel1
RooDataSet::AsimovData0[obs_x_channel1,channelCat,weight:binWeightAsimov] = 2 entries (230 weighted)
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset asimovDataFullModel
[#1] INFO:ObjectHandling -- RooWorkSpace::import(combined) changing name of dataset from  asimovDataFullModel to asimovData
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::obs_x_channel1
Merging data for channel channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset channel1
[#1] INFO:ObjectHandling -- RooWorkSpace::import(combined) changing name of dataset from  channel1 to obsData

RooWorkspace(combined) combined contents

variables
---------
(channelCat,nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1,obs_x_channel1,weightVar)

datasets
--------
RooDataSet::asimovData(obs_x_channel1,weightVar,channelCat)
RooDataSet::obsData(channelCat,obs_x_channel1)

named sets
----------
ModelConfig_GlobalObservables:(nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
ModelConfig_Observables:(obs_x_channel1,weightVar,channelCat)
globalObservables:(nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
observables:(obs_x_channel1,weightVar,channelCat)



----------------
 Importing combined model
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset signal_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset background1_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset background2_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooCategory::channelCat for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooGaussian::lumiConstraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooConstVar::0.1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::Lumi
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nominalLumi
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooGaussian::alpha_syst1Constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooConstVar::1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::alpha_syst1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_alpha_syst1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooGaussian::alpha_syst2Constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::alpha_syst2
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::nom_alpha_syst2 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooGaussian::alpha_syst3Constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::alpha_syst3
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::nom_alpha_syst3 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooPoisson::gamma_stat_channel1_bin_0_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::nom_gamma_stat_channel1_bin_0 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::gamma_stat_channel1_bin_0_poisMean
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooConstVar::gamma_stat_channel1_bin_0_tau
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::gamma_stat_channel1_bin_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooPoisson::gamma_stat_channel1_bin_1_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::nom_gamma_stat_channel1_bin_1 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::gamma_stat_channel1_bin_1_poisMean
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooConstVar::gamma_stat_channel1_bin_1_tau
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::gamma_stat_channel1_bin_1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealSumPdf::channel1_model
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::L_x_signal_channel1_overallSyst_x_Exp
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::signal_channel1_overallSyst_x_Exp
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooHistFunc::signal_channel1_nominal
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::obs_x_channel1 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::signal_channel1_overallNorm_x_sigma_epsilon
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::SigXsecOverSM
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooStats::HistFactory::FlexibleInterpVar::signal_channel1_epsilon
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::binWidth_obs_x_channel1_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::L_x_background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::background1_channel1_overallSyst_x_Exp
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooHistFunc::background1_channel1_nominal
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::binWidth_obs_x_channel1_1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::L_x_background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::background2_channel1_overallSyst_x_Exp
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooHistFunc::background2_channel1_nominal
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::binWidth_obs_x_channel1_2
setting Lumi constant
setting alpha_syst1 constant
Setting Parameter(s) of Interest as: SigXsecOverSM 

=== Using the following for ModelConfig ===
Observables:             RooArgSet:: = (obs_x_channel1,weightVar,channelCat)
Parameters of Interest:  RooArgSet:: = (SigXsecOverSM)
Nuisance Parameters:     RooArgSet:: = (alpha_syst2,alpha_syst3,gamma_stat_channel1_bin_0,gamma_stat_channel1_bin_1)
Global Observables:      RooArgSet:: = (nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
PDF:                     RooSimultaneous::simPdf[ indexCat=channelCat channel1=model_channel1 ] = 0.174888

Writing combined workspace to file: ./results/example_combined_GaussExample_model.root
Info in <TCanvas::Print>: eps file ./results/example_channel1_GaussExample_profileLR.eps has been created
Writing combined measurement to file: ./results/example_combined_GaussExample_model.root
Writing sample: signal
Writing sample: background1
Writing sample: background2
Saved all histograms
Saved Measurement


---------------
---------------- Doing combined Fit
---------------


[#1] INFO:Minization -- p.d.f. provides expected number of events, including extended term in likelihood.
[#1] INFO:Minization -- createNLL: caching constraint set under name CONSTR_OF_PDF_simPdf_FOR_OBS_channelCat:obs_x_channel1 with 6 entries
[#1] INFO:Minization --  Including the following constraint terms in minimization: (lumiConstraint,alpha_syst1Constraint,alpha_syst2Constraint,alpha_syst3Constraint,gamma_stat_channel1_bin_0_constraint,gamma_stat_channel1_bin_1_constraint)
[#1] INFO:Fitting -- RooAddition::defaultErrorLevel(nll_simPdf_obsData_with_constr) Summation contains a RooNLLVar, using its error level
[#1] INFO:Minization -- RooMinimizer::optimizeConst: activating const optimization
RooAbsTestStatistic::initSimMode: creating slave calculator #0 for state channel1 (2 dataset entries)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
[#1] INFO:Fitting -- RooAbsTestStatistic::initSimMode: created 1 slave calculators.
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
[#1] INFO:Minization --  The following expressions have been identified as constant and will be precalculated and cached: (signal_channel1_nominal,background1_channel1_nominal,background2_channel1_nominal)
[#1] INFO:Minization --  The following expressions will be evaluated in cache-and-track mode: (mc_stat_channel1)
 **********
 ** 1842 **SET NOGRAD
 **********
 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 SigXsecOverSM   1.00000e+00  3.00000e-01    0.00000e+00  3.00000e+00
     2 alpha_syst2   0.00000e+00  1.00000e+00   -5.00000e+00  5.00000e+00
     3 alpha_syst3   0.00000e+00  1.00000e+00   -5.00000e+00  5.00000e+00
     4 gamma_stat_channel1_bin_0   1.00000e+00  5.00000e-02    0.00000e+00  1.25000e+00
     5 gamma_stat_channel1_bin_1   1.00000e+00  1.00000e-01    0.00000e+00  1.50000e+00
 **********
 ** 1843 **SET ERR         0.5
 **********
 **********
 ** 1844 **SET PRINT           1
 **********
 **********
 ** 1845 **SET STR           1
 **********
 NOW USING STRATEGY  1: TRY TO BALANCE SPEED AGAINST RELIABILITY
 **********
 ** 1846 **MIGRAD        2500           1
 **********
 FIRST CALL TO USER FUNCTION AT NEW START POINT, WITH IFLAG=4.
[#1] INFO:NumericIntegration -- RooRealIntegral::init(gamma_stat_channel1_bin_0_constraint_Int[gamma_stat_channel1_bin_0]) using numeric integrator RooIntegrator1D to calculate Int(gamma_stat_channel1_bin_0)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(gamma_stat_channel1_bin_1_constraint_Int[gamma_stat_channel1_bin_1]) using numeric integrator RooIntegrator1D to calculate Int(gamma_stat_channel1_bin_1)
 START MIGRAD MINIMIZATION.  STRATEGY  1.  CONVERGENCE WHEN EDM .LT. 1.00e-03
 FCN=-1044.81 FROM MIGRAD    STATUS=INITIATE       14 CALLS          15 TOTAL
                     EDM= unknown      STRATEGY= 1      NO ERROR MATRIX       
  EXT PARAMETER               CURRENT GUESS       STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  SigXsecOverSM   1.00000e+00   3.00000e-01   2.14402e-01  -7.28473e-01
   2  alpha_syst2   0.00000e+00   1.00000e+00   2.01358e-01  -4.16836e-01
   3  alpha_syst3   0.00000e+00   1.00000e+00   2.01358e-01  -4.54731e-01
   4  gamma_stat_channel1_bin_0   1.00000e+00   5.00000e-02   1.00456e-01  -8.33660e-01
   5  gamma_stat_channel1_bin_1   1.00000e+00   1.00000e-01   1.42080e-01  -1.28585e+00
                               ERR DEF= 0.5
 MIGRAD MINIMIZATION HAS CONVERGED.
 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 COVARIANCE MATRIX CALCULATED SUCCESSFULLY
 FCN=-1044.84 FROM MIGRAD    STATUS=CONVERGED      81 CALLS          82 TOTAL
                     EDM=3.27975e-05    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  SigXsecOverSM   1.11502e+00   5.86100e-01   7.54848e-03   7.38245e-04
   2  alpha_syst2  -7.65543e-03   9.82184e-01   4.06870e-03   7.64601e-03
   3  alpha_syst3   1.30147e-02   9.47542e-01   4.03080e-03  -2.57997e-02
   4  gamma_stat_channel1_bin_0   9.99623e-01   4.93234e-02   2.03189e-03   1.64207e-02
   5  gamma_stat_channel1_bin_1   1.00380e+00   8.00861e-02   2.30372e-03   1.15839e-02
                               ERR DEF= 0.5
 EXTERNAL ERROR MATRIX.    NDIM=  25    NPAR=  5    ERR DEF=0.5
  3.641e-01 -2.108e-01 -7.712e-02 -1.052e-02 -1.544e-02 
 -2.108e-01  9.774e-01  4.466e-02 -1.168e-03  8.943e-03 
 -7.712e-02  4.466e-02  9.088e-01  2.228e-03 -1.792e-02 
 -1.052e-02 -1.168e-03  2.228e-03  2.441e-03  4.462e-04 
 -1.544e-02  8.943e-03 -1.792e-02  4.462e-04  6.441e-03 
 PARAMETER  CORRELATION COEFFICIENTS  
       NO.  GLOBAL      1      2      3      4      5
        1  0.58365   1.000 -0.353 -0.134 -0.353 -0.319
        2  0.38745  -0.353  1.000  0.047 -0.024  0.113
        3  0.32155  -0.134  0.047  1.000  0.047 -0.234
        4  0.38693  -0.353 -0.024  0.047  1.000  0.113
        5  0.42409  -0.319  0.113 -0.234  0.113  1.000
 **********
 ** 1847 **SET ERR         0.5
 **********
 **********
 ** 1848 **SET PRINT           1
 **********
 **********
 ** 1849 **HESSE        2500
 **********
 COVARIANCE MATRIX CALCULATED SUCCESSFULLY
 FCN=-1044.84 FROM HESSE     STATUS=OK             31 CALLS         113 TOTAL
                     EDM=3.28117e-05    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME      VALUE            ERROR       STEP SIZE       VALUE   
   1  SigXsecOverSM   1.11502e+00   5.86553e-01   1.50970e-03  -2.59558e-01
   2  alpha_syst2  -7.65543e-03   9.82481e-01   8.13739e-04  -1.53109e-03
   3  alpha_syst3   1.30147e-02   9.47601e-01   8.06160e-04   2.60294e-03
   4  gamma_stat_channel1_bin_0   9.99623e-01   4.93408e-02   4.06379e-04   6.42748e-01
   5  gamma_stat_channel1_bin_1   1.00380e+00   8.01088e-02   4.60745e-04   3.45220e-01
                               ERR DEF= 0.5
 EXTERNAL ERROR MATRIX.    NDIM=  25    NPAR=  5    ERR DEF=0.5
  3.647e-01 -2.115e-01 -7.728e-02 -1.055e-02 -1.549e-02 
 -2.115e-01  9.780e-01  4.481e-02 -1.142e-03  8.985e-03 
 -7.728e-02  4.481e-02  9.089e-01  2.237e-03 -1.792e-02 
 -1.055e-02 -1.142e-03  2.237e-03  2.442e-03  4.485e-04 
 -1.549e-02  8.985e-03 -1.792e-02  4.485e-04  6.445e-03 
 PARAMETER  CORRELATION COEFFICIENTS  
       NO.  GLOBAL      1      2      3      4      5
        1  0.58459   1.000 -0.354 -0.134 -0.354 -0.320
        2  0.38812  -0.354  1.000  0.048 -0.023  0.113
        3  0.32173  -0.134  0.048  1.000  0.047 -0.234
        4  0.38771  -0.354 -0.023  0.047  1.000  0.113
        5  0.42463  -0.320  0.113 -0.234  0.113  1.000
 **********
 ** 1850 **MINOS        2500           1
 **********
 FCN=-1044.84 FROM MINOS     STATUS=SUCCESSFUL     90 CALLS         203 TOTAL
                     EDM=3.28117e-05    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                  PARABOLIC         MINOS ERRORS        
  NO.   NAME      VALUE            ERROR      NEGATIVE      POSITIVE   
   1  SigXsecOverSM   1.11502e+00   5.86553e-01  -5.96829e-01   6.11590e-01
   2  alpha_syst2  -7.65543e-03   9.82481e-01                            
   3  alpha_syst3   1.30147e-02   9.47601e-01                            
   4  gamma_stat_channel1_bin_0   9.99623e-01   4.93408e-02                            
   5  gamma_stat_channel1_bin_1   1.00380e+00   8.01088e-02  -7.85700e-02   8.20232e-02
                               ERR DEF= 0.5
 **********
 ** 1851 **MINOS        2500           2
 **********
 FCN=-1044.84 FROM MINOS     STATUS=SUCCESSFUL     73 CALLS         276 TOTAL
                     EDM=3.28117e-05    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                  PARABOLIC         MINOS ERRORS        
  NO.   NAME      VALUE            ERROR      NEGATIVE      POSITIVE   
   1  SigXsecOverSM   1.11502e+00   5.86553e-01  -5.96829e-01   6.11590e-01
   2  alpha_syst2  -7.65543e-03   9.82481e-01  -9.90051e-01   9.87631e-01
   3  alpha_syst3   1.30147e-02   9.47601e-01                            
   4  gamma_stat_channel1_bin_0   9.99623e-01   4.93408e-02                            
   5  gamma_stat_channel1_bin_1   1.00380e+00   8.01088e-02  -7.85700e-02   8.20232e-02
                               ERR DEF= 0.5
 **********
 ** 1852 **MINOS        2500           3
 **********
 FCN=-1044.84 FROM MINOS     STATUS=SUCCESSFUL     55 CALLS         331 TOTAL
                     EDM=3.28117e-05    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                  PARABOLIC         MINOS ERRORS        
  NO.   NAME      VALUE            ERROR      NEGATIVE      POSITIVE   
   1  SigXsecOverSM   1.11502e+00   5.86553e-01  -5.96829e-01   6.11590e-01
   2  alpha_syst2  -7.65543e-03   9.82481e-01  -9.90051e-01   9.87631e-01
   3  alpha_syst3   1.30147e-02   9.47601e-01  -9.47046e-01   9.60252e-01
   4  gamma_stat_channel1_bin_0   9.99623e-01   4.93408e-02                            
   5  gamma_stat_channel1_bin_1   1.00380e+00   8.01088e-02  -7.85700e-02   8.20232e-02
                               ERR DEF= 0.5
 **********
 ** 1853 **MINOS        2500           4
 **********
 FCN=-1044.84 FROM MINOS     STATUS=SUCCESSFUL     74 CALLS         405 TOTAL
                     EDM=3.28117e-05    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                  PARABOLIC         MINOS ERRORS        
  NO.   NAME      VALUE            ERROR      NEGATIVE      POSITIVE   
   1  SigXsecOverSM   1.11502e+00   5.86553e-01  -5.96829e-01   6.11590e-01
   2  alpha_syst2  -7.65543e-03   9.82481e-01  -9.90051e-01   9.87631e-01
   3  alpha_syst3   1.30147e-02   9.47601e-01  -9.47046e-01   9.60252e-01
   4  gamma_stat_channel1_bin_0   9.99623e-01   4.93408e-02  -4.86933e-02   5.01526e-02
   5  gamma_stat_channel1_bin_1   1.00380e+00   8.01088e-02  -7.85700e-02   8.20232e-02
                               ERR DEF= 0.5
 **********
 ** 1854 **MINOS        2500           5
 **********
 FCN=-1044.84 FROM MINOS     STATUS=SUCCESSFUL     74 CALLS         479 TOTAL
                     EDM=3.28117e-05    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                  PARABOLIC         MINOS ERRORS        
  NO.   NAME      VALUE            ERROR      NEGATIVE      POSITIVE   
   1  SigXsecOverSM   1.11502e+00   5.86553e-01  -5.96829e-01   6.11590e-01
   2  alpha_syst2  -7.65543e-03   9.82481e-01  -9.90051e-01   9.87631e-01
   3  alpha_syst3   1.30147e-02   9.47601e-01  -9.47046e-01   9.60252e-01
   4  gamma_stat_channel1_bin_0   9.99623e-01   4.93408e-02  -4.86933e-02   5.01526e-02
   5  gamma_stat_channel1_bin_1   1.00380e+00   8.01088e-02  -7.85700e-02   8.20231e-02
                               ERR DEF= 0.5
[#1] INFO:Minization -- RooMinimizer::optimizeConst: deactivating const optimization
printing results for SigXsecOverSM at 1.11502 high -0.596829 low 0.61159
[#1] INFO:Minization -- p.d.f. provides expected number of events, including extended term in likelihood.
[#1] INFO:Minization -- createNLL picked up cached consraints from workspace with 6 entries
[#1] INFO:Minization --  Including the following constraint terms in minimization: (lumiConstraint,alpha_syst1Constraint,alpha_syst2Constraint,alpha_syst3Constraint,gamma_stat_channel1_bin_0_constraint,gamma_stat_channel1_bin_1_constraint)
RooAbsTestStatistic::initSimMode: creating slave calculator #0 for state channel1 (2 dataset entries)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
[#1] INFO:Fitting -- RooAbsTestStatistic::initSimMode: created 1 slave calculators.
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(lumiConstraint_Int[Lumi,nominalLumi]) using numeric integrator RooIntegrator1D to calculate Int(nominalLumi)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(alpha_syst1Constraint_Int[alpha_syst1,nom_alpha_syst1]) using numeric integrator RooIntegrator1D to calculate Int(nom_alpha_syst1)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(alpha_syst2Constraint_Int[alpha_syst2,nom_alpha_syst2]) using numeric integrator RooIntegrator1D to calculate Int(nom_alpha_syst2)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(alpha_syst3Constraint_Int[alpha_syst3,nom_alpha_syst3]) using numeric integrator RooIntegrator1D to calculate Int(nom_alpha_syst3)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(gamma_stat_channel1_bin_0_constraint_Int[gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_0]) using numeric integrator RooIntegrator1D to calculate Int(gamma_stat_channel1_bin_0)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(gamma_stat_channel1_bin_1_constraint_Int[gamma_stat_channel1_bin_1,nom_gamma_stat_channel1_bin_1]) using numeric integrator RooIntegrator1D to calculate Int(gamma_stat_channel1_bin_1)
[#1] INFO:Minization -- RooProfileLL::evaluate(nll_simPdf_obsData_with_constr_Profile[SigXsecOverSM]) Creating instance of MINUIT
[#1] INFO:Fitting -- RooAddition::defaultErrorLevel(nll_simPdf_obsData_with_constr) Summation contains a RooNLLVar, using its error level
[#1] INFO:Minization -- RooProfileLL::evaluate(nll_simPdf_obsData_with_constr_Profile[SigXsecOverSM]) determining minimum likelihood for current configurations w.r.t all observable
RooAbsTestStatistic::initSimMode: creating slave calculator #0 for state channel1 (2 dataset entries)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
[#1] INFO:Fitting -- RooAbsTestStatistic::initSimMode: created 1 slave calculators.
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(lumiConstraint_Int[Lumi,nominalLumi]) using numeric integrator RooIntegrator1D to calculate Int(nominalLumi)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(alpha_syst1Constraint_Int[alpha_syst1,nom_alpha_syst1]) using numeric integrator RooIntegrator1D to calculate Int(nom_alpha_syst1)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(alpha_syst2Constraint_Int[alpha_syst2,nom_alpha_syst2]) using numeric integrator RooIntegrator1D to calculate Int(nom_alpha_syst2)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(alpha_syst3Constraint_Int[alpha_syst3,nom_alpha_syst3]) using numeric integrator RooIntegrator1D to calculate Int(nom_alpha_syst3)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(gamma_stat_channel1_bin_0_constraint_Int[gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_0]) using numeric integrator RooIntegrator1D to calculate Int(gamma_stat_channel1_bin_0)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(gamma_stat_channel1_bin_1_constraint_Int[gamma_stat_channel1_bin_1,nom_gamma_stat_channel1_bin_1]) using numeric integrator RooIntegrator1D to calculate Int(gamma_stat_channel1_bin_1)
[#1] INFO:Minization -- RooProfileLL::evaluate(nll_simPdf_obsData_with_constr_Profile[SigXsecOverSM]) minimum found at (SigXsecOverSM=1.11488)
..........................................................................................................................................................................................................
RooAbsTestStatistic::initSimMode: creating slave calculator #0 for state channel1 (2 dataset entries)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
[#1] INFO:Fitting -- RooAbsTestStatistic::initSimMode: created 1 slave calculators.
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(lumiConstraint_Int[Lumi,nominalLumi]) using numeric integrator RooIntegrator1D to calculate Int(nominalLumi)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(alpha_syst1Constraint_Int[alpha_syst1,nom_alpha_syst1]) using numeric integrator RooIntegrator1D to calculate Int(nom_alpha_syst1)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(alpha_syst2Constraint_Int[alpha_syst2,nom_alpha_syst2]) using numeric integrator RooIntegrator1D to calculate Int(nom_alpha_syst2)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(alpha_syst3Constraint_Int[alpha_syst3,nom_alpha_syst3]) using numeric integrator RooIntegrator1D to calculate Int(nom_alpha_syst3)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(gamma_stat_channel1_bin_0_constraint_Int[gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_0]) using numeric integrator RooIntegrator1D to calculate Int(gamma_stat_channel1_bin_0)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(gamma_stat_channel1_bin_1_constraint_Int[gamma_stat_channel1_bin_1,nom_gamma_stat_channel1_bin_1]) using numeric integrator RooIntegrator1D to calculate Int(gamma_stat_channel1_bin_1)
Info in <TCanvas::Print>: eps file ./results/example_combined_GaussExample_profileLR.eps has been created
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName data
Opened input file: ./data/example.root: 0x330b710
Collecting Nominal Histogram
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName signal
Opened input file: ./data/example.root: 0x466a8c0
Collecting Nominal Histogram
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName background1
Opened input file: ./data/example.root: 0x4648170
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName background1_statUncert
Opened input file: ./data/example.root: 0x461f710
Collecting Nominal Histogram
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName background2
Opened input file: ./data/example.root: 0x464d370
Making Model and Measurements (Fast) for measurement: GammaExample
using lumi = 1 and lumiError = 0.1 including bins between 0 and 1
fixing the following parameters:
   Lumi
   alpha_syst1
Checking if output directory : ./results -  exists
Creating the output file: ./results/example_GammaExample.root
Creating the table file: ./results/example_results.table
Creating the HistoToWorkspaceFactoryFast factory
Setting preprocess functions
Starting to process channel: channel1


-------------------
Starting to process channel1 channel with 1 observables
lumi str = [1,0,10]
lumi Error str = nominalLumi[1,0,2],0.1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooStats::HistFactory::FlexibleInterpVar::signal_channel1_epsilon
making normFactor: SigXsecOverSM
WARNING: Const attribute to <NormFactor> tag is deprecated, will ignore. Instead, add 
	<ParamSetting Const="True">SigXsecOverSM</ParamSetting>
 to your top-level XML's <Measurment> entry
signal_channel1 has no variation histograms 
processing hist signal
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset signal_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooHistFunc::signal_channel1_nominal
[#0] WARNING:InputArguments -- The parameter 'theta_syst2' with range [-1e+30, 1e+30] of the RooGamma 'beta_syst2Constraint' exceeds the safe range of (0, inf). Advise to limit its range.
0x48db5e0 RooPolyVar::alphaOfBeta_syst2 = 0 [Auto,Clean] 
  0x48dcb00/V- RooConstVar::-3.33333 = -3.33333
  0x4745050/V- RooConstVar::3.33333 = 3.33333
  0x4982ea0/V- RooRealVar::beta_syst2 = 1
0x4a0ba80 RooGamma::beta_syst2Constraint = 1.31243 [Auto,Dirty] 
  0x4a078e0/V- RooConstVar::0 = 0
  0x4982ea0/V- RooRealVar::beta_syst2 = 1
  0x49d23f0/V- RooAddition::k_syst2 = 11 [Auto,Clean] 
    0x49da040/V- RooRealVar::nom_beta_syst2 = 10
    0x49856d0/V- RooConstVar::1 = 1
  0x4914e00/V- RooRealVar::theta_syst2 = 0.09
Added a gamma constraint for syst2
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon
background1_channel1 has no variation histograms 
processing hist background1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset background1_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooHistFunc::background1_channel1_nominal
Sample: background1 to be included in Stat Error for channel channel1
Using external histogram for Stat Errors for  Channel: channel1 Sample: background1
Error Histogram: background1_statUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealVar::gamma_stat_channel1_bin_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealVar::gamma_stat_channel1_bin_1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::obs_x_channel1 for import of ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of ParamHistFunc::mc_stat_channel1 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::obs_x_channel1 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background1_channel1_overallSyst_x_Exp for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::background1_channel1_nominal for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooPolyVar::alphaOfBeta_syst2 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::-3.33333 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::3.33333 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::beta_syst2 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon
background2_channel1 has no variation histograms 
processing hist background2
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset background2_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooHistFunc::background2_channel1_nominal
Sample: background2 to be included in Stat Error for channel channel1
Making Statistical Uncertainty Hist for  Channel: channel1 Sample: background2
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of ParamHistFunc::mc_stat_channel1 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::obs_x_channel1 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background2_channel1_overallSyst_x_Exp for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::background2_channel1_nominal for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::alpha_syst3 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
Making Total Uncertainty for bin 1 Error = 5 Val = 100 RelativeError = 0.05
Making Total Uncertainty for bin 2 Error = 10 Val = 100 RelativeError = 0.1
About to create Constraint Terms from: mc_stat_channel1 params: (gamma_stat_channel1_bin_0,gamma_stat_channel1_bin_1)
Using Poisson StatErrors in channel: channel1
Creating constraint for: gamma_stat_channel1_bin_0. Type of constraint: 1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooPoisson::gamma_stat_channel1_bin_0_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealVar::nom_gamma_stat_channel1_bin_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProduct::gamma_stat_channel1_bin_0_poisMean
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of RooPoisson::gamma_stat_channel1_bin_0_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooConstVar::gamma_stat_channel1_bin_0_tau
Creating constraint for: gamma_stat_channel1_bin_1. Type of constraint: 1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooPoisson::gamma_stat_channel1_bin_1_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealVar::nom_gamma_stat_channel1_bin_1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProduct::gamma_stat_channel1_bin_1_poisMean
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of RooPoisson::gamma_stat_channel1_bin_1_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooConstVar::gamma_stat_channel1_bin_1_tau
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealSumPdf::channel1_model
-----------------------------------------
import model into workspace
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooGaussian::lumiConstraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::0.1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::Lumi for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nominalLumi for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooGaussian::alpha_syst1Constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::alpha_syst1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_alpha_syst1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooGamma::beta_syst2Constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::0 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::beta_syst2 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooAddition::k_syst2 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_beta_syst2 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::theta_syst2 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooGaussian::alpha_syst3Constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::alpha_syst3 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_alpha_syst3 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooPoisson::gamma_stat_channel1_bin_0_constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_gamma_stat_channel1_bin_0 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::gamma_stat_channel1_bin_0_poisMean for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::gamma_stat_channel1_bin_0_tau for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooPoisson::gamma_stat_channel1_bin_1_constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_gamma_stat_channel1_bin_1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::gamma_stat_channel1_bin_1_poisMean for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::gamma_stat_channel1_bin_1_tau for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealSumPdf::channel1_model for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::L_x_signal_channel1_overallSyst_x_Exp for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::signal_channel1_overallSyst_x_Exp for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::signal_channel1_nominal for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::obs_x_channel1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::signal_channel1_overallNorm_x_sigma_epsilon for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::SigXsecOverSM for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::signal_channel1_epsilon for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::binWidth_obs_x_channel1_0 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::L_x_background1_channel1_overallSyst_x_StatUncert for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background1_channel1_overallSyst_x_StatUncert for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of ParamHistFunc::mc_stat_channel1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background1_channel1_overallSyst_x_Exp for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::background1_channel1_nominal for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooPolyVar::alphaOfBeta_syst2 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::-3.33333 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::3.33333 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::binWidth_obs_x_channel1_1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::L_x_background2_channel1_overallSyst_x_StatUncert for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background2_channel1_overallSyst_x_StatUncert for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background2_channel1_overallSyst_x_Exp for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::background2_channel1_nominal for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::binWidth_obs_x_channel1_2 for import of RooProdPdf::model_channel1
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
RooDataSet::AsimovData[obs_x_channel1,weight:binWeightAsimov] = 2 entries (230 weighted)
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset AsimovData
[#1] INFO:ObjectHandling -- RooWorkSpace::import(channel1) changing name of dataset from  AsimovData to asimovData
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset obsData

RooWorkspace(channel1) channel1 workspace contents

variables
---------
(Lumi,SigXsecOverSM,alpha_syst1,alpha_syst3,beta_syst2,binWidth_obs_x_channel1_0,binWidth_obs_x_channel1_1,binWidth_obs_x_channel1_2,gamma_stat_channel1_bin_0,gamma_stat_channel1_bin_1,nom_alpha_syst1,nom_alpha_syst3,nom_beta_syst2,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1,nominalLumi,obs_x_channel1,theta_syst2,weightVar)

p.d.f.s
-------
RooGaussian::alpha_syst1Constraint[ x=alpha_syst1 mean=nom_alpha_syst1 sigma=1 ] = 1
RooGaussian::alpha_syst3Constraint[ x=alpha_syst3 mean=nom_alpha_syst3 sigma=1 ] = 1
RooGamma::beta_syst2Constraint[ x=beta_syst2 mean=k_syst2 beta=theta_syst2 mu=0 ] = 1.31243
RooRealSumPdf::channel1_model[ binWidth_obs_x_channel1_0 * L_x_signal_channel1_overallSyst_x_Exp + binWidth_obs_x_channel1_1 * L_x_background1_channel1_overallSyst_x_StatUncert + binWidth_obs_x_channel1_2 * L_x_background2_channel1_overallSyst_x_StatUncert ] = 220/230
RooPoisson::gamma_stat_channel1_bin_0_constraint[ x=nom_gamma_stat_channel1_bin_0 mean=gamma_stat_channel1_bin_0_poisMean ] = 0.019943
RooPoisson::gamma_stat_channel1_bin_1_constraint[ x=nom_gamma_stat_channel1_bin_1 mean=gamma_stat_channel1_bin_1_poisMean ] = 0.039861
RooGaussian::lumiConstraint[ x=Lumi mean=nominalLumi sigma=0.1 ] = 1
RooProdPdf::model_channel1[ lumiConstraint * alpha_syst1Constraint * beta_syst2Constraint * alpha_syst3Constraint * gamma_stat_channel1_bin_0_constraint * gamma_stat_channel1_bin_1_constraint * channel1_model(obs_x_channel1) ] = 0.229528

functions
--------
RooProduct::L_x_background1_channel1_overallSyst_x_StatUncert[ Lumi * background1_channel1_overallSyst_x_StatUncert ] = 0
RooProduct::L_x_background2_channel1_overallSyst_x_StatUncert[ Lumi * background2_channel1_overallSyst_x_StatUncert ] = 100
RooProduct::L_x_signal_channel1_overallSyst_x_Exp[ Lumi * signal_channel1_overallSyst_x_Exp ] = 10
RooPolyVar::alphaOfBeta_syst2[ x=beta_syst2 coefList=(-3.33333,3.33333) ] = 0
RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon[ paramList=(alphaOfBeta_syst2) ] = 1
RooHistFunc::background1_channel1_nominal[ depList=(obs_x_channel1) ] = 0
RooProduct::background1_channel1_overallSyst_x_Exp[ background1_channel1_nominal * background1_channel1_epsilon ] = 0
RooProduct::background1_channel1_overallSyst_x_StatUncert[ mc_stat_channel1 * background1_channel1_overallSyst_x_Exp ] = 0
RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon[ paramList=(alpha_syst3) ] = 1
RooHistFunc::background2_channel1_nominal[ depList=(obs_x_channel1) ] = 100
RooProduct::background2_channel1_overallSyst_x_Exp[ background2_channel1_nominal * background2_channel1_epsilon ] = 100
RooProduct::background2_channel1_overallSyst_x_StatUncert[ mc_stat_channel1 * background2_channel1_overallSyst_x_Exp ] = 100
RooProduct::gamma_stat_channel1_bin_0_poisMean[ gamma_stat_channel1_bin_0 * gamma_stat_channel1_bin_0_tau ] = 400
RooProduct::gamma_stat_channel1_bin_1_poisMean[ gamma_stat_channel1_bin_1 * gamma_stat_channel1_bin_1_tau ] = 100
RooAddition::k_syst2[ nom_beta_syst2 + 1 ] = 11
ParamHistFunc::mc_stat_channel1[ ] = 1
RooStats::HistFactory::FlexibleInterpVar::signal_channel1_epsilon[ paramList=(alpha_syst1) ] = 1
RooHistFunc::signal_channel1_nominal[ depList=(obs_x_channel1) ] = 10
RooProduct::signal_channel1_overallNorm_x_sigma_epsilon[ SigXsecOverSM * signal_channel1_epsilon ] = 1
RooProduct::signal_channel1_overallSyst_x_Exp[ signal_channel1_nominal * signal_channel1_overallNorm_x_sigma_epsilon ] = 10

datasets
--------
RooDataSet::asimovData(obs_x_channel1)
RooDataSet::obsData(obs_x_channel1)

embedded datasets (in pdfs and functions)
-----------------------------------------
RooDataHist::signal_channel1nominalDHist(obs_x_channel1)
RooDataHist::background1_channel1nominalDHist(obs_x_channel1)
RooDataHist::background2_channel1nominalDHist(obs_x_channel1)

named sets
----------
ModelConfig_GlobalObservables:(nom_beta_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
ModelConfig_Observables:(obs_x_channel1)
coefList:(binWidth_obs_x_channel1_0,binWidth_obs_x_channel1_1,binWidth_obs_x_channel1_2)
constraintTerms:(lumiConstraint,alpha_syst1Constraint,beta_syst2Constraint,alpha_syst3Constraint,gamma_stat_channel1_bin_0_constraint,gamma_stat_channel1_bin_1_constraint)
globalObservables:(nom_beta_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
likelihoodTerms:(channel1_model)
obsAndWeight:(weightVar,obs_x_channel1)
observables:(obs_x_channel1)
observablesSet:(obs_x_channel1)
shapeList:(L_x_signal_channel1_overallSyst_x_Exp,L_x_background1_channel1_overallSyst_x_StatUncert,L_x_background2_channel1_overallSyst_x_StatUncert)

generic objects
---------------
RooStats::ModelConfig::ModelConfig

Setting Parameter(s) of Interest as: SigXsecOverSM 

=== Using the following for ModelConfig ===
Observables:             RooArgSet:: = (obs_x_channel1)
Parameters of Interest:  RooArgSet:: = (SigXsecOverSM)
Nuisance Parameters:     RooArgSet:: = (alpha_syst3,beta_syst2,gamma_stat_channel1_bin_0,gamma_stat_channel1_bin_1)
Global Observables:      RooArgSet:: = (nom_beta_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
PDF:                     RooProdPdf::model_channel1[ lumiConstraint * alpha_syst1Constraint * beta_syst2Constraint * alpha_syst3Constraint * gamma_stat_channel1_bin_0_constraint * gamma_stat_channel1_bin_1_constraint * channel1_model(obs_x_channel1) ] = 0.229528

Opening File to hold channel: ./results/example_channel1_GammaExample_model.root
About to write channel measurement to file
Writing sample: signal
Writing sample: background1
Writing sample: background2
Saved all histograms
Saved Measurement
Successfully wrote channel to file
full list of observables:
RooArgList:: = (obs_x_channel1)


------------------
 Entering combination
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_beta_syst2
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_alpha_syst3
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_gamma_stat_channel1_bin_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_gamma_stat_channel1_bin_1
-----------------------------------------
create toy data for channel1
RooDataSet::AsimovData0[obs_x_channel1,channelCat,weight:binWeightAsimov] = 2 entries (230 weighted)
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset asimovDataFullModel
[#1] INFO:ObjectHandling -- RooWorkSpace::import(combined) changing name of dataset from  asimovDataFullModel to asimovData
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::obs_x_channel1
Merging data for channel channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset channel1
[#1] INFO:ObjectHandling -- RooWorkSpace::import(combined) changing name of dataset from  channel1 to obsData

RooWorkspace(combined) combined contents

variables
---------
(channelCat,nom_alpha_syst3,nom_beta_syst2,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1,obs_x_channel1,weightVar)

datasets
--------
RooDataSet::asimovData(obs_x_channel1,weightVar,channelCat)
RooDataSet::obsData(channelCat,obs_x_channel1)

named sets
----------
ModelConfig_GlobalObservables:(nom_beta_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
ModelConfig_Observables:(obs_x_channel1,weightVar,channelCat)
globalObservables:(nom_beta_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
observables:(obs_x_channel1,weightVar,channelCat)



----------------
 Importing combined model
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset signal_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset background1_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset background2_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooCategory::channelCat for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooGaussian::lumiConstraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooConstVar::0.1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::Lumi
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nominalLumi
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooGaussian::alpha_syst1Constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooConstVar::1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::alpha_syst1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_alpha_syst1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooGamma::beta_syst2Constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooConstVar::0
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::beta_syst2
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooAddition::k_syst2
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::nom_beta_syst2 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::theta_syst2
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooGaussian::alpha_syst3Constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::alpha_syst3
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::nom_alpha_syst3 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooPoisson::gamma_stat_channel1_bin_0_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::nom_gamma_stat_channel1_bin_0 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::gamma_stat_channel1_bin_0_poisMean
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooConstVar::gamma_stat_channel1_bin_0_tau
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::gamma_stat_channel1_bin_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooPoisson::gamma_stat_channel1_bin_1_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::nom_gamma_stat_channel1_bin_1 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::gamma_stat_channel1_bin_1_poisMean
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooConstVar::gamma_stat_channel1_bin_1_tau
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::gamma_stat_channel1_bin_1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealSumPdf::channel1_model
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::L_x_signal_channel1_overallSyst_x_Exp
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::signal_channel1_overallSyst_x_Exp
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooHistFunc::signal_channel1_nominal
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::obs_x_channel1 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::signal_channel1_overallNorm_x_sigma_epsilon
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::SigXsecOverSM
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooStats::HistFactory::FlexibleInterpVar::signal_channel1_epsilon
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::binWidth_obs_x_channel1_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::L_x_background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::background1_channel1_overallSyst_x_Exp
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooHistFunc::background1_channel1_nominal
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooPolyVar::alphaOfBeta_syst2
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooConstVar::-3.33333
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooConstVar::3.33333
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::binWidth_obs_x_channel1_1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::L_x_background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::background2_channel1_overallSyst_x_Exp
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooHistFunc::background2_channel1_nominal
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::binWidth_obs_x_channel1_2
setting Lumi constant
setting alpha_syst1 constant
Setting Parameter(s) of Interest as: SigXsecOverSM 

=== Using the following for ModelConfig ===
Observables:             RooArgSet:: = (obs_x_channel1,weightVar,channelCat)
Parameters of Interest:  RooArgSet:: = (SigXsecOverSM)
Nuisance Parameters:     RooArgSet:: = (alpha_syst3,beta_syst2,gamma_stat_channel1_bin_0,gamma_stat_channel1_bin_1)
Global Observables:      RooArgSet:: = (nom_beta_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
PDF:                     RooSimultaneous::simPdf[ indexCat=channelCat channel1=model_channel1 ] = 0.229528

Writing combined workspace to file: ./results/example_combined_GammaExample_model.root
Writing combined measurement to file: ./results/example_combined_GammaExample_model.root
Writing sample: signal
Writing sample: background1
Writing sample: background2
Saved all histograms
Saved Measurement
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName data
Opened input file: ./data/example.root: 0x46352f0
Collecting Nominal Histogram
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName signal
Opened input file: ./data/example.root: 0x3308710
Collecting Nominal Histogram
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName background1
Opened input file: ./data/example.root: 0x4602ed0
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName background1_statUncert
Opened input file: ./data/example.root: 0x47479c0
Collecting Nominal Histogram
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName background2
Opened input file: ./data/example.root: 0x330a570
Making Model and Measurements (Fast) for measurement: LogNormExample
using lumi = 1 and lumiError = 0.1 including bins between 0 and 1
fixing the following parameters:
   Lumi
   alpha_syst1
Checking if output directory : ./results -  exists
Creating the output file: ./results/example_LogNormExample.root
Creating the table file: ./results/example_results.table
Creating the HistoToWorkspaceFactoryFast factory
Setting preprocess functions
Starting to process channel: channel1


-------------------
Starting to process channel1 channel with 1 observables
lumi str = [1,0,10]
lumi Error str = nominalLumi[1,0,2],0.1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooStats::HistFactory::FlexibleInterpVar::signal_channel1_epsilon
making normFactor: SigXsecOverSM
WARNING: Const attribute to <NormFactor> tag is deprecated, will ignore. Instead, add 
	<ParamSetting Const="True">SigXsecOverSM</ParamSetting>
 to your top-level XML's <Measurment> entry
signal_channel1 has no variation histograms 
processing hist signal
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset signal_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooHistFunc::signal_channel1_nominal
Added a log-normal constraint for syst2
0x4bedd50 RooFormulaVar::alphaOfBeta_syst2 = 0 [Auto,Clean] 
  0x4a89e40/V- RooRealVar::tau_syst2 = 3.33333
  0x4bcf520/V- RooRealVar::kappa_syst2 = 1.3
  0x4b9dd10/V- RooRealVar::alpha_syst2 = 0
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon
background1_channel1 has no variation histograms 
processing hist background1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset background1_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooHistFunc::background1_channel1_nominal
Sample: background1 to be included in Stat Error for channel channel1
Using external histogram for Stat Errors for  Channel: channel1 Sample: background1
Error Histogram: background1_statUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealVar::gamma_stat_channel1_bin_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealVar::gamma_stat_channel1_bin_1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::obs_x_channel1 for import of ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of ParamHistFunc::mc_stat_channel1 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::obs_x_channel1 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background1_channel1_overallSyst_x_Exp for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::background1_channel1_nominal for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooFormulaVar::alphaOfBeta_syst2 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::tau_syst2 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::kappa_syst2 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::alpha_syst2 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon
background2_channel1 has no variation histograms 
processing hist background2
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset background2_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooHistFunc::background2_channel1_nominal
Sample: background2 to be included in Stat Error for channel channel1
Making Statistical Uncertainty Hist for  Channel: channel1 Sample: background2
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of ParamHistFunc::mc_stat_channel1 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::obs_x_channel1 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background2_channel1_overallSyst_x_Exp for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::background2_channel1_nominal for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::alpha_syst3 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
Making Total Uncertainty for bin 1 Error = 5 Val = 100 RelativeError = 0.05
Making Total Uncertainty for bin 2 Error = 10 Val = 100 RelativeError = 0.1
About to create Constraint Terms from: mc_stat_channel1 params: (gamma_stat_channel1_bin_0,gamma_stat_channel1_bin_1)
Using Poisson StatErrors in channel: channel1
Creating constraint for: gamma_stat_channel1_bin_0. Type of constraint: 1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooPoisson::gamma_stat_channel1_bin_0_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealVar::nom_gamma_stat_channel1_bin_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProduct::gamma_stat_channel1_bin_0_poisMean
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of RooPoisson::gamma_stat_channel1_bin_0_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooConstVar::gamma_stat_channel1_bin_0_tau
Creating constraint for: gamma_stat_channel1_bin_1. Type of constraint: 1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooPoisson::gamma_stat_channel1_bin_1_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealVar::nom_gamma_stat_channel1_bin_1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProduct::gamma_stat_channel1_bin_1_poisMean
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of RooPoisson::gamma_stat_channel1_bin_1_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooConstVar::gamma_stat_channel1_bin_1_tau
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealSumPdf::channel1_model
-----------------------------------------
import model into workspace
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooGaussian::lumiConstraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::0.1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::Lumi for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nominalLumi for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooGaussian::alpha_syst1Constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::alpha_syst1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_alpha_syst1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooGaussian::alpha_syst2Constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::alpha_syst2 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_alpha_syst2 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooGaussian::alpha_syst3Constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::alpha_syst3 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_alpha_syst3 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooPoisson::gamma_stat_channel1_bin_0_constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_gamma_stat_channel1_bin_0 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::gamma_stat_channel1_bin_0_poisMean for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::gamma_stat_channel1_bin_0_tau for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooPoisson::gamma_stat_channel1_bin_1_constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_gamma_stat_channel1_bin_1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::gamma_stat_channel1_bin_1_poisMean for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::gamma_stat_channel1_bin_1_tau for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealSumPdf::channel1_model for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::L_x_signal_channel1_overallSyst_x_Exp for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::signal_channel1_overallSyst_x_Exp for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::signal_channel1_nominal for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::obs_x_channel1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::signal_channel1_overallNorm_x_sigma_epsilon for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::SigXsecOverSM for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::signal_channel1_epsilon for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::binWidth_obs_x_channel1_0 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::L_x_background1_channel1_overallSyst_x_StatUncert for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background1_channel1_overallSyst_x_StatUncert for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of ParamHistFunc::mc_stat_channel1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background1_channel1_overallSyst_x_Exp for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::background1_channel1_nominal for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooFormulaVar::alphaOfBeta_syst2 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::tau_syst2 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::kappa_syst2 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::binWidth_obs_x_channel1_1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::L_x_background2_channel1_overallSyst_x_StatUncert for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background2_channel1_overallSyst_x_StatUncert for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background2_channel1_overallSyst_x_Exp for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::background2_channel1_nominal for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::binWidth_obs_x_channel1_2 for import of RooProdPdf::model_channel1
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
RooDataSet::AsimovData[obs_x_channel1,weight:binWeightAsimov] = 2 entries (230 weighted)
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset AsimovData
[#1] INFO:ObjectHandling -- RooWorkSpace::import(channel1) changing name of dataset from  AsimovData to asimovData
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset obsData

RooWorkspace(channel1) channel1 workspace contents

variables
---------
(Lumi,SigXsecOverSM,alpha_syst1,alpha_syst2,alpha_syst3,binWidth_obs_x_channel1_0,binWidth_obs_x_channel1_1,binWidth_obs_x_channel1_2,gamma_stat_channel1_bin_0,gamma_stat_channel1_bin_1,kappa_syst2,nom_alpha_syst1,nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1,nominalLumi,obs_x_channel1,tau_syst2,weightVar)

p.d.f.s
-------
RooGaussian::alpha_syst1Constraint[ x=alpha_syst1 mean=nom_alpha_syst1 sigma=1 ] = 1
RooGaussian::alpha_syst2Constraint[ x=alpha_syst2 mean=nom_alpha_syst2 sigma=1 ] = 1
RooGaussian::alpha_syst3Constraint[ x=alpha_syst3 mean=nom_alpha_syst3 sigma=1 ] = 1
RooRealSumPdf::channel1_model[ binWidth_obs_x_channel1_0 * L_x_signal_channel1_overallSyst_x_Exp + binWidth_obs_x_channel1_1 * L_x_background1_channel1_overallSyst_x_StatUncert + binWidth_obs_x_channel1_2 * L_x_background2_channel1_overallSyst_x_StatUncert ] = 220/230
RooPoisson::gamma_stat_channel1_bin_0_constraint[ x=nom_gamma_stat_channel1_bin_0 mean=gamma_stat_channel1_bin_0_poisMean ] = 0.019943
RooPoisson::gamma_stat_channel1_bin_1_constraint[ x=nom_gamma_stat_channel1_bin_1 mean=gamma_stat_channel1_bin_1_poisMean ] = 0.039861
RooGaussian::lumiConstraint[ x=Lumi mean=nominalLumi sigma=0.1 ] = 1
RooProdPdf::model_channel1[ lumiConstraint * alpha_syst1Constraint * alpha_syst2Constraint * alpha_syst3Constraint * gamma_stat_channel1_bin_0_constraint * gamma_stat_channel1_bin_1_constraint * channel1_model(obs_x_channel1) ] = 0.174888

functions
--------
RooProduct::L_x_background1_channel1_overallSyst_x_StatUncert[ Lumi * background1_channel1_overallSyst_x_StatUncert ] = 0
RooProduct::L_x_background2_channel1_overallSyst_x_StatUncert[ Lumi * background2_channel1_overallSyst_x_StatUncert ] = 100
RooProduct::L_x_signal_channel1_overallSyst_x_Exp[ Lumi * signal_channel1_overallSyst_x_Exp ] = 10
RooFormulaVar::alphaOfBeta_syst2[ actualVars=(tau_syst2,kappa_syst2,alpha_syst2) formula="x[0]*(pow(x[1],x[2])-1.)" ] = 0
RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon[ paramList=(alphaOfBeta_syst2) ] = 1
RooHistFunc::background1_channel1_nominal[ depList=(obs_x_channel1) ] = 0
RooProduct::background1_channel1_overallSyst_x_Exp[ background1_channel1_nominal * background1_channel1_epsilon ] = 0
RooProduct::background1_channel1_overallSyst_x_StatUncert[ mc_stat_channel1 * background1_channel1_overallSyst_x_Exp ] = 0
RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon[ paramList=(alpha_syst3) ] = 1
RooHistFunc::background2_channel1_nominal[ depList=(obs_x_channel1) ] = 100
RooProduct::background2_channel1_overallSyst_x_Exp[ background2_channel1_nominal * background2_channel1_epsilon ] = 100
RooProduct::background2_channel1_overallSyst_x_StatUncert[ mc_stat_channel1 * background2_channel1_overallSyst_x_Exp ] = 100
RooProduct::gamma_stat_channel1_bin_0_poisMean[ gamma_stat_channel1_bin_0 * gamma_stat_channel1_bin_0_tau ] = 400
RooProduct::gamma_stat_channel1_bin_1_poisMean[ gamma_stat_channel1_bin_1 * gamma_stat_channel1_bin_1_tau ] = 100
ParamHistFunc::mc_stat_channel1[ ] = 1
RooStats::HistFactory::FlexibleInterpVar::signal_channel1_epsilon[ paramList=(alpha_syst1) ] = 1
RooHistFunc::signal_channel1_nominal[ depList=(obs_x_channel1) ] = 10
RooProduct::signal_channel1_overallNorm_x_sigma_epsilon[ SigXsecOverSM * signal_channel1_epsilon ] = 1
RooProduct::signal_channel1_overallSyst_x_Exp[ signal_channel1_nominal * signal_channel1_overallNorm_x_sigma_epsilon ] = 10

datasets
--------
RooDataSet::asimovData(obs_x_channel1)
RooDataSet::obsData(obs_x_channel1)

embedded datasets (in pdfs and functions)
-----------------------------------------
RooDataHist::signal_channel1nominalDHist(obs_x_channel1)
RooDataHist::background1_channel1nominalDHist(obs_x_channel1)
RooDataHist::background2_channel1nominalDHist(obs_x_channel1)

named sets
----------
ModelConfig_GlobalObservables:(nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
ModelConfig_Observables:(obs_x_channel1)
coefList:(binWidth_obs_x_channel1_0,binWidth_obs_x_channel1_1,binWidth_obs_x_channel1_2)
constraintTerms:(lumiConstraint,alpha_syst1Constraint,alpha_syst2Constraint,alpha_syst3Constraint,gamma_stat_channel1_bin_0_constraint,gamma_stat_channel1_bin_1_constraint)
globalObservables:(nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
likelihoodTerms:(channel1_model)
obsAndWeight:(weightVar,obs_x_channel1)
observables:(obs_x_channel1)
observablesSet:(obs_x_channel1)
shapeList:(L_x_signal_channel1_overallSyst_x_Exp,L_x_background1_channel1_overallSyst_x_StatUncert,L_x_background2_channel1_overallSyst_x_StatUncert)

generic objects
---------------
RooStats::ModelConfig::ModelConfig

Setting Parameter(s) of Interest as: SigXsecOverSM 

=== Using the following for ModelConfig ===
Observables:             RooArgSet:: = (obs_x_channel1)
Parameters of Interest:  RooArgSet:: = (SigXsecOverSM)
Nuisance Parameters:     RooArgSet:: = (alpha_syst2,alpha_syst3,gamma_stat_channel1_bin_0,gamma_stat_channel1_bin_1)
Global Observables:      RooArgSet:: = (nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
PDF:                     RooProdPdf::model_channel1[ lumiConstraint * alpha_syst1Constraint * alpha_syst2Constraint * alpha_syst3Constraint * gamma_stat_channel1_bin_0_constraint * gamma_stat_channel1_bin_1_constraint * channel1_model(obs_x_channel1) ] = 0.174888

Opening File to hold channel: ./results/example_channel1_LogNormExample_model.root
About to write channel measurement to file
Writing sample: signal
Writing sample: background1
Writing sample: background2
Saved all histograms
Saved Measurement
Successfully wrote channel to file
full list of observables:
RooArgList:: = (obs_x_channel1)


------------------
 Entering combination
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_alpha_syst2
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_alpha_syst3
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_gamma_stat_channel1_bin_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_gamma_stat_channel1_bin_1
-----------------------------------------
create toy data for channel1
RooDataSet::AsimovData0[obs_x_channel1,channelCat,weight:binWeightAsimov] = 2 entries (230 weighted)
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset asimovDataFullModel
[#1] INFO:ObjectHandling -- RooWorkSpace::import(combined) changing name of dataset from  asimovDataFullModel to asimovData
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::obs_x_channel1
Merging data for channel channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset channel1
[#1] INFO:ObjectHandling -- RooWorkSpace::import(combined) changing name of dataset from  channel1 to obsData

RooWorkspace(combined) combined contents

variables
---------
(channelCat,nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1,obs_x_channel1,weightVar)

datasets
--------
RooDataSet::asimovData(obs_x_channel1,weightVar,channelCat)
RooDataSet::obsData(channelCat,obs_x_channel1)

named sets
----------
ModelConfig_GlobalObservables:(nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
ModelConfig_Observables:(obs_x_channel1,weightVar,channelCat)
globalObservables:(nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
observables:(obs_x_channel1,weightVar,channelCat)



----------------
 Importing combined model
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset signal_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset background1_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset background2_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooCategory::channelCat for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooGaussian::lumiConstraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooConstVar::0.1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::Lumi
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nominalLumi
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooGaussian::alpha_syst1Constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooConstVar::1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::alpha_syst1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_alpha_syst1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooGaussian::alpha_syst2Constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::alpha_syst2
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::nom_alpha_syst2 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooGaussian::alpha_syst3Constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::alpha_syst3
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::nom_alpha_syst3 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooPoisson::gamma_stat_channel1_bin_0_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::nom_gamma_stat_channel1_bin_0 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::gamma_stat_channel1_bin_0_poisMean
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooConstVar::gamma_stat_channel1_bin_0_tau
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::gamma_stat_channel1_bin_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooPoisson::gamma_stat_channel1_bin_1_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::nom_gamma_stat_channel1_bin_1 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::gamma_stat_channel1_bin_1_poisMean
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooConstVar::gamma_stat_channel1_bin_1_tau
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::gamma_stat_channel1_bin_1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealSumPdf::channel1_model
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::L_x_signal_channel1_overallSyst_x_Exp
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::signal_channel1_overallSyst_x_Exp
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooHistFunc::signal_channel1_nominal
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::obs_x_channel1 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::signal_channel1_overallNorm_x_sigma_epsilon
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::SigXsecOverSM
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooStats::HistFactory::FlexibleInterpVar::signal_channel1_epsilon
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::binWidth_obs_x_channel1_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::L_x_background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::background1_channel1_overallSyst_x_Exp
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooHistFunc::background1_channel1_nominal
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooFormulaVar::alphaOfBeta_syst2
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::tau_syst2
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::kappa_syst2
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::binWidth_obs_x_channel1_1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::L_x_background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::background2_channel1_overallSyst_x_Exp
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooHistFunc::background2_channel1_nominal
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::binWidth_obs_x_channel1_2
setting Lumi constant
setting alpha_syst1 constant
Setting Parameter(s) of Interest as: SigXsecOverSM 

=== Using the following for ModelConfig ===
Observables:             RooArgSet:: = (obs_x_channel1,weightVar,channelCat)
Parameters of Interest:  RooArgSet:: = (SigXsecOverSM)
Nuisance Parameters:     RooArgSet:: = (alpha_syst2,alpha_syst3,gamma_stat_channel1_bin_0,gamma_stat_channel1_bin_1)
Global Observables:      RooArgSet:: = (nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
PDF:                     RooSimultaneous::simPdf[ indexCat=channelCat channel1=model_channel1 ] = 0.174888

Writing combined workspace to file: ./results/example_combined_LogNormExample_model.root
Writing combined measurement to file: ./results/example_combined_LogNormExample_model.root
Writing sample: signal
Writing sample: background1
Writing sample: background2
Saved all histograms
Saved Measurement
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName data
Opened input file: ./data/example.root: 0x4af47c0
Collecting Nominal Histogram
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName signal
Opened input file: ./data/example.root: 0x4c86600
Collecting Nominal Histogram
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName background1
Opened input file: ./data/example.root: 0x4b24880
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName background1_statUncert
Opened input file: ./data/example.root: 0x4b0fee0
Collecting Nominal Histogram
Getting histogram.  InputFile ./data/example.root HistoPath  HistoName background2
Opened input file: ./data/example.root: 0x4e1ba90
Making Model and Measurements (Fast) for measurement: ConstExample
using lumi = 1 and lumiError = 0.1 including bins between 0 and 1
fixing the following parameters:
   Lumi
   alpha_syst1
Checking if output directory : ./results -  exists
Creating the output file: ./results/example_ConstExample.root
Creating the table file: ./results/example_results.table
Creating the HistoToWorkspaceFactoryFast factory
Setting preprocess functions
Starting to process channel: channel1


-------------------
Starting to process channel1 channel with 1 observables
lumi str = [1,0,10]
lumi Error str = nominalLumi[1,0,2],0.1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooStats::HistFactory::FlexibleInterpVar::signal_channel1_epsilon
making normFactor: SigXsecOverSM
WARNING: Const attribute to <NormFactor> tag is deprecated, will ignore. Instead, add 
	<ParamSetting Const="True">SigXsecOverSM</ParamSetting>
 to your top-level XML's <Measurment> entry
signal_channel1 has no variation histograms 
processing hist signal
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset signal_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooHistFunc::signal_channel1_nominal
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon
background1_channel1 has no variation histograms 
processing hist background1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset background1_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooHistFunc::background1_channel1_nominal
Sample: background1 to be included in Stat Error for channel channel1
Using external histogram for Stat Errors for  Channel: channel1 Sample: background1
Error Histogram: background1_statUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealVar::gamma_stat_channel1_bin_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealVar::gamma_stat_channel1_bin_1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::obs_x_channel1 for import of ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of ParamHistFunc::mc_stat_channel1 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::obs_x_channel1 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background1_channel1_overallSyst_x_Exp for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::background1_channel1_nominal for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::alpha_syst2 for import of RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon
background2_channel1 has no variation histograms 
processing hist background2
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset background2_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooHistFunc::background2_channel1_nominal
Sample: background2 to be included in Stat Error for channel channel1
Making Statistical Uncertainty Hist for  Channel: channel1 Sample: background2
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of ParamHistFunc::mc_stat_channel1 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::obs_x_channel1 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background2_channel1_overallSyst_x_Exp for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::background2_channel1_nominal for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::alpha_syst3 for import of RooProduct::background2_channel1_overallSyst_x_StatUncert
Making Total Uncertainty for bin 1 Error = 5 Val = 100 RelativeError = 0.05
Making Total Uncertainty for bin 2 Error = 10 Val = 100 RelativeError = 0.1
About to create Constraint Terms from: mc_stat_channel1 params: (gamma_stat_channel1_bin_0,gamma_stat_channel1_bin_1)
Using Poisson StatErrors in channel: channel1
Creating constraint for: gamma_stat_channel1_bin_0. Type of constraint: 1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooPoisson::gamma_stat_channel1_bin_0_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealVar::nom_gamma_stat_channel1_bin_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProduct::gamma_stat_channel1_bin_0_poisMean
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of RooPoisson::gamma_stat_channel1_bin_0_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooConstVar::gamma_stat_channel1_bin_0_tau
Creating constraint for: gamma_stat_channel1_bin_1. Type of constraint: 1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooPoisson::gamma_stat_channel1_bin_1_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealVar::nom_gamma_stat_channel1_bin_1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProduct::gamma_stat_channel1_bin_1_poisMean
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of RooPoisson::gamma_stat_channel1_bin_1_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooConstVar::gamma_stat_channel1_bin_1_tau
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooRealSumPdf::channel1_model
-----------------------------------------
import model into workspace
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooGaussian::lumiConstraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::0.1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::Lumi for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nominalLumi for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooGaussian::alpha_syst1Constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::alpha_syst1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_alpha_syst1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooGaussian::alpha_syst2Constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::alpha_syst2 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_alpha_syst2 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooGaussian::alpha_syst3Constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::alpha_syst3 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_alpha_syst3 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooPoisson::gamma_stat_channel1_bin_0_constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_gamma_stat_channel1_bin_0 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::gamma_stat_channel1_bin_0_poisMean for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::gamma_stat_channel1_bin_0_tau for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_0 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooPoisson::gamma_stat_channel1_bin_1_constraint for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::nom_gamma_stat_channel1_bin_1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::gamma_stat_channel1_bin_1_poisMean for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooConstVar::gamma_stat_channel1_bin_1_tau for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::gamma_stat_channel1_bin_1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealSumPdf::channel1_model for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::L_x_signal_channel1_overallSyst_x_Exp for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::signal_channel1_overallSyst_x_Exp for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::signal_channel1_nominal for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::obs_x_channel1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::signal_channel1_overallNorm_x_sigma_epsilon for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::SigXsecOverSM for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::signal_channel1_epsilon for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::binWidth_obs_x_channel1_0 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::L_x_background1_channel1_overallSyst_x_StatUncert for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background1_channel1_overallSyst_x_StatUncert for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of ParamHistFunc::mc_stat_channel1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background1_channel1_overallSyst_x_Exp for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::background1_channel1_nominal for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::binWidth_obs_x_channel1_1 for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::L_x_background2_channel1_overallSyst_x_StatUncert for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background2_channel1_overallSyst_x_StatUncert for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooProduct::background2_channel1_overallSyst_x_Exp for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooHistFunc::background2_channel1_nominal for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon for import of RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) using existing copy of RooRealVar::binWidth_obs_x_channel1_2 for import of RooProdPdf::model_channel1
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
RooDataSet::AsimovData[obs_x_channel1,weight:binWeightAsimov] = 2 entries (230 weighted)
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset AsimovData
[#1] INFO:ObjectHandling -- RooWorkSpace::import(channel1) changing name of dataset from  AsimovData to asimovData
[#1] INFO:ObjectHandling -- RooWorkspace::import(channel1) importing dataset obsData

RooWorkspace(channel1) channel1 workspace contents

variables
---------
(Lumi,SigXsecOverSM,alpha_syst1,alpha_syst2,alpha_syst3,binWidth_obs_x_channel1_0,binWidth_obs_x_channel1_1,binWidth_obs_x_channel1_2,gamma_stat_channel1_bin_0,gamma_stat_channel1_bin_1,nom_alpha_syst1,nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1,nominalLumi,obs_x_channel1,weightVar)

p.d.f.s
-------
RooGaussian::alpha_syst1Constraint[ x=alpha_syst1 mean=nom_alpha_syst1 sigma=1 ] = 1
RooGaussian::alpha_syst2Constraint[ x=alpha_syst2 mean=nom_alpha_syst2 sigma=1 ] = 1
RooGaussian::alpha_syst3Constraint[ x=alpha_syst3 mean=nom_alpha_syst3 sigma=1 ] = 1
RooRealSumPdf::channel1_model[ binWidth_obs_x_channel1_0 * L_x_signal_channel1_overallSyst_x_Exp + binWidth_obs_x_channel1_1 * L_x_background1_channel1_overallSyst_x_StatUncert + binWidth_obs_x_channel1_2 * L_x_background2_channel1_overallSyst_x_StatUncert ] = 220/230
RooPoisson::gamma_stat_channel1_bin_0_constraint[ x=nom_gamma_stat_channel1_bin_0 mean=gamma_stat_channel1_bin_0_poisMean ] = 0.019943
RooPoisson::gamma_stat_channel1_bin_1_constraint[ x=nom_gamma_stat_channel1_bin_1 mean=gamma_stat_channel1_bin_1_poisMean ] = 0.039861
RooGaussian::lumiConstraint[ x=Lumi mean=nominalLumi sigma=0.1 ] = 1
RooProdPdf::model_channel1[ lumiConstraint * alpha_syst1Constraint * alpha_syst2Constraint * alpha_syst3Constraint * gamma_stat_channel1_bin_0_constraint * gamma_stat_channel1_bin_1_constraint * channel1_model(obs_x_channel1) ] = 0.174888

functions
--------
RooProduct::L_x_background1_channel1_overallSyst_x_StatUncert[ Lumi * background1_channel1_overallSyst_x_StatUncert ] = 0
RooProduct::L_x_background2_channel1_overallSyst_x_StatUncert[ Lumi * background2_channel1_overallSyst_x_StatUncert ] = 100
RooProduct::L_x_signal_channel1_overallSyst_x_Exp[ Lumi * signal_channel1_overallSyst_x_Exp ] = 10
RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon[ paramList=(alpha_syst2) ] = 1
RooHistFunc::background1_channel1_nominal[ depList=(obs_x_channel1) ] = 0
RooProduct::background1_channel1_overallSyst_x_Exp[ background1_channel1_nominal * background1_channel1_epsilon ] = 0
RooProduct::background1_channel1_overallSyst_x_StatUncert[ mc_stat_channel1 * background1_channel1_overallSyst_x_Exp ] = 0
RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon[ paramList=(alpha_syst3) ] = 1
RooHistFunc::background2_channel1_nominal[ depList=(obs_x_channel1) ] = 100
RooProduct::background2_channel1_overallSyst_x_Exp[ background2_channel1_nominal * background2_channel1_epsilon ] = 100
RooProduct::background2_channel1_overallSyst_x_StatUncert[ mc_stat_channel1 * background2_channel1_overallSyst_x_Exp ] = 100
RooProduct::gamma_stat_channel1_bin_0_poisMean[ gamma_stat_channel1_bin_0 * gamma_stat_channel1_bin_0_tau ] = 400
RooProduct::gamma_stat_channel1_bin_1_poisMean[ gamma_stat_channel1_bin_1 * gamma_stat_channel1_bin_1_tau ] = 100
ParamHistFunc::mc_stat_channel1[ ] = 1
RooStats::HistFactory::FlexibleInterpVar::signal_channel1_epsilon[ paramList=(alpha_syst1) ] = 1
RooHistFunc::signal_channel1_nominal[ depList=(obs_x_channel1) ] = 10
RooProduct::signal_channel1_overallNorm_x_sigma_epsilon[ SigXsecOverSM * signal_channel1_epsilon ] = 1
RooProduct::signal_channel1_overallSyst_x_Exp[ signal_channel1_nominal * signal_channel1_overallNorm_x_sigma_epsilon ] = 10

datasets
--------
RooDataSet::asimovData(obs_x_channel1)
RooDataSet::obsData(obs_x_channel1)

embedded datasets (in pdfs and functions)
-----------------------------------------
RooDataHist::signal_channel1nominalDHist(obs_x_channel1)
RooDataHist::background1_channel1nominalDHist(obs_x_channel1)
RooDataHist::background2_channel1nominalDHist(obs_x_channel1)

named sets
----------
ModelConfig_GlobalObservables:(nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
ModelConfig_Observables:(obs_x_channel1)
coefList:(binWidth_obs_x_channel1_0,binWidth_obs_x_channel1_1,binWidth_obs_x_channel1_2)
constraintTerms:(lumiConstraint,alpha_syst1Constraint,alpha_syst2Constraint,alpha_syst3Constraint,gamma_stat_channel1_bin_0_constraint,gamma_stat_channel1_bin_1_constraint)
globalObservables:(nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
likelihoodTerms:(channel1_model)
obsAndWeight:(weightVar,obs_x_channel1)
observables:(obs_x_channel1)
observablesSet:(obs_x_channel1)
shapeList:(L_x_signal_channel1_overallSyst_x_Exp,L_x_background1_channel1_overallSyst_x_StatUncert,L_x_background2_channel1_overallSyst_x_StatUncert)

generic objects
---------------
RooStats::ModelConfig::ModelConfig

Setting Parameter(s) of Interest as: SigXsecOverSM 

=== Using the following for ModelConfig ===
Observables:             RooArgSet:: = (obs_x_channel1)
Parameters of Interest:  RooArgSet:: = (SigXsecOverSM)
Nuisance Parameters:     RooArgSet:: = (alpha_syst2,alpha_syst3,gamma_stat_channel1_bin_0,gamma_stat_channel1_bin_1)
Global Observables:      RooArgSet:: = (nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
PDF:                     RooProdPdf::model_channel1[ lumiConstraint * alpha_syst1Constraint * alpha_syst2Constraint * alpha_syst3Constraint * gamma_stat_channel1_bin_0_constraint * gamma_stat_channel1_bin_1_constraint * channel1_model(obs_x_channel1) ] = 0.174888

Opening File to hold channel: ./results/example_channel1_ConstExample_model.root
About to write channel measurement to file
Writing sample: signal
Writing sample: background1
Writing sample: background2
Saved all histograms
Saved Measurement
Successfully wrote channel to file
full list of observables:
RooArgList:: = (obs_x_channel1)


------------------
 Entering combination
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_alpha_syst2
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_alpha_syst3
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_gamma_stat_channel1_bin_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_gamma_stat_channel1_bin_1
-----------------------------------------
create toy data for channel1
RooDataSet::AsimovData0[obs_x_channel1,channelCat,weight:binWeightAsimov] = 2 entries (230 weighted)
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset asimovDataFullModel
[#1] INFO:ObjectHandling -- RooWorkSpace::import(combined) changing name of dataset from  asimovDataFullModel to asimovData
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::obs_x_channel1
Merging data for channel channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset channel1
[#1] INFO:ObjectHandling -- RooWorkSpace::import(combined) changing name of dataset from  channel1 to obsData

RooWorkspace(combined) combined contents

variables
---------
(channelCat,nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1,obs_x_channel1,weightVar)

datasets
--------
RooDataSet::asimovData(obs_x_channel1,weightVar,channelCat)
RooDataSet::obsData(channelCat,obs_x_channel1)

named sets
----------
ModelConfig_GlobalObservables:(nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
ModelConfig_Observables:(obs_x_channel1,weightVar,channelCat)
globalObservables:(nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
observables:(obs_x_channel1,weightVar,channelCat)



----------------
 Importing combined model
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset signal_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset background1_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing dataset background2_channel1nominalDHist
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooCategory::channelCat for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProdPdf::model_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooGaussian::lumiConstraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooConstVar::0.1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::Lumi
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nominalLumi
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooGaussian::alpha_syst1Constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooConstVar::1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::alpha_syst1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::nom_alpha_syst1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooGaussian::alpha_syst2Constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::alpha_syst2
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::nom_alpha_syst2 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooGaussian::alpha_syst3Constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::alpha_syst3
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::nom_alpha_syst3 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooPoisson::gamma_stat_channel1_bin_0_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::nom_gamma_stat_channel1_bin_0 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::gamma_stat_channel1_bin_0_poisMean
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooConstVar::gamma_stat_channel1_bin_0_tau
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::gamma_stat_channel1_bin_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooPoisson::gamma_stat_channel1_bin_1_constraint
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::nom_gamma_stat_channel1_bin_1 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::gamma_stat_channel1_bin_1_poisMean
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooConstVar::gamma_stat_channel1_bin_1_tau
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::gamma_stat_channel1_bin_1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealSumPdf::channel1_model
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::L_x_signal_channel1_overallSyst_x_Exp
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::signal_channel1_overallSyst_x_Exp
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooHistFunc::signal_channel1_nominal
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) using existing copy of RooRealVar::obs_x_channel1 for import of RooSimultaneous::simPdf
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::signal_channel1_overallNorm_x_sigma_epsilon
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::SigXsecOverSM
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooStats::HistFactory::FlexibleInterpVar::signal_channel1_epsilon
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::binWidth_obs_x_channel1_0
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::L_x_background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::background1_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing ParamHistFunc::mc_stat_channel1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::background1_channel1_overallSyst_x_Exp
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooHistFunc::background1_channel1_nominal
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::binWidth_obs_x_channel1_1
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::L_x_background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::background2_channel1_overallSyst_x_StatUncert
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooProduct::background2_channel1_overallSyst_x_Exp
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooHistFunc::background2_channel1_nominal
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon
[#1] INFO:ObjectHandling -- RooWorkspace::import(combined) importing RooRealVar::binWidth_obs_x_channel1_2
setting Lumi constant
setting alpha_syst1 constant
Setting Parameter(s) of Interest as: SigXsecOverSM 

=== Using the following for ModelConfig ===
Observables:             RooArgSet:: = (obs_x_channel1,weightVar,channelCat)
Parameters of Interest:  RooArgSet:: = (SigXsecOverSM)
Nuisance Parameters:     RooArgSet:: = (alpha_syst2,alpha_syst3,gamma_stat_channel1_bin_0,gamma_stat_channel1_bin_1)
Global Observables:      RooArgSet:: = (nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
PDF:                     RooSimultaneous::simPdf[ indexCat=channelCat channel1=model_channel1 ] = 0.174888

Writing combined workspace to file: ./results/example_combined_ConstExample_model.root
Writing combined measurement to file: ./results/example_combined_ConstExample_model.root
Writing sample: signal
Writing sample: background1
Writing sample: background2
Saved all histograms
Saved Measurement


---------------------
Done creating example input
---------------------


Try to open the file

In [7]:
TFile *file = TFile::Open(filename);
RooFit v3.60 -- Developed by Wouter Verkerke and David Kirkby 
                Copyright (C) 2000-2013 NIKHEF, University of California & Stanford University
                All rights reserved, please read http://roofit.sourceforge.net/license.txt

If input file was specified byt not found, quit

In [8]:
if (!file) {
   cout << "StandardRooStatsDemoMacro: Input file " << filename << " is not found" << endl;
   return;
}

Now get the data and workspace

Get the workspace out of the file

In [9]:
RooWorkspace *w = (RooWorkspace *)file->Get(workspaceName);
if (!w) {
   cout << "workspace not found" << endl;
   return;
}

Get the modelconfig out of the file

In [10]:
ModelConfig *mc = (ModelConfig *)w->obj(modelConfigName);

Get the modelconfig out of the file

In [11]:
RooAbsData *data = w->data(dataName);

Make sure ingredients are found

In [12]:
if (!data || !mc) {
   w->Print();
   cout << "data or ModelConfig was not found" << endl;
   return;
}

Now get the POI for convenience you may want to adjust the range of your POI

In [13]:
RooRealVar *firstPOI = (RooRealVar *)mc->GetParametersOfInterest()->first();
/*  firstPOI->setMin(0);*/
/*  firstPOI->setMax(10);*/

Create and use the FeldmanCousins tool to find and plot the 95% confidence interval on the parameter of interest as specified in the model config REMEMBER, we will change the test statistic so this is NOT a Feldman-Cousins interval

In [14]:
FeldmanCousins fc(*data, *mc);
fc.SetConfidenceLevel(confidenceLevel);
fc.AdditionalNToysFactor(
   0.5); // degrade/improve sampling that defines confidence belt: in this case makes the example faster
/*  fc.UseAdaptiveSampling(true); // speed it up a bit, don't use for expected limits*/
fc.SetNBins(nPointsToScan); // set how many points per parameter of interest to scan
fc.CreateConfBelt(true);    // save the information in the belt for plotting

Feldman-Cousins is a unified limit by definition but the tool takes care of a few things for us like which values of the nuisance parameters should be used to generate toys. so let's just change the test statistic and realize this is no longer "Feldman-Cousins" but is a fully frequentist Neyman-Construction.

In [15]:
/*  ProfileLikelihoodTestStatModified onesided(*mc->GetPdf());*/
/*  fc.GetTestStatSampler()->SetTestStatistic(&onesided);*/
/* ((ToyMCSampler*) fc.GetTestStatSampler())->SetGenerateBinned(true); */
ToyMCSampler *toymcsampler = (ToyMCSampler *)fc.GetTestStatSampler();
ProfileLikelihoodTestStat *testStat = dynamic_cast<ProfileLikelihoodTestStat *>(toymcsampler->GetTestStatistic());
testStat->SetOneSided(true);
input_line_182:9:1: error: expected expression
[email protected]
^

Since this tool needs to throw toy mc the pdf needs to be extended or the tool needs to know how many entries in a dataset per pseudo experiment. In the 'number counting form' where the entries in the dataset are counts, and not values of discriminating variables, the datasets typically only have one entry and the PDF is not extended.

In [16]:
if (!mc->GetPdf()->canBeExtended()) {
   if (data->numEntries() == 1)
      fc.FluctuateNumDataEntries(false);
   else
      cout << "Not sure what to do about this model" << endl;
}

We can use proof to speed things along in parallel However, the test statistic has to be installed on the workers so either turn off PROOF or include the modified test statistic in your $ROOTSYS/roofit/roostats/inc directory, add the additional line to the LinkDef.h file, and recompile root.

In [17]:
if (useProof) {
   ProofConfig pc(*w, nworkers, "", false);
   toymcsampler->SetProofConfig(&pc); // enable proof
}

if (mc->GetGlobalObservables()) {
   cout << "will use global observables for unconditional ensemble" << endl;
   mc->GetGlobalObservables()->Print();
   toymcsampler->SetGlobalObservables(*mc->GetGlobalObservables());
}
will use global observables for unconditional ensemble
RooArgSet:: = (nom_alpha_syst2,nom_alpha_syst3,nom_gamma_stat_channel1_bin_0,nom_gamma_stat_channel1_bin_1)
input_line_185:2:3: error: use of undeclared identifier 'toymcsampler'
 (toymcsampler->SetGlobalObservables(*((*(class RooStats::ModelConfig **)0x7f95e259c060))->GetGlobalObservables()))
  ^
Error in <HandleInterpreterException>: Error evaluating expression (toymcsampler->SetGlobalObservables(*((*(class RooStats::ModelConfig **)0x7f95e259c060))->GetGlobalObservables())).
Execution of your code was aborted.

Now get the interval

In [18]:
PointSetInterval *interval = fc.GetInterval();
ConfidenceBelt *belt = fc.GetConfidenceBelt();
input_line_187:2:3: error: use of undeclared identifier 'fc'
 (fc.GetInterval())
  ^
Error in <HandleInterpreterException>: Error evaluating expression (fc.GetInterval()).
Execution of your code was aborted.

Print out the interval on the first parameter of interest

In [19]:
cout << "\n95% interval on " << firstPOI->GetName() << " is : [" << interval->LowerLimit(*firstPOI) << ", "
     << interval->UpperLimit(*firstPOI) << "] " << endl;
95% interval on SigXsecOverSM is : [
 Generating stack trace...
 0x00007f95dcf28605 in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) + 0x85 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcf2cea5 in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) + 0x1b5 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcf30b8a in cling::Interpreter::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*, cling::Transaction**, bool) + 0xfa from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcfd8e05 in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) + 0x1c5 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcea87ec in <unknown> from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dceb476c in <unknown> from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95db5715f9 in JupyROOTExecutorImpl(char const*) + 0x29 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/python2.7/libJupyROOT.so
 0x00007f95db571689 in JupyROOTExecutor + 0x9 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/python2.7/libJupyROOT.so
 0x00007f95e160cace in ffi_call_unix64 + 0x4c from /lib64/libffi.so.6
 0x00007f95e160c48f in ffi_call + 0x35f from /lib64/libffi.so.6
 0x00007f95e163f417 in _ctypes_callproc + 0x537 from /usr/lib64/python2.7/lib-dynload/_ctypes.so
 0x00007f95e1638d52 in <unknown> from /usr/lib64/python2.7/lib-dynload/_ctypes.so
 0x00007f95e2a94a87 in PyObject_Call + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6b5a1 in PyEval_EvalFrameEx + 0x3a51 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6f093 in PyEval_EvalFrameEx + 0x7543 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6f093 in PyEval_EvalFrameEx + 0x7543 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6f093 in PyEval_EvalFrameEx + 0x7543 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b711d2 in PyEval_EvalCodeEx + 0x712 from /lib64/libpython2.7.so.1.0
 0x00007f95e2aad92e in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e2a94a87 in PyObject_Call + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2aa044e in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e2a94a87 in PyObject_Call + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b67607 in PyEval_CallObjectWithKeywords + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b7db76 in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e2b7c0e8 in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e29ea4aa in <unknown> from /lib64/libpthread.so.0
 0x00007f95e278b3f3 in clone at :? from /lib64/libc.so.6
Error in <HandleInterpreterException>: Trying to dereference null pointer or trying to call routine taking non-null arguments.
Execution of your code was aborted.
input_line_188:2:70: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
 cout << "\n95% interval on " << firstPOI->GetName() << " is : [" << interval->LowerLimit(*firstPOI) << ", "
                                                                     ^~~~~~~~

Get observed ul and value of test statistic evaluated there

In [20]:
RooArgSet tmpPOI(*firstPOI);
double observedUL = interval->UpperLimit(*firstPOI);
firstPOI->setVal(observedUL);
double obsTSatObsUL = fc.GetTestStatSampler()->EvaluateTestStatistic(*data, tmpPOI);
 Generating stack trace...
 0x00007f95dcf8f529 in cling::IncrementalExecutor::runStaticInitializersOnce(cling::Transaction const&) const + 0x389 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcf2900a in cling::Interpreter::executeTransaction(cling::Transaction&) + 0x9a from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcf9d38d in cling::IncrementalParser::commitTransaction(llvm::PointerIntPair<cling::Transaction*, 2u, cling::IncrementalParser::EParseResult, llvm::PointerLikeTypeTraits<cling::Transaction*>, llvm::PointerIntPairInfo<cling::Transaction*, 2u, llvm::PointerLikeTypeTraits<cling::Transaction*> > >&, bool) at IncrementalParser.cpp:? from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcf9d4db in cling::IncrementalParser::Compile(llvm::StringRef, cling::CompilationOptions const&) + 0x5b from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcf2cd6a in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) + 0x7a from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcf30b8a in cling::Interpreter::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*, cling::Transaction**, bool) + 0xfa from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcfd8e05 in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) + 0x1c5 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcea87ec in <unknown> from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dceb476c in <unknown> from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95db5715f9 in JupyROOTExecutorImpl(char const*) + 0x29 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/python2.7/libJupyROOT.so
 0x00007f95db571689 in JupyROOTExecutor + 0x9 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/python2.7/libJupyROOT.so
 0x00007f95e160cace in ffi_call_unix64 + 0x4c from /lib64/libffi.so.6
 0x00007f95e160c48f in ffi_call + 0x35f from /lib64/libffi.so.6
 0x00007f95e163f417 in _ctypes_callproc + 0x537 from /usr/lib64/python2.7/lib-dynload/_ctypes.so
 0x00007f95e1638d52 in <unknown> from /usr/lib64/python2.7/lib-dynload/_ctypes.so
 0x00007f95e2a94a87 in PyObject_Call + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6b5a1 in PyEval_EvalFrameEx + 0x3a51 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6f093 in PyEval_EvalFrameEx + 0x7543 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6f093 in PyEval_EvalFrameEx + 0x7543 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6f093 in PyEval_EvalFrameEx + 0x7543 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b711d2 in PyEval_EvalCodeEx + 0x712 from /lib64/libpython2.7.so.1.0
 0x00007f95e2aad92e in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e2a94a87 in PyObject_Call + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2aa044e in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e2a94a87 in PyObject_Call + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b67607 in PyEval_CallObjectWithKeywords + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b7db76 in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e2b7c0e8 in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e29ea4aa in <unknown> from /lib64/libpthread.so.0
 0x00007f95e278b3f3 in clone at :? from /lib64/libc.so.6
Error in <HandleInterpreterException>: Trying to dereference null pointer or trying to call routine taking non-null arguments.
Execution of your code was aborted.
input_line_189:3:21: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
double observedUL = interval->UpperLimit(*firstPOI);
                    ^~~~~~~~

Ask the calculator which points were scanned

In [21]:
RooDataSet *parameterScan = (RooDataSet *)fc.GetPointsToScan();
RooArgSet *tmpPoint;
input_line_191:2:17: error: use of undeclared identifier 'fc'
 ((RooDataSet *)fc.GetPointsToScan())
                ^
Error in <HandleInterpreterException>: Error evaluating expression ((RooDataSet *)fc.GetPointsToScan()).
Execution of your code was aborted.

Make a histogram of parameter vs. threshold

In [22]:
TH1F *histOfThresholds =
   new TH1F("histOfThresholds", "", parameterScan->numEntries(), firstPOI->getMin(), firstPOI->getMax());
histOfThresholds->GetXaxis()->SetTitle(firstPOI->GetName());
histOfThresholds->GetYaxis()->SetTitle("Threshold");
 Generating stack trace...
 0x00007f95dcf8f529 in cling::IncrementalExecutor::runStaticInitializersOnce(cling::Transaction const&) const + 0x389 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcf2900a in cling::Interpreter::executeTransaction(cling::Transaction&) + 0x9a from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcf9d38d in cling::IncrementalParser::commitTransaction(llvm::PointerIntPair<cling::Transaction*, 2u, cling::IncrementalParser::EParseResult, llvm::PointerLikeTypeTraits<cling::Transaction*>, llvm::PointerIntPairInfo<cling::Transaction*, 2u, llvm::PointerLikeTypeTraits<cling::Transaction*> > >&, bool) at IncrementalParser.cpp:? from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcf9d4db in cling::IncrementalParser::Compile(llvm::StringRef, cling::CompilationOptions const&) + 0x5b from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcf2cd6a in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) + 0x7a from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcf30b8a in cling::Interpreter::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*, cling::Transaction**, bool) + 0xfa from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcfd8e05 in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) + 0x1c5 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcea87ec in <unknown> from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dceb476c in <unknown> from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95db5715f9 in JupyROOTExecutorImpl(char const*) + 0x29 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/python2.7/libJupyROOT.so
 0x00007f95db571689 in JupyROOTExecutor + 0x9 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/python2.7/libJupyROOT.so
 0x00007f95e160cace in ffi_call_unix64 + 0x4c from /lib64/libffi.so.6
 0x00007f95e160c48f in ffi_call + 0x35f from /lib64/libffi.so.6
 0x00007f95e163f417 in _ctypes_callproc + 0x537 from /usr/lib64/python2.7/lib-dynload/_ctypes.so
 0x00007f95e1638d52 in <unknown> from /usr/lib64/python2.7/lib-dynload/_ctypes.so
 0x00007f95e2a94a87 in PyObject_Call + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6b5a1 in PyEval_EvalFrameEx + 0x3a51 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6f093 in PyEval_EvalFrameEx + 0x7543 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6f093 in PyEval_EvalFrameEx + 0x7543 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6f093 in PyEval_EvalFrameEx + 0x7543 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b711d2 in PyEval_EvalCodeEx + 0x712 from /lib64/libpython2.7.so.1.0
 0x00007f95e2aad92e in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e2a94a87 in PyObject_Call + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2aa044e in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e2a94a87 in PyObject_Call + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b67607 in PyEval_CallObjectWithKeywords + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b7db76 in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e2b7c0e8 in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e29ea4aa in <unknown> from /lib64/libpthread.so.0
 0x00007f95e278b3f3 in clone at :? from /lib64/libc.so.6
Error in <HandleInterpreterException>: Trying to dereference null pointer or trying to call routine taking non-null arguments.
Execution of your code was aborted.
input_line_192:3:37: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
   new TH1F("histOfThresholds", "", parameterScan->numEntries(), firstPOI->getMin(), firstPOI->getMax());
                                    ^~~~~~~~~~~~~

Loop through the points that were tested and ask confidence belt what the upper/lower thresholds were. For FeldmanCousins, the lower cut off is always 0

In [23]:
for (Int_t i = 0; i < parameterScan->numEntries(); ++i) {
   tmpPoint = (RooArgSet *)parameterScan->get(i)->clone("temp");
   // cout <<"get threshold"<<endl;
   double arMax = belt->GetAcceptanceRegionMax(*tmpPoint);
   double poiVal = tmpPoint->getRealValue(firstPOI->GetName());
   histOfThresholds->Fill(poiVal, arMax);
}
TCanvas *c1 = new TCanvas();
c1->Divide(2);
c1->cd(1);
histOfThresholds->SetMinimum(0);
histOfThresholds->Draw();
c1->cd(2);
 Generating stack trace...
 0x00007f95b7eb00bd in <unknown function>
 0x00007f95dcf8f529 in cling::IncrementalExecutor::runStaticInitializersOnce(cling::Transaction const&) const + 0x389 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcf2900a in cling::Interpreter::executeTransaction(cling::Transaction&) + 0x9a from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcf9d38d in cling::IncrementalParser::commitTransaction(llvm::PointerIntPair<cling::Transaction*, 2u, cling::IncrementalParser::EParseResult, llvm::PointerLikeTypeTraits<cling::Transaction*>, llvm::PointerIntPairInfo<cling::Transaction*, 2u, llvm::PointerLikeTypeTraits<cling::Transaction*> > >&, bool) at IncrementalParser.cpp:? from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcf9d4db in cling::IncrementalParser::Compile(llvm::StringRef, cling::CompilationOptions const&) + 0x5b from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcf2cd6a in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) + 0x7a from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcf30b8a in cling::Interpreter::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*, cling::Transaction**, bool) + 0xfa from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcfd8e05 in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) + 0x1c5 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcea87ec in <unknown> from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dceb476c in <unknown> from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95db5715f9 in JupyROOTExecutorImpl(char const*) + 0x29 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/python2.7/libJupyROOT.so
 0x00007f95db571689 in JupyROOTExecutor + 0x9 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/python2.7/libJupyROOT.so
 0x00007f95e160cace in ffi_call_unix64 + 0x4c from /lib64/libffi.so.6
 0x00007f95e160c48f in ffi_call + 0x35f from /lib64/libffi.so.6
 0x00007f95e163f417 in _ctypes_callproc + 0x537 from /usr/lib64/python2.7/lib-dynload/_ctypes.so
 0x00007f95e1638d52 in <unknown> from /usr/lib64/python2.7/lib-dynload/_ctypes.so
 0x00007f95e2a94a87 in PyObject_Call + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6b5a1 in PyEval_EvalFrameEx + 0x3a51 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6f093 in PyEval_EvalFrameEx + 0x7543 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6f093 in PyEval_EvalFrameEx + 0x7543 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6f093 in PyEval_EvalFrameEx + 0x7543 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b711d2 in PyEval_EvalCodeEx + 0x712 from /lib64/libpython2.7.so.1.0
 0x00007f95e2aad92e in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e2a94a87 in PyObject_Call + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2aa044e in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e2a94a87 in PyObject_Call + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b67607 in PyEval_CallObjectWithKeywords + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b7db76 in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e2b7c0e8 in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e29ea4aa in <unknown> from /lib64/libpthread.so.0
 0x00007f95e278b3f3 in clone at :? from /lib64/libc.so.6
Error in <HandleInterpreterException>: Trying to dereference null pointer or trying to call routine taking non-null arguments.
Execution of your code was aborted.
input_line_193:2:24: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
 for (Int_t i = 0; i < parameterScan->numEntries(); ++i) {
                       ^~~~~~~~~~~~~

Now we generate the expected bands and power-constraint

First: find parameter point for mu=0, with conditional mles for nuisance parameters

In [24]:
RooAbsReal *nll = mc->GetPdf()->createNLL(*data);
RooAbsReal *profile = nll->createProfile(*mc->GetParametersOfInterest());
firstPOI->setVal(0.);
profile->getVal(); // this will do fit and set nuisance parameters to profiled values
RooArgSet *poiAndNuisance = new RooArgSet();
if (mc->GetNuisanceParameters())
   poiAndNuisance->add(*mc->GetNuisanceParameters());
poiAndNuisance->add(*mc->GetParametersOfInterest());
w->saveSnapshot("paramsToGenerateData", *poiAndNuisance);
RooArgSet *paramsToGenerateData = (RooArgSet *)poiAndNuisance->snapshot();
cout << "\nWill use these parameter points to generate pseudo data for bkg only" << endl;
paramsToGenerateData->Print("v");

RooArgSet unconditionalObs;
unconditionalObs.add(*mc->GetObservables());
unconditionalObs.add(*mc->GetGlobalObservables()); // comment this out for the original conditional ensemble

double CLb = 0;
double CLbinclusive = 0;
[#1] INFO:Minization -- p.d.f. provides expected number of events, including extended term in likelihood.
[#1] INFO:Minization -- createNLL: caching constraint set under name CONSTR_OF_PDF_simPdf_FOR_OBS_channelCat:obs_x_channel1 with 6 entries
[#1] INFO:Minization --  Including the following constraint terms in minimization: (lumiConstraint,alpha_syst1Constraint,alpha_syst2Constraint,alpha_syst3Constraint,gamma_stat_channel1_bin_0_constraint,gamma_stat_channel1_bin_1_constraint)
[#1] INFO:Minization -- RooProfileLL::evaluate(nll_simPdf_obsData_with_constr_Profile[SigXsecOverSM]) Creating instance of MINUIT
[#1] INFO:Fitting -- RooAddition::defaultErrorLevel(nll_simPdf_obsData_with_constr) Summation contains a RooNLLVar, using its error level
[#1] INFO:Minization -- RooProfileLL::evaluate(nll_simPdf_obsData_with_constr_Profile[SigXsecOverSM]) determining minimum likelihood for current configurations w.r.t all observable
RooAbsTestStatistic::initSimMode: creating slave calculator #0 for state channel1 (2 dataset entries)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
[#1] INFO:Fitting -- RooAbsTestStatistic::initSimMode: created 1 slave calculators.
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(gamma_stat_channel1_bin_0_constraint_Int[gamma_stat_channel1_bin_0]) using numeric integrator RooIntegrator1D to calculate Int(gamma_stat_channel1_bin_0)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(gamma_stat_channel1_bin_1_constraint_Int[gamma_stat_channel1_bin_1]) using numeric integrator RooIntegrator1D to calculate Int(gamma_stat_channel1_bin_1)
[#1] INFO:Minization -- RooProfileLL::evaluate(nll_simPdf_obsData_with_constr_Profile[SigXsecOverSM]) minimum found at (SigXsecOverSM=1.11601)
.
Will use these parameter points to generate pseudo data for bkg only
  1) 0x7f95a50e8200 RooRealVar::               alpha_syst2 = 0.71118 +/- 0.914106  L(-5 - 5)  "alpha_syst2"
  2) 0x7f95a509d430 RooRealVar::               alpha_syst3 = 0.261474 +/- 0.9291  L(-5 - 5)  "alpha_syst3"
  3) 0x7f95a52131e0 RooRealVar:: gamma_stat_channel1_bin_0 = 1.03677 +/- 0.0462899  L(0 - 1.25)  "gamma_stat_channel1_bin_0"
  4) 0x7f95a5270bb0 RooRealVar:: gamma_stat_channel1_bin_1 = 1.05319 +/- 0.0761204  L(0 - 1.5)  "gamma_stat_channel1_bin_1"
  5) 0x7f95a5264080 RooRealVar::             SigXsecOverSM = 0 +/- 0  L(0 - 3)  "SigXsecOverSM"

Now we generate background only and find distribution of upper limits

In [25]:
TH1F *histOfUL = new TH1F("histOfUL", "", 100, 0, firstPOI->getMax());
histOfUL->GetXaxis()->SetTitle("Upper Limit (background only)");
histOfUL->GetYaxis()->SetTitle("Entries");
for (int imc = 0; imc < nToyMC; ++imc) {

   // set parameters back to values for generating pseudo data
   //    cout << "\n get current nuis, set vals, print again" << endl;
   w->loadSnapshot("paramsToGenerateData");
   //    poiAndNuisance->Print("v");

   RooDataSet *toyData = 0;
   // now generate a toy dataset
   if (!mc->GetPdf()->canBeExtended()) {
      if (data->numEntries() == 1)
         toyData = mc->GetPdf()->generate(*mc->GetObservables(), 1);
      else
         cout << "Not sure what to do about this model" << endl;
   } else {
      //      cout << "generating extended dataset"<<endl;
      toyData = mc->GetPdf()->generate(*mc->GetObservables(), Extended());
   }

   // generate global observables
   // need to be careful for simpdf
   //    RooDataSet* globalData = mc->GetPdf()->generate(*mc->GetGlobalObservables(),1);

   RooSimultaneous *simPdf = dynamic_cast<RooSimultaneous *>(mc->GetPdf());
   if (!simPdf) {
      RooDataSet *one = mc->GetPdf()->generate(*mc->GetGlobalObservables(), 1);
      const RooArgSet *values = one->get();
      RooArgSet *allVars = mc->GetPdf()->getVariables();
      *allVars = *values;
      delete allVars;
      delete values;
      delete one;
   } else {

      // try fix for sim pdf
      TIterator *iter = simPdf->indexCat().typeIterator();
      RooCatType *tt = NULL;
      while ((tt = (RooCatType *)iter->Next())) {

         // Get pdf associated with state from simpdf
         RooAbsPdf *pdftmp = simPdf->getPdf(tt->GetName());

         // Generate only global variables defined by the pdf associated with this state
         RooArgSet *globtmp = pdftmp->getObservables(*mc->GetGlobalObservables());
         RooDataSet *tmp = pdftmp->generate(*globtmp, 1);

         // Transfer values to output placeholder
         *globtmp = *tmp->get(0);

         // Cleanup
         delete globtmp;
         delete tmp;
      }
   }

   //    globalData->Print("v");
   //    unconditionalObs = *globalData->get();
   //    mc->GetGlobalObservables()->Print("v");
   //    delete globalData;
   //    cout << "toy data = " << endl;
   //    toyData->get()->Print("v");

   // get test stat at observed UL in observed data
   firstPOI->setVal(observedUL);
   double toyTSatObsUL = fc.GetTestStatSampler()->EvaluateTestStatistic(*toyData, tmpPOI);
   //    toyData->get()->Print("v");
   //    cout <<"obsTSatObsUL " <<obsTSatObsUL << "toyTS " << toyTSatObsUL << endl;
   if (obsTSatObsUL < toyTSatObsUL) // not sure about <= part yet
      CLb += (1.) / nToyMC;
   if (obsTSatObsUL <= toyTSatObsUL) // not sure about <= part yet
      CLbinclusive += (1.) / nToyMC;

   // loop over points in belt to find upper limit for this toy data
   double thisUL = 0;
   for (Int_t i = 0; i < parameterScan->numEntries(); ++i) {
      tmpPoint = (RooArgSet *)parameterScan->get(i)->clone("temp");
      double arMax = belt->GetAcceptanceRegionMax(*tmpPoint);
      firstPOI->setVal(tmpPoint->getRealValue(firstPOI->GetName()));
      //   double thisTS = profile->getVal();
      double thisTS = fc.GetTestStatSampler()->EvaluateTestStatistic(*toyData, tmpPOI);

      //   cout << "poi = " << firstPOI->getVal()
      // << " max is " << arMax << " this profile = " << thisTS << endl;
      //      cout << "thisTS = " << thisTS<<endl;
      if (thisTS <= arMax) {
         thisUL = firstPOI->getVal();
      } else {
         break;
      }
   }

   /*
   // loop over points in belt to find upper limit for this toy data
   double thisUL = 0;
   for(Int_t i=0; i<histOfThresholds->GetNbinsX(); ++i){
      tmpPoint = (RooArgSet*) parameterScan->get(i)->clone("temp");
      cout <<"----------------  "<<i<<endl;
      tmpPoint->Print("v");
      cout << "from hist " << histOfThresholds->GetBinCenter(i+1) <<endl;
      double arMax = histOfThresholds->GetBinContent(i+1);
      // cout << " threhold from Hist = aMax " << arMax<<endl;
      // double arMax2 = belt->GetAcceptanceRegionMax(*tmpPoint);
      // cout << "from scan arMax2 = "<< arMax2 << endl; // not the same due to TH1F not TH1D
      // cout << "scan - hist" << arMax2-arMax << endl;
      firstPOI->setVal( histOfThresholds->GetBinCenter(i+1));
      //   double thisTS = profile->getVal();
      double thisTS = fc.GetTestStatSampler()->EvaluateTestStatistic(*toyData,tmpPOI);

      //   cout << "poi = " << firstPOI->getVal()
      // << " max is " << arMax << " this profile = " << thisTS << endl;
      //      cout << "thisTS = " << thisTS<<endl;

      // NOTE: need to add a small epsilon term for single precision vs. double precision
      if(thisTS<=arMax + 1e-7){
         thisUL = firstPOI->getVal();
      } else{
         break;
      }
   }
   */

   histOfUL->Fill(thisUL);

   // for few events, data is often the same, and UL is often the same
   //    cout << "thisUL = " << thisUL<<endl;

   delete toyData;
}
histOfUL->Draw();
c1->SaveAs("one-sided_upper_limit_output.pdf");
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
input_line_215:2:3: error: use of undeclared identifier 'fc'
 (fc.GetTestStatSampler()->EvaluateTestStatistic(*((*(class RooDataSet **)0x7f95b6628b78)), ((*(class RooArgSet*)0x7f95e259c088))))
  ^
Error in <HandleInterpreterException>: Error evaluating expression (fc.GetTestStatSampler()->EvaluateTestStatistic(*((*(class RooDataSet **)0x7f95b6628b78)), ((*(class RooArgSet*)0x7f95e259c088)))).
Execution of your code was aborted.

If you want to see a plot of the sampling distribution for a particular scan point:

In [26]:
/*
SamplingDistPlot sampPlot;
int indexInScan = 0;
tmpPoint = (RooArgSet*) parameterScan->get(indexInScan)->clone("temp");
firstPOI->setVal( tmpPoint->getRealValue(firstPOI->GetName()) );
toymcsampler->SetParametersForTestStat(tmpPOI);
SamplingDistribution* samp = toymcsampler->GetSamplingDistribution(*tmpPoint);
sampPlot.AddSamplingDistribution(samp);
sampPlot.Draw();
   */

Now find bands and power constraint

In [27]:
Double_t *bins = histOfUL->GetIntegral();
TH1F *cumulative = (TH1F *)histOfUL->Clone("cumulative");
cumulative->SetContent(bins);
double band2sigDown, band1sigDown, bandMedian, band1sigUp, band2sigUp;
for (int i = 1; i <= cumulative->GetNbinsX(); ++i) {
   if (bins[i] < RooStats::SignificanceToPValue(2))
      band2sigDown = cumulative->GetBinCenter(i);
   if (bins[i] < RooStats::SignificanceToPValue(1))
      band1sigDown = cumulative->GetBinCenter(i);
   if (bins[i] < 0.5)
      bandMedian = cumulative->GetBinCenter(i);
   if (bins[i] < RooStats::SignificanceToPValue(-1))
      band1sigUp = cumulative->GetBinCenter(i);
   if (bins[i] < RooStats::SignificanceToPValue(-2))
      band2sigUp = cumulative->GetBinCenter(i);
}
cout << "-2 sigma  band " << band2sigDown << endl;
cout << "-1 sigma  band " << band1sigDown << " [Power Constraint)]" << endl;
cout << "median of band " << bandMedian << endl;
cout << "+1 sigma  band " << band1sigUp << endl;
cout << "+2 sigma  band " << band2sigUp << endl;
-2 sigma  band 2.985
-1 sigma  band 2.985 [Power Constraint)]
median of band 2.985
+1 sigma  band 2.985
+2 sigma  band 2.985
Error in <TH1F::ComputeIntegral>: Integral = zero

Print out the interval on the first parameter of interest

In [28]:
cout << "\nobserved 95% upper-limit " << interval->UpperLimit(*firstPOI) << endl;
cout << "CLb strict [P(toy>obs|0)] for observed 95% upper-limit " << CLb << endl;
cout << "CLb inclusive [P(toy>=obs|0)] for observed 95% upper-limit " << CLbinclusive << endl;

delete profile;
delete nll;
observed 95% upper-limit 
 Generating stack trace...
 0x00007f95dcf28605 in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) + 0x85 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcf2cea5 in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) + 0x1b5 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcf30b8a in cling::Interpreter::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*, cling::Transaction**, bool) + 0xfa from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcfd8e05 in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) + 0x1c5 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dcea87ec in <unknown> from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95dceb476c in <unknown> from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/libCling.so
 0x00007f95db5715f9 in JupyROOTExecutorImpl(char const*) + 0x29 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/python2.7/libJupyROOT.so
 0x00007f95db571689 in JupyROOTExecutor + 0x9 from /mnt/build/workspace/root-makedoc/rootspi/rdoc/src/master.build/lib/python2.7/libJupyROOT.so
 0x00007f95e160cace in ffi_call_unix64 + 0x4c from /lib64/libffi.so.6
 0x00007f95e160c48f in ffi_call + 0x35f from /lib64/libffi.so.6
 0x00007f95e163f417 in _ctypes_callproc + 0x537 from /usr/lib64/python2.7/lib-dynload/_ctypes.so
 0x00007f95e1638d52 in <unknown> from /usr/lib64/python2.7/lib-dynload/_ctypes.so
 0x00007f95e2a94a87 in PyObject_Call + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6b5a1 in PyEval_EvalFrameEx + 0x3a51 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6f093 in PyEval_EvalFrameEx + 0x7543 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6f093 in PyEval_EvalFrameEx + 0x7543 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b6f093 in PyEval_EvalFrameEx + 0x7543 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b711d2 in PyEval_EvalCodeEx + 0x712 from /lib64/libpython2.7.so.1.0
 0x00007f95e2aad92e in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e2a94a87 in PyObject_Call + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2aa044e in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e2a94a87 in PyObject_Call + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b67607 in PyEval_CallObjectWithKeywords + 0x47 from /lib64/libpython2.7.so.1.0
 0x00007f95e2b7db76 in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e2b7c0e8 in <unknown> from /lib64/libpython2.7.so.1.0
 0x00007f95e29ea4aa in <unknown> from /lib64/libpthread.so.0
 0x00007f95e278b3f3 in clone at :? from /lib64/libc.so.6
Error in <HandleInterpreterException>: Trying to dereference null pointer or trying to call routine taking non-null arguments.
Execution of your code was aborted.
input_line_218:2:43: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
 cout << "\nobserved 95% upper-limit " << interval->UpperLimit(*firstPOI) << endl;
                                          ^~~~~~~~

Draw all canvases

In [29]:
gROOT->GetListOfCanvases()->Draw()