Class Acts::MaterialMapJsonConverter
-
class MaterialMapJsonConverter
read the material from Json
Public Types
-
using DetectorMaterialMaps = std::pair<SurfaceMaterialMap, VolumeMaterialMap>
-
using SurfaceMaterialMap = std::map<GeometryIdentifier, std::shared_ptr<const ISurfaceMaterial>>
-
using VolumeMaterialMap = std::map<GeometryIdentifier, std::shared_ptr<const IVolumeMaterial>>
Public Functions
-
MaterialMapJsonConverter(const Config &config, Acts::Logging::Level level)
Constructor.
- Parameters
config – configuration struct for the reader
level – The log level
-
~MaterialMapJsonConverter() = default
Destructor.
-
void convertToHierarchy(std::vector<std::pair<GeometryIdentifier, Acts::TrackingVolumeAndMaterial>> &volumeHierarchy, std::vector<std::pair<GeometryIdentifier, Acts::SurfaceAndMaterialWithContext>> &surfaceHierarchy, const Acts::TrackingVolume *tVolume)
Go through a volume to find subvolume, layers and surfaces.
Store volumes and surfaces in two vector used to initialised the geometry hierarchy.
- Parameters
volumeHierarchy – is a vector of volume to be filled
surfaceHierarchy – is a vector of surfaces to be filled
tVolume – is a volume
-
DetectorMaterialMaps jsonToMaterialMaps(const nlohmann::json &materialmaps)
Convert a json material map to a DetectorMaterialMaps.
- Parameters
materialmaps – The json material
-
nlohmann::json materialMapsToJson(const DetectorMaterialMaps &maps, const IVolumeMaterialJsonDecorator *decorator = nullptr)
Convert a DetectorMaterialMaps to json.
- Parameters
maps – The material map collection
decorator – nullptr or a decorator to add extra attributes
-
nlohmann::json trackingGeometryToJson(const TrackingGeometry &tGeometry, const ITrackingGeometryJsonDecorator *decorator = nullptr)
Convert a tracking geometry to json.
Can be used to initialise the material mapping process.
- Parameters
tGeometry – is the tracking geometry
decorator – nullptr or a decorator to add extra attributes
-
class Config
Configuration of the Converter.
Public Members
-
GeometryContext context = GeometryContext()
Default geometry context to extract surface transforms.
-
bool processApproaches = true
Steering to handle approach data.
-
bool processBoundaries = true
Steering to handle boundary data.
-
bool processDenseVolumes = false
Steering to handle volume data.
-
bool processNonMaterial = false
Add proto material to all surfaces.
-
bool processRepresenting = true
Steering to handle representing data.
-
bool processSensitives = true
Steering to handle sensitive data.
-
bool processVolumes = true
Steering to handle volume data.
-
GeometryContext context = GeometryContext()
-
using DetectorMaterialMaps = std::pair<SurfaceMaterialMap, VolumeMaterialMap>