EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
read the material from Json More...
#include <acts/blob/sPHENIX/Plugins/Json/include/Acts/Plugins/Json/JsonGeometryConverter.hpp>
Classes | |
class | Config |
struct | DetectorRep |
Detector representation for Json writing. More... | |
struct | LayerRep |
Layer representation for Json writing. More... | |
struct | VolumeRep |
Volume representation for Json writing. More... | |
Public Types | |
using | SurfaceMaterialMap = std::map< GeometryIdentifier, std::shared_ptr< const ISurfaceMaterial >> |
using | VolumeMaterialMap = std::map< GeometryIdentifier, std::shared_ptr< const IVolumeMaterial >> |
using | DetectorMaterialMaps = std::pair< SurfaceMaterialMap, VolumeMaterialMap > |
using | geo_id_value = uint64_t |
using | SurfaceMaterialRep = std::map< geo_id_value, const ISurfaceMaterial * > |
using | SurfaceRep = std::map< geo_id_value, const Surface * > |
using | VolumeMaterialRep = std::map< geo_id_value, const IVolumeMaterial * > |
Public Member Functions | |
JsonGeometryConverter (const Config &cfg) | |
~JsonGeometryConverter ()=default | |
Destructor. | |
std::pair< std::map < GeometryIdentifier, std::shared_ptr< const ISurfaceMaterial > >, std::map < GeometryIdentifier, std::shared_ptr< const IVolumeMaterial > > > | jsonToMaterialMaps (const nlohmann::json &materialmaps) |
nlohmann::json | materialMapsToJson (const DetectorMaterialMaps &maps) |
nlohmann::json | trackingGeometryToJson (const TrackingGeometry &tGeometry) |
Private Attributes | |
Config | m_cfg |
The config class. | |
read the material from Json
Definition at line 30 of file JsonGeometryConverter.hpp.
View newest version in sPHENIX GitHub at line 30 of file JsonGeometryConverter.hpp
using Acts::JsonGeometryConverter::DetectorMaterialMaps = std::pair<SurfaceMaterialMap, VolumeMaterialMap> |
Definition at line 38 of file JsonGeometryConverter.hpp.
View newest version in sPHENIX GitHub at line 38 of file JsonGeometryConverter.hpp
using Acts::JsonGeometryConverter::geo_id_value = uint64_t |
Definition at line 40 of file JsonGeometryConverter.hpp.
View newest version in sPHENIX GitHub at line 40 of file JsonGeometryConverter.hpp
using Acts::JsonGeometryConverter::SurfaceMaterialMap = std::map<GeometryIdentifier, std::shared_ptr<const ISurfaceMaterial>> |
Definition at line 33 of file JsonGeometryConverter.hpp.
View newest version in sPHENIX GitHub at line 33 of file JsonGeometryConverter.hpp
using Acts::JsonGeometryConverter::SurfaceMaterialRep = std::map<geo_id_value, const ISurfaceMaterial*> |
Definition at line 42 of file JsonGeometryConverter.hpp.
View newest version in sPHENIX GitHub at line 42 of file JsonGeometryConverter.hpp
using Acts::JsonGeometryConverter::SurfaceRep = std::map<geo_id_value, const Surface*> |
Definition at line 43 of file JsonGeometryConverter.hpp.
View newest version in sPHENIX GitHub at line 43 of file JsonGeometryConverter.hpp
using Acts::JsonGeometryConverter::VolumeMaterialMap = std::map<GeometryIdentifier, std::shared_ptr<const IVolumeMaterial>> |
Definition at line 36 of file JsonGeometryConverter.hpp.
View newest version in sPHENIX GitHub at line 36 of file JsonGeometryConverter.hpp
using Acts::JsonGeometryConverter::VolumeMaterialRep = std::map<geo_id_value, const IVolumeMaterial*> |
Definition at line 44 of file JsonGeometryConverter.hpp.
View newest version in sPHENIX GitHub at line 44 of file JsonGeometryConverter.hpp
Acts::JsonGeometryConverter::JsonGeometryConverter | ( | const Config & | cfg | ) |
Constructor
cfg | configuration struct for the reader |
Definition at line 95 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 95 of file JsonGeometryConverter.cpp
References Acts::JsonGeometryConverter::Config::logger, and m_cfg.
|
default |
Destructor.
|
private |
Add surface information to json surface
The | json surface The surface |
Definition at line 854 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 854 of file JsonGeometryConverter.cpp
References Acts::Surface::bounds(), Acts::CylinderBounds::eHalfLengthZ, Acts::CylinderBounds::eR, Acts::GeometryObject::geometryId(), Acts::CylinderBounds::get(), Acts::AnnulusBounds::phiMax(), Acts::AnnulusBounds::phiMin(), Acts::RadialBounds::rMax(), Acts::AnnulusBounds::rMax(), Acts::RadialBounds::rMin(), Acts::AnnulusBounds::rMin(), and Acts::Surface::transform().
|
private |
Convert to internal representation method, recursive call
tGeometry | is the tracking geometry which contains the material |
Definition at line 501 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 501 of file JsonGeometryConverter.cpp
References Acts::BinnedArray< T >::arrayObjects(), Acts::JsonGeometryConverter::VolumeRep::boundaries, Acts::GeometryIdentifier::boundary(), Acts::JsonGeometryConverter::VolumeRep::boundarySurfaces, Acts::TrackingVolume::boundarySurfaces(), Acts::TrackingVolume::confinedLayers(), Acts::TrackingVolume::confinedVolumes(), Acts::TrackingVolume::denseVolumes(), Acts::GeometryObject::geometryId(), Acts::GeometryIdentifier::layer(), Acts::JsonGeometryConverter::VolumeRep::layers, Acts::JsonGeometryConverter::VolumeRep::material, Acts::GeometryIdentifier::volume(), Acts::JsonGeometryConverter::VolumeRep::volumeID, Acts::TrackingVolume::volumeMaterial(), Acts::JsonGeometryConverter::VolumeRep::volumeName, Acts::TrackingVolume::volumeName(), and Acts::JsonGeometryConverter::DetectorRep::volumes.
|
private |
Convert to internal representation method
tGeometry | is the tracking geometry which contains the material |
Definition at line 584 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 584 of file JsonGeometryConverter.cpp
References Acts::GeometryIdentifier::approach(), Acts::Layer::approachDescriptor(), Acts::JsonGeometryConverter::LayerRep::approaches, Acts::JsonGeometryConverter::LayerRep::approacheSurfaces, Acts::ApproachDescriptor::containedSurfaces(), Acts::GeometryObject::geometryId(), Acts::JsonGeometryConverter::LayerRep::layerID, Acts::JsonGeometryConverter::LayerRep::representing, Acts::JsonGeometryConverter::LayerRep::representingSurface, Acts::GeometryIdentifier::sensitive(), Acts::JsonGeometryConverter::LayerRep::sensitives, Acts::JsonGeometryConverter::LayerRep::sensitiveSurfaces, Acts::Layer::surfaceArray(), Acts::Surface::surfaceMaterial(), Acts::Layer::surfaceRepresentation(), and Acts::SurfaceArray::surfaces().
|
private |
Default BinUtility to create proto material
the | Surface |
Definition at line 947 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 947 of file JsonGeometryConverter.cpp
References ACTS_INFO, Acts::binPhi, Acts::binR, Acts::binX, Acts::binY, Acts::binZ, Acts::Surface::bounds(), Acts::closed, Acts::RadialBounds::eAveragePhi, Acts::CylinderBounds::eAveragePhi, Acts::CylinderBounds::eHalfLengthZ, Acts::RadialBounds::eHalfPhiSector, Acts::CylinderBounds::eHalfPhiSector, Acts::AnnulusBounds::eMaxPhiRel, Acts::RectangleBounds::eMaxX, Acts::RectangleBounds::eMaxY, Acts::AnnulusBounds::eMinPhiRel, Acts::RectangleBounds::eMinX, Acts::RectangleBounds::eMinY, Acts::RadialBounds::get(), Acts::AnnulusBounds::get(), Acts::CylinderBounds::get(), Acts::RectangleBounds::get(), M_PI, Acts::Surface::name(), Acts::open, Acts::RadialBounds::rMax(), Acts::AnnulusBounds::rMax(), Acts::RadialBounds::rMin(), Acts::AnnulusBounds::rMin(), and Acts::s_epsilon.
|
private |
Default BinUtility to create proto material
the | Volume |
Definition at line 1015 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 1015 of file JsonGeometryConverter.cpp
References ACTS_INFO, Acts::binPhi, Acts::binR, Acts::binX, Acts::binY, Acts::binZ, Acts::closed, Acts::CuboidVolumeBounds::eHalfLengthX, Acts::CuboidVolumeBounds::eHalfLengthY, Acts::CutoutCylinderVolumeBounds::eHalfLengthZ, Acts::CuboidVolumeBounds::eHalfLengthZ, Acts::CylinderVolumeBounds::eHalfLengthZ, Acts::CylinderVolumeBounds::eHalfPhiSector, Acts::CutoutCylinderVolumeBounds::eMaxR, Acts::CylinderVolumeBounds::eMaxR, Acts::CutoutCylinderVolumeBounds::eMinR, Acts::CylinderVolumeBounds::eMinR, M_PI, Acts::open, Acts::s_epsilon, Acts::Volume::volumeBounds(), and Acts::TrackingVolume::volumeName().
|
private |
Create Json from a detector represenation.
Definition at line 276 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 276 of file JsonGeometryConverter.cpp
References ACTS_VERBOSE, nlohmann::to_string(), value, and Acts::JsonGeometryConverter::DetectorRep::volumes.
|
private |
Create the BinUtility for from Json.
Create the BinUtility for this.
Definition at line 909 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 909 of file JsonGeometryConverter.cpp
References Acts::binningValueNames, charm_jet_strange_helicity::bins, Acts::closed, max, min, Acts::open, and nlohmann::basic_json::size().
std::pair< std::map< Acts::GeometryIdentifier, std::shared_ptr< const Acts::ISurfaceMaterial > >, std::map< Acts::GeometryIdentifier, std::shared_ptr< const Acts::IVolumeMaterial > > > Acts::JsonGeometryConverter::jsonToMaterialMaps | ( | const nlohmann::json & | materialmaps | ) |
Convert method
surfaceMaterialMap | The indexed material map collection |
Definition at line 108 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 108 of file JsonGeometryConverter.cpp
References ACTS_VERBOSE, Acts::GeometryIdentifier::setApproach(), Acts::GeometryIdentifier::setBoundary(), Acts::GeometryIdentifier::setLayer(), Acts::GeometryIdentifier::setSensitive(), Acts::GeometryIdentifier::setVolume(), and value.
Referenced by BOOST_AUTO_TEST_CASE(), and Acts::JsonMaterialDecorator::JsonMaterialDecorator().
|
private |
Create the Material Matrix.
Create the Material Matrix from Json
data | is the json part representing a material data array |
Definition at line 894 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 894 of file JsonGeometryConverter.cpp
|
private |
Create the Surface Material from Json
material | is the json part representing a material object |
Definition at line 371 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 371 of file JsonGeometryConverter.cpp
References Acts::BinUtility::bins(), nlohmann::basic_json::items(), and value.
|
private |
Create the local to global transform for from Json.
Create the local to global transform.
Definition at line 931 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 931 of file JsonGeometryConverter.cpp
References Acts::Test::transform.
|
private |
Create the Volume Material from Json
material | is the json part representing a material object |
Definition at line 409 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 409 of file JsonGeometryConverter.cpp
References Acts::detail::Grid< T, Axes >::at(), Acts::createGrid2D(), Acts::createGrid3D(), Acts::BinUtility::dimensions(), nlohmann::basic_json::items(), max, Acts::detail::Grid< T, Axes >::maxPosition(), min, Acts::detail::Grid< T, Axes >::minPosition(), Acts::detail::Grid< T, Axes >::numLocalBins(), and value.
|
inlineprivate |
Private access to the logging instance.
Definition at line 258 of file JsonGeometryConverter.hpp.
View newest version in sPHENIX GitHub at line 258 of file JsonGeometryConverter.hpp
References Acts::JsonGeometryConverter::Config::logger, and m_cfg.
json Acts::JsonGeometryConverter::materialMapsToJson | ( | const DetectorMaterialMaps & | maps | ) |
Convert method
surfaceMaterialMap | The indexed material map collection |
Convert method
Definition at line 222 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 222 of file JsonGeometryConverter.cpp
References value, and Acts::JsonGeometryConverter::DetectorRep::volumes.
Referenced by BOOST_AUTO_TEST_CASE(), and ActsExamples::JsonMaterialWriter::write().
|
private |
SurfaceMaterial to Json
the | SurfaceMaterial |
Definition at line 650 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 650 of file JsonGeometryConverter.cpp
References nlohmann::basic_json::array(), Acts::BinUtility::binningData(), Acts::binningValueNames, Acts::closed, nlohmann::basic_json::push_back(), and Acts::BinUtility::transform().
json Acts::JsonGeometryConverter::trackingGeometryToJson | ( | const TrackingGeometry & | tGeometry | ) |
Write method
tGeometry | is the tracking geometry which contains the material |
Definition at line 494 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 494 of file JsonGeometryConverter.cpp
References Acts::TrackingGeometry::highestTrackingVolume().
Referenced by ActsExamples::JsonMaterialWriter::write().
|
private |
VolumeMaterial to Json
the | VolumeMaterial |
Definition at line 744 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 744 of file JsonGeometryConverter.cpp
References nlohmann::basic_json::array(), Acts::detail::Grid< T, Axes >::at(), nlohmann::basic_json::push_back(), and Acts::detail::Grid< T, Axes >::size().
|
private |
The config class.
Definition at line 255 of file JsonGeometryConverter.hpp.
View newest version in sPHENIX GitHub at line 255 of file JsonGeometryConverter.hpp
Referenced by JsonGeometryConverter(), and logger().