File DetectorVolumeJsonConverter.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

namespace DetectorVolumeJsonConverter

Functions

std::shared_ptr<Experimental::DetectorVolume> fromJson(const GeometryContext &gctx, const nlohmann::json &jVolume)

convert from json format

Note

this only creates a volume in a stand-alone context, not in a detector context. For the latter, use the DetectorJsonConverter that will patch the portals accordingly

Parameters
  • gctx – the geometry context

  • jVolume – the json object representing the detector volume

nlohmann::json toJson(const GeometryContext &gctx, const Experimental::DetectorVolume &volume, const std::vector<const Experimental::DetectorVolume*> &detectorVolumes, const std::vector<const Experimental::Portal*> &portals = {}, const Options &options = Options{})

Convert to json format.

Parameters
  • gctx – the geometry context

  • volume – the detector volume instance

  • detectorVolumes – the list of other detector volumes

  • portals – the list of portals for saving the portal links

  • options – the options for the conversion

Returns

a json object representing the detector volume

nlohmann::json toJsonDetray(const GeometryContext &gctx, const Experimental::DetectorVolume &volume, const std::vector<const Experimental::DetectorVolume*> &detectorVolumes, const Options &options = Options{})

Convert to json detray format.

Parameters
  • gctx – the geometry context

  • volume – the detector volume instance

  • detectorVolumes – the list of other detector volumes

  • options – the options for the conversion

Returns

a json object representing the detector volume

struct Options
#include <Acts/Plugins/Json/DetectorVolumeJsonConverter.hpp>

Public Members

PortalJsonConverter::Options portalOptions
SurfaceJsonConverter::Options surfaceOptions
Transform3JsonConverter::Options transformOptions
namespace Experimental