Public Member Functions | Public Attributes | Private Attributes | List of all members
fnex::FixedBinning Class Reference

Binning containing a fixed number of bins. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-25/FNEX/utilities/Binning.h"

Inheritance diagram for fnex::FixedBinning:
fnex::Binning

Public Member Functions

 FixedBinning ()
 need default constructor to be able to serialize in ROOT file. vals are signaling NaNs so you catch if they're not overwritten More...
 
 FixedBinning (std::size_t nb, const std::pair< double, double > &rng)
 
 FixedBinning (std::size_t nb, double lowerBound, double upperBound)
 
std::size_t nBins () const
 Number of bins always means something, but data is stored differently in derived classes. More...
 
std::vector< double > const & BinLowEdges () const
 

Public Attributes

std::pair< double, double > range
 

Private Attributes

std::size_t fNBins
 
std::vector< double > fLowEdges
 

Detailed Description

Binning containing a fixed number of bins.

Definition at line 31 of file Binning.h.

Constructor & Destructor Documentation

fnex::FixedBinning::FixedBinning ( )
inline

need default constructor to be able to serialize in ROOT file. vals are signaling NaNs so you catch if they're not overwritten

Definition at line 35 of file Binning.h.

36  : range( std::make_pair(std::numeric_limits<double>::signaling_NaN(), std::numeric_limits<double>::signaling_NaN()) )
37  , fNBins(std::numeric_limits<std::size_t>::signaling_NaN())
38  {};
std::pair< Spectrum *, CheatDecomp * > make_pair(SpectrumLoaderBase &loader_data, SpectrumLoaderBase &loader_mc, HistAxis *axis, Cut *cut, const SystShifts &shift, const Var &wei)
Definition: DataMCLoad.C:336
std::size_t fNBins
Definition: Binning.h:60
std::pair< double, double > range
Definition: Binning.h:57
fnex::FixedBinning::FixedBinning ( std::size_t  nb,
const std::pair< double, double > &  rng 
)
inline

Definition at line 40 of file Binning.h.

41  : range(rng)
42  , fNBins(nb) {};
std::size_t fNBins
Definition: Binning.h:60
std::pair< double, double > range
Definition: Binning.h:57
static const double nb
Definition: Units.h:89
fnex::FixedBinning::FixedBinning ( std::size_t  nb,
double  lowerBound,
double  upperBound 
)
inline

Definition at line 45 of file Binning.h.

References b, genie::units::nb, and fillBadChanDBTables::step.

46  : range(std::make_pair(lowerBound, upperBound))
47  , fNBins(nb)
48  {
49  double totalSpan = upperBound - lowerBound;
50  double step = totalSpan / (1. * nb);
51  for(size_t b = 0; b < nb; ++ b) fLowEdges.push_back(b * step + lowerBound);
52  fLowEdges.push_back(upperBound);
53  };
std::vector< double > fLowEdges
Definition: Binning.h:61
std::pair< Spectrum *, CheatDecomp * > make_pair(SpectrumLoaderBase &loader_data, SpectrumLoaderBase &loader_mc, HistAxis *axis, Cut *cut, const SystShifts &shift, const Var &wei)
Definition: DataMCLoad.C:336
std::size_t fNBins
Definition: Binning.h:60
std::pair< double, double > range
Definition: Binning.h:57
const hit & b
Definition: hits.cxx:21
static const double nb
Definition: Units.h:89

Member Function Documentation

std::vector<double> const& fnex::FixedBinning::BinLowEdges ( ) const
inlinevirtual

Implements fnex::Binning.

Definition at line 56 of file Binning.h.

56 { return fLowEdges; }
std::vector< double > fLowEdges
Definition: Binning.h:61
std::size_t fnex::FixedBinning::nBins ( ) const
inlinevirtual

Number of bins always means something, but data is stored differently in derived classes.

Implements fnex::Binning.

Definition at line 55 of file Binning.h.

55 { return fNBins; };
std::size_t fNBins
Definition: Binning.h:60

Member Data Documentation

std::vector<double> fnex::FixedBinning::fLowEdges
private

Definition at line 61 of file Binning.h.

std::size_t fnex::FixedBinning::fNBins
private

Definition at line 60 of file Binning.h.

std::pair<double, double> fnex::FixedBinning::range

Definition at line 57 of file Binning.h.


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