ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::MaterialInteractionAssignment Namespace Reference

Classes

struct  Options
 Options for the material interaction matcher The options are used to specify the vetos for the assignment. More...
struct  Result
 The result struct of the assignment run. More...

Typedefs

using GlobalVeto
 definition of a global veto for assigning material interactions
using LocalVeto
 definition of a local veto on a material interaction
using ReAssignment
 definition of possible re-assignments to next surface, this could e.g.

Functions

Result assign (const GeometryContext &gctx, const std::vector< MaterialInteraction > &materialInteractions, const std::vector< IAssignmentFinder::SurfaceAssignment > &intersectedSurfaces, const Options &options=Options())
 Match the material interactions to surfaces intersections while respecting eventual vetos for the assignment.

Typedef Documentation

◆ GlobalVeto

Initial value:
std::function<bool(const MaterialInteraction& materialInteraction)>
The Material interaction struct It records the surface and the passed material This is only necessary...
Definition MaterialInteraction.hpp:55

definition of a global veto for assigning material interactions

This can be used to restrict the assignment to a specific volume, or exclude certain materials (if one wants), etc.

Parameters
materialInteractionis the material interaction to be checked for the veto

It will be globally applied, i.e. every single material interaction will have to go through this veto

◆ LocalVeto

Initial value:
std::function<bool(
const IAssignmentFinder::SurfaceAssignment& suggestedAssignment)>
SurfaceAssignment is a surface, a position and a direction.
Definition IAssignmentFinder.hpp:29

definition of a local veto on a material interaction

This can take already the suggested surface assignment into account return true if the assignment should be vetoed. This can be used for having exclusion rules based on surface information.

Parameters
materialInteractionis the material interaction to be checked for the veto
suggestedAssignmentis the suggested assignment: surface, position, direction

◆ ReAssignment

Initial value:
std::function<void(
MaterialInteraction& materialInteraction,
const IAssignmentFinder::SurfaceAssignment& suggestedAssignment,
const IAssignmentFinder::SurfaceAssignment& suggestedReAssignment)>

definition of possible re-assignments to next surface, this could e.g.

be used for respecting pre/post mapping directives that are not fully handled by closest distance matching

The provided parameters are the mutable material interaction, the suggested assignment and the next possible assignment, due to the ordered nature of the material interactions, assignment to previous is excluded

Parameters
materialInteractionis the material interaction to be checked for the veto
suggestedAssignmentis the suggested assignment: surface, position, direction
suggestedReAssignmentis the suggested assignment: surface, position, direction
Note
this changes the MaterialInteraction if the re-assignment is accepted

Function Documentation

◆ assign()

Result Acts::MaterialInteractionAssignment::assign ( const GeometryContext & gctx,
const std::vector< MaterialInteraction > & materialInteractions,
const std::vector< IAssignmentFinder::SurfaceAssignment > & intersectedSurfaces,
const Options & options = Options() )

Match the material interactions to surfaces intersections while respecting eventual vetos for the assignment.

Parameters
gctxis the geometry context
materialInteractionsis the vector of material interaction
intersectedSurfacesare the surfac assignment candidates
optionsare the options for the assignment
Returns
a pair of vectors of assigned and unassigned material interactions