BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Histogram over a set of integers not number line. More...
#include <PerEntryHistogramSet.hh>
Public Member Functions | |
PerEntryHistogramSet (const HistogramDefSet *definitionIn, Event *eventIn, TChain *chainIn) | |
virtual void | AccumulateCurrentEntry (long int entryNumber) |
virtual void | Terminate () |
Terminate the accumulator and save the result to the result member variable. | |
virtual void | Write (TDirectory *dir=nullptr) |
void | CheckSampler () |
![]() | |
PerEntryHistogram () | |
Public constructor only for compatibility with ROOT - not intended for use. | |
PerEntryHistogram (const HistogramDef *definition, TChain *chain) | |
Constructor with a histogram definition and the chain to operate on. | |
virtual void | AccumulateCurrentEntry (long int entryNumber) |
virtual void | Terminate () |
Terminate the accumulator and save the result to the result member variable. | |
virtual void | Write (TDirectory *dir=nullptr) |
void | AddNEmptyEntries (unsigned long i) |
double | Integral () const |
Get the Integral() from the result member histogram if it exists, otherwise 0. | |
Protected Member Functions | |
bool | IsIon (long long int pdgID) const |
void | CreatePerEntryHistogram (long long int pdgID) |
std::vector< long long int > | TopUtility (const std::set< long long int > &s, size_t n) const |
Utility function to find top N in set s. Sorted in descending order of integral. | |
std::vector< long long int > | TopNNonIons (int n) const |
Get top part of set. Sorted in descending order of integral. | |
std::vector< long long int > | TopNIons (int n) const |
Get top part of set. Sorted in descending order of integral. | |
std::vector< long long int > | TopN (int n) const |
Get top part of set. Sorted in descending order of integral. | |
![]() | |
ClassDef (PerEntryHistogram, 1) | |
Protected Attributes | |
HistogramDef * | baseDefinition |
Event * | event |
TChain * | chain |
std::string | branchName |
bool | dynamicallyStoreParticles |
bool | dynamicallyStoreIons |
long long int | nEntries |
HistogramDefSet::writewhat | what |
int | topN |
BDSOutputROOTEventSampler< double > * | sampler |
BDSOutputROOTEventSampler< float > * | sampler |
std::set< long long int > | allPDGIDs |
std::set< long long int > | ions |
std::set< long long int > | nonIons |
std::map< ParticleSpec, PerEntryHistogram * > | histograms |
std::map< long long int, PerEntryHistogram * > | histogramsByPDGID |
std::vector< PerEntryHistogram * > | allPerEntryHistograms |
![]() | |
HistogramAccumulator * | accumulator |
TChain * | chain |
Cache of chain pointer that provides data. | |
std::string | selection |
Selection command. | |
TH1 * | temp |
Histogram for temporary 1 event data. | |
TH1 * | result |
Final result with errors as the error on the mean. | |
std::string | command |
Draw command. | |
Histogram over a set of integers not number line.
Definition at line 61 of file PerEntryHistogramSet.hh.
PerEntryHistogramSet::PerEntryHistogramSet | ( | const HistogramDefSet * | definitionIn, |
Event * | eventIn, | ||
TChain * | chainIn | ||
) |
Definition at line 38 of file PerEntryHistogramSet.cc.
|
virtual |
Definition at line 91 of file PerEntryHistogramSet.cc.
|
virtual |
Create a histogram of the appropriate dimensions for the currently loaded event then add it to the online (ie running) means and variances.
Reimplemented from PerEntryHistogram.
Definition at line 108 of file PerEntryHistogramSet.cc.
References PerEntryHistogram::AccumulateCurrentEntry(), and CheckSampler().
void PerEntryHistogramSet::CheckSampler | ( | ) |
Ensure sampler is setup even if it wasn't on at the beginning when we inspected the model tree.
Definition at line 98 of file PerEntryHistogramSet.cc.
Referenced by AccumulateCurrentEntry().
|
protected |
Definition at line 70 of file PerEntryHistogramSet.cc.
|
inlineprotected |
Definition at line 78 of file PerEntryHistogramSet.hh.
|
virtual |
Terminate the accumulator and save the result to the result member variable.
Reimplemented from PerEntryHistogram.
Definition at line 138 of file PerEntryHistogramSet.cc.
References PerEntryHistogram::Terminate().
|
protected |
Get top part of set. Sorted in descending order of integral.
Definition at line 209 of file PerEntryHistogramSet.cc.
References TopUtility().
Referenced by Write().
|
protected |
Get top part of set. Sorted in descending order of integral.
Definition at line 204 of file PerEntryHistogramSet.cc.
References TopUtility().
Referenced by Write().
|
protected |
Get top part of set. Sorted in descending order of integral.
Definition at line 199 of file PerEntryHistogramSet.cc.
References TopUtility().
Referenced by Write().
|
protected |
Utility function to find top N in set s. Sorted in descending order of integral.
Definition at line 176 of file PerEntryHistogramSet.cc.
Referenced by TopN(), TopNIons(), and TopNNonIons().
|
virtual |
Forwarding function - call Write on result histograms on the currently open file. Optional directory to specify where the histogram should be moved to.
Reimplemented from PerEntryHistogram.
Definition at line 144 of file PerEntryHistogramSet.cc.
References TopN(), TopNIons(), TopNNonIons(), and PerEntryHistogram::Write().
|
protected |
Definition at line 108 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 113 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 92 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 95 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 94 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 97 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 96 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 93 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 111 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 112 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 109 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 98 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 110 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 103 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 105 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 100 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 99 of file PerEntryHistogramSet.hh.