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

Classes

struct  Options
 

Functions

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.
 
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.
 
std::shared_ptr
< Experimental::DetectorVolume
fromJson (const GeometryContext &gctx, const nlohmann::json &jVolume)
 convert from json format
 

Function Documentation

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

convert from json format

Parameters
gctxthe geometry context
jVolumethe json object representing the detector volume
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

Definition at line 151 of file DetectorVolumeJsonConverter.cpp.

View newest version in sPHENIX GitHub at line 151 of file DetectorVolumeJsonConverter.cpp

References bounds, Acts::Experimental::defaultPortalGenerator(), Acts::Transform3JsonConverter::fromJson(), testing::internal::move(), perf_headwind::name, portalGenerator, Acts::Test::transform, Acts::Experimental::tryAllPortals(), Acts::Experimental::tryRootVolumes(), and volumes.

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::DetectorVolumeJsonConverter::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
gctxthe geometry context
volumethe detector volume instance
detectorVolumesthe list of other detector volumes
portalsthe list of portals for saving the portal links
optionsthe options for the conversion
Returns
a json object representing the detector volume

Definition at line 45 of file DetectorVolumeJsonConverter.cpp.

View newest version in sPHENIX GitHub at line 45 of file DetectorVolumeJsonConverter.cpp

References distance(), it, Acts::Experimental::DetectorVolume::name(), merge_hashes::p, Acts::DetectorVolumeJsonConverter::Options::portalOptions, Acts::Experimental::DetectorVolume::portals(), physmon_simulation::s, Acts::Experimental::DetectorVolume::surfaceCandidatesUpdator(), Acts::DetectorVolumeJsonConverter::Options::surfaceOptions, Acts::Experimental::DetectorVolume::surfaces(), Acts::Transform3JsonConverter::toJson(), Acts::Experimental::DetectorVolume::transform(), Acts::DetectorVolumeJsonConverter::Options::transformOptions, testSigmaEff::v, Acts::Experimental::DetectorVolume::volumeBounds(), and Acts::Experimental::DetectorVolume::volumes().

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::DetectorVolumeJsonConverter::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
gctxthe geometry context
volumethe detector volume instance
detectorVolumesthe list of other detector volumes
optionsthe options for the conversion
Returns
a json object representing the detector volume

Definition at line 99 of file DetectorVolumeJsonConverter.cpp.

View newest version in sPHENIX GitHub at line 99 of file DetectorVolumeJsonConverter.cpp

References Acts::DetrayJsonHelper::addVolumeLink(), Acts::enumerate(), Acts::Experimental::DetectorVolume::name(), Acts::VolumeBounds::orientedSurfaces(), merge_hashes::p, Acts::DetectorVolumeJsonConverter::Options::portalOptions, Acts::Experimental::DetectorVolume::portals(), physmon_simulation::s, Acts::DetectorVolumeJsonConverter::Options::surfaceOptions, Acts::Experimental::DetectorVolume::surfaces(), Acts::Transform3JsonConverter::toJson(), Acts::DetectorJsonConverter::toJsonDetray(), Acts::Experimental::DetectorVolume::transform(), Acts::DetectorVolumeJsonConverter::Options::transformOptions, Acts::VolumeBounds::type(), physmon_ckf_tracking::u, and Acts::Experimental::DetectorVolume::volumeBounds().

Referenced by BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: