Jpp 20.0.0-rc.6
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 25 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 32 of file JExperiment.hh.

33 {
34 return get_snr();
35 }
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 43 of file JExperiment.hh.

44 {
45 get_snr() = value;
46 }

◆ check() [1/5]

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

Check validity of signal and background.

Parameters
ssignal
bbackground
Returns
true if signal and backgroud are valid; else false

Definition at line 56 of file JExperiment.hh.

57 {
58 return (s > 0.0 && b > 0.0 && s/b >= getSNR());
59 }
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 69 of file JExperiment.hh.

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

◆ 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 83 of file JExperiment.hh.

84 {
85 return check(ha.GetXaxis(), hb.GetXaxis());
86 }
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 96 of file JExperiment.hh.

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

◆ 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 110 of file JExperiment.hh.

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

◆ get_snr()

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

Get minimal signa-to-noise ratio.

Returns
signa-to-noise ratio.

Definition at line 123 of file JExperiment.hh.

124 {
125 static double value = 0.0;
126
127 return value;
128 }

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