|
gsystem
|
Material definition belonging to a detector system. More...
#include <gmaterial.h>
Public Member Functions | |
| GMaterial (const std::string &system, std::vector< std::string > pars, const std::shared_ptr< GLogger > &logger) | |
| Construct a material from a serialized parameter list. | |
| virtual std::unique_ptr< GMaterial > | clone () const |
| Clone the material (polymorphic deep-copy). | |
| virtual | ~GMaterial ()=default |
| Virtual destructor (safe deletion through base pointers). | |
| bool | isChemicalFormula () const |
| Heuristic: return true if the composition looks like a chemical formula. | |
Identity and description | |
| std::string | getName () const |
| std::string | getDescription () const |
| double | getDensity () const |
| std::vector< std::string > | getComponents () const |
| std::vector< double > | getAmounts () const |
Public Member Functions inherited from GBase< GMaterial > | |
| GBase (const std::shared_ptr< GOptions > &gopt, std::string logger_name="") | |
| GBase (const std::shared_ptr< GLogger > &logger) | |
| GBase (const GBase &)=default | |
| GBase (GBase &&) noexcept=default | |
| virtual | ~GBase () |
| GBase & | operator= (const GBase &)=default |
| GBase & | operator= (GBase &&) noexcept=default |
Friends | |
| std::ostream & | operator<< (std::ostream &stream, const GMaterial &) |
| Stream operator used for logging material summaries. | |
Optical properties | |
| std::vector< double > | getPhotonEnergy () const |
| std::vector< double > | getIndexOfRefraction () const |
| std::vector< double > | getAbsorptionLength () const |
| std::vector< double > | getReflectivity () const |
| std::vector< double > | getEfficiency () const |
Scintillation properties | |
| std::vector< double > | getFastcomponent () const |
| std::vector< double > | getSlowcomponent () const |
| double | getScintillationyield () const |
| double | getResolutionscale () const |
| double | getFasttimeconstant () const |
| double | getSlowtimeconstant () const |
| double | getYieldratio () const |
| double | getBirksConstant () const |
Additional optical properties | |
| std::vector< double > | getRayleigh () const |
Additional Inherited Members | |
Protected Attributes inherited from GBase< GMaterial > | |
| std::shared_ptr< GLogger > | log |
A GMaterial is constructed from a serialized list of parameters (typically read from a database row or ASCII file) and stores:
The module treats materials as system-local definitions: a system (GSystem) loads its own materials and associates them to volumes by name.
Definition at line 28 of file gmaterial.h.
| GMaterial::GMaterial | ( | const std::string & | system, |
| std::vector< std::string > | pars, | ||
| const std::shared_ptr< GLogger > & | logger ) |
| system | System name that owns this material (used for provenance/logging). |
| pars | Serialized material parameters (must match GMATERIALNUMBEROFPARS). |
| logger | Logger used for diagnostics and error reporting. |
The constructor validates pars length against GMATERIALNUMBEROFPARS and then parses the fields. Optical/scintillation properties may be "unset" (typically UNINITIALIZEDSTRINGQUANTITY) and are skipped.
Definition at line 21 of file gmaterial.cc.
|
virtualdefault |
|
inlinevirtual |
Definition at line 50 of file gmaterial.h.
|
inline |
Definition at line 180 of file gmaterial.h.
|
inline |
Definition at line 173 of file gmaterial.h.
|
inline |
Definition at line 194 of file gmaterial.h.
|
inline |
Definition at line 172 of file gmaterial.h.
|
inline |
Definition at line 171 of file gmaterial.h.
|
inline |
Definition at line 170 of file gmaterial.h.
|
inline |
Definition at line 182 of file gmaterial.h.
|
inline |
Definition at line 187 of file gmaterial.h.
|
inline |
Definition at line 191 of file gmaterial.h.
|
inline |
Definition at line 179 of file gmaterial.h.
|
inline |
Definition at line 169 of file gmaterial.h.
|
inline |
Definition at line 178 of file gmaterial.h.
|
inline |
Definition at line 199 of file gmaterial.h.
|
inline |
Definition at line 181 of file gmaterial.h.
|
inline |
Definition at line 190 of file gmaterial.h.
|
inline |
Definition at line 189 of file gmaterial.h.
|
inline |
Definition at line 188 of file gmaterial.h.
|
inline |
Definition at line 192 of file gmaterial.h.
|
inline |
Definition at line 193 of file gmaterial.h.
|
inline |
The module uses a simple heuristic: when the sum of amounts is > 1.0, the values are likely atom counts rather than fractional masses.
true if the composition likely represents a formula, false otherwise. Definition at line 210 of file gmaterial.h.
|
friend |
Definition at line 66 of file gmaterial.cc.