198 auto m_samples = m.def_submodule(
"samples");
200 "This is a Python binding of MaCh3s C++ based samples library.";
203 py::enum_<TestStatistic>(m_samples,
"TestStatistic")
217 "reweight the MC events in this sample. You will need to override this."
223 "Get the sample likelihood at the current point in your model space. You will need to override this."
229 "Set the test statistic that should be used when calculating likelihoods. \n\
230 :param test_stat: The new test statistic to use",
237 "Get the LLH for a bin by comparing the data and MC. The result depends on having previously set the test statistic using :py:meth:`pyMaCh3.samples.SampleHandlerBase.set_test_stat` \n\
238 :param data: The data content of the bin. \n\
239 :param mc: The mc content of the bin \n\
240 :param w2: The Sum(w_{i}^2) (sum of weights squared) in the bin, which is sigma^2_{MC stats}",
249 py::init<std::string, ParameterHandlerGeneric*>(),
250 "This should never be called directly as SampleHandlerFD is an abstract base class. \n\
251 However when creating a derived class, in the __init__() method, you should call the parent constructor i.e. this one by doing:: \n\
253 \tsuper(<your derived SampleHandler class>, self).__init__(*args) \n\
255 py::arg(
"mc_version"),
@ kNTestStatistics
Number of test statistics.
@ kPearson
Standard Pearson likelihood .
@ kBarlowBeeston
Barlow-Beeston () following Conway approximation ()
@ kDembinskiAbdelmotteleb
Based on .
@ kPoisson
Standard Poisson likelihood .
EW: As SampleHandlerBase is an abstract base class we have to do some gymnastics to get it to get it ...
As SampleHandlerFD is an abstract base class we have to do some gymnastics to get it to get it into p...
Class responsible for handling implementation of samples used in analysis, reweighting and returning ...
virtual void Reweight()=0
Class responsible for handling implementation of samples used in analysis, reweighting and returning ...
void SetTestStatistic(TestStatistic testStat)
Set the test statistic to be used when calculating the binned likelihoods.
double GetTestStatLLH(const double data, const double mc, const double w2) const
Calculate test statistic for a single bin. Calculation depends on setting of fTestStatistic....
virtual double GetLikelihood()=0