File MaterialMapJsonConverter.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

Typedefs

typedef std::tuple<std::shared_ptr<const Acts::Surface>, std::shared_ptr<const Acts::ISurfaceMaterial>, Acts::GeometryContext> SurfaceAndMaterialWithContext
typedef std::pair<const Acts::TrackingVolume*, std::shared_ptr<const Acts::IVolumeMaterial>> TrackingVolumeAndMaterial
class MaterialMapJsonConverter
#include <Acts/Plugins/Json/MaterialMapJsonConverter.hpp>

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

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)

Convert a DetectorMaterialMaps to json.

Parameters

maps – The material map collection

nlohmann::json trackingGeometryToJson(const TrackingGeometry &tGeometry)

Convert a tracking geometry to json.

Can be used to initialise the material mapping process.

Parameters

tGeometry – is the tracking geometry

Private Functions

inline const Logger &logger() const

Private access to the logging instance.

Private Members

Config m_cfg

The config class.

std::unique_ptr<const Logger> m_logger = {nullptr}

The logger instance.

Acts::GeometryHierarchyMapJsonConverter<Acts::SurfaceAndMaterialWithContext> m_surfaceConverter

Geometry hierarchy writer for surface.

Acts::GeometryHierarchyMapJsonConverter<const ISurfaceMaterial*> m_surfaceMaterialConverter

Geometry hierarchy writer for surface material.

std::string m_surfaceName = "Material Surface Map"

Name of the surface hierarchy.

Acts::GeometryHierarchyMapJsonConverter<Acts::TrackingVolumeAndMaterial> m_volumeConverter

Geometry hierarchy writer for tracking volume.

Acts::GeometryHierarchyMapJsonConverter<const IVolumeMaterial*> m_volumeMaterialConverter

Geometry hierarchy writer for volume material.

std::string m_volumeName = "Material Volume Map"

Name of the volume hierarchy.

class Config
#include <Acts/Plugins/Json/MaterialMapJsonConverter.hpp>

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.