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
}
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
[#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: 0x55be799b48c0
statErrorConfig:
RelErrorThreshold: 0.05 ConstraintType: Poisson
Samples:
Name: signal Channel: channel1 NormalizeByTheory: True StatErrorActivate: False
InputFile: ./data/example.root HistName: signal HistoPath: HistoAddress: 0x55be79228830
Name: background1 Channel: channel1 NormalizeByTheory: True StatErrorActivate: False
InputFile: ./data/example.root HistName: background1 HistoPath: HistoAddress: 0x55be799d4490
StatError Activate: 1 InputFile: ./data/example.root HistName: background1_statUncert HistoPath: HistoAddress: 0x55be79ea0e10
Name: background2 Channel: channel1 NormalizeByTheory: True StatErrorActivate: False
InputFile: ./data/example.root HistName: background2 HistoPath: HistoAddress: 0x55be79ea17e0
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 = [1,0,10]
[#2] INFO:HistFactory -- lumi Error str = nominalLumi[1,0,2],0.1
[#2] INFO:HistFactory -- making normFactor: SigXsecOverSM
[#2] INFO:HistFactory -- signal_channel1 has no variation histograms
[#2] INFO:HistFactory -- processing hist signal
[#2] INFO:HistFactory -- background1_channel1 has no variation histograms
[#2] INFO:HistFactory -- processing hist background1
[#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 -- background2_channel1 has no variation histograms
[#2] INFO:HistFactory -- processing hist background2
[#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)
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,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
[#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: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] 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 -- RooMinimizer::optimizeConst: deactivating const optimization
[#2] INFO:HistFactory -- 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)
[#2] INFO:HistFactory -- full list of observables:
[#2] INFO:HistFactory -- (obs_x_channel1)[#2] PROGRESS:HistFactory --
-----------------------------------------
Entering combination
-----------------------------------------
[#2] PROGRESS:HistFactory --
-----------------------------------------
create toy data for channelCat[channel1]
-----------------------------------------
RooDataSet::AsimovData0[obs_x_channel1,channelCat,weight:binWeightAsimov] = 2 entries (230 weighted)
[#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::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)
[#2] PROGRESS:HistFactory --
-----------------------------------------
Importing combined model
-----------------------------------------
[#2] INFO:HistFactory -- setting alpha_syst1 constant
[#2] INFO:HistFactory -- setting Lumi constant
[#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.174888
[#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: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)
[#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 -- RooMinimizer::optimizeConst: deactivating const optimization
[#2] INFO:HistFactory -- 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)
Author
George Lewis

Definition in file hf001_example.C.

TSystem::AccessPathName
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:1294
RooFit::HistFactory
@ HistFactory
Definition: RooGlobalFunc.h:69
TFile.h
MakeModelAndMeasurementsFast.h
TROOT.h
Measurement.h
RooStats::HistFactory::MakeModelAndMeasurementFast
RooWorkspace * MakeModelAndMeasurementFast(RooStats::HistFactory::Measurement &measurement)
Definition: MakeModelAndMeasurementsFast.cxx:104
gSystem
R__EXTERN TSystem * gSystem
Definition: TSystem.h:559
RooStats
Definition: Asimov.h:19
gROOT
#define gROOT
Definition: TROOT.h:406