ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::JsonMaterialDecorator Class Reference

Material decorator from Json format. More...

#include <ActsPlugins/Json/JsonMaterialDecorator.hpp>

Inheritance diagram for Acts::JsonMaterialDecorator:
[legend]
Collaboration diagram for Acts::JsonMaterialDecorator:
[legend]

Public Member Functions

 JsonMaterialDecorator (const MaterialMapJsonConverter::Config &rConfig, const std::string &jFileName, Acts::Logging::Level level, bool clearSurfaceMaterial=true, bool clearVolumeMaterial=true)
 Constructor with configuration.
void decorate (Surface &surface) const final
 Decorate a surface.
void decorate (TrackingVolume &volume) const final
 Decorate a TrackingVolume.
Public Member Functions inherited from Acts::IMaterialDecorator
virtual ~IMaterialDecorator ()=default
 Virtual Destructor.

Detailed Description

Material decorator from Json format.

This reads in material maps for surfaces and volumes from a json file

Constructor & Destructor Documentation

◆ JsonMaterialDecorator()

Acts::JsonMaterialDecorator::JsonMaterialDecorator ( const MaterialMapJsonConverter::Config & rConfig,
const std::string & jFileName,
Acts::Logging::Level level,
bool clearSurfaceMaterial = true,
bool clearVolumeMaterial = true )

Constructor with configuration.

Parameters
rConfigthe configuration for the material map reader
jFileNamethe json file name to read
levelthe logging level
clearSurfaceMaterialif true, clear the surface material before decorating, this means if there is no material for a certain surface within the json file, the surface WILL NOT have any material, eventually assigned (proto-/)material will be cleared
clearVolumeMaterialif true, clear the volume material before decorating, same as above, but for volumes

Member Function Documentation

◆ decorate() [1/2]

void Acts::JsonMaterialDecorator::decorate ( Surface & surface) const
finalvirtual

Decorate a surface.

Parameters
surfacethe non-cost surface that is decorated

Implements Acts::IMaterialDecorator.

◆ decorate() [2/2]

void Acts::JsonMaterialDecorator::decorate ( TrackingVolume & volume) const
finalvirtual

Decorate a TrackingVolume.

Parameters
volumethe non-cost volume that is decorated

Implements Acts::IMaterialDecorator.