LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
Stores material properties and sends them to GEANT4 geometry. More...
#include "MaterialPropertyLoader.h"
Public Member Functions | |
MaterialPropertyLoader () | |
~MaterialPropertyLoader () | |
std::map< double, double > | GetMaterialProperty (std::string Material, std::string Property) |
double | GetMaterialConstProperty (std::string Material, std::string Property) |
std::map< std::string, double > | GetMaterialConstProperties (std::string Material) |
std::map< std::string, std::map< double, double > > | GetMaterialProperties (std::string Material) |
void | GetPropertiesFromServices () |
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 45 of file MaterialPropertyLoader.h.
|
inline |
Definition at line 52 of file MaterialPropertyLoader.h.
|
inline |
Definition at line 54 of file MaterialPropertyLoader.h.
|
inline |
Definition at line 70 of file MaterialPropertyLoader.h.
References fConstPropertyList.
|
inline |
Definition at line 66 of file MaterialPropertyLoader.h.
References fConstPropertyList.
|
inline |
Definition at line 74 of file MaterialPropertyLoader.h.
References fPropertyList, GetPropertiesFromServices(), SetBirksConstant(), SetMaterialConstProperty(), SetMaterialProperty(), SetReflectances(), and UpdateGeometry().
|
inline |
Definition at line 62 of file MaterialPropertyLoader.h.
References fPropertyList.
void larg4::MaterialPropertyLoader::GetPropertiesFromServices | ( | ) |
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 290 of file MaterialPropertyLoader.cxx.
References detinfo::LArProperties::AbsLengthSpectrum(), detinfo::LArProperties::AlphaScintYield(), detinfo::LArProperties::AlphaScintYieldRatio(), detinfo::LArProperties::ElectronScintYield(), detinfo::LArProperties::ElectronScintYieldRatio(), detinfo::LArProperties::ExtraMatProperties(), detinfo::LArProperties::FastScintSpectrum(), detinfo::LArProperties::KaonScintYield(), detinfo::LArProperties::KaonScintYieldRatio(), detinfo::LArProperties::MuonScintYield(), detinfo::LArProperties::MuonScintYieldRatio(), detinfo::LArProperties::PionScintYield(), detinfo::LArProperties::PionScintYieldRatio(), detinfo::LArProperties::ProtonScintYield(), detinfo::LArProperties::ProtonScintYieldRatio(), detinfo::LArProperties::RayleighSpectrum(), detinfo::LArProperties::RIndexSpectrum(), detinfo::LArProperties::ScintBirksConstant(), detinfo::LArProperties::ScintByParticleType(), detinfo::LArProperties::ScintFastTimeConst(), detinfo::LArProperties::ScintResolutionScale(), detinfo::LArProperties::ScintSlowTimeConst(), detinfo::LArProperties::ScintYield(), detinfo::LArProperties::ScintYieldRatio(), SetBirksConstant(), SetMaterialConstProperty(), SetMaterialProperty(), SetReflectances(), detinfo::LArProperties::SlowScintSpectrum(), detinfo::LArProperties::SurfaceReflectanceDiffuseFractions(), detinfo::LArProperties::SurfaceReflectances(), detinfo::LArProperties::TpbAbs(), detinfo::LArProperties::TpbEm(), and detinfo::LArProperties::TpbTimeConstant().
Referenced by larg4::LArG4::beginJob(), and GetMaterialProperties().
void larg4::MaterialPropertyLoader::SetBirksConstant | ( | std::string | Material, |
double | PropertyValue, | ||
double | Unit | ||
) |
Definition at line 59 of file MaterialPropertyLoader.cxx.
References fBirksConstants.
Referenced by GetMaterialProperties(), and GetPropertiesFromServices().
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 46 of file MaterialPropertyLoader.cxx.
References fConstPropertyList.
Referenced by GetMaterialProperties(), and GetPropertiesFromServices().
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 26 of file MaterialPropertyLoader.cxx.
References fPropertyList.
Referenced by GetMaterialProperties(), GetPropertiesFromServices(), and SetReflectances().
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 232 of file MaterialPropertyLoader.cxx.
References SetMaterialProperty().
Referenced by GetMaterialProperties(), and GetPropertiesFromServices().
void larg4::MaterialPropertyLoader::SetReflectances | ( | std::map< std::string, std::map< double, double > > | Reflectances | ) |
Definition at line 270 of file MaterialPropertyLoader.cxx.
References SetMaterialProperty().
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.
References fBirksConstants, fConstPropertyList, and fPropertyList.
Referenced by larg4::LArG4::beginJob(), and GetMaterialProperties().
|
private |
Definition at line 202 of file MaterialPropertyLoader.h.
Referenced by SetBirksConstant(), and UpdateGeometry().
|
private |
Definition at line 197 of file MaterialPropertyLoader.h.
Referenced by GetMaterialConstProperties(), GetMaterialConstProperty(), SetMaterialConstProperty(), and UpdateGeometry().
|
private |
Definition at line 200 of file MaterialPropertyLoader.h.
Referenced by GetMaterialProperties(), GetMaterialProperty(), SetMaterialProperty(), and UpdateGeometry().