Namespace Acts::SurfaceJsonConverter

namespace SurfaceJsonConverter

Functions

std::shared_ptr<Surface> fromJson(const nlohmann::json &jSurface)

The Surface converter from json.

The Surface converter from json.

Convert the single delegate if it is of the type of the reference.

The Transform converter from json.

The type is given as a template argument in order to be able to construct the correct fitting types for surfaces.

The Surface converter from json.

Convert the single delegate if it is of the type of the reference.

The Transform converter from json.

The type is given as a template argument in order to be able to construct the correct fitting types for surfaces.

Parameters
  • jSurface – the surface json object

  • j – the read-in json object

  • jVolumeBounds – the read-in json object

  • jVolumeBounds – the read-in json object

Returns

a shared object created from json input

Returns

a shared_ptr to a surface object for type polymorphism

Returns

a unique_ptr to a volume bounds object for type polymorphism

Returns

a unique_ptr to a volume bounds object for type polymorphism

nlohmann::json toJson(const GeometryContext &gctx, const Surface &surface, const Options &options = Options{})

Contextual conversion of a surface.

Parameters
  • gctx – the geometry context for this

  • surface – the surface to be converted

  • options – the writing options for the surfaces

Returns

a json object representing the surface

nlohmann::json toJsonDetray(const GeometryContext &gctx, const Surface &surface, const Options &options = Options{})

Contextual conversion of a surface - Detray export.

Note

reading back detray json is not supported and will fail

Parameters
  • gctx – the geometry context for this

  • surface – the surface to be converted

  • options – the writing options for the surfaces

Returns

a json object representing the surface

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

Public Members

bool portal = false
Transform3JsonConverter::Options transformOptions = Transform3JsonConverter::Options{}
bool writeMaterial = true