Stores material properties and sends them to GEANT4 geometry. More...
#include <MaterialPropertyLoader.h>
Public Member Functions | |
std::map< double, double > | GetMaterialProperty (std::string Material, std::string Property) |
double | GetMaterialConstProperty (std::string Material, std::string Property) |
std::map< std::string, double > const & | GetMaterialConstProperties (std::string Material) |
std::map< std::string, std::map< double, double > > const & | GetMaterialProperties (std::string Material) |
void | GetPropertiesFromServices (detinfo::DetectorPropertiesData const &detProp) |
Imports properties from LArSoft services. More... | |
void | UpdateGeometry (G4LogicalVolumeStore *lvs) |
Updates the material properties with the collected values. More... | |
Methods to set material properties | |
void | SetMaterialProperty (std::string Material, std::string Property, std::map< double, double > Values, double Unit) |
Stores the specified emergy-dependent material property. More... | |
void | SetMaterialConstProperty (std::string Material, std::string Property, double Value, double Unit) |
Stores the specified material property. More... | |
Setting of specific properties | |
void | SetBirksConstant (std::string, double, double) |
void | SetReflectances (std::string, std::map< std::string, std::map< double, double >>, std::map< std::string, std::map< double, double >>) |
void | SetReflectances (std::map< std::string, std::map< double, double >>) |
Private Attributes | |
std::map< std::string, std::map< std::string, double > > | fConstPropertyList |
std::map< std::string, std::map< std::string, std::map< double, double > > > | fPropertyList |
std::map< std::string, double > | fBirksConstants |
Stores material properties and sends them to GEANT4 geometry.
Class to set material properties for different materials in the detector. Currently mainly used to set optical properties for LAr and other optical components.
The reflectivity properties of the material are stored in a different way depending on whether the standard GEANT4 process or the custom simple boundary process are used in the simulation (determined by detinfo::DetectorProperties::SimpleBoundary()
). For the former, reflectivity is saved as a property of the material itself with the property name "REFLECTIVITY"
. For the latter, the properties (both a reflectivity and a diffuse reflection fraction) are stored as properties of the "LAr"
material, with a name "REFLECTANCE_\<Material\>"
and "DIFFUSE_REFLECTANCE_FRACTION_\<Material\>"
. This is the storage policy expected by larg4::OpBoundaryProcessSimple
, which implements the simple boundary model.
Definition at line 50 of file MaterialPropertyLoader.h.
|
inline |
Definition at line 69 of file MaterialPropertyLoader.h.
|
inline |
Definition at line 62 of file MaterialPropertyLoader.h.
|
inline |
Definition at line 76 of file MaterialPropertyLoader.h.
|
inline |
Definition at line 55 of file MaterialPropertyLoader.h.
void larg4::MaterialPropertyLoader::GetPropertiesFromServices | ( | detinfo::DetectorPropertiesData const & | detProp | ) |
Imports properties from LArSoft services.
The properties imported include:
"LAr"
:"FASTCOMPONENT"
) from detinfo::LArProperties::FastScintSpectrum()
"SLOWCOMPONENT"
) from detinfo::LArProperties::SlowScintSpectrum()
"RINDEX"
) from detinfo::LArProperties::RIndexSpectrum()
"ABSLENGTH"
) from detinfo::LArProperties::AbsLengthSpectrum()
[cm]"RAYLEIGH"
) from detinfo::LArProperties::RayleighSpectrum()
[cm]"SCINTILLATIONYIELD"
) from detinfo::LArProperties::ScintYield(true)
[1/MeV]"FASTTIMECONSTANT"
) from detinfo::LArProperties::ScintFastTimeConst()
[ns]"SLOWTIMECONSTANT"
) from detinfo::LArProperties::ScintSlowTimeConst()
[ns]"YIELDRATIO"
) detinfo::LArProperties::ScintYieldRatio()
"ELECTRICFIELD"
) from detinfo::DetectorProperties::Efield()
[kV/cm]detinfo::LArProperties::ScintBirksConstant()
[cm/MeV]detinfo::DetectorProperties::SimpleBoundary()
), for each supported material XXX
:"REFLECTANCE_XXX"
) from detinfo::LArProperties::SurfaceReflectances()
"DIFFUSE_REFLECTANCE_FRACTION_XXX"
) from detinfo::LArProperties::SurfaceReflectances()
detinfo::LArProperties
.detinfo::LArProperties::ScintByParticleType()
):"\<PARTICLE\>SCINTILLATIONYIELD"
from detinfo::LArProperties::<Particle>ScintYield()
(as above)"\<PARTICLE\>YIELDRATIO"
from detinfo::LArProperties::<Particle>ScintYieldRatio()
(as above)<PARTICLE>
being proton, muon, kaon, pion, electron and α particles.!detinfo::DetectorProperties::SimpleBoundary()
):XXX
reflectivity ("REFLECTIVITY"
) from detinfo::LArProperties::SurfaceReflectances()
detinfo::LArProperties::SurfaceReflectances()
.TPB
material (if simulating it, according to detinfo::LArProperties::ExtraMatProperties()
):"RINDEX"
) from detinfo::LArProperties::RIndexSpectrum()
"WLSABSLENGTH"
) from detinfo::LArProperties::TpbAbs()
[m]"WLSCOMPONENT"
from detinfo::LArProperties::TpbEm()
Definition at line 318 of file MaterialPropertyLoader.cxx.
void larg4::MaterialPropertyLoader::SetBirksConstant | ( | std::string | Material, |
double | PropertyValue, | ||
double | Unit | ||
) |
Definition at line 61 of file MaterialPropertyLoader.cxx.
void larg4::MaterialPropertyLoader::SetMaterialConstProperty | ( | std::string | Material, |
std::string | Property, | ||
double | Value, | ||
double | Unit | ||
) |
Stores the specified material property.
Material | name of the material to set the property of |
Property | name of the property |
Value | the value of the property |
Unit | unit of the property value (CLHEP) |
SetMaterialProperty()
The property is stored internally and not propagated to GEANT4 (use UpdateGeometry()
to that purpose). The previous value of the property is silently overwritten.
Definition at line 48 of file MaterialPropertyLoader.cxx.
void larg4::MaterialPropertyLoader::SetMaterialProperty | ( | std::string | Material, |
std::string | Property, | ||
std::map< double, double > | Values, | ||
double | Unit | ||
) |
Stores the specified emergy-dependent material property.
Material | name of the material to set the property of |
Property | name of the property |
Values | table of property values (see below) |
Unit | unit of the property values (CLHEP) |
SetMaterialConstProperty()
The property is stored internally and not propagated to GEANT4 (use UpdateGeometry()
to that purpose). The previous value of the property is silently overwritten.
The table of values is in form of (energy
, value
) pairs, where value
is measured in Units
and energy
is measured in electronvolt.
Definition at line 30 of file MaterialPropertyLoader.cxx.
void larg4::MaterialPropertyLoader::SetReflectances | ( | std::string | , |
std::map< std::string, std::map< double, double >> | Reflectances, | ||
std::map< std::string, std::map< double, double >> | DiffuseFractions | ||
) |
Definition at line 260 of file MaterialPropertyLoader.cxx.
void larg4::MaterialPropertyLoader::SetReflectances | ( | std::map< std::string, std::map< double, double >> | Reflectances | ) |
Definition at line 298 of file MaterialPropertyLoader.cxx.
void larg4::MaterialPropertyLoader::UpdateGeometry | ( | G4LogicalVolumeStore * | lvs | ) |
Updates the material properties with the collected values.
lvs | the store of logical volumes to be updated |
Before calling this function, properties for some materials (mostly liquid argon, but not only: see e.g. GetPropertiesFromServices()
) are collected and updated. This method considers all volumes in the store lvs
. For the ones made of a material we have properties for, their material properties are updated to reflect the values we have collected.
Definition at line 70 of file MaterialPropertyLoader.cxx.
|
private |
Definition at line 208 of file MaterialPropertyLoader.h.
|
private |
Definition at line 203 of file MaterialPropertyLoader.h.
|
private |
Definition at line 206 of file MaterialPropertyLoader.h.