Jpp 20.0.0-rc.2
the software that should make you happy
|
Implementation of the Poisson log-likelihood ratio test. More...
#include <JTestPoissonLogLikelihoodRatio.hh>
Public Member Functions | |
JTestPoissonLogLikelihoodRatio () | |
Default constructor. | |
void | test (const TObject *o1, const TObject *o2) override |
Applies a Poissonian log-likelihood ratio test to the two given histograms. | |
std::istream & | read (std::istream &in) override |
Read test parameters from input. | |
virtual std::ostream & | write (std::ostream &out, const char delimiter=' ', const bool onlyFailures=false) const |
Write test result to output. | |
virtual void | save (TFile *f, const std::string &path, const bool onlyFailures=false) const |
Writes the test result to root file. | |
const std::string & | getTestName () const |
Get test name. | |
const std::string & | getResultType () const |
Get result type. | |
Protected Attributes | |
const std::string | testName |
test name | |
const std::string | resultType |
test result type | |
Private Attributes | |
double | threshold |
threshold chi-square to decide if test is passed. | |
Implementation of the Poisson log-likelihood ratio test.
The first histogram is treated as an Asimov dataset corresponding to a given null hypothesis, which is compared to an alternative hypothesis given by the second histogram. The uncertainty on the expectation is taken into account as an additional Poissonian constraint term in the likelihood of each bin (
where:
This is inspired on the Beeston-Barlow method, described in the following publication: Computer Physics Communications, Volume 77, Issue 2, 1993 "Fitting using finite Monte Carlo samples", Roger Barlow and Christine Beeston. DOI: 10.1016/0010-4655(93)90005-W
Definition at line 43 of file JTestPoissonLogLikelihoodRatio.hh.
|
inline |
Default constructor.
Definition at line 51 of file JTestPoissonLogLikelihoodRatio.hh.
|
inlineoverridevirtual |
Applies a Poissonian log-likelihood ratio test to the two given histograms.
The first histogram is treated as an Asimov dataset corresponding to a given null hypothesis.
The second histogram is treated as the expectation for the alternative hypothesis, to which the null hypothesis is compared.
o1 | First histogram |
o2 | Second histogram |
Implements JCOMPAREHISTOGRAMS::JTest_t.
Definition at line 65 of file JTestPoissonLogLikelihoodRatio.hh.
|
inlineoverridevirtual |
Read test parameters from input.
in | input stream |
Implements JCOMPAREHISTOGRAMS::JTest_t.
Definition at line 164 of file JTestPoissonLogLikelihoodRatio.hh.
|
inlinevirtualinherited |
Write test result to output.
out | output stream |
delimiter | field delimiter |
onlyFailures | if true, write only failures. |
Definition at line 84 of file JTest_t.hh.
|
inlinevirtualinherited |
Writes the test result to root file.
f | A ROOT file |
path | Path in root file. |
onlyFailures | If true, write only failures. |
Definition at line 108 of file JTest_t.hh.
|
inlineinherited |
|
inlineinherited |
|
private |
threshold chi-square to decide if test is passed.
Definition at line 179 of file JTestPoissonLogLikelihoodRatio.hh.
|
protectedinherited |
test name
Definition at line 180 of file JTest_t.hh.
|
protectedinherited |
test result type
Definition at line 181 of file JTest_t.hh.