A very basic two dimensional histogram to provide storage of HLT distributions, allowing constraints but preventing excessive memory usage for busy events. The histogram data is compressed during persistification according to the type of template instantiated.
More...
#include <TrigHisto2D.h>
|
| TrigHisto2D (void) |
| Default constructor used by T/P converters. More...
|
|
| TrigHisto2D (unsigned int nbins_x, float min_x, float max_x, unsigned int nbins_y, float min_y, float max_y) |
| Standard constructor used by FEX algorithms. More...
|
|
| TrigHisto2D (unsigned int nbins_x, float min_x, float max_x, unsigned int nbins_y, float min_y, float max_y, const std::vector< float > &contents) |
|
virtual | ~TrigHisto2D (void) |
| Destructor. More...
|
|
| TrigHisto2D (const TrigHisto2D &trigHisto) |
| Copy Constructor. More...
|
|
| TrigHisto2D (TrigHisto2D &&trigHisto) |
|
TrigHisto2D & | operator= (const TrigHisto2D &trigHisto) |
| Assignment operator. More...
|
|
TrigHisto2D & | operator= (TrigHisto2D &&trigHisto) |
|
void | fill (float value_x, float value_y, float weight) |
| Fill a 2D histogram. More...
|
|
double | sumEntries (float value_x, float value_y, int cutType) const |
| Sum the number of entries within the cut range. More...
|
|
TrigHisto1D | profileX (void) const |
| Collapse the y-axis and return a profile from the x-axis. More...
|
|
TrigHisto1D | profileY (void) const |
| Collapse the x-axis and return a profile from the y-axis. More...
|
|
unsigned int | nbins_y (void) const |
| Return the number of bins along the y-axis, not including the under and overflow. More...
|
|
float | min_y (void) const |
| Return the minimum along the y-axis. More...
|
|
float | max_y (void) const |
| Return the maximum along the y-axis. More...
|
|
void | clear (void) |
| Zero all histogram bins. More...
|
|
unsigned int | nbins_x (void) const |
| Return the number of bins along the y-axis, not including the under and overflow. More...
|
|
float | min_x (void) const |
| Return the minimum along the x-axis. More...
|
|
float | max_x (void) const |
| Return the maximum along the x-axis. More...
|
|
const std::vector< float > & | contents (void) const |
| Return the bin contents of the histogram, including the under and overflow bins. More...
|
|
|
unsigned int | findBin (unsigned int nbins, float h_min, float h_max, float binSize, float value) const |
|
A very basic two dimensional histogram to provide storage of HLT distributions, allowing constraints but preventing excessive memory usage for busy events. The histogram data is compressed during persistification according to the type of template instantiated.
- Author
- W. H. Bell W.Bel.nosp@m.l@ce.nosp@m.rn.ch
Definition at line 24 of file Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigHisto2D.h.
◆ TrigHisto2D() [1/5]
TrigHisto2D::TrigHisto2D |
( |
void |
| ) |
|
◆ TrigHisto2D() [2/5]
TrigHisto2D::TrigHisto2D |
( |
unsigned int |
nbins_x, |
|
|
float |
min_x, |
|
|
float |
max_x, |
|
|
unsigned int |
nbins_y, |
|
|
float |
min_y, |
|
|
float |
max_y |
|
) |
| |
Standard constructor used by FEX algorithms.
Definition at line 59 of file TrigHisto2D.cxx.
◆ TrigHisto2D() [3/5]
TrigHisto2D::TrigHisto2D |
( |
unsigned int |
nbins_x, |
|
|
float |
min_x, |
|
|
float |
max_x, |
|
|
unsigned int |
nbins_y, |
|
|
float |
min_y, |
|
|
float |
max_y, |
|
|
const std::vector< float > & |
contents |
|
) |
| |
◆ ~TrigHisto2D()
TrigHisto2D::~TrigHisto2D |
( |
void |
| ) |
|
|
virtual |
◆ TrigHisto2D() [4/5]
◆ TrigHisto2D() [5/5]
◆ clear()
void TrigHisto::clear |
( |
void |
| ) |
|
|
inherited |
◆ contents()
const std::vector<float>& TrigHisto::contents |
( |
void |
| ) |
const |
|
inlineinherited |
Return the bin contents of the histogram, including the under and overflow bins.
Definition at line 58 of file TrigHisto.h.
◆ fill()
void TrigHisto2D::fill |
( |
float |
value_x, |
|
|
float |
value_y, |
|
|
float |
weight |
|
) |
| |
◆ findBin()
unsigned int TrigHisto::findBin |
( |
unsigned int |
nbins, |
|
|
float |
h_min, |
|
|
float |
h_max, |
|
|
float |
binSize, |
|
|
float |
value |
|
) |
| const |
|
protectedinherited |
- Returns
- which bin this value corresponds to. (Supply bin limits such that it might be used for 1D or 2D derived class.)
Definition at line 33 of file TrigHisto.cxx.
38 unsigned int ibin = 0;
43 else if( !(
value < h_max)) {
47 while(
value > (ibin*binSize+h_min) && ibin <=
nbins) {
◆ max_x()
float TrigHisto::max_x |
( |
void |
| ) |
const |
|
inlineinherited |
Return the maximum along the x-axis.
Definition at line 52 of file TrigHisto.h.
◆ max_y()
float TrigHisto2D::max_y |
( |
void |
| ) |
const |
|
inline |
◆ min_x()
float TrigHisto::min_x |
( |
void |
| ) |
const |
|
inlineinherited |
Return the minimum along the x-axis.
Definition at line 47 of file TrigHisto.h.
◆ min_y()
float TrigHisto2D::min_y |
( |
void |
| ) |
const |
|
inline |
◆ nbins_x()
unsigned int TrigHisto::nbins_x |
( |
void |
| ) |
const |
|
inlineinherited |
Return the number of bins along the y-axis, not including the under and overflow.
Definition at line 42 of file TrigHisto.h.
◆ nbins_y()
unsigned int TrigHisto2D::nbins_y |
( |
void |
| ) |
const |
|
inline |
◆ operator=() [1/2]
Assignment operator.
Definition at line 120 of file TrigHisto2D.cxx.
121 if (
this != &trigHisto) {
◆ operator=() [2/2]
◆ profileX()
Collapse the y-axis and return a profile from the x-axis.
Definition at line 238 of file TrigHisto2D.cxx.
239 unsigned int ibin, ibin_x, ibin_y;
◆ profileY()
Collapse the x-axis and return a profile from the y-axis.
Definition at line 258 of file TrigHisto2D.cxx.
265 const unsigned int ibin = ibin_y*(
m_nbins_x+2) + ibin_x;
◆ sumEntries()
double TrigHisto2D::sumEntries |
( |
float |
value_x, |
|
|
float |
value_y, |
|
|
int |
cutType |
|
) |
| const |
Sum the number of entries within the cut range.
Definition at line 181 of file TrigHisto2D.cxx.
197 for(
unsigned int ibin_x =
m_underflowBin_x; ibin_x <= ibin_x_selected; ibin_x++) {
198 for(
unsigned int ibin_y =
m_underflowBin_y; ibin_y <= ibin_y_selected; ibin_y++) {
199 const unsigned int ibin = ibin_y*(
m_nbins_x+2) + ibin_x;
205 for(
unsigned int ibin_x = ibin_x_selected; ibin_x <=
m_overflowBin_x; ibin_x++) {
206 for(
unsigned int ibin_y =
m_underflowBin_y; ibin_y <= ibin_y_selected; ibin_y++) {
207 const unsigned int ibin = ibin_y*(
m_nbins_x+2) + ibin_x;
213 for(
unsigned int ibin_x =
m_underflowBin_x; ibin_x <= ibin_x_selected; ibin_x++) {
214 for(
unsigned int ibin_y = ibin_y_selected; ibin_y <=
m_overflowBin_y; ibin_y++) {
215 const unsigned int ibin = ibin_y*(
m_nbins_x+2) + ibin_x;
221 for(
unsigned int ibin_x = ibin_x_selected; ibin_x <=
m_overflowBin_x; ibin_x++) {
222 for(
unsigned int ibin_y = ibin_y_selected; ibin_y <=
m_overflowBin_y; ibin_y++) {
223 const unsigned int ibin = ibin_y*(
m_nbins_x+2) + ibin_x;
◆ m_binSize_x
float TrigHisto::m_binSize_x |
|
protectedinherited |
◆ m_binSize_y
float TrigHisto2D::m_binSize_y |
|
protected |
◆ m_contents
std::vector<float> TrigHisto::m_contents |
|
protectedinherited |
◆ m_itr
std::vector<float>::iterator TrigHisto::m_itr |
|
protectedinherited |
◆ m_itr_end
std::vector<float>::iterator TrigHisto::m_itr_end |
|
protectedinherited |
◆ m_max_x
◆ m_max_y
float TrigHisto2D::m_max_y |
|
protected |
◆ m_min_x
◆ m_min_y
float TrigHisto2D::m_min_y |
|
protected |
◆ m_nbins_x
unsigned int TrigHisto::m_nbins_x |
|
protectedinherited |
◆ m_nbins_y
unsigned int TrigHisto2D::m_nbins_y |
|
protected |
◆ m_overflowBin_x
unsigned int TrigHisto::m_overflowBin_x |
|
protectedinherited |
◆ m_overflowBin_y
unsigned int TrigHisto2D::m_overflowBin_y |
|
protected |
◆ m_underflowBin_x
unsigned int TrigHisto::m_underflowBin_x |
|
protectedinherited |
◆ m_underflowBin_y
unsigned int TrigHisto2D::m_underflowBin_y |
|
protected |
The documentation for this class was generated from the following files: