MIDSX 0.1
A x-ray transport code system for dosimetry
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
InteractionData Class Reference

Class which provides access to various simulation significant data. More...

#include <interaction_data.h>

Collaboration diagram for InteractionData:

Public Member Functions

 InteractionData (const std::vector< std::string > &material_names)
 Constructor for the InteractionData class.
 
MaterialgetMaterialFromId (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.
 
double interpolateMaxTotalCrossSection (double energy) const
 Returns the maximum total cross section for all materials at the given energy.
 
std::string getAnyMaterialNameFromId (int id)
 Returns the name of the material with the given ID.
 
uint8_t getAnyMaterialIdFromName (std::string name)
 Returns the ID of the material with the given name.
 

Private Member Functions

void initializeData ()
 Initializes the data for the InteractionData object.
 
void setMaterialMap ()
 Sets the material map for the InteractionData object.
 
void setMaxTotalCrossSectionsAndInterpolator ()
 Sets the maximum total cross sections and interpolator for the InteractionData object.
 
Eigen::Matrix< double, Eigen::Dynamic, 2 > getTotalMaxCrossSectionsMatrixFromInteractionData ()
 Returns the 2 column matrix containing the maximum total cross sections for all materials.
 
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.
 

Private Attributes

DataAccessObject dao_
 
std::vector< std::string > material_names_
 
std::map< int, Materialmaterial_map_
 
Eigen::Matrix< double, Eigen::Dynamic, 2 > max_total_cs_matrix_
 
Interpolator::LogLogLinear max_total_cs_interpolator_
 

Detailed Description

Class which provides access to various simulation significant data.

This class provides an interface to the database along with Material objects which contain computed data, along with data that is computed from all materials.

Definition at line 30 of file interaction_data.h.

Constructor & Destructor Documentation

◆ InteractionData()

InteractionData::InteractionData ( const std::vector< std::string > & material_names)
explicit

Constructor for the InteractionData class.

Parameters
material_namesA vector of strings containing the names of the materials to be used in the simulation.

Member Function Documentation

◆ fillTotalMaxCrossSectionsMatrix()

void InteractionData::fillTotalMaxCrossSectionsMatrix ( Eigen::MatrixXd & total_max_cross_sections_matrix,
const Eigen::MatrixXd & merged_energy_matrix )
private

Fills the total max cross sections matrix with the maximum total cross sections for all materials.

Parameters
total_max_cross_sections_matrixThe matrix to fill with the maximum total cross sections for all materials.
merged_energy_matrixThe matrix containing the energy values for all materials.

◆ getAnyMaterialIdFromName()

uint8_t InteractionData::getAnyMaterialIdFromName ( std::string name)

Returns the ID of the material with the given name.

Parameters
nameThe name of the material.
Returns
The ID of the material with the given name.

◆ getAnyMaterialNameFromId()

std::string InteractionData::getAnyMaterialNameFromId ( int id)

Returns the name of the material with the given ID.

Parameters
idThe ID of the material.
Returns
The name of the material with the given ID.

◆ getMaterialFromId()

Material & InteractionData::getMaterialFromId ( int id)
inline

Returns the Material object with the given ID.

Parameters
idThe ID of the Material object to return.
Returns
The Material object with the given ID.

Definition at line 45 of file interaction_data.h.

◆ getMaxTotalCrossSectionsMatrix()

Eigen::Matrix< double, Eigen::Dynamic, 2 > InteractionData::getMaxTotalCrossSectionsMatrix ( ) const
inline

Returns the 2 column matrix containing the maximum total cross sections for all materials.

The first column contains the energy values, and the second column contains the maximum total cross sections. Energy values are in eV and cross sections are in cm^-1.

Returns
The 2 column matrix containing the maximum total cross sections for all materials.

Definition at line 55 of file interaction_data.h.

◆ getTotalMaxCrossSectionsMatrixFromInteractionData()

Eigen::Matrix< double, Eigen::Dynamic, 2 > InteractionData::getTotalMaxCrossSectionsMatrixFromInteractionData ( )
private

Returns the 2 column matrix containing the maximum total cross sections for all materials.

The first column contains the energy values, and the second column contains the maximum total cross sections. Energy values are in eV and cross sections are in cm^-1.

Returns
The 2 column matrix containing the maximum total cross sections for all materials.

◆ interpolateMaxTotalCrossSection()

double InteractionData::interpolateMaxTotalCrossSection ( double energy) const
inline

Returns the maximum total cross section for all materials at the given energy.

Parameters
energyThe energy (eV) at which to return the maximum total cross section.
Returns
The maximum total cross section (cm^-1) for all materials at the given energy .

Definition at line 63 of file interaction_data.h.

◆ setMaterialMap()

void InteractionData::setMaterialMap ( )
private

Sets the material map for the InteractionData object.

The material map is a map of material IDs to Material objects.

Member Data Documentation

◆ dao_

DataAccessObject InteractionData::dao_
private

Definition at line 81 of file interaction_data.h.

◆ material_map_

std::map<int, Material> InteractionData::material_map_
private

Definition at line 83 of file interaction_data.h.

◆ material_names_

std::vector<std::string> InteractionData::material_names_
private

Definition at line 82 of file interaction_data.h.

◆ max_total_cs_interpolator_

Interpolator::LogLogLinear InteractionData::max_total_cs_interpolator_
private

Definition at line 85 of file interaction_data.h.

◆ max_total_cs_matrix_

Eigen::Matrix<double, Eigen::Dynamic, 2> InteractionData::max_total_cs_matrix_
private

Definition at line 84 of file interaction_data.h.


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