BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Holder for a set of histograms to be stored. More...
#include <BDSOutputROOTEventHistograms.hh>
Public Member Functions | |
BDSOutputROOTEventHistograms (const BDSOutputROOTEventHistograms &h) | |
BDSOutputROOTEventHistograms & | operator= (const BDSOutputROOTEventHistograms &)=delete |
BDSOutputROOTEventHistograms (std::vector< TH1D * > &histogram1DIn, std::vector< TH2D * > &histogram2DIn, std::vector< TH3D * > &histogram3DIn, std::vector< BDSBH4DBase * > &histograms4DIn) | |
int | Create1DHistogramSTD (std::string name, std::string title, int nbins, double xmin, double xmax) |
Interface function to create a 1D histogram using only standard types. | |
G4int | Create1DHistogram (G4String name, G4String title, G4int nbins, G4double xmin, G4double xmax) |
G4int | Create1DHistogram (G4String name, G4String title, std::vector< double > &edges) |
G4int | Create2DHistogram (G4String name, G4String title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax) |
G4int | Create2DHistogram (G4String name, G4String title, std::vector< double > &xedges, std::vector< double > &yedges) |
G4int | Create3DHistogram (G4String name, G4String title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4int nzbins, G4double zmin, G4double zmax) |
G4int | Create3DHistogram (G4String name, G4String title, std::vector< double > &xedges, std::vector< double > &yedges, std::vector< double > &zedges) |
G4int | Create4DHistogram (const G4String &name, const G4String &title, const G4String &eScale, const std::vector< double > &eBinsEdges, unsigned int nxbins, G4double xmin, G4double xmax, unsigned int nybins, G4double ymin, G4double ymax, unsigned int nzbins, G4double zmin, G4double zmax, unsigned int nebins, G4double emin, G4double emax) |
void | Fill1DHistogram (G4int histoId, G4double value, G4double weight=1.0) |
void | Fill2DHistogram (G4int histoId, G4double xValue, G4double yValue, G4double weight=1.0) |
void | Fill3DHistogram (G4int histoId, G4double xValue, G4double yValue, G4double zValue, G4double weight=1.0) |
void | Fill4DHistogram (G4int histoId, G4double xValue, G4double yValue, G4double zvalue, G4double eValue) |
void | Set3DHistogramBinContent (G4int histoId, G4int globalBinID, G4double value) |
void | Set4DHistogramBinContent (G4int histoId, G4int x, G4int y, G4int z, G4int e, G4double value) |
void | AccumulateHistogram3D (G4int histoId, TH3D *otherHistogram) |
Add the values from one supplied 3D histogram to another. Uses TH3-Add(). | |
void | AccumulateHistogram4D (G4int histoId, BDSBH4DBase *otherHistogram) |
virtual void | Flush () |
Flush the contents. | |
void | Fill (const BDSOutputROOTEventHistograms *rhs) |
Copy (using the TH->Clone) method from another instance. | |
void | FillSimple (const BDSOutputROOTEventHistograms *rhs) |
Copy (without using the TH->Clone) method from another instance. (Quicker). | |
std::vector< TH1D * > & | Get1DHistograms () |
Accessors. | |
std::vector< TH2D * > & | Get2DHistograms () |
Accessors. | |
std::vector< TH3D * > & | Get3DHistograms () |
Accessors. | |
std::vector< BDSBH4DBase * > & | Get4DHistograms () |
Accessors. | |
TH1D * | Get1DHistogram (int iHisto) const |
Accessors. | |
TH2D * | Get2DHistogram (int iHisto) const |
Accessors. | |
TH3D * | Get3DHistogram (int iHisto) const |
Accessors. | |
BDSBH4DBase * | Get4DHistogram (int iHisto) const |
Accessors. | |
Private Member Functions | |
ClassDef (BDSOutputROOTEventHistograms, 4) | |
Private Attributes | |
std::vector< TH1D * > | histograms1D |
std::vector< TH2D * > | histograms2D |
std::vector< TH3D * > | histograms3D |
std::vector< BDSBH4DBase * > | histograms4D |
Holder for a set of histograms to be stored.
Definition at line 47 of file BDSOutputROOTEventHistograms.hh.
BDSOutputROOTEventHistograms::BDSOutputROOTEventHistograms | ( | const BDSOutputROOTEventHistograms & | h | ) |
Definition at line 42 of file BDSOutputROOTEventHistograms.cc.
BDSOutputROOTEventHistograms::BDSOutputROOTEventHistograms | ( | std::vector< TH1D * > & | histogram1DIn, |
std::vector< TH2D * > & | histogram2DIn, | ||
std::vector< TH3D * > & | histogram3DIn, | ||
std::vector< BDSBH4DBase * > & | histograms4DIn | ||
) |
Definition at line 48 of file BDSOutputROOTEventHistograms.cc.
|
virtual |
Definition at line 58 of file BDSOutputROOTEventHistograms.cc.
void BDSOutputROOTEventHistograms::AccumulateHistogram3D | ( | G4int | histoId, |
TH3D * | otherHistogram | ||
) |
Add the values from one supplied 3D histogram to another. Uses TH3-Add().
Definition at line 304 of file BDSOutputROOTEventHistograms.cc.
Referenced by BDSOutput::FillScorerHitsIndividual().
void BDSOutputROOTEventHistograms::AccumulateHistogram4D | ( | G4int | histoId, |
BDSBH4DBase * | otherHistogram | ||
) |
Definition at line 310 of file BDSOutputROOTEventHistograms.cc.
G4int BDSOutputROOTEventHistograms::Create1DHistogram | ( | G4String | name, |
G4String | title, | ||
G4int | nbins, | ||
G4double | xmin, | ||
G4double | xmax | ||
) |
Definition at line 100 of file BDSOutputROOTEventHistograms.cc.
G4int BDSOutputROOTEventHistograms::Create1DHistogram | ( | G4String | name, |
G4String | title, | ||
std::vector< double > & | edges | ||
) |
Definition at line 107 of file BDSOutputROOTEventHistograms.cc.
int BDSOutputROOTEventHistograms::Create1DHistogramSTD | ( | std::string | name, |
std::string | title, | ||
int | nbins, | ||
double | xmin, | ||
double | xmax | ||
) |
Interface function to create a 1D histogram using only standard types.
Definition at line 91 of file BDSOutputROOTEventHistograms.cc.
G4int BDSOutputROOTEventHistograms::Create2DHistogram | ( | G4String | name, |
G4String | title, | ||
G4int | nxbins, | ||
G4double | xmin, | ||
G4double | xmax, | ||
G4int | nybins, | ||
G4double | ymin, | ||
G4double | ymax | ||
) |
Definition at line 121 of file BDSOutputROOTEventHistograms.cc.
G4int BDSOutputROOTEventHistograms::Create2DHistogram | ( | G4String | name, |
G4String | title, | ||
std::vector< double > & | xedges, | ||
std::vector< double > & | yedges | ||
) |
Definition at line 129 of file BDSOutputROOTEventHistograms.cc.
G4int BDSOutputROOTEventHistograms::Create3DHistogram | ( | G4String | name, |
G4String | title, | ||
G4int | nxbins, | ||
G4double | xmin, | ||
G4double | xmax, | ||
G4int | nybins, | ||
G4double | ymin, | ||
G4double | ymax, | ||
G4int | nzbins, | ||
G4double | zmin, | ||
G4double | zmax | ||
) |
Definition at line 148 of file BDSOutputROOTEventHistograms.cc.
G4int BDSOutputROOTEventHistograms::Create3DHistogram | ( | G4String | name, |
G4String | title, | ||
std::vector< double > & | xedges, | ||
std::vector< double > & | yedges, | ||
std::vector< double > & | zedges | ||
) |
Definition at line 160 of file BDSOutputROOTEventHistograms.cc.
G4int BDSOutputROOTEventHistograms::Create4DHistogram | ( | const G4String & | name, |
const G4String & | title, | ||
const G4String & | eScale, | ||
const std::vector< double > & | eBinsEdges, | ||
unsigned int | nxbins, | ||
G4double | xmin, | ||
G4double | xmax, | ||
unsigned int | nybins, | ||
G4double | ymin, | ||
G4double | ymax, | ||
unsigned int | nzbins, | ||
G4double | zmin, | ||
G4double | zmax, | ||
unsigned int | nebins, | ||
G4double | emin, | ||
G4double | emax | ||
) |
Definition at line 185 of file BDSOutputROOTEventHistograms.cc.
void BDSOutputROOTEventHistograms::Fill | ( | const BDSOutputROOTEventHistograms * | rhs | ) |
Copy (using the TH->Clone) method from another instance.
Definition at line 72 of file BDSOutputROOTEventHistograms.cc.
void BDSOutputROOTEventHistograms::Fill1DHistogram | ( | G4int | histoId, |
G4double | value, | ||
G4double | weight = 1.0 |
||
) |
Definition at line 236 of file BDSOutputROOTEventHistograms.cc.
void BDSOutputROOTEventHistograms::Fill2DHistogram | ( | G4int | histoId, |
G4double | xValue, | ||
G4double | yValue, | ||
G4double | weight = 1.0 |
||
) |
Definition at line 243 of file BDSOutputROOTEventHistograms.cc.
void BDSOutputROOTEventHistograms::Fill3DHistogram | ( | G4int | histoId, |
G4double | xValue, | ||
G4double | yValue, | ||
G4double | zValue, | ||
G4double | weight = 1.0 |
||
) |
Definition at line 251 of file BDSOutputROOTEventHistograms.cc.
void BDSOutputROOTEventHistograms::Fill4DHistogram | ( | G4int | histoId, |
G4double | xValue, | ||
G4double | yValue, | ||
G4double | zvalue, | ||
G4double | eValue | ||
) |
Definition at line 261 of file BDSOutputROOTEventHistograms.cc.
void BDSOutputROOTEventHistograms::FillSimple | ( | const BDSOutputROOTEventHistograms * | rhs | ) |
Copy (without using the TH->Clone) method from another instance. (Quicker).
Definition at line 61 of file BDSOutputROOTEventHistograms.cc.
Referenced by Event::Fill().
|
virtual |
Flush the contents.
Definition at line 318 of file BDSOutputROOTEventHistograms.cc.
Referenced by BDSOutputStructures::ClearStructuresEventLevel(), and Event::Flush().
|
inline |
Accessors.
Definition at line 129 of file BDSOutputROOTEventHistograms.hh.
Referenced by BDSOutput::CopyFromHistToHist1D().
|
inline |
Accessors.
Definition at line 125 of file BDSOutputROOTEventHistograms.hh.
Referenced by HistogramMeanFromFile::Accumulate(), and HistogramMeanFromFile::HistogramMeanFromFile().
|
inline |
Accessors.
Definition at line 130 of file BDSOutputROOTEventHistograms.hh.
|
inline |
Accessors.
Definition at line 126 of file BDSOutputROOTEventHistograms.hh.
Referenced by HistogramMeanFromFile::Accumulate(), and HistogramMeanFromFile::HistogramMeanFromFile().
|
inline |
Accessors.
Definition at line 131 of file BDSOutputROOTEventHistograms.hh.
Referenced by BDSOutput::FillScorerHitsIndividual().
|
inline |
Accessors.
Definition at line 127 of file BDSOutputROOTEventHistograms.hh.
Referenced by HistogramMeanFromFile::Accumulate(), and HistogramMeanFromFile::HistogramMeanFromFile().
|
inline |
Accessors.
Definition at line 132 of file BDSOutputROOTEventHistograms.hh.
Referenced by BDSOutput::FillScorerHitsIndividual().
|
inline |
Accessors.
Definition at line 128 of file BDSOutputROOTEventHistograms.hh.
Referenced by HistogramMeanFromFile::Accumulate(), and HistogramMeanFromFile::HistogramMeanFromFile().
void BDSOutputROOTEventHistograms::Set3DHistogramBinContent | ( | G4int | histoId, |
G4int | globalBinID, | ||
G4double | value | ||
) |
Set the value of a bin by (ROOT!!) global bin index. Note the TH3 function should be used to get ROOT's idea of a global bin index.
Definition at line 280 of file BDSOutputROOTEventHistograms.cc.
Referenced by BDSOutput::FillScorerHitsIndividual().
void BDSOutputROOTEventHistograms::Set4DHistogramBinContent | ( | G4int | histoId, |
G4int | x, | ||
G4int | y, | ||
G4int | z, | ||
G4int | e, | ||
G4double | value | ||
) |
Definition at line 288 of file BDSOutputROOTEventHistograms.cc.
|
private |
Definition at line 136 of file BDSOutputROOTEventHistograms.hh.
|
private |
Definition at line 137 of file BDSOutputROOTEventHistograms.hh.
|
private |
Definition at line 138 of file BDSOutputROOTEventHistograms.hh.
|
private |
Definition at line 139 of file BDSOutputROOTEventHistograms.hh.