|
GGEMS
1.1
GPU GEant4-based Monte Carlo Simulations
|
Go to the documentation of this file.
41 GGcout(
"GGEMSLogEnergyTable",
"GGEMSLogEnergyTable", 3) <<
"GGEMSLogEnergyTable creating..." <<
GGendl;
43 bin_width_ = logf(highest_energy / lowest_energy) /
static_cast<GGfloat>(number_of_bins);
53 bins_.push_back(lowest_energy);
63 bins_.push_back(highest_energy);
69 GGcout(
"GGEMSLogEnergyTable",
"GGEMSLogEnergyTable", 3) <<
"GGEMSLogEnergyTable created!!!" <<
GGendl;
78 GGcout(
"GGEMSLogEnergyTable",
"~GGEMSLogEnergyTable", 3) <<
"GGEMSLogEnergyTable erasing..." <<
GGendl;
80 GGcout(
"GGEMSLogEnergyTable",
"~GGEMSLogEnergyTable", 3) <<
"GGEMSLogEnergyTable erased!!!" <<
GGendl;
110 last_index =
FindBin(energy, last_index);
132 else if (bin > 0 && energy <
bins_.at(bin)) {
150 if (energy <
bins_.at(1)) {
Definitions of miscellaneous mathematical functions.
std::vector< GGfloat > loss_table_data_
GGfloat LinearInterpolation(GGfloat const xa, GGfloat const ya, GGfloat const xb, GGfloat const yb, GGfloat const x)
interpolate the x value between point A and B
std::vector< GGfloat > bins_
GGfloat GetLossTableValue(GGfloat const &energy) const
get the interpolated loss table value
GGEMSLogEnergyTable(GGfloat const &lowest_energy, GGfloat const &highest_energy, GGsize const &number_of_bins)
GGEMSLogEnergyTable constructor.
GGsize FindBinLocation(GGfloat const &energy) const
get the bin where is the energy
#define GGendl
overload C++ std::endl
void SetValue(GGsize const &index, GGfloat const &value)
Set the data vector at index.
Print a custom std::cout end std::cerr handling verbosity.
GGsize FindBin(GGfloat const &energy, GGsize const &index) const
get the bin where is the energy depending on a index
~GGEMSLogEnergyTable(void)
GGEMSLogEnergyTable destructor.
GGEMS class computing log table for cut convertion from length to energy.