MIDSX 0.1
A x-ray transport code system for dosimetry
Loading...
Searching...
No Matches
material_properties.h
1#ifndef MCXRAYTRANSPORT_MATERIAL_PROPERTIES_H
2#define MCXRAYTRANSPORT_MATERIAL_PROPERTIES_H
3
4#include "data_access_object.h"
5#include <string>
6#include <vector>
7#include <unordered_map>
8#include <memory>
9
16public:
23 MaterialProperties(std::string name, DataAccessObject& dao);
24
30 std::string getName() const { return name_; }
31
37 int getMaterialId() const { return material_id_; }
38
44 double getMassDensity() const { return mass_density_; }
45
51 double getNumberDensity() const { return number_density_; }
52
58 double getAtomicWeight() const { return atomic_weight_; }
59
65 std::unordered_map<int, double> getElementalComposition() const { return elemental_composition_; }
66
72 std::unordered_map<int, double> getElementalMassDensity() const { return elemental_mass_density_; }
73
79 std::unordered_map<int, double> getElementalNumberDensity() const { return elemental_number_density_; }
80
86 std::unordered_map<int, double> getElementalAtomicWeight() const { return elemental_atomic_weight_; }
87
93 std::unordered_map<int, double> getElementalMassNumber() const { return elemental_mass_number_; }
94private:
95 std::string name_;
96 DataAccessObject& dao_;
97 int material_id_;
98 double mass_density_;
99 double number_density_;
100 double atomic_weight_;
101 std::unordered_map<int, double> elemental_composition_;
102 std::unordered_map<int, double> elemental_mass_density_;
103 std::unordered_map<int, double> elemental_number_density_;
104 std::unordered_map<int, double> elemental_atomic_weight_;
105 std::unordered_map<int, double> elemental_mass_number_;
106
107
108 void initializeProperties();
109
110 void setMaterialId();
111 void setElementalComposition();
112 void initializeMaterialProperties();
113
114
115
116 void setElementalDataForTableAndColumn(const std::string &table_name, const std::string &column_name,
117 std::unordered_map<int, double> &map);
118
119 void setMassDensity();
120 void setNumberDensity();
121 void setAtomicWeight();
122};
123
124#endif //MCXRAYTRANSPORT_MATERIAL_PROPERTIES_H
Class which provides an interface to a SQLite database.
Class which represents the properties of a material.
std::unordered_map< int, double > getElementalNumberDensity() const
Returns the number density of the elements in the material.
std::string getName() const
Returns the name of the material.
std::unordered_map< int, double > getElementalMassNumber() const
Returns the mass number of the elements in the material.
std::unordered_map< int, double > getElementalAtomicWeight() const
Returns the atomic weight of the elements in the material.
double getAtomicWeight() const
Returns the atomic weight of the material.
std::unordered_map< int, double > getElementalMassDensity() const
Returns the mass density of the elements in the material.
std::unordered_map< int, double > getElementalComposition() const
Returns the fractional elemental composition of the material.
int getMaterialId() const
Returns the ID of the material.
double getNumberDensity() const
Returns the number density of the material.
MaterialProperties(std::string name, DataAccessObject &dao)
Constructor for the MaterialProperties class.
double getMassDensity() const
Returns the mass density of the material.