inlib
1.2.0
|
Public Member Functions | |
bool | set_title (const std::string &) |
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) |
bool | fill (double, double, double=1) |
double | lower_edge_x () const |
double | upper_edge_x () const |
double | lower_edge_y () const |
double | upper_edge_y () const |
double | value_x (unsigned int) const |
double | value_y (unsigned int) const |
double | weight (unsigned int) const |
double | mean_x () const |
double | mean_y () const |
double | rms_x () const |
double | rms_y () const |
bool | convert (unsigned int, double, double, unsigned int, double, double) |
bool | convert (const std::vector< double > &, const std::vector< double > &) |
const histo::h2d & | histogram () const |
bool | fill_histogram (histo::h2d &a_histo) const |
bool | set_conversion_parameters (unsigned int, double, double, unsigned int, double, double) |
c2d () | |
c2d (const std::string &, int=-1) | |
virtual | ~c2d () |
c2d (const c2d &a_from) | |
c2d & | operator= (const c2d &a_from) |
Protected Member Functions | |
void | clear () |
Protected Attributes | |
std::vector< double > | m_xs |
std::vector< double > | m_ys |
double | m_lower_x |
double | m_upper_x |
double | m_lower_y |
double | m_upper_y |
double | m_Sxw |
double | m_Sx2w |
double | m_Syw |
double | m_Sy2w |
unsigned int | m_cnv_x_num |
double | m_cnv_x_min |
double | m_cnv_x_max |
unsigned int | m_cnv_y_num |
double | m_cnv_y_min |
double | m_cnv_y_max |
histo::h2d * | m_histo |
inlib::histo::c2d::c2d | ( | ) | [inline] |
Definition at line 137 of file c2d.
:base_cloud(UNLIMITED()) ,m_lower_x(0) ,m_upper_x(0) ,m_lower_y(0) ,m_upper_y(0) ,m_Sxw(0) ,m_Sx2w(0) ,m_Syw(0) ,m_Sy2w(0) ,m_cnv_x_num(0) ,m_cnv_x_min(0) ,m_cnv_x_max(0) ,m_cnv_y_num(0) ,m_cnv_y_min(0) ,m_cnv_y_max(0) ,m_histo(0) {}
inlib::histo::c2d::c2d | ( | const std::string & | a_title, |
int | aLimit = -1 |
||
) | [inline] |
Definition at line 157 of file c2d.
:base_cloud(aLimit) ,m_lower_x(0) ,m_upper_x(0) ,m_lower_y(0) ,m_upper_y(0) ,m_Sxw(0) ,m_Sx2w(0) ,m_Syw(0) ,m_Sy2w(0) ,m_cnv_x_num(0) ,m_cnv_x_min(0) ,m_cnv_x_max(0) ,m_cnv_y_num(0) ,m_cnv_y_min(0) ,m_cnv_y_max(0) ,m_histo(0) { set_title(a_title); }
virtual inlib::histo::c2d::~c2d | ( | ) | [inline, virtual] |
inlib::histo::c2d::c2d | ( | const c2d & | a_from | ) | [inline] |
Definition at line 58 of file c2d.
:base_cloud(a_from) ,m_xs(a_from.m_xs) ,m_ys(a_from.m_ys) ,m_lower_x(a_from.m_lower_x) ,m_upper_x(a_from.m_upper_x) ,m_lower_y(a_from.m_lower_y) ,m_upper_y(a_from.m_upper_y) ,m_Sxw(a_from.m_Sxw) ,m_Sx2w(a_from.m_Sx2w) ,m_Syw(a_from.m_Syw) ,m_Sy2w(a_from.m_Sy2w) ,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_cnv_y_num(a_from.m_cnv_y_num) ,m_cnv_y_min(a_from.m_cnv_y_min) ,m_cnv_y_max(a_from.m_cnv_y_max) ,m_histo(0) { if(a_from.m_histo) { m_histo = new histo::h2d(*a_from.m_histo); } }
void inlib::histo::c2d::clear | ( | ) | [inline, protected] |
bool inlib::histo::c2d::convert | ( | unsigned int | aBinsX, |
double | aLowerEdgeX, | ||
double | aUpperEdgeX, | ||
unsigned int | aBinsY, | ||
double | aLowerEdgeY, | ||
double | aUpperEdgeY | ||
) | [inline] |
bool inlib::histo::c2d::convert | ( | const std::vector< double > & | aEdgesX, |
const std::vector< double > & | aEdgesY | ||
) | [inline] |
bool inlib::histo::c2d::convert_to_histogram | ( | ) | [inline] |
Definition at line 213 of file c2d.
{ if( (m_cnv_x_num<=0) || (m_cnv_x_max<=m_cnv_x_min) || (m_cnv_y_num<=0) || (m_cnv_y_max<=m_cnv_y_min) ) { double dx = 0.01 * (upper_edge_x() - lower_edge_x())/BINS(); double dy = 0.01 * (upper_edge_y() - lower_edge_y())/BINS(); return convert(BINS(),lower_edge_x(),upper_edge_x()+dx, BINS(),lower_edge_y(),upper_edge_y()+dy); } else { return convert(m_cnv_x_num,m_cnv_x_min,m_cnv_x_max, m_cnv_y_num,m_cnv_y_min,m_cnv_y_max); } }
unsigned int inlib::histo::c2d::dimension | ( | ) | const [inline] |
unsigned int inlib::histo::c2d::entries | ( | ) | const [inline] |
bool inlib::histo::c2d::fill | ( | double | aX, |
double | aY, | ||
double | aW = 1 |
||
) | [inline] |
Definition at line 259 of file c2d.
{ if(!m_histo && (m_limit!=UNLIMITED()) && ((int)m_xs.size()>=m_limit)){ convert_to_histogram(); } if(m_histo) { return m_histo->fill(aX,aY,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; } if(m_ys.size()) { m_lower_y = inlib::mn<double>(aY,m_lower_y); m_upper_y = inlib::mx<double>(aY,m_upper_y); } else { m_lower_y = aY; m_upper_y = aY; } m_xs.push_back(aX); m_ys.push_back(aY); m_ws.push_back(aW); m_Sw += aW; double xw = aX * aW; m_Sxw += xw; m_Sx2w += aX * xw; double yw = aY * aW; m_Syw += yw; m_Sy2w += aY * yw; return true; } }
bool inlib::histo::c2d::fill_histogram | ( | histo::h2d & | a_histo | ) | const [inline] |
const h2d & inlib::histo::c2d::histogram | ( | ) | const [inline] |
bool inlib::histo::c2d::is_converted | ( | ) | const [inline] |
double inlib::histo::c2d::lower_edge_x | ( | ) | const [inline] |
double inlib::histo::c2d::lower_edge_y | ( | ) | const [inline] |
double inlib::histo::c2d::mean_x | ( | ) | const [inline] |
double inlib::histo::c2d::mean_y | ( | ) | const [inline] |
Definition at line 83 of file c2d.
{ base_cloud::operator=(a_from); m_xs = a_from.m_xs; m_ys = a_from.m_ys; m_lower_x = a_from.m_lower_x; m_upper_x = a_from.m_upper_x; m_lower_y = a_from.m_lower_y; m_upper_y = a_from.m_upper_y; m_Sxw = a_from.m_Sxw; m_Sx2w = a_from.m_Sx2w; m_Syw = a_from.m_Syw; m_Sy2w = a_from.m_Sy2w; 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_cnv_y_num = a_from.m_cnv_y_num; m_cnv_y_min = a_from.m_cnv_y_min; m_cnv_y_max = a_from.m_cnv_y_max; delete m_histo; m_histo = 0; if(a_from.m_histo) { m_histo = new histo::h2d(*a_from.m_histo); } return *this; }
bool inlib::histo::c2d::reset | ( | ) | [inline] |
double inlib::histo::c2d::rms_x | ( | ) | const [inline] |
double inlib::histo::c2d::rms_y | ( | ) | const [inline] |
bool inlib::histo::c2d::scale | ( | double | a_scale | ) | [inline] |
bool inlib::histo::c2d::set_conversion_parameters | ( | unsigned int | aCnvXnumber, |
double | aCnvXmin, | ||
double | aCnvXmax, | ||
unsigned int | aCnvYnumber, | ||
double | aCnvYmin, | ||
double | aCnvYmax | ||
) | [inline] |
Definition at line 307 of file c2d.
{ m_cnv_x_num = aCnvXnumber; m_cnv_x_min = aCnvXmin; m_cnv_x_max = aCnvXmax; m_cnv_y_num = aCnvYnumber; m_cnv_y_min = aCnvYmin; m_cnv_y_max = aCnvYmax; return true; }
bool inlib::histo::c2d::set_title | ( | const std::string & | a_title | ) | [inline] |
double inlib::histo::c2d::sum_of_weights | ( | ) | const [inline] |
double inlib::histo::c2d::upper_edge_x | ( | ) | const [inline] |
double inlib::histo::c2d::upper_edge_y | ( | ) | const [inline] |
double inlib::histo::c2d::value_x | ( | unsigned int | aIndex | ) | const [inline] |
double inlib::histo::c2d::value_y | ( | unsigned int | aIndex | ) | const [inline] |
double inlib::histo::c2d::weight | ( | unsigned int | aIndex | ) | const [inline] |
double inlib::histo::c2d::m_cnv_x_max [protected] |
double inlib::histo::c2d::m_cnv_x_min [protected] |
unsigned int inlib::histo::c2d::m_cnv_x_num [protected] |
double inlib::histo::c2d::m_cnv_y_max [protected] |
double inlib::histo::c2d::m_cnv_y_min [protected] |
unsigned int inlib::histo::c2d::m_cnv_y_num [protected] |
histo::h2d* inlib::histo::c2d::m_histo [protected] |
double inlib::histo::c2d::m_lower_x [protected] |
double inlib::histo::c2d::m_lower_y [protected] |
double inlib::histo::c2d::m_Sx2w [protected] |
double inlib::histo::c2d::m_Sxw [protected] |
double inlib::histo::c2d::m_Sy2w [protected] |
double inlib::histo::c2d::m_Syw [protected] |
double inlib::histo::c2d::m_upper_x [protected] |
double inlib::histo::c2d::m_upper_y [protected] |
std::vector<double> inlib::histo::c2d::m_xs [protected] |
std::vector<double> inlib::histo::c2d::m_ys [protected] |