4#ifndef MC_XRAY_TRANSPORT_PHYSICS_ENGINE_DATA_SERVICE_H
5#define MC_XRAY_TRANSPORT_PHYSICS_ENGINE_DATA_SERVICE_H
7#include "data_access_object.h"
8#include "interpolators.h"
20 const std::string MIDSX_DB_DIR_VAR = MIDSX_DB_DIR;
21 const std::string MIDSX_DB_NAME =
"midsx.db";
22 const std::string MIDSX_DB_PATH = MIDSX_DB_DIR_VAR +
"/" + MIDSX_DB_NAME;
82 std::vector<std::string> material_names_;
83 std::map<int, Material> material_map_;
84 Eigen::Matrix<double, Eigen::Dynamic, 2> max_total_cs_matrix_;
Class which provides an interface to a SQLite database.
Class which provides access to various simulation significant data.
void setMaxTotalCrossSectionsAndInterpolator()
Sets the maximum total cross sections and interpolator for the InteractionData object.
double interpolateMaxTotalCrossSection(double energy) const
Returns the maximum total cross section for all materials at the given energy.
uint8_t getAnyMaterialIdFromName(std::string name)
Returns the ID of the material with the given name.
InteractionData(const std::vector< std::string > &material_names)
Constructor for the InteractionData class.
Eigen::Matrix< double, Eigen::Dynamic, 2 > getTotalMaxCrossSectionsMatrixFromInteractionData()
Returns the 2 column matrix containing the maximum total cross sections for all materials.
void initializeData()
Initializes the data for the InteractionData object.
void setMaterialMap()
Sets the material map for the InteractionData object.
void fillTotalMaxCrossSectionsMatrix(Eigen::MatrixXd &total_max_cross_sections_matrix, const Eigen::MatrixXd &merged_energy_matrix)
Fills the total max cross sections matrix with the maximum total cross sections for all materials.
Material & getMaterialFromId(int id)
Returns the Material object with the given ID.
Eigen::Matrix< double, Eigen::Dynamic, 2 > getMaxTotalCrossSectionsMatrix() const
Returns the 2 column matrix containing the maximum total cross sections for all materials.
std::string getAnyMaterialNameFromId(int id)
Returns the name of the material with the given ID.
Class which performs linear interpolation on a log-log scale.
Class which represents a material.