OMSim
Geant4 for IceCube optical module studies
|
Handles the creation and processing of materials from json files. More...
This class is responsible for extracting data from json files, creating new materials, processing optical surfaces, and handling special material types such as IceCube ice and scintillators.
Public Member Functions | |
OMSimMaterialHandler (const G4String &filename) | |
void | processMaterial () |
Process the material defined in the input file. | |
G4OpticalSurface * | processSurface () |
Process and return an optical surface defined in the input file. | |
void | processExtraProperties () |
Process extra properties for an existing material. | |
void | processSpecial (ProcessorFunction *processor) |
Process special material types using a provided function. | |
G4String | GetName () |
Private Member Functions | |
void | readJsonFile () |
void | createMaterial () |
Create a new Geant4 material based on the input data. | |
void | processProperties () |
Process the properties defined in the input file and add them to the material. | |
void | processConstProperties () |
Process constant properties defined in the input file and add them to the material. | |
void | findMaterialPropertyTable (G4String p_name) |
Find the material property table for an existing material. | |
void | addProperty (const G4String &key, G4double energyUnit, G4double valueUnit, bool invertX, const boost::property_tree::ptree &propertyTree) |
Add a property to the material properties table. | |
G4OpticalSurfaceFinish | getOpticalSurfaceFinish (const std::string &finish) |
Get the G4OpticalSurfaceFinish enum value from a string. | |
G4OpticalSurfaceModel | getOpticalSurfaceModel (const std::string &model) |
Get the G4OpticalSurfaceModel enum value from a string. | |
G4SurfaceType | getSurfaceType (const std::string &type) |
Get the G4SurfaceType enum value from a string. | |
G4State | getState (const std::string &type) |
Get the G4State enum value from a string. | |
Private Attributes | |
ParameterTable * | m_fileData |
G4double | m_hc_eVnm = h_Planck * c_light / nm |
G4String | m_filePath |
G4String | m_objectName |
boost::property_tree::ptree | m_jsonTree |
G4Material * | m_material |
G4MaterialPropertiesTable * | m_MPT |
G4OpticalSurface * | m_opticalSurface |
|
private |
p_propertyName | Name of the property. |
p_xUnit | Unit conversion factor for energy values. |
p_yUnit | Unit conversion factor for property values. |
p_invertX | Whether to invert the x-axis values. |
p_propertyTree | Property tree containing the property data. |
|
private |
p_name | Name of the material whose property table is to be found. |
|
private |
finish | String representation of the finish. |
|
private |
p_model | String representation of the model. |
|
private |
p_state | String representation of the state. |
|
private |
p_type | String representation of the surface type. |
|
private |
The json files that contain a key "jConstProperties", will have a list of properties with a constant
void OMSimMaterialHandler::processExtraProperties | ( | ) |
This method is used to add additional properties to a material that has already been defined.
|
private |
In the json file there is a jProperties key containing one ore more keys (which will be the name of the property in the material property table). Each of these keys contains two arrays, one in key jWavelength and the other in jValues.
void OMSimMaterialHandler::processSpecial | ( | ProcessorFunction * | p_processor | ) |
p_processor | Function pointer to the processor function. |
This method is used for processing special material types like IceCube ice or scintillators, which require custom handling.
G4OpticalSurface * OMSimMaterialHandler::processSurface | ( | ) |