Logo ROOT  
Reference Guide
hf001_example.C File Reference

Detailed Description

A ROOT script demonstrating an example of writing a HistFactory model using c++ only.

#include "TFile.h"
#include "TROOT.h"
using namespace RooStats;
using namespace HistFactory;
void hf001_example() {
std::string InputFile = "./data/example.root";
// in case the file is not found
bool bfile = gSystem->AccessPathName(InputFile.c_str());
if (bfile) {
std::cout << "Input file is not found - run prepareHistFactory script " << std::endl;
gROOT->ProcessLine(".! prepareHistFactory .");
bfile = gSystem->AccessPathName(InputFile.c_str());
if (bfile) {
std::cout << "Still no " << InputFile << ", giving up.\n";
exit(1);
}
}
// Create the measurement
Measurement meas("meas", "meas");
meas.SetOutputFilePrefix( "./results/example_UsingC" );
meas.SetPOI( "SigXsecOverSM" );
meas.AddConstantParam("alpha_syst1");
meas.AddConstantParam("Lumi");
meas.SetLumi( 1.0 );
meas.SetLumiRelErr( 0.10 );
meas.SetExportOnly( false );
meas.SetBinHigh( 2 );
// Create a channel
Channel chan( "channel1" );
chan.SetData( "data", InputFile );
chan.SetStatErrorConfig( 0.05, "Poisson" );
// Now, create some samples
// Create the signal sample
Sample signal( "signal", "signal", InputFile );
signal.AddOverallSys( "syst1", 0.95, 1.05 );
signal.AddNormFactor( "SigXsecOverSM", 1, 0, 3 );
chan.AddSample( signal );
// Background 1
Sample background1( "background1", "background1", InputFile );
background1.ActivateStatError( "background1_statUncert", InputFile );
background1.AddOverallSys( "syst2", 0.95, 1.05 );
chan.AddSample( background1 );
// Background 1
Sample background2( "background2", "background2", InputFile );
background2.ActivateStatError();
background2.AddOverallSys( "syst3", 0.95, 1.05 );
chan.AddSample( background2 );
// Done with this channel
// Add it to the measurement:
meas.AddChannel( chan );
// Collect the histograms from their files,
// print some output,
meas.CollectHistograms();
meas.PrintTree();
// One can print XML code to an
// output directory:
// meas.PrintXML( "xmlFromCCode", meas.GetOutputFilePrefix() );
// Now, do the measurement
}
#define gROOT
Definition: TROOT.h:404
R__EXTERN TSystem * gSystem
Definition: TSystem.h:559
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
Definition: TSystem.cxx:1296
RooWorkspace * MakeModelAndMeasurementFast(RooStats::HistFactory::Measurement &measurement, HistoToWorkspaceFactoryFast::Configuration const &cfg={})
@ HistFactory
Definition: RooGlobalFunc.h:65
Namespace for the RooStats classes.
Definition: Asimov.h:19
Input file is not found - run prepareHistFactory script
Using etcdir /home/sftnight/build/workspace/root-makedoc-master/rootspi/rdoc/src/master.build/etc
Using tutorials dir /home/sftnight/build/workspace/root-makedoc-master/rootspi/rdoc/src/master.build/tutorials
HistFactory workplace will be created in: .
Creating directory structure...
Copying skeleton configuration files...
------------------------------------------------------------------
| Welcome to ROOT 6.27/01 https://root.cern |
| (c) 1995-2022, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for linuxx8664gcc on Jun 26 2022, 06:57:40 |
| From heads/master@v6-25-02-1590-g09e59159f2 |
| With c++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 |
| Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------------
Done!
[#2] PROGRESS:HistFactory -- Getting histogram ./data/example.root:/data
[#2] INFO:HistFactory -- Opened input file: ./data/example.root:
[#2] PROGRESS:HistFactory -- Getting histogram ./data/example.root:/signal
[#2] PROGRESS:HistFactory -- Getting histogram ./data/example.root:/background1
[#2] PROGRESS:HistFactory -- Getting histogram ./data/example.root:/background1_statUncert
[#2] PROGRESS:HistFactory -- Getting histogram ./data/example.root:/background2
Measurement Name: meas OutputFilePrefix: ./results/example_UsingC POI: SigXsecOverSM Lumi: 1 LumiRelErr: 0.1 BinLow: 0 BinHigh: 2 ExportOnly: 0
Constant Params: alpha_syst1 Lumi
Channels:
Channel Name: channel1 InputFile:
Data:
InputFile: ./data/example.root HistoName: data HistoPath: HistoAddress: 0x56008fe908a0
statErrorConfig:
RelErrorThreshold: 0.05 ConstraintType: Poisson
Samples:
Name: signal Channel: channel1 NormalizeByTheory: True StatErrorActivate: False
InputFile: ./data/example.root HistName: signal HistoPath: HistoAddress: 0x560091412bb0
Name: background1 Channel: channel1 NormalizeByTheory: True StatErrorActivate: False
InputFile: ./data/example.root HistName: background1 HistoPath: HistoAddress: 0x560091413140
StatError Activate: 1 InputFile: ./data/example.root HistName: background1_statUncert HistoPath: HistoAddress: 0x560091413ac0
Name: background2 Channel: channel1 NormalizeByTheory: True StatErrorActivate: False
InputFile: ./data/example.root HistName: background2 HistoPath: HistoAddress: 0x560091414440
StatError Activate: 1 InputFile: ./data/example.root HistName: HistoPath: HistoAddress: 0
End of Channel channel1
[#2] INFO:HistFactory -- End Measurement: meas
[#2] INFO:HistFactory -- Making Model and Measurements (Fast) for measurement: meas
[#2] INFO:HistFactory -- using lumi = 1 and lumiError = 0.1 including bins between 0 and 2
[#2] INFO:HistFactory -- fixing the following parameters:
alpha_syst1
Lumi
[#2] INFO:HistFactory -- Creating the output file: ./results/example_UsingC_meas.root
[#2] INFO:HistFactory -- Creating the table file: ./results/example_UsingC_results.table
[#2] INFO:HistFactory -- Creating the HistoToWorkspaceFactoryFast factory
[#2] INFO:HistFactory -- Setting preprocess functions
[#2] PROGRESS:HistFactory -- Starting to process channel: channel1
[#2] PROGRESS:HistFactory --
-----------------------------------------
Starting to process 'channel1' channel with 1 observables
-----------------------------------------
[#2] INFO:HistFactory -- lumi str = Lumi[1,0,10]
[#2] INFO:HistFactory -- lumi Error str = nominalLumi[1,0,2],0.1
[#2] INFO:HistFactory -- making normFactor: SigXsecOverSM
[#2] INFO:HistFactory -- processing hist signal
[#2] INFO:HistFactory -- signal_channel1 has no variation histograms
[#2] INFO:HistFactory -- processing hist background1
[#2] INFO:HistFactory -- background1_channel1 has no variation histograms
[#2] INFO:HistFactory -- Sample: background1 to be included in Stat Error for channel channel1
[#2] INFO:HistFactory -- Using external histogram for Stat Errors for Channel: channel1 Sample: background1 Error Histogram: background1_statUncert
[#2] INFO:HistFactory -- processing hist background2
[#2] INFO:HistFactory -- background2_channel1 has no variation histograms
[#2] INFO:HistFactory -- Sample: background2 to be included in Stat Error for channel channel1
[#2] INFO:HistFactory -- Making Statistical Uncertainty Hist for Channel: channel1 Sample: background2
[#2] INFO:HistFactory -- Making Total Uncertainty for bin 1 Error = 5 CentralVal = 100 RelativeError = 0.05
[#2] INFO:HistFactory -- Making Total Uncertainty for bin 2 Error = 10 CentralVal = 100 RelativeError = 0.1
[#2] INFO:HistFactory -- About to create Constraint Terms from: mc_stat_channel1 params: (gamma_stat_channel1_bin_0,gamma_stat_channel1_bin_1)
[#2] INFO:HistFactory -- Using Poisson StatErrors in channel: channel1
[#2] INFO:HistFactory -- Creating constraint for: gamma_stat_channel1_bin_0. Type of constraint: 1
[#2] INFO:HistFactory -- Creating constraint for: gamma_stat_channel1_bin_1. Type of constraint: 1
[#2] PROGRESS:HistFactory --
-----------------------------------------
import model into workspace
-----------------------------------------
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
[#1] INFO:Fitting -- using CPU computation library compiled with -mavx2
RooDataSet::AsimovData[obs_x_channel1,weight:binWeightAsimov] = 2 entries (230 weighted)
RooWorkspace(channel1) channel1 workspace contents
variables
---------
(Lumi,SigXsecOverSM,alpha_syst1,alpha_syst2,alpha_syst3,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[ signal_channel1_scaleFactors * signal_channel1_shapes + background1_channel1_scaleFactors * background1_channel1_shapes + background2_channel1_scaleFactors * background2_channel1_shapes ] = 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
--------
RooHistFunc::background1_channel1_Hist_alphanominal[ depList=(obs_x_channel1) ] = 0
RooStats::HistFactory::FlexibleInterpVar::background1_channel1_epsilon[ paramList=(alpha_syst2) ] = 1
RooProduct::background1_channel1_scaleFactors[ background1_channel1_epsilon * Lumi ] = 1
RooProduct::background1_channel1_shapes[ background1_channel1_Hist_alphanominal * mc_stat_channel1 * channel1_model_binWidth ] = 0
RooHistFunc::background2_channel1_Hist_alphanominal[ depList=(obs_x_channel1) ] = 100
RooStats::HistFactory::FlexibleInterpVar::background2_channel1_epsilon[ paramList=(alpha_syst3) ] = 1
RooProduct::background2_channel1_scaleFactors[ background2_channel1_epsilon * Lumi ] = 1
RooProduct::background2_channel1_shapes[ background2_channel1_Hist_alphanominal * mc_stat_channel1 * channel1_model_binWidth ] = 200
RooBinWidthFunction::channel1_model_binWidth[ HistFuncForBinWidth=signal_channel1_Hist_alphanominal ] = 2
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
RooHistFunc::signal_channel1_Hist_alphanominal[ depList=(obs_x_channel1) ] = 10
RooStats::HistFactory::FlexibleInterpVar::signal_channel1_epsilon[ paramList=(alpha_syst1) ] = 1
RooProduct::signal_channel1_scaleFactors[ signal_channel1_epsilon * SigXsecOverSM * Lumi ] = 1
RooProduct::signal_channel1_shapes[ signal_channel1_Hist_alphanominal * channel1_model_binWidth ] = 20
datasets
--------
RooDataSet::asimovData(obs_x_channel1)
RooDataSet::obsData(obs_x_channel1)
embedded datasets (in pdfs and functions)
-----------------------------------------
RooDataHist::signal_channel1_Hist_alphanominalDHist(obs_x_channel1)
RooDataHist::background1_channel1_Hist_alphanominalDHist(obs_x_channel1)
RooDataHist::background2_channel1_Hist_alphanominalDHist(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)
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)
generic objects
---------------
RooStats::ModelConfig::ModelConfig
[#2] INFO:HistFactory -- 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
[#2] INFO:HistFactory -- Opening File to hold channel: ./results/example_UsingC_channel1_meas_model.root
[#2] INFO:HistFactory -- About to write channel measurement to file
[#2] PROGRESS:HistFactory -- Writing sample: signal
[#2] PROGRESS:HistFactory -- Writing sample: background1
[#2] PROGRESS:HistFactory -- Writing sample: background2
[#2] PROGRESS:HistFactory -- Saved all histograms
[#2] PROGRESS:HistFactory -- Saved Measurement
[#2] PROGRESS:HistFactory -- Successfully wrote channel to file
[#2] PROGRESS:HistFactory --
---------------
Doing channel1 Fit
---------------
[#1] INFO:Minimization -- p.d.f. provides expected number of events, including extended term in likelihood.
[#1] INFO:Minimization -- createConstraintTerm: caching constraint set under name CACHE_CONSTR_OF_PDF_model_channel1_FOR_OBS_obs_x_channel1 with 6 entries
[#1] INFO:Minimization -- 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:Minimization -- The global observables are not defined , normalize constraints with respect to the parameters (Lumi,SigXsecOverSM,alpha_syst1,alpha_syst2,alpha_syst3,gamma_stat_channel1_bin_0,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:Fitting -- RooAddition::defaultErrorLevel(nll_model_channel1_obsData_with_constr) Summation contains a RooNLLVar, using its error level
[#1] INFO:Minimization -- RooAbsMinimizerFcn::setOptimizeConst: activating const optimization
[#1] INFO:Minimization -- The following expressions have been identified as constant and will be precalculated and cached: (signal_channel1_shapes,background1_channel1_Hist_alphanominal,channel1_model_binWidth,background2_channel1_Hist_alphanominal)
[#1] INFO:Minimization -- The following expressions will be evaluated in cache-and-track mode: (mc_stat_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:Minimization -- RooAbsMinimizerFcn::setOptimizeConst: deactivating const optimization
[#2] INFO:HistFactory -- printing results for SigXsecOverSM at 1.11502 high -0.596829 low 0.61159
[#1] INFO:Minimization -- p.d.f. provides expected number of events, including extended term in likelihood.
[#1] INFO:Minimization -- createConstraintTerm picked up cached constraints from workspace with 6 entries
[#1] INFO:Minimization -- 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:Minimization -- The global observables are not defined , normalize constraints with respect to the parameters (Lumi,SigXsecOverSM,alpha_syst1,alpha_syst2,alpha_syst3,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)
[#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(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:Minimization -- 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:Minimization -- 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:Minimization -- 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)
[#2] INFO:HistFactory -- full list of observables:
(obs_x_channel1)
[#2] PROGRESS:HistFactory --
-----------------------------------------
Entering combination
-----------------------------------------
[#2] PROGRESS:HistFactory -- Merging data for channel channel1
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::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)
[#2] PROGRESS:HistFactory --
-----------------------------------------
Importing combined model
-----------------------------------------
[#2] INFO:HistFactory -- setting alpha_syst1 constant
[#2] INFO:HistFactory -- setting Lumi constant
[#2] PROGRESS:HistFactory --
-----------------------------------------
create toy data for channelCat[channel1]
-----------------------------------------
[#1] INFO:NumericIntegration -- RooRealIntegral::init(channel1_model_Int[obs_x_channel1]) using numeric integrator RooBinIntegrator to calculate Int(obs_x_channel1)
RooDataSet::AsimovData0[obs_x_channel1,channelCat,weight:binWeightAsimov] = 2 entries (230 weighted)
[#2] INFO:HistFactory -- 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.190787
[#2] PROGRESS:HistFactory -- Writing combined workspace to file: ./results/example_UsingC_combined_meas_model.root
[#2] PROGRESS:HistFactory -- Writing combined measurement to file: ./results/example_UsingC_combined_meas_model.root
[#2] PROGRESS:HistFactory -- Writing sample: signal
[#2] PROGRESS:HistFactory -- Writing sample: background1
[#2] PROGRESS:HistFactory -- Writing sample: background2
[#2] PROGRESS:HistFactory -- Saved all histograms
[#2] PROGRESS:HistFactory -- Saved Measurement
[#2] PROGRESS:HistFactory --
---------------
Doing combined Fit
---------------
[#1] INFO:Minimization -- p.d.f. provides expected number of events, including extended term in likelihood.
[#1] INFO:Minimization -- createConstraintTerm: caching constraint set under name CACHE_CONSTR_OF_PDF_simPdf_FOR_OBS_channelCat:obs_x_channel1 with 6 entries
[#1] INFO:Minimization -- 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:Minimization -- The global observables are not defined , normalize constraints with respect to the parameters (Lumi,SigXsecOverSM,alpha_syst1,alpha_syst2,alpha_syst3,gamma_stat_channel1_bin_0,gamma_stat_channel1_bin_1)
[#1] INFO:Fitting -- RooAddition::defaultErrorLevel(nll_simPdf_obsData_with_constr) Summation contains a RooNLLVar, using its error level
[#1] INFO:Minimization -- RooAbsMinimizerFcn::setOptimizeConst: activating const optimization
RooAbsTestStatistic::initSimMode: creating slave calculator #0 for state channel1 (2 dataset entries)
[#1] INFO:Fitting -- RooAbsTestStatistic::initSimMode: created 1 slave calculators.
[#1] INFO:Minimization -- The following expressions have been identified as constant and will be precalculated and cached: (signal_channel1_shapes,background1_channel1_Hist_alphanominal,channel1_model_binWidth,background2_channel1_Hist_alphanominal)
[#1] INFO:Minimization -- The following expressions will be evaluated in cache-and-track mode: (mc_stat_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:Minimization -- RooAbsMinimizerFcn::setOptimizeConst: deactivating const optimization
[#2] INFO:HistFactory -- printing results for SigXsecOverSM at 1.11503 high -0.596843 low 0.611576
[#1] INFO:Minimization -- p.d.f. provides expected number of events, including extended term in likelihood.
[#1] INFO:Minimization -- createConstraintTerm picked up cached constraints from workspace with 6 entries
[#1] INFO:Minimization -- 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:Minimization -- The global observables are not defined , normalize constraints with respect to the parameters (Lumi,SigXsecOverSM,alpha_syst1,alpha_syst2,alpha_syst3,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)
RooAbsTestStatistic::initSimMode: creating slave calculator #0 for state channel1 (2 dataset entries)
[#1] INFO:Fitting -- RooAbsTestStatistic::initSimMode: created 1 slave calculators.
[#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:Minimization -- 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:Minimization -- 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:Fitting -- RooAbsTestStatistic::initSimMode: created 1 slave calculators.
[#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:Minimization -- RooProfileLL::evaluate(nll_simPdf_obsData_with_constr_Profile[SigXsecOverSM]) minimum found at (SigXsecOverSM=1.1149)
..........................................................................................................................................................................................................
RooAbsTestStatistic::initSimMode: creating slave calculator #0 for state channel1 (2 dataset entries)
[#1] INFO:Fitting -- RooAbsTestStatistic::initSimMode: created 1 slave calculators.
[#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)
Author
George Lewis

Definition in file hf001_example.C.