17using namespace HistFactory;
22 std::string InputFile =
"./data/example.root";
26 std::cout <<
"Input file is not found - run prepareHistFactory script " << std::endl;
27 gROOT->ProcessLine(
".! prepareHistFactory .");
30 std::cout <<
"Still no " << InputFile <<
", giving up.\n";
36 Measurement meas(
"meas",
"meas");
38 meas.SetOutputFilePrefix(
"./results/example_UsingC" );
39 meas.SetPOI(
"SigXsecOverSM" );
40 meas.AddConstantParam(
"alpha_syst1");
41 meas.AddConstantParam(
"Lumi");
44 meas.SetLumiRelErr( 0.10 );
45 meas.SetExportOnly(
false );
50 Channel chan(
"channel1" );
51 chan.SetData(
"data", InputFile );
52 chan.SetStatErrorConfig( 0.05,
"Poisson" );
59 Sample signal(
"signal",
"signal", InputFile );
60 signal.AddOverallSys(
"syst1", 0.95, 1.05 );
61 signal.AddNormFactor(
"SigXsecOverSM", 1, 0, 3 );
62 chan.AddSample( signal );
65 Sample background1(
"background1",
"background1", InputFile );
66 background1.ActivateStatError(
"background1_statUncert", InputFile );
67 background1.AddOverallSys(
"syst2", 0.95, 1.05 );
68 chan.AddSample( background1 );
72 Sample background2(
"background2",
"background2", InputFile );
73 background2.ActivateStatError();
74 background2.AddOverallSys(
"syst3", 0.95, 1.05 );
75 chan.AddSample( background2 );
80 meas.AddChannel( chan );
84 meas.CollectHistograms();
R__EXTERN TSystem * gSystem
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
RooWorkspace * MakeModelAndMeasurementFast(RooStats::HistFactory::Measurement &measurement)
Namespace for the RooStats classes.