22 lines
484 B
C++
Executable File
22 lines
484 B
C++
Executable File
#ifndef ENERGY_BINNING_H
|
|
#define ENERGY_BINNING_H
|
|
|
|
#include <vector>
|
|
|
|
class EnergyBinning {
|
|
public:
|
|
EnergyBinning(double minimal_energy, double maximal_energy, int num_bins);
|
|
EnergyBinning(std::vector<double> energy_bin_borders);
|
|
|
|
int bin(double energy_eV) const;
|
|
int numBins() const;
|
|
std::vector<double> binBorders() const;
|
|
int binIndexMin() const;
|
|
int binIndexMax() const;
|
|
|
|
private:
|
|
const std::vector<double> energy_bin_borders_;
|
|
};
|
|
|
|
#endif /* ENERGY_BINNING_H */
|