ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::MergedMaterialMarker Class Referencefinal

Sentinel surface material used by Portal::merge in its "keep going" mode. More...

#include <Acts/Material/MergedMaterialMarker.hpp>

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

Public Member Functions

 MergedMaterialMarker ()=default
 Default constructor.
 ~MergedMaterialMarker () override=default
 Destructor.
double factor (Direction pDir, MaterialUpdateMode mode) const
 Update pre factor.
std::vector< AxisDirectionlocalAxisDirections () const override
 Returns the axis directions for the local coordinate system.
virtual MaterialSlab materialSlab (const Vector2 &lp, Direction pDir, MaterialUpdateMode mode) const
 Return method for fully scaled material description of the Surface.
const MaterialSlabmaterialSlab (const Vector2 &lp=Vector2{ 0., 0.}) const override
 Return method for full material description of the Surface.
const MaterialSlabmaterialSlab (const Vector3 &gp) const override
 Return method for full material description of the Surface.
virtual MaterialSlab materialSlab (const Vector3 &gp, Direction pDir, MaterialUpdateMode mode) const
 Return method for full material description of the Surface.
MergedMaterialMarkerscale (double factor) override
 Scale operator – no-op, the marker carries no material.
std::ostream & toStream (std::ostream &sl) const override
 Output Method for std::ostream.
Public Member Functions inherited from Acts::ISurfaceMaterial
 ISurfaceMaterial ()=default
 Constructor.
 ISurfaceMaterial (double splitFactor)
 Constructor.
 ISurfaceMaterial (double splitFactor, MappingType mappingType)
 Constructor.
virtual ~ISurfaceMaterial ()=default
 Destructor.
double factor (Direction pDir, MaterialUpdateMode mode) const
 Update pre factor.
MappingType mappingType () const
 Return the type of surface material mapping.
std::string toString () const
 output into a string

Additional Inherited Members

Protected Attributes inherited from Acts::ISurfaceMaterial
MappingType m_mappingType {MappingType::Default}
 Use the default mapping type by default.
double m_splitFactor {1.}
 the split factor in favour of oppositePre

Detailed Description

Sentinel surface material used by Portal::merge in its "keep going" mode.

When two portal surfaces that both carry material (or one of them does) are merged, the original material cannot be transferred onto the (larger) merged surface. Instead of aborting the construction, the merge can be configured to discard the input material and tag the merged surface with this marker.

The marker carries no physical material – it always returns MaterialSlab::Nothing() – but its presence makes the lossy merge discoverable downstream (e.g. when inspecting or writing out the geometry).

Member Function Documentation

◆ factor()

Update pre factor.

Parameters
pDiris the positive direction through the surface
modeis the material update directive
Returns
Factor for material scaling based on direction and update mode

◆ localAxisDirections()

std::vector< AxisDirection > Acts::MergedMaterialMarker::localAxisDirections ( ) const
overridevirtual

Returns the axis directions for the local coordinate system.

Returns
Vector of axis directions defining the local coordinate system

Implements Acts::ISurfaceMaterial.

◆ materialSlab() [1/4]

virtual MaterialSlab Acts::ISurfaceMaterial::materialSlab ( const Vector2 & lp,
Direction pDir,
MaterialUpdateMode mode ) const
virtual

Return method for fully scaled material description of the Surface.

  • from local coordinate of the material grid
Parameters
lpis the local position used for the (eventual) lookup
pDiris the positive direction through the surface
modeis the material update directive
Returns
MaterialSlab

Reimplemented from Acts::ISurfaceMaterial.

◆ materialSlab() [2/4]

const MaterialSlab & Acts::MergedMaterialMarker::materialSlab ( const Vector2 & lp = Vector2{ 0., 0.}) const
overridevirtual

Return method for full material description of the Surface.

  • from local coordinate of the material grid
Parameters
lpis the local position used for the (eventual) lookup
Returns
const MaterialSlab
Note
the input parameter is ignored, always returns MaterialSlab::Nothing()

Implements Acts::ISurfaceMaterial.

◆ materialSlab() [3/4]

const MaterialSlab & Acts::MergedMaterialMarker::materialSlab ( const Vector3 & gp) const
overridevirtual

Return method for full material description of the Surface.

  • from the global coordinates
Parameters
gpis the global position used for the (eventual) lookup
Returns
const MaterialSlab
Deprecated
Use materialSlab(const Vector2&) with a prior Surface::globalToLocal() call to convert the global position.
Note
the input parameter is ignored, always returns MaterialSlab::Nothing()

Implements Acts::ISurfaceMaterial.

◆ materialSlab() [4/4]

virtual MaterialSlab Acts::ISurfaceMaterial::materialSlab ( const Vector3 & gp,
Direction pDir,
MaterialUpdateMode mode ) const
virtual

Return method for full material description of the Surface.

  • from the global coordinates
Parameters
gpis the global position used for the (eventual) lookup
pDiris the positive direction through the surface
modeis the material update directive
Returns
MaterialSlab
Deprecated
Use materialSlab(const Vector2&, Direction, MaterialUpdateMode) with a prior Surface::globalToLocal() call to convert gp.

Reimplemented from Acts::ISurfaceMaterial.

◆ scale()

MergedMaterialMarker & Acts::MergedMaterialMarker::scale ( double factor)
overridevirtual

Scale operator – no-op, the marker carries no material.

Parameters
factoris the scale factor (ignored)
Returns
Reference to this marker

Implements Acts::ISurfaceMaterial.

◆ toStream()

std::ostream & Acts::MergedMaterialMarker::toStream ( std::ostream & sl) const
overridevirtual

Output Method for std::ostream.

Parameters
slThe output stream
Returns
Reference to the output stream for chaining

Implements Acts::ISurfaceMaterial.