Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::PortalJsonConverter Namespace Reference

Classes

struct  Options
 

Functions

nlohmann::json toJson (const GeometryContext &gctx, const Experimental::Portal &portal, const std::vector< const Experimental::DetectorVolume * > &detectorVolumes, const Options &options=Options{})
 Convert to json format.
 
std::vector< nlohmann::json > toJsonDetray (const GeometryContext &gctx, const Experimental::Portal &portal, std::size_t ip, const Experimental::DetectorVolume &volume, const OrientedSurfaces &orientedSurfaces, const std::vector< const Experimental::DetectorVolume * > &detectorVolumes, const Options &options=Options{})
 Convert to json format - dedicated Detray function.
 
nlohmann::json toJson (const Experimental::DetectorVolumeUpdator &updator, const std::vector< const Experimental::DetectorVolume * > &detectorVolumes)
 convert to json format
 
std::shared_ptr
< Experimental::Portal
fromJson (const GeometryContext &gctx, const nlohmann::json &jPortal, const std::vector< std::shared_ptr< Experimental::DetectorVolume >> &detectorVolumes)
 convert from json format
 

Function Documentation

std::shared_ptr< Acts::Experimental::Portal > Acts::PortalJsonConverter::fromJson ( const GeometryContext &  gctx,
const nlohmann::json &  jPortal,
const std::vector< std::shared_ptr< Experimental::DetectorVolume >> &  detectorVolumes 
)

convert from json format

Parameters
gctxthe geometry context
jPortalis the json portal description
detectorVolumesis the list of already created detector volumes
Returns
a Portal

Definition at line 295 of file PortalJsonConverter.cpp.

View newest version in sPHENIX GitHub at line 295 of file PortalJsonConverter.cpp

References Acts::Experimental::detail::PortalHelper::attachDetectorVolumesUpdator(), Acts::Experimental::detail::PortalHelper::attachDetectorVolumeUpdator(), acts.examples.mockupbuilder::detectorVolumes, Acts::enumerate(), Acts::Transform3JsonConverter::fromJson(), writeMapConfig::surface, and t.

Referenced by BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Convert to json format.

Parameters
gctxthe geometry context
portalthe portal instance
detectorVolumesis the list of all detector voluems for portal pointing
optionshow to write this thing out
Returns
a json object

Definition at line 48 of file PortalJsonConverter.cpp.

View newest version in sPHENIX GitHub at line 48 of file PortalJsonConverter.cpp

References Acts::Experimental::Portal::detectorVolumeUpdators(), Acts::Experimental::Portal::surface(), Acts::PortalJsonConverter::Options::surfaceOptions, and Acts::Transform3JsonConverter::toJson().

Referenced by BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

nlohmann::json Acts::PortalJsonConverter::toJson ( const Experimental::DetectorVolumeUpdator &  updator,
const std::vector< const Experimental::DetectorVolume * > &  detectorVolumes 
)

convert to json format

Parameters
updatorthe detector volume updator
detectorVolumesthe list of all detector volumes
Returns
a json object

Definition at line 253 of file PortalJsonConverter.cpp.

View newest version in sPHENIX GitHub at line 253 of file PortalJsonConverter.cpp

References Acts::Transform3JsonConverter::toJson(), physmon_ckf_tracking::u, and testSigmaEff::v.

+ Here is the call graph for this function:

std::vector< nlohmann::json > Acts::PortalJsonConverter::toJsonDetray ( const GeometryContext &  gctx,
const Experimental::Portal &  portal,
std::size_t  ip,
const Experimental::DetectorVolume &  volume,
const OrientedSurfaces &  orientedSurfaces,
const std::vector< const Experimental::DetectorVolume * > &  detectorVolumes,
const Options options = Options{} 
)

Convert to json format - dedicated Detray function.

Parameters
gctxthe geometry context
portalthe portal instance
ipis the portal index that could be used to pick the oriented surface
volumeis the detector volume to which these surfaces belong to
orientedSurfacesare the bounding surfaces (may still need to be split)
detectorVolumesis the list of all detector voluems for portal pointing
optionshow to write this thing out
Note
that detray relies on singly connected masks, hence a portal from ACTS with multi volume link needs to be split into the multiple volumes
detray also only has outside pointing links
Returns
a json object

Definition at line 69 of file PortalJsonConverter.cpp.

View newest version in sPHENIX GitHub at line 69 of file PortalJsonConverter.cpp

References Acts::DetrayJsonHelper::addVolumeLink(), Acts::detail::Grid< T, Axes >::axes(), KFPMath::b, Acts::binR, Acts::binZ, Acts::VectorHelpers::cast(), Acts::Surface::center(), Acts::Experimental::Portal::detectorVolumeUpdators(), Acts::enumerate(), Acts::Experimental::IndexedUpdatorImpl< grid_t, extractor_type, filler_type >::grid, add_histos_bX::ib, Acts::Experimental::BoundVolumesGrid1Impl::indexedUpdator, Acts::Surface::normal(), Acts::SurfaceJsonConverter::Options::portal, writeMapConfig::surface, Acts::Experimental::Portal::surface(), Acts::PortalJsonConverter::Options::surfaceOptions, Acts::DetectorJsonConverter::toJsonDetray(), Acts::Test::transform, Acts::Surface::transform(), Acts::Experimental::DetectorVolume::transform(), Acts::Surface::type(), physmon_ckf_tracking::u, and testSigmaEff::v.

+ Here is the call graph for this function: