BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
BinSpecification Class Reference

Binning specification for a single dimension. More...

#include <BinSpecification.hh>

Collaboration diagram for BinSpecification:
Collaboration graph

Public Member Functions

 BinSpecification ()
 Default constructor.
 
 BinSpecification (double lowIn, double highIn, int nIn)
 Linearly spaced bins.
 
 BinSpecification (const std::vector< double > &edgesIn)
 Uneven binning - suitable for logarithmic etc.
 
 BinSpecification (const BinSpecification &other)
 
 BinSpecification (BinSpecification &&other) noexcept
 
std::string GetBinString () const
 Return the filename or the binning.
 
std::string GetLogString () const
 Utility function.
 

Data Fields

double low
 
double high
 
int n
 
std::vector< double > * edges
 
bool isLogSpaced
 
std::string edgesFileName
 

Detailed Description

Binning specification for a single dimension.

For logarithmic or uneven binning, a set of bin edges can be used. Otherwise, a high and low limit and the number of bins in between can be used.

"n" is the number of bins, not the number of edges.

Author
Laurie Nevay

Definition at line 38 of file BinSpecification.hh.

Constructor & Destructor Documentation

◆ BinSpecification() [1/4]

BinSpecification::BinSpecification ( double  lowIn,
double  highIn,
int  nIn 
)

Linearly spaced bins.

Definition at line 35 of file BinSpecification.cc.

◆ BinSpecification() [2/4]

BinSpecification::BinSpecification ( const std::vector< double > &  edgesIn)
explicit

Uneven binning - suitable for logarithmic etc.

Definition at line 50 of file BinSpecification.cc.

◆ BinSpecification() [3/4]

BinSpecification::BinSpecification ( const BinSpecification other)

Definition at line 64 of file BinSpecification.cc.

◆ BinSpecification() [4/4]

BinSpecification::BinSpecification ( BinSpecification &&  other)
noexcept

Definition at line 75 of file BinSpecification.cc.

◆ ~BinSpecification()

BinSpecification::~BinSpecification ( )

Definition at line 91 of file BinSpecification.cc.

Member Function Documentation

◆ GetBinString()

std::string BinSpecification::GetBinString ( ) const

Return the filename or the binning.

Definition at line 96 of file BinSpecification.cc.

Referenced by HistogramDef1D::GetBinningString(), HistogramDef2D::GetBinningString(), HistogramDef3D::GetBinningString(), and HistogramDef4D::GetBinningString().

Here is the caller graph for this function:

◆ GetLogString()

std::string BinSpecification::GetLogString ( ) const
inline

Utility function.

Definition at line 60 of file BinSpecification.hh.

Referenced by HistogramDef2D::GetHistogramString(), HistogramDef3D::GetHistogramString(), and HistogramDef4D::GetHistogramString().

Here is the caller graph for this function:

Field Documentation

◆ edges

std::vector<double>* BinSpecification::edges

Definition at line 65 of file BinSpecification.hh.

◆ edgesFileName

std::string BinSpecification::edgesFileName

Definition at line 67 of file BinSpecification.hh.

◆ high

double BinSpecification::high

Definition at line 63 of file BinSpecification.hh.

◆ isLogSpaced

bool BinSpecification::isLogSpaced

Definition at line 66 of file BinSpecification.hh.

◆ low

double BinSpecification::low

Definition at line 62 of file BinSpecification.hh.

◆ n

int BinSpecification::n

Definition at line 64 of file BinSpecification.hh.


The documentation for this class was generated from the following files: