BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Class to combine histograms of mean with error on mean. More...
#include <HistogramAccumulatorMerge.hh>
Public Member Functions | |
HistogramAccumulatorMerge () | |
Default constructor only for ROOT reflexivity - not intended for use. | |
HistogramAccumulatorMerge (TH1 *baseHistogram, int nDimensionsIn, const std::string &resultHistName, const std::string &resultHistTitle) | |
Constructor simply passes down to base class. | |
virtual void | Accumulate (TH1 *newValue) |
![]() | |
HistogramAccumulator () | |
Default constructor only for ROOT reflexivity - not intended for use. | |
HistogramAccumulator (TH1 *baseHistogram, const std::string &resultHistNameIn, const std::string &resultHistTitleIn) | |
HistogramAccumulator (TH1 *baseHistogram, int nDimensionsIn, const std::string &resultHistName, const std::string &resultHistTitle) | |
virtual | ~HistogramAccumulator () |
virtual void | Accumulate (TH1 *newValue) |
virtual TH1 * | Terminate () |
TH1 * | Result () const |
Accessor. | |
void | AddNEmptyEntries (unsigned long i) |
unsigned long | N () const |
Access currently accumulated number of entries. | |
Protected Member Functions | |
virtual void | AccumulateSingleValue (double oldMean, double oldVari, double x, double xVari, unsigned long nEntriesAccumulated, unsigned long nEntriesToAccumulate, double &newMean, double &newVari) const |
ClassDef (HistogramAccumulatorMerge, 1) | |
![]() | |
virtual void | AccumulateSingleValue (double oldMean, double oldVari, double x, double xVari, unsigned long nEntriesAccumulated, unsigned long nEntriesToAccumulate, double &newMean, double &newVari) const |
ClassDef (HistogramAccumulator, 1) | |
Additional Inherited Members | |
![]() | |
int | nDimensions |
Number of dimensions. | |
unsigned long | n |
Counter. | |
bool | terminated |
Whether this instance has been finished. | |
const std::string | resultHistName |
Name for resultant histogram. | |
const std::string | resultHistTitle |
Title for resultant histogram. | |
TH1 * | mean |
TH1 * | variance |
TH1 * | result |
Class to combine histograms of mean with error on mean.
This uses the functionality of HistogramAccumulator to accumulate a combined mean and error on the mean from histograms already containing means and error the mean. i.e. The incoming histograms have already averaged many (at least 2) events.
This overrides two methods for the accumulation but the inheritance saves on repetition in the constructor and structures.
Definition at line 44 of file HistogramAccumulatorMerge.hh.
HistogramAccumulatorMerge::HistogramAccumulatorMerge | ( | TH1 * | baseHistogram, |
int | nDimensionsIn, | ||
const std::string & | resultHistName, | ||
const std::string & | resultHistTitle | ||
) |
Constructor simply passes down to base class.
Definition at line 37 of file HistogramAccumulatorMerge.cc.
|
inlinevirtual |
Definition at line 56 of file HistogramAccumulatorMerge.hh.
|
virtual |
This method must be overridden as the information passed to the AccumualteSingleValue is different.
Reimplemented from HistogramAccumulator.
Definition at line 47 of file HistogramAccumulatorMerge.cc.
References AccumulateSingleValue(), HistogramAccumulator::n, and HistogramAccumulator::nDimensions.
|
protectedvirtual |
This implements a different method from the base class that is used to combine means and variances from different samples of the same underlying experiment / data.
Reimplemented from HistogramAccumulator.
Definition at line 189 of file HistogramAccumulatorMerge.cc.
Referenced by Accumulate().