inlib
1.2.0
|
Public Member Functions | |
bool | set_title (const std::string &a_title) |
unsigned int | dimension () const |
bool | reset () |
unsigned int | entries () const |
double | sum_of_weights () const |
bool | convert_to_histogram () |
bool | is_converted () const |
bool | scale (double a_scale) |
bool | fill (double aX, double aW=1) |
double | lower_edge () const |
double | upper_edge () const |
double | value (unsigned int aIndex) const |
double | weight (unsigned int aIndex) const |
double | mean () const |
double | rms () const |
bool | convert (unsigned int aBins, double aLowerEdge, double aUpperEdge) |
bool | convert (const std::vector< double > &aEdges) |
const histo::h1d & | histogram () const |
bool | fill_histogram (histo::h1d &a_histo) const |
bool | set_conversion_parameters (unsigned int aCnvXnumber, double aCnvXmin, double aCnvXmax) |
c1d () | |
c1d (const std::string &a_title, int aLimit=-1) | |
virtual | ~c1d () |
c1d (const c1d &a_from) | |
c1d & | operator= (const c1d &a_from) |
Protected Member Functions | |
void | clear () |
Protected Attributes | |
std::vector< double > | m_xs |
double | m_lower_x |
double | m_upper_x |
double | m_Sxw |
double | m_Sx2w |
unsigned int | m_cnv_x_num |
double | m_cnv_x_min |
double | m_cnv_x_max |
histo::h1d * | m_histo |
inlib::histo::c1d::c1d | ( | ) | [inline] |
Definition at line 153 of file c1d.
:base_cloud(UNLIMITED()) ,m_lower_x(0),m_upper_x(0) ,m_Sxw(0),m_Sx2w(0) ,m_cnv_x_num(0),m_cnv_x_min(0),m_cnv_x_max(0),m_histo(0) {}
inlib::histo::c1d::c1d | ( | const std::string & | a_title, |
int | aLimit = -1 |
||
) | [inline] |
Definition at line 160 of file c1d.
:base_cloud(aLimit) ,m_lower_x(0),m_upper_x(0) ,m_Sxw(0),m_Sx2w(0) ,m_cnv_x_num(0),m_cnv_x_min(0),m_cnv_x_max(0),m_histo(0) { set_title(a_title); }
virtual inlib::histo::c1d::~c1d | ( | ) | [inline, virtual] |
inlib::histo::c1d::c1d | ( | const c1d & | a_from | ) | [inline] |
Definition at line 171 of file c1d.
:base_cloud(a_from) ,m_xs(a_from.m_xs) ,m_lower_x(a_from.m_lower_x) ,m_upper_x(a_from.m_upper_x) ,m_Sxw(a_from.m_Sxw) ,m_Sx2w(a_from.m_Sx2w) ,m_cnv_x_num(a_from.m_cnv_x_num) ,m_cnv_x_min(a_from.m_cnv_x_min) ,m_cnv_x_max(a_from.m_cnv_x_max) ,m_histo(0) { if(a_from.m_histo) { m_histo = new histo::h1d(*a_from.m_histo); } }
void inlib::histo::c1d::clear | ( | ) | [inline, protected] |
bool inlib::histo::c1d::convert | ( | unsigned int | aBins, |
double | aLowerEdge, | ||
double | aUpperEdge | ||
) | [inline] |
bool inlib::histo::c1d::convert | ( | const std::vector< double > & | aEdges | ) | [inline] |
bool inlib::histo::c1d::convert_to_histogram | ( | ) | [inline] |
Definition at line 39 of file c1d.
{ if( (m_cnv_x_num<=0) || (m_cnv_x_max<=m_cnv_x_min) ) { // Cloud min, max should be included in the histo. double dx = 0.01 * (upper_edge() - lower_edge())/BINS(); return convert(BINS(),lower_edge(),upper_edge() + dx); } else { return convert(m_cnv_x_num,m_cnv_x_min,m_cnv_x_max); } }
unsigned int inlib::histo::c1d::dimension | ( | ) | const [inline] |
unsigned int inlib::histo::c1d::entries | ( | ) | const [inline] |
bool inlib::histo::c1d::fill | ( | double | aX, |
double | aW = 1 |
||
) | [inline] |
Definition at line 64 of file c1d.
{ if(!m_histo && (m_limit!=UNLIMITED()) && ((int)m_xs.size()>=m_limit)){ convert_to_histogram(); } if(m_histo) { return m_histo->fill(aX,aW); } else { if(m_xs.size()) { m_lower_x = inlib::mn<double>(aX,m_lower_x); m_upper_x = inlib::mx<double>(aX,m_upper_x); } else { m_lower_x = aX; m_upper_x = aX; } m_xs.push_back(aX); m_ws.push_back(aW); m_Sw += aW; double xw = aX * aW; m_Sxw += xw; m_Sx2w += aX * xw; return true; } }
bool inlib::histo::c1d::fill_histogram | ( | histo::h1d & | a_histo | ) | const [inline] |
const histo::h1d& inlib::histo::c1d::histogram | ( | ) | const [inline] |
bool inlib::histo::c1d::is_converted | ( | ) | const [inline] |
double inlib::histo::c1d::lower_edge | ( | ) | const [inline] |
double inlib::histo::c1d::mean | ( | ) | const [inline] |
Definition at line 188 of file c1d.
{ base_cloud::operator=(a_from); m_xs = a_from.m_xs; m_lower_x = a_from.m_lower_x; m_upper_x = a_from.m_upper_x; m_Sxw = a_from.m_Sxw; m_Sx2w = a_from.m_Sx2w; m_cnv_x_num = a_from.m_cnv_x_num; m_cnv_x_min = a_from.m_cnv_x_min; m_cnv_x_max = a_from.m_cnv_x_max; delete m_histo; m_histo = 0; if(a_from.m_histo) { m_histo = new histo::h1d(*a_from.m_histo); } return *this; }
bool inlib::histo::c1d::reset | ( | ) | [inline] |
double inlib::histo::c1d::rms | ( | ) | const [inline] |
bool inlib::histo::c1d::scale | ( | double | a_scale | ) | [inline] |
bool inlib::histo::c1d::set_conversion_parameters | ( | unsigned int | aCnvXnumber, |
double | aCnvXmin, | ||
double | aCnvXmax | ||
) | [inline] |
Definition at line 144 of file c1d.
{ m_cnv_x_num = aCnvXnumber; m_cnv_x_min = aCnvXmin; m_cnv_x_max = aCnvXmax; return true; }
bool inlib::histo::c1d::set_title | ( | const std::string & | a_title | ) | [inline] |
double inlib::histo::c1d::sum_of_weights | ( | ) | const [inline] |
double inlib::histo::c1d::upper_edge | ( | ) | const [inline] |
double inlib::histo::c1d::value | ( | unsigned int | aIndex | ) | const [inline] |
double inlib::histo::c1d::weight | ( | unsigned int | aIndex | ) | const [inline] |
double inlib::histo::c1d::m_cnv_x_max [protected] |
double inlib::histo::c1d::m_cnv_x_min [protected] |
unsigned int inlib::histo::c1d::m_cnv_x_num [protected] |
histo::h1d* inlib::histo::c1d::m_histo [protected] |
double inlib::histo::c1d::m_lower_x [protected] |
double inlib::histo::c1d::m_Sx2w [protected] |
double inlib::histo::c1d::m_Sxw [protected] |
double inlib::histo::c1d::m_upper_x [protected] |
std::vector<double> inlib::histo::c1d::m_xs [protected] |