Auxiliary interface for pseudo experiment.
More...
#include <JPseudoExperiment.hh>
|
| static bool | check (const double s, const double b) |
| | Check validity of signal and background.
|
| |
| static bool | check (const TAxis *ha, const TAxis *hb) |
| | Check histogram bins.
|
| |
| static bool | check (const TH1 &ha, const TH1 &hb) |
| | Check histogram bins.
|
| |
| static bool | check (const TH2 &ha, const TH2 &hb) |
| | Check histogram bins.
|
| |
| static bool | check (const TH3 &ha, const TH3 &hb) |
| | Check histogram bins.
|
| |
Auxiliary interface for pseudo experiment.
Definition at line 38 of file JPseudoExperiment.hh.
◆ fit_type
◆ getAspera()
| virtual JAspera & JASTRONOMY::JPseudoExperiment_t::getAspera |
( |
| ) |
|
|
pure virtual |
◆ run()
◆ operator()() [1/4]
| result_type JASTRONOMY::JPseudoExperiment_t::operator() |
( |
| ) |
|
|
inline |
Generate pseudo experiment and fit signal strength.
- Returns
- result
Definition at line 93 of file JPseudoExperiment.hh.
94 {
96
97
98
99 aspera.clear();
100 aspera.setSignal(0.0);
101
102 return {
run(aspera), aspera() };
103 }
virtual JAspera & getAspera()=0
Get fit method.
virtual stats_type run(JAspera &out) const =0
◆ operator()() [2/4]
Run pseudo experiments using given storage.
- Parameters
-
Definition at line 111 of file JPseudoExperiment.hh.
112 {
113 for (auto& i : storage) {
114 i = (*this)();
115 }
116 }
◆ operator()() [3/4]
template<class T , class JValue_t >
| void JASTRONOMY::JPseudoExperiment_t::operator() |
( |
JValue_t result_type::* | pm, |
|
|
std::vector< T > & | storage ) |
|
inline |
Run pseudo experiments using given storage.
- Parameters
-
| pm | pointer to data member of result |
| storage | storage |
Definition at line 126 of file JPseudoExperiment.hh.
127 {
128 for (auto& i : storage) {
129 i = (*this)().*pm;
130 }
131 }
◆ operator()() [4/4]
template<class T , class JValue_t >
| void JASTRONOMY::JPseudoExperiment_t::operator() |
( |
JValue_t JAspera::fit_type::* | pm, |
|
|
std::vector< T > & | storage ) |
|
inline |
Run pseudo experiments using given storage.
- Parameters
-
| pm | pointer to data member of result |
| storage | storage |
Definition at line 141 of file JPseudoExperiment.hh.
142 {
143 (*this)(static_cast<JValue_t result_type::*>(pm), storage);
144 }
◆ check() [1/5]
| static bool JASTRONOMY::JExperiment::check |
( |
const double | s, |
|
|
const double | b ) |
|
inlinestaticinherited |
Check validity of signal and background.
- Parameters
-
- Returns
- true if signal and backgroud are valid; else false
Definition at line 34 of file JExperiment.hh.
35 {
36 return (s > 0.0 && b > 0.0);
37 }
◆ check() [2/5]
| static bool JASTRONOMY::JExperiment::check |
( |
const TAxis * | ha, |
|
|
const TAxis * | hb ) |
|
inlinestaticinherited |
Check histogram bins.
- Parameters
-
| ha | histogram axis |
| hb | histogram axis |
- Returns
- true if same binning; else false
Definition at line 47 of file JExperiment.hh.
48 {
49 return (ha->GetNbins() == hb->GetNbins() &&
50 ha->GetXmin() == hb->GetXmin() &&
51 ha->GetXmax() == hb->GetXmax());
52 }
◆ check() [3/5]
| static bool JASTRONOMY::JExperiment::check |
( |
const TH1 & | ha, |
|
|
const TH1 & | hb ) |
|
inlinestaticinherited |
Check histogram bins.
- Parameters
-
- Returns
- true if same binning; else false
Definition at line 61 of file JExperiment.hh.
62 {
63 return check(ha.GetXaxis(), hb.GetXaxis());
64 }
static bool check(const double s, const double b)
Check validity of signal and background.
◆ check() [4/5]
| static bool JASTRONOMY::JExperiment::check |
( |
const TH2 & | ha, |
|
|
const TH2 & | hb ) |
|
inlinestaticinherited |
Check histogram bins.
- Parameters
-
- Returns
- true if same binning; else false
Definition at line 74 of file JExperiment.hh.
75 {
76 return (
check(ha.GetXaxis(), hb.GetXaxis()) &&
77 check(ha.GetYaxis(), hb.GetYaxis()));
78 }
◆ check() [5/5]
| static bool JASTRONOMY::JExperiment::check |
( |
const TH3 & | ha, |
|
|
const TH3 & | hb ) |
|
inlinestaticinherited |
Check histogram bins.
- Parameters
-
- Returns
- true if same binning; else false
Definition at line 88 of file JExperiment.hh.
89 {
90 return (
check(ha.GetXaxis(), hb.GetXaxis()) &&
91 check(ha.GetYaxis(), hb.GetYaxis()) &&
92 check(ha.GetZaxis(), hb.GetZaxis()));
93 }
The documentation for this struct was generated from the following file: