|
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) |
| virtual void | CheckSampler ()=0 |
Public Member Functions inherited from PerEntryHistogram | |
| 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. | |
| void | AddNEmptyEntries (unsigned long i) |
| double | Integral () const |
| Get the Integral() from the result member histogram if it exists, otherwise 0. | |
Protected Member Functions | |
| virtual void | GetPDGIDSetFromSampler (std::set< long long int > &setIn) const =0 |
| 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. | |
Protected Member Functions inherited from PerEntryHistogram | |
| 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 |
Protected Attributes inherited from PerEntryHistogram | |
| 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 98 of file PerEntryHistogramSet.cc.
References PerEntryHistogram::AccumulateCurrentEntry(), CheckSampler(), and GetPDGIDSetFromSampler().

|
pure virtual |
Ensure sampler is setup even if it wasn't on at the beginning when we inspected the model tree. We need this to build up unique PDG IDs by manually looping over the data. A derived class must implement this for each type of sampler data we have.
Implemented in PerEntryHistogramSetC, PerEntryHistogramSetPlane, and PerEntryHistogramSetS.
Referenced by AccumulateCurrentEntry().

|
protected |
Definition at line 70 of file PerEntryHistogramSet.cc.
|
protectedpure virtual |
Derived class should get the partID member and form a set from the specific type of sampler it is.
Implemented in PerEntryHistogramSetC, PerEntryHistogramSetPlane, and PerEntryHistogramSetS.
Referenced by AccumulateCurrentEntry().

|
inlineprotected |
Definition at line 84 of file PerEntryHistogramSet.hh.
|
virtual |
Terminate the accumulator and save the result to the result member variable.
Reimplemented from PerEntryHistogram.
Definition at line 129 of file PerEntryHistogramSet.cc.
References PerEntryHistogram::Terminate().

|
protected |
Get top part of set. Sorted in descending order of integral.
Definition at line 200 of file PerEntryHistogramSet.cc.
References TopUtility().
Referenced by Write().


|
protected |
Get top part of set. Sorted in descending order of integral.
Definition at line 195 of file PerEntryHistogramSet.cc.
References TopUtility().
Referenced by Write().


|
protected |
Get top part of set. Sorted in descending order of integral.
Definition at line 190 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 167 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 135 of file PerEntryHistogramSet.cc.
References TopN(), TopNIons(), TopNNonIons(), and PerEntryHistogram::Write().

|
protected |
Definition at line 114 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 119 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 98 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 101 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 100 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 103 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 102 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 99 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 117 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 118 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 115 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 104 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 116 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 109 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 111 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 106 of file PerEntryHistogramSet.hh.
|
protected |
Definition at line 105 of file PerEntryHistogramSet.hh.