inlib
1.2.0
|
Public Types | |
typedef b3< TC, TN, TW, TH >::bn_t | bn_t |
Public Member Functions | |
virtual TH | bin_error (int aI, int aJ, int aK) const |
bool | multiply (TW aFactor) |
bool | scale (TW aFactor) |
void | copy_from_data (const histo_data< TC, TN, TW > &a_from) |
histo_data< TC, TN, TW > | get_histo_data () const |
bool | reset () |
bool | fill (TC aX, TC aY, TC aZ, TW aWeight=1) |
bool | add (const h3 &a_histo) |
bool | subtract (const h3 &a_histo) |
bool | multiply (const h3 &a_histo) |
bool | divide (const h3 &a_histo) |
h3 (const std::string &a_title, bn_t aXnumber, TC aXmin, TC aXmax, bn_t aYnumber, TC aYmin, TC aYmax, bn_t aZnumber, TC aZmin, TC aZmax) | |
h3 (const std::string &a_title, const std::vector< TC > &aEdgesX, const std::vector< TC > &aEdgesY, const std::vector< TC > &aEdgesZ) | |
virtual | ~h3 () |
h3 (const h3 &a_from) | |
h3 & | operator= (const h3 &a_from) |
Protected Member Functions | |
virtual TH | get_bin_height (int a_offset) const |
typedef b3<TC,TN,TW,TH>::bn_t inlib::histo::h3< TC, TN, TW, TH >::bn_t |
Reimplemented from inlib::histo::b3< TC, TN, TW, TH >.
inlib::histo::h3< TC, TN, TW, TH >::h3 | ( | const std::string & | a_title, |
bn_t | aXnumber, | ||
TC | aXmin, | ||
TC | aXmax, | ||
bn_t | aYnumber, | ||
TC | aYmin, | ||
TC | aYmax, | ||
bn_t | aZnumber, | ||
TC | aZmin, | ||
TC | aZmax | ||
) | [inline] |
inlib::histo::h3< TC, TN, TW, TH >::h3 | ( | const std::string & | a_title, |
const std::vector< TC > & | aEdgesX, | ||
const std::vector< TC > & | aEdgesY, | ||
const std::vector< TC > & | aEdgesZ | ||
) | [inline] |
virtual inlib::histo::h3< TC, TN, TW, TH >::~h3 | ( | ) | [inline, virtual] |
inlib::histo::h3< TC, TN, TW, TH >::h3 | ( | const h3< TC, TN, TW, TH > & | a_from | ) | [inline] |
bool inlib::histo::h3< TC, TN, TW, TH >::add | ( | const h3< TC, TN, TW, TH > & | a_histo | ) | [inline] |
Definition at line 120 of file h3.
{ parent::base_add(a_histo); this->update_fast_getters(); return true; }
virtual TH inlib::histo::h3< TC, TN, TW, TH >::bin_error | ( | int | aI, |
int | aJ, | ||
int | aK | ||
) | const [inline, virtual] |
Implements inlib::histo::b3< TC, TN, TW, TH >.
Definition at line 23 of file h3.
{ if(parent::m_bin_number==0) return 0; bn_t ibin; if(!parent::m_axes[0].in_range_to_absolute_index(aI,ibin)) return 0; bn_t jbin; if(!parent::m_axes[1].in_range_to_absolute_index(aJ,jbin)) return 0; bn_t kbin; if(!parent::m_axes[2].in_range_to_absolute_index(aK,kbin)) return 0; bn_t offset = ibin + jbin * parent::m_axes[1].m_offset + kbin * parent::m_axes[2].m_offset; return ::sqrt(parent::m_bin_Sw2[offset]); }
void inlib::histo::h3< TC, TN, TW, TH >::copy_from_data | ( | const histo_data< TC, TN, TW > & | a_from | ) | [inline] |
Definition at line 45 of file h3.
{ parent::base_from_data(a_from); }
bool inlib::histo::h3< TC, TN, TW, TH >::divide | ( | const h3< TC, TN, TW, TH > & | a_histo | ) | [inline] |
Definition at line 137 of file h3.
{ if(!parent::base_divide(a_histo)) return false; this->update_fast_getters(); return true; }
bool inlib::histo::h3< TC, TN, TW, TH >::fill | ( | TC | aX, |
TC | aY, | ||
TC | aZ, | ||
TW | aWeight = 1 |
||
) | [inline] |
Definition at line 58 of file h3.
{ //m_coords[0] = aX; //m_coords[1] = aY; //m_coords[2] = aZ; //return fill_bin(m_coords,aWeight); if(parent::m_dimension<=0) return false; bn_t ibin,jbin,kbin; if(!parent::m_axes[0].coord_to_absolute_index(aX,ibin)) return false; if(!parent::m_axes[1].coord_to_absolute_index(aY,jbin)) return false; if(!parent::m_axes[3].coord_to_absolute_index(aZ,kbin)) return false; bn_t offset = ibin + jbin * parent::m_axes[1].m_offset + kbin * parent::m_axes[2].m_offset; parent::m_bin_entries[offset]++; parent::m_bin_Sw[offset] += aWeight; parent::m_bin_Sw2[offset] += aWeight * aWeight; TC xw = aX * aWeight; TC x2w = aX * xw; parent::m_bin_Sxw[offset][0] += xw; parent::m_bin_Sx2w[offset][0] += x2w; TC yw = aY * aWeight; TC y2w = aY * yw; parent::m_bin_Sxw[offset][1] += yw; parent::m_bin_Sx2w[offset][1] += y2w; TC zw = aZ * aWeight; TC z2w = aZ * zw; parent::m_bin_Sxw[offset][2] += zw; parent::m_bin_Sx2w[offset][2] += z2w; bool inRange = true; if(ibin==0) inRange = false; else if(ibin==(parent::m_axes[0].m_number_of_bins+1)) inRange = false; if(jbin==0) inRange = false; else if(jbin==(parent::m_axes[1].m_number_of_bins+1)) inRange = false; if(kbin==0) inRange = false; else if(kbin==(parent::m_axes[2].m_number_of_bins+1)) inRange = false; if(inRange) { parent::m_in_range_entries++; parent::m_in_range_Sw += aWeight; parent::m_in_range_Sxw += xw; parent::m_in_range_Sx2w += x2w; parent::m_in_range_Syw += yw; parent::m_in_range_Sy2w += y2w; parent::m_in_range_Szw += zw; parent::m_in_range_Sz2w += z2w; } return true; }
virtual TH inlib::histo::h3< TC, TN, TW, TH >::get_bin_height | ( | int | a_offset | ) | const [inline, protected, virtual] |
Implements inlib::histo::base_histo< TC, TN, TW, TH >.
Definition at line 18 of file h3.
{ //TH should be the same as TW return parent::m_bin_Sw[a_offset]; }
histo_data<TC,TN,TW> inlib::histo::h3< TC, TN, TW, TH >::get_histo_data | ( | ) | const [inline] |
Definition at line 48 of file h3.
{ return parent::base_get_data(); }
bool inlib::histo::h3< TC, TN, TW, TH >::multiply | ( | TW | aFactor | ) | [inline] |
Definition at line 38 of file h3.
{ if(!parent::base_multiply(aFactor)) return false; this->update_fast_getters(); return true; }
bool inlib::histo::h3< TC, TN, TW, TH >::multiply | ( | const h3< TC, TN, TW, TH > & | a_histo | ) | [inline] |
Definition at line 131 of file h3.
{ if(!parent::base_multiply(a_histo)) return false; this->update_fast_getters(); return true; }
h3& inlib::histo::h3< TC, TN, TW, TH >::operator= | ( | const h3< TC, TN, TW, TH > & | a_from | ) | [inline] |
Definition at line 170 of file h3.
{ parent::operator=(a_from); return *this; }
bool inlib::histo::h3< TC, TN, TW, TH >::reset | ( | ) | [inline] |
Definition at line 52 of file h3.
{ parent::base_reset(); this->update_fast_getters(); return true; }
bool inlib::histo::h3< TC, TN, TW, TH >::scale | ( | TW | aFactor | ) | [inline] |
bool inlib::histo::h3< TC, TN, TW, TH >::subtract | ( | const h3< TC, TN, TW, TH > & | a_histo | ) | [inline] |
Definition at line 125 of file h3.
{ parent::base_subtract(a_histo); this->update_fast_getters(); return true; }