ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
|
read the material from Json More...
#include <acts/blob/master/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< GeometryID, std::shared_ptr< const ISurfaceMaterial >> |
using | VolumeMaterialMap = std::map< GeometryID, 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 < GeometryID, std::shared_ptr < const ISurfaceMaterial > >, std::map< GeometryID, 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<GeometryID, 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<GeometryID, 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 44 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 44 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 805 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 805 of file JsonGeometryConverter.cpp
References Acts::Surface::bounds(), Acts::CylinderBounds::eHalfLengthZ, Acts::CylinderBounds::eR, Acts::GeometryObject::geoID(), 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 438 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 438 of file JsonGeometryConverter.cpp
References Acts::BinnedArray< T >::arrayObjects(), Acts::JsonGeometryConverter::VolumeRep::boundaries, Acts::GeometryID::boundary(), Acts::JsonGeometryConverter::VolumeRep::boundarySurfaces, Acts::TrackingVolume::boundarySurfaces(), Acts::TrackingVolume::confinedLayers(), Acts::TrackingVolume::confinedVolumes(), Acts::TrackingVolume::denseVolumes(), Acts::GeometryObject::geoID(), Acts::GeometryID::layer(), Acts::JsonGeometryConverter::VolumeRep::layers, Acts::JsonGeometryConverter::VolumeRep::material, Acts::GeometryID::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 521 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 521 of file JsonGeometryConverter.cpp
References Acts::GeometryID::approach(), Acts::Layer::approachDescriptor(), Acts::JsonGeometryConverter::LayerRep::approaches, Acts::JsonGeometryConverter::LayerRep::approacheSurfaces, Acts::ApproachDescriptor::containedSurfaces(), Acts::GeometryObject::geoID(), Acts::JsonGeometryConverter::LayerRep::layerID, Acts::JsonGeometryConverter::LayerRep::representing, Acts::JsonGeometryConverter::LayerRep::representingSurface, Acts::GeometryID::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 883 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 883 of file JsonGeometryConverter.cpp
References Acts::binPhi, Acts::binR, 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::AnnulusBounds::eMinPhiRel, Acts::RadialBounds::get(), Acts::AnnulusBounds::get(), Acts::CylinderBounds::get(), Acts::open, Acts::RadialBounds::rMax(), Acts::AnnulusBounds::rMax(), Acts::RadialBounds::rMin(), and Acts::AnnulusBounds::rMin().
|
private |
Default BinUtility to create proto material
the | Volume |
Definition at line 928 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 928 of file JsonGeometryConverter.cpp
References Acts::binPhi, Acts::binR, Acts::binX, Acts::binY, Acts::binZ, Acts::closed, Acts::CuboidVolumeBounds::eHalfLengthX, Acts::CuboidVolumeBounds::eHalfLengthY, Acts::CuboidVolumeBounds::eHalfLengthZ, Acts::CylinderVolumeBounds::eHalfLengthZ, Acts::CylinderVolumeBounds::eHalfPhiSector, Acts::CylinderVolumeBounds::eMaxR, Acts::CylinderVolumeBounds::eMinR, Acts::open, and Acts::Volume::volumeBounds().
|
private |
Create Json from a detector represenation.
Definition at line 219 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 219 of file JsonGeometryConverter.cpp
References ACTS_VERBOSE, nlohmann::to_string(), and Acts::JsonGeometryConverter::DetectorRep::volumes.
|
private |
Create the BinUtility for from Json.
Create the BinUtility for this.
Definition at line 865 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 865 of file JsonGeometryConverter.cpp
References Acts::binningValueNames, Acts::closed, max, min, and Acts::open.
std::pair< std::map< Acts::GeometryID, std::shared_ptr< const Acts::ISurfaceMaterial > >, std::map< Acts::GeometryID, std::shared_ptr< const Acts::IVolumeMaterial > > > Acts::JsonGeometryConverter::jsonToMaterialMaps | ( | const nlohmann::json & | materialmaps | ) |
Convert method
surfaceMaterialMap | The indexed material map collection |
Definition at line 56 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 56 of file JsonGeometryConverter.cpp
References ACTS_VERBOSE, Acts::GeometryID::setApproach(), Acts::GeometryID::setBoundary(), Acts::GeometryID::setLayer(), Acts::GeometryID::setSensitive(), and Acts::GeometryID::setVolume().
Referenced by Acts::Test::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 |
This is assumed to be an array or array of array[6]
Definition at line 846 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 846 of file JsonGeometryConverter.cpp
|
private |
Create the Surface Material from Json
material | is the json part representing a material object |
Definition at line 314 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 314 of file JsonGeometryConverter.cpp
References Acts::BinUtility::bins(), and nlohmann::basic_json::items().
|
private |
Create the Volume Material from Json
material | is the json part representing a material object |
Definition at line 346 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 346 of file JsonGeometryConverter.cpp
References Acts::detail::Grid< T, Axes >::at(), bin, Acts::Material::classificationNumbers(), 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(), and Acts::detail::Grid< T, Axes >::numLocalBins().
|
inlineprivate |
Private access to the logging instance.
Definition at line 250 of file JsonGeometryConverter.hpp.
View newest version in sPHENIX GitHub at line 250 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 165 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 165 of file JsonGeometryConverter.cpp
References Acts::JsonGeometryConverter::DetectorRep::volumes.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), and FW::Json::JsonMaterialWriter::write().
|
private |
SurfaceMaterial to Json
the | SurfaceMaterial |
Return the thickness in mm
Definition at line 587 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 587 of file JsonGeometryConverter.cpp
References Acts::BinUtility::binningData(), Acts::binningValueNames, Acts::closed, if(), and nlohmann::basic_json::push_back().
json Acts::JsonGeometryConverter::trackingGeometryToJson | ( | const TrackingGeometry & | tGeometry | ) |
Write method
tGeometry | is the tracking geometry which contains the material |
Definition at line 431 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 431 of file JsonGeometryConverter.cpp
References Acts::TrackingGeometry::highestTrackingVolume().
Referenced by FW::Json::JsonMaterialWriter::write().
|
private |
VolumeMaterial to Json
the | VolumeMaterial |
Definition at line 689 of file JsonGeometryConverter.cpp.
View newest version in sPHENIX GitHub at line 689 of file JsonGeometryConverter.cpp
References Acts::detail::Grid< T, Axes >::at(), bin, Acts::BinUtility::binningData(), Acts::binningValueNames, Acts::closed, if(), mat, nlohmann::basic_json::push_back(), and Acts::detail::Grid< T, Axes >::size().
|
private |
The config class.
Definition at line 247 of file JsonGeometryConverter.hpp.
View newest version in sPHENIX GitHub at line 247 of file JsonGeometryConverter.hpp
Referenced by JsonGeometryConverter(), and logger().