allpix::Materials
#include <MaterialManager.hpp>
Public Functions
Name | |
---|---|
Materials(Materials const & ) =delete | |
void | operator=(Materials const & ) =delete |
G4Material * | get(const std::string & material) const |
void | set(const std::string & name, G4Material * material) |
Materials & | getInstance() |
Detailed Description
class allpix::Materials;
Singleton class to manage materials
This manager both holds often-used, pre-defined materials and provides access to the Geant4 NIST database of materials. It is a singleton class and can be extended at run time via the set method.
Public Functions Documentation
function Materials
Materials(
Materials const &
) =delete
function operator=
void operator=(
Materials const &
) =delete
function get
G4Material * get(
const std::string & material
) const
Parameters:
- material Material name
Exceptions:
- ModuleError if material cannot be found
Return: Material
Method to get a Geant4 material from the manager’s internal database or from external sources
function set
void set(
const std::string & name,
G4Material * material
)
Parameters:
- name Name of the material to be registered
- material Pointer to the material object
Method to add an additional material to the internal database
function getInstance
static Materials & getInstance()
Updated on 2024-12-13 at 08:31:36 +0000