gsystem
Loading...
Searching...
No Matches
GMirror Class Reference

Optical boundary (surface) definition belonging to a detector system. More...

#include <gmirror.h>

Public Member Functions

 GMirror (const std::string &system, std::vector< std::string > pars, const std::shared_ptr< GLogger > &logger)
 Construct a mirror from a serialized parameter list.
 
virtual std::unique_ptr< GMirrorclone () const
 Clone the mirror (polymorphic deep-copy).
 
virtual ~GMirror ()=default
 Virtual destructor (safe deletion through base pointers).
 
Identity and description
std::string getName () const
 
std::string getDescription () const
 
- Public Member Functions inherited from GBase< GMirror >
 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 ()
 
GBaseoperator= (const GBase &)=default
 
GBaseoperator= (GBase &&) noexcept=default
 

Friends

std::ostream & operator<< (std::ostream &stream, const GMirror &)
 Stream operator used for logging mirror summaries.
 

Geant4 surface configuration

std::string getType () const
 
std::string getFinish () const
 
std::string getModel () const
 
std::string getBorder () const
 
bool isSkinSurface () const
 
double getSigmaAlpha () const
 
bool hasSigmaAlpha () const
 

Optical properties

std::string getMatOptProps () const
 
bool usesMaterialOpticalProperties () const
 
std::vector< double > getPhotonEnergy () const
 
std::vector< double > getIndexOfRefraction () const
 
std::vector< double > getReflectivity () const
 
std::vector< double > getEfficiency () const
 
std::vector< double > getSpecularLobe () const
 
std::vector< double > getSpecularSpike () const
 
std::vector< double > getBackscatter () const
 
std::vector< double > getTransmittance () const
 

Additional Inherited Members

- Protected Attributes inherited from GBase< GMirror >
std::shared_ptr< GLoggerlog
 

Detailed Description

In gemc, any optical boundary is described as a "mirror", regardless of its use or reflective quality. A GMirror is constructed from a serialized list of parameters (typically read from a database row or ASCII file) and stores:

  • the Geant4 surface configuration (type, finish, model, sigmaAlpha);
  • the boundary scope: "SkinSurface" for the whole volume skin, or the name of a bordering volume for a border surface;
  • the boundary optical properties, either as the name of a material whose properties table is reused (matOptProps) or as explicit tables evaluated at photonEnergy.

The module treats mirrors as system-local definitions: a system (GSystem) loads its own mirrors and volumes reference them by name through the GVolume mirror field.

Definition at line 28 of file gmirror.h.

Constructor & Destructor Documentation

◆ GMirror()

GMirror::GMirror ( const std::string & system,
std::vector< std::string > pars,
const std::shared_ptr< GLogger > & logger )
Parameters
systemSystem name that owns this mirror (used for provenance/logging).
parsSerialized mirror parameters (must match GMIRRORNUMBEROFPARS).
loggerLogger used for diagnostics and error reporting.

The constructor validates pars length against GMIRRORNUMBEROFPARS and then parses the fields positionally, in the canonical order used by the loaders: name, description, type, finish, model, border, matOptProps, photonEnergy, indexOfRefraction, reflectivity, efficiency, specularlobe, specularspike, backscatter, transmittance, sigmaAlpha.

Validation performed here (fail fast, before any Geant4 object is created):

  • type, finish, model and border are mandatory;
  • either matOptProps or a non-empty photonEnergy table must be provided;
  • every provided property vector must match the photonEnergy length.

Definition at line 26 of file gmirror.cc.

◆ ~GMirror()

virtual GMirror::~GMirror ( )
virtualdefault

Member Function Documentation

◆ clone()

virtual std::unique_ptr< GMirror > GMirror::clone ( ) const
inlinevirtual
Returns
A heap-allocated copy of this mirror.

Definition at line 56 of file gmirror.h.

◆ getBackscatter()

std::vector< double > GMirror::getBackscatter ( ) const
inline

Definition at line 155 of file gmirror.h.

◆ getBorder()

std::string GMirror::getBorder ( ) const
inline

Definition at line 139 of file gmirror.h.

◆ getDescription()

std::string GMirror::getDescription ( ) const
inline

Definition at line 131 of file gmirror.h.

◆ getEfficiency()

std::vector< double > GMirror::getEfficiency ( ) const
inline

Definition at line 152 of file gmirror.h.

◆ getFinish()

std::string GMirror::getFinish ( ) const
inline

Definition at line 137 of file gmirror.h.

◆ getIndexOfRefraction()

std::vector< double > GMirror::getIndexOfRefraction ( ) const
inline

Definition at line 150 of file gmirror.h.

◆ getMatOptProps()

std::string GMirror::getMatOptProps ( ) const
inline

Definition at line 147 of file gmirror.h.

◆ getModel()

std::string GMirror::getModel ( ) const
inline

Definition at line 138 of file gmirror.h.

◆ getName()

std::string GMirror::getName ( ) const
inline

Definition at line 130 of file gmirror.h.

◆ getPhotonEnergy()

std::vector< double > GMirror::getPhotonEnergy ( ) const
inline

Definition at line 149 of file gmirror.h.

◆ getReflectivity()

std::vector< double > GMirror::getReflectivity ( ) const
inline

Definition at line 151 of file gmirror.h.

◆ getSigmaAlpha()

double GMirror::getSigmaAlpha ( ) const
inline

Definition at line 141 of file gmirror.h.

◆ getSpecularLobe()

std::vector< double > GMirror::getSpecularLobe ( ) const
inline

Definition at line 153 of file gmirror.h.

◆ getSpecularSpike()

std::vector< double > GMirror::getSpecularSpike ( ) const
inline

Definition at line 154 of file gmirror.h.

◆ getTransmittance()

std::vector< double > GMirror::getTransmittance ( ) const
inline

Definition at line 156 of file gmirror.h.

◆ getType()

std::string GMirror::getType ( ) const
inline

Definition at line 136 of file gmirror.h.

◆ hasSigmaAlpha()

bool GMirror::hasSigmaAlpha ( ) const
inline

Definition at line 142 of file gmirror.h.

◆ isSkinSurface()

bool GMirror::isSkinSurface ( ) const

Definition at line 98 of file gmirror.cc.

◆ usesMaterialOpticalProperties()

bool GMirror::usesMaterialOpticalProperties ( ) const
inline

Definition at line 148 of file gmirror.h.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & stream,
const GMirror & gMir )
friend

Definition at line 131 of file gmirror.cc.


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