ra4_draw
4bd0201e3d922d42bd545d4b045ed44db33454a4
|
Container for a TH1D associated with a single Process. More...
#include <hist1d.hpp>
Public Member Functions | |
SingleHist1D (const Hist1D &stack, const std::shared_ptr< Process > &process, const TH1D &hist) | |
Standard constructor. More... | |
~SingleHist1D ()=default | |
void | RecordEvent (const Baby &baby) final |
double | GetMax (double max_bound=std::numeric_limits< double >::infinity(), bool include_error_bar=false, bool include_overflow=false) const |
double | GetMin (double max_bound=0., bool include_error_bar=false, bool include_overflow=false) const |
Public Member Functions inherited from Figure::FigureComponent | |
FigureComponent (const Figure &figure, const std::shared_ptr< Process > &process) | |
virtual | ~FigureComponent ()=default |
Public Attributes | |
TH1D | raw_hist_ |
Histogram storing distribution before stacking and luminosity weighting. More... | |
TH1D | scaled_hist_ |
Kludge. Mutable storage of scaled and stacked histogram. More... | |
Public Attributes inherited from Figure::FigureComponent | |
const Figure & | figure_ |
Reference to figure containing this component. More... | |
std::shared_ptr< Process > | process_ |
Process associated to this part of the figure. More... | |
std::mutex | mutex_ |
Private Member Functions | |
SingleHist1D ()=delete | |
SingleHist1D (const SingleHist1D &)=delete | |
SingleHist1D & | operator= (const SingleHist1D &)=delete |
SingleHist1D (SingleHist1D &&)=delete | |
SingleHist1D & | operator= (SingleHist1D &&)=delete |
Private Attributes | |
NamedFunc | proc_and_hist_cut_ |
NamedFunc::VectorType | cut_vector_ |
NamedFunc::VectorType | wgt_vector_ |
NamedFunc::VectorType | val_vector_ |
Container for a TH1D associated with a single Process.
Hist1D::SingleHist1D is mostly a "dumb" container used by Hist1D for convenience. It contains a pointer to a single Process and a TH1D.
Until I have a more elegant solution, it also contains a second TH1D which is (ab)used by Hist1D to draw the stacked and luminosity scaled histogram without disturbing the data in the main TH1D.
Definition at line 25 of file hist1d.hpp.
Hist1D::SingleHist1D::SingleHist1D | ( | const Hist1D & | figure, |
const std::shared_ptr< Process > & | process, | ||
const TH1D & | hist | ||
) |
Standard constructor.
[in] | process | Process used to fill histogram |
[in] | hist | A fully styled, and typically unfilled histogram to start from |
Definition at line 138 of file hist1d.cpp.
References raw_hist_, and scaled_hist_.
|
default |
|
privatedelete |
|
privatedelete |
|
privatedelete |
double Hist1D::SingleHist1D::GetMax | ( | double | max_bound = std::numeric_limits<double>::infinity() , |
bool | include_error_bar = false , |
||
bool | include_overflow = false |
||
) | const |
Get the maximum of the histogram
[in] | max_bound | Returns the highest bin content c satisfying c<max_bound. Usually infinity. |
[in] | include_error_bar | If true, use bin content+error instead of just content |
[in] | include_overflow | If true, also check height of underflow and overflow bins |
Definition at line 215 of file hist1d.cpp.
References scaled_hist_.
double Hist1D::SingleHist1D::GetMin | ( | double | min_bound = 0. , |
bool | include_error_bar = false , |
||
bool | include_overflow = false |
||
) | const |
Get the minimum of the histogram
[in] | min_bound | Returns the lowest bin content c satisfying c>min_bound. Usually zero. |
[in] | include_error_bar | If true, use bin content-error instead of just content |
[in] | include_overflow | If true, also check height of underflow and overflow bins |
Definition at line 246 of file hist1d.cpp.
References scaled_hist_.
|
privatedelete |
|
privatedelete |
|
finalvirtual |
Implements Figure::FigureComponent.
Definition at line 152 of file hist1d.cpp.
References cut_vector_, Figure::FigureComponent::figure_, NamedFunc::GetScalar(), NamedFunc::GetVector(), HavePass(), NamedFunc::IsScalar(), NamedFunc::IsVector(), proc_and_hist_cut_, raw_hist_, val_vector_, Axis::var_, Hist1D::weight_, wgt_vector_, and Hist1D::xaxis_.
|
private |
Definition at line 52 of file hist1d.hpp.
Referenced by RecordEvent().
|
private |
Definition at line 51 of file hist1d.hpp.
Referenced by RecordEvent().
TH1D Hist1D::SingleHist1D::raw_hist_ |
Histogram storing distribution before stacking and luminosity weighting.
Definition at line 32 of file hist1d.hpp.
Referenced by Hist1D::Hist1D(), RecordEvent(), and SingleHist1D().
|
mutable |
Kludge. Mutable storage of scaled and stacked histogram.
Definition at line 33 of file hist1d.hpp.
Referenced by GetMax(), GetMin(), and SingleHist1D().
|
private |
Definition at line 52 of file hist1d.hpp.
Referenced by RecordEvent().
|
private |
Definition at line 52 of file hist1d.hpp.
Referenced by RecordEvent().