ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::TrackingGeometryMaterial Struct Reference

Surface and volume material assignments. More...

#include <Acts/Material/TrackingGeometryMaterial.hpp>

Collaboration diagram for Acts::TrackingGeometryMaterial:
[legend]

Public Member Functions

 TrackingGeometryMaterial ()=default
 Construct empty material assignments.
 TrackingGeometryMaterial (SurfaceMaterialMaps surfaces, VolumeMaterialMaps volumes, KeyedSurfaceMaterialMaps keyed={})
 Construct from material assignment maps.
void apply (std::span< Surface *const > surfaces) const
 Apply to selected surfaces with the same validation as a complete geometry.
void apply (Surface &surface) const
 Apply to a single surface.
void apply (TrackingGeometry &geometry) const
 Apply material to a completed geometry, checking surface identities and resolving all surface assignments before modifying the geometry.
void apply (TrackingVolume &volume) const
 Apply volume material by geometry identifier.
const std::optional< std::string > & description () const
 Read the optional document description, ignored when applying material.
void setDescription (std::optional< std::string > description)
 Set or remove the document description.

Static Public Member Functions

static TrackingGeometryMaterial fromGeometry (const TrackingGeometry &geometry, bool includeNonMaterial=false)
 Extract material assignments without modifying the geometry or resolving deferred binning.

Public Attributes

KeyedSurfaceMaterialMaps keyedSurfaces {}
 Surface assignments indexed by stable string key.
SurfaceMaterialMaps surfaceMaterials {}
 Unkeyed surface assignments indexed by geometry ID.
VolumeMaterialMaps volumeMaterials {}
 Volume assignments indexed by geometry ID.

Detailed Description

Surface and volume material assignments.

Keyed assignments are stored separately and must never be matched by ID.

Constructor & Destructor Documentation

◆ TrackingGeometryMaterial()

Acts::TrackingGeometryMaterial::TrackingGeometryMaterial ( SurfaceMaterialMaps surfaces,
VolumeMaterialMaps volumes,
KeyedSurfaceMaterialMaps keyed = {} )

Construct from material assignment maps.

Parameters
surfacesUnkeyed surface assignments
volumesVolume assignments
keyedStable-key surface assignments

Member Function Documentation

◆ apply() [1/4]

void Acts::TrackingGeometryMaterial::apply ( std::span< Surface *const > surfaces) const

Apply to selected surfaces with the same validation as a complete geometry.

Parameters
surfacesSurfaces whose material is updated; repeated pointers are allowed

◆ apply() [2/4]

void Acts::TrackingGeometryMaterial::apply ( Surface & surface) const

Apply to a single surface.

This cannot check uniqueness across surfaces.

Parameters
surfaceSurface whose material is updated

◆ apply() [3/4]

void Acts::TrackingGeometryMaterial::apply ( TrackingGeometry & geometry) const

Apply material to a completed geometry, checking surface identities and resolving all surface assignments before modifying the geometry.

Keyed surfaces require a matching key; unused map entries are allowed.

Exceptions
std::invalid_argumentif a keyed map is applied to Gen1 geometry
Parameters
geometryGeometry whose material is updated

◆ apply() [4/4]

void Acts::TrackingGeometryMaterial::apply ( TrackingVolume & volume) const

Apply volume material by geometry identifier.

Parameters
volumeVolume whose material is updated

◆ description()

const std::optional< std::string > & Acts::TrackingGeometryMaterial::description ( ) const

Read the optional document description, ignored when applying material.

Returns
Description, or std::nullopt if absent

◆ fromGeometry()

TrackingGeometryMaterial Acts::TrackingGeometryMaterial::fromGeometry ( const TrackingGeometry & geometry,
bool includeNonMaterial = false )
static

Extract material assignments without modifying the geometry or resolving deferred binning.

Existing material payloads are shared with the geometry.

Parameters
geometryGeometry to extract material from
includeNonMaterialAdd deferred one-bin proto grids for bare surfaces
Returns
Surface (including stable-key) and volume assignments

◆ setDescription()

void Acts::TrackingGeometryMaterial::setDescription ( std::optional< std::string > description)

Set or remove the document description.

Empty descriptions are allowed.

Parameters
descriptionText, or std::nullopt to remove the description