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)


  • config – configuration struct for the reader

  • level – The log level

~MaterialMapJsonConverter() = default


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 hierachy.

  • 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.


materialmaps – The json material

nlohmann::json materialMapsToJson(const DetectorMaterialMaps &maps, const IVolumeMaterialJsonDecorator *decorator = nullptr)

Convert a DetectorMaterialMaps to json.

  • 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.

  • 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 tranforms.

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.