7 using namespace RooStats;
8 using namespace HistFactory;
29 std::string InputFile =
"./data/example.root";
33 std::cout <<
"Input file is not found - run prepareHistFactory script " << std::endl;
34 gROOT->ProcessLine(
".! prepareHistFactory .");
37 std::cout <<
"Still no " << InputFile <<
", giving up.\n";
43 Measurement meas(
"meas",
"meas");
45 meas.SetOutputFilePrefix(
"./results/example_UsingC" );
46 meas.SetPOI(
"SigXsecOverSM" );
47 meas.AddConstantParam(
"alpha_syst1");
48 meas.AddConstantParam(
"Lumi");
51 meas.SetLumiRelErr( 0.10 );
52 meas.SetExportOnly(
false );
57 Channel chan(
"channel1" );
58 chan.SetData(
"data", InputFile );
59 chan.SetStatErrorConfig( 0.05,
"Poisson" );
66 Sample signal(
"signal",
"signal", InputFile );
67 signal.AddOverallSys(
"syst1", 0.95, 1.05 );
68 signal.AddNormFactor(
"SigXsecOverSM", 1, 0, 3 );
69 chan.AddSample( signal );
72 Sample background1(
"background1",
"background1", InputFile );
73 background1.ActivateStatError(
"background1_statUncert", InputFile );
74 background1.AddOverallSys(
"syst2", 0.95, 1.05 );
75 chan.AddSample( background1 );
79 Sample background2(
"background2",
"background2", InputFile );
80 background2.ActivateStatError();
81 background2.AddOverallSys(
"syst3", 0.95, 1.05 );
82 chan.AddSample( background2 );
87 meas.AddChannel( chan );
91 meas.CollectHistograms();
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)
R__EXTERN TSystem * gSystem