Jpp 20.0.0
the software that should make you happy
Loading...
Searching...
No Matches
JASTRONOMY::JExperiment Struct Reference

Auxiliary base class for experiment. More...

#include <JExperiment.hh>

Inheritance diagram for JASTRONOMY::JExperiment:
JASTRONOMY::JPseudoExperiment_t JASTRONOMY::JRealExperiment JASTRONOMY::JGen2 JASTRONOMY::JPseudoExperiment

Static Public Member Functions

static double getSNR ()
 Get minimal signa-to-noise ratio.
 
static void setSNR (const double value)
 Set minimal signa-to-noise ratio.
 
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.
 

Static Private Member Functions

static double & get_snr ()
 Get minimal signa-to-noise ratio.
 

Detailed Description

Auxiliary base class for experiment.

Definition at line 26 of file JExperiment.hh.

Member Function Documentation

◆ getSNR()

static double JASTRONOMY::JExperiment::getSNR ( )
inlinestatic

Get minimal signa-to-noise ratio.

Returns
signa-to-noise ratio.

Definition at line 33 of file JExperiment.hh.

34 {
35 return get_snr();
36 }
static double & get_snr()
Get minimal signa-to-noise ratio.

◆ setSNR()

static void JASTRONOMY::JExperiment::setSNR ( const double value)
inlinestatic

Set minimal signa-to-noise ratio.

Parameters
valuesigna-to-noise ratio.

Definition at line 44 of file JExperiment.hh.

45 {
46 get_snr() = value;
47 }

◆ check() [1/5]

static bool JASTRONOMY::JExperiment::check ( const double s,
const double b )
inlinestatic

Check validity of signal and background.

Parameters
ssignal
bbackground compare significance expectation for 1 bin with cut value
Returns
true if signal and backgroud are valid; else false

Definition at line 58 of file JExperiment.hh.

59 {
60 return (s > 0.0 && b > 0.0 && (s+s*s)/(b+b*b) >= getSNR()); //E(S^2) / E(B^2) for Poisson distribution
61 }
static double getSNR()
Get minimal signa-to-noise ratio.

◆ check() [2/5]

static bool JASTRONOMY::JExperiment::check ( const TAxis * ha,
const TAxis * hb )
inlinestatic

Check histogram bins.

Parameters
hahistogram axis
hbhistogram axis
Returns
true if same binning; else false

Definition at line 71 of file JExperiment.hh.

72 {
73 return (ha->GetNbins() == hb->GetNbins() &&
74 ha->GetXmin() == hb->GetXmin() &&
75 ha->GetXmax() == hb->GetXmax());
76 }

◆ check() [3/5]

static bool JASTRONOMY::JExperiment::check ( const TH1 & ha,
const TH1 & hb )
inlinestatic

Check histogram bins.

Parameters
hahistogram
hbhistogram
Returns
true if same binning; else false

Definition at line 85 of file JExperiment.hh.

86 {
87 return check(ha.GetXaxis(), hb.GetXaxis());
88 }
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 )
inlinestatic

Check histogram bins.

Parameters
hahistogram
hbhistogram
Returns
true if same binning; else false

Definition at line 98 of file JExperiment.hh.

99 {
100 return (check(ha.GetXaxis(), hb.GetXaxis()) &&
101 check(ha.GetYaxis(), hb.GetYaxis()));
102 }

◆ check() [5/5]

static bool JASTRONOMY::JExperiment::check ( const TH3 & ha,
const TH3 & hb )
inlinestatic

Check histogram bins.

Parameters
hahistogram
hbhistogram
Returns
true if same binning; else false

Definition at line 112 of file JExperiment.hh.

113 {
114 return (check(ha.GetXaxis(), hb.GetXaxis()) &&
115 check(ha.GetYaxis(), hb.GetYaxis()) &&
116 check(ha.GetZaxis(), hb.GetZaxis()));
117 }

◆ get_snr()

static double & JASTRONOMY::JExperiment::get_snr ( )
inlinestaticprivate

Get minimal signa-to-noise ratio.

Returns
signa-to-noise ratio.

Definition at line 125 of file JExperiment.hh.

126 {
127 static double value = 0.0;
128
129 return value;
130 }

The documentation for this struct was generated from the following file: