|
ACTS
Experiment-independent tracking
|
GridPortalLink implements a subdivided surface where the target volume depends on the position on the surface. More...
#include <Acts/Geometry/GridPortalLink.hpp>
Public Member Functions | |
| ~GridPortalLink () override | |
| Override the destructor so we can get away with forward declaration of TrivialPortalLink. | |
| std::span< const TrivialPortalLink > | artifactPortalLinks () const |
| Get the artifact portal links. | |
| virtual unsigned int | dim () const =0 |
| Get the number of dimensions of the grid. | |
| AxisDirection | direction () const |
| The binning direction of the grid. | |
| virtual std::unique_ptr< GridPortalLink > | extendTo2d (const IAxis *other) const =0 |
| Expand a 1D grid to a 2D one, by using the provided axis along the missing direction. | |
| virtual const IGrid & | grid () const =0 |
| Return the associated grid in a type-erased form. | |
| virtual IGrid & | grid ()=0 |
| Return the associated grid in a type-erased form. | |
| void | printContents (std::ostream &os) const |
| Helper function that prints a textual representation of the grid with the volume names. | |
| void | setArtifactPortalLinks (std::vector< TrivialPortalLink > links) |
| Set the artifact portal links. | |
| virtual void | setVolume (TrackingVolume *volume)=0 |
| Set the volume on all grid bins. | |
| Public Member Functions inherited from Acts::PortalLinkBase | |
| virtual | ~PortalLinkBase ()=default |
| Virtual destructor in case the object is held as a derived. | |
| virtual Result< const TrackingVolume * > | resolveVolume (const GeometryContext &gctx, const Vector2 &position, double tolerance=s_onSurfaceTolerance) const =0 |
| Resolve a volume given a local position. | |
| virtual Result< const TrackingVolume * > | resolveVolume (const GeometryContext &gctx, const Vector3 &position, double tolerance=s_onSurfaceTolerance) const =0 |
| Resolve a volume given a global position. | |
| void | setSurface (std::shared_ptr< RegularSurface > surface) |
| Setter for the surface. | |
| const RegularSurface & | surface () const |
| Getter for the associated surface. | |
| const std::shared_ptr< RegularSurface > & | surfacePtr () const |
| Getter for the underlying shared pointer. | |
| virtual void | toStream (std::ostream &os) const =0 |
| Stream output function. | |
Static Public Member Functions | |
| static void | fillMergedGrid (const GridPortalLink &a, const GridPortalLink &b, GridPortalLink &merged, AxisDirection direction, const Logger &logger) |
| Helper function to fill the bin contents after merging. | |
| static std::unique_ptr< GridPortalLink > | make (const std::shared_ptr< RegularSurface > &surface, TrackingVolume &volume, AxisDirection direction) |
| Factory function for an automatically sized one-dimensional grid. | |
| template<AxisConcept axis_1_t, AxisConcept axis_2_t> | |
| static std::unique_ptr< GridPortalLinkT< axis_1_t, axis_2_t > > | make (std::shared_ptr< RegularSurface > surface, axis_1_t axis1, axis_2_t axis2) |
| Factory function for a two-dimensional grid portal link, which allows using template deduction to figure out the right type. | |
| template<AxisConcept axis_t> | |
| static std::unique_ptr< GridPortalLinkT< axis_t > > | make (std::shared_ptr< RegularSurface > surface, AxisDirection direction, axis_t &&axis) |
| Factory function for a one-dimensional grid portal link, which allows using template deduction to figure out the right type. | |
| static std::unique_ptr< PortalLinkBase > | merge (const GridPortalLink &a, const GridPortalLink &b, AxisDirection direction, const Logger &logger=getDummyLogger()) |
| Merge two grid portal links into a single one. | |
| Static Public Member Functions inherited from Acts::PortalLinkBase | |
| static std::unique_ptr< PortalLinkBase > | merge (std::unique_ptr< PortalLinkBase > a, std::unique_ptr< PortalLinkBase > b, AxisDirection direction, const Logger &logger=getDummyLogger()) |
| Merge two portal link into a single one. | |
Protected Types | |
| enum class | FillDirection { loc0 , loc1 } |
| Helper enum to declare which local direction to fill. More... | |
Protected Member Functions | |
| GridPortalLink (std::shared_ptr< RegularSurface > surface, AxisDirection direction) | |
| Constructor from a surface and a direction, for initialization by derived class. | |
| std::unique_ptr< GridPortalLink > | extendTo2dImpl (const std::shared_ptr< CylinderSurface > &surface, const IAxis *other) const |
| Expand a 1D grid to a 2D one for a cylinder surface. | |
| std::unique_ptr< GridPortalLink > | extendTo2dImpl (const std::shared_ptr< DiscSurface > &surface, const IAxis *other) const |
| Expand a 1D grid to a 2D one for a disc surface. | |
| std::unique_ptr< GridPortalLink > | extendTo2dImpl (const std::shared_ptr< PlaneSurface > &surface, const IAxis *other) const |
| Expand a 1D grid to a 2D one for a plane surface. | |
| Protected Member Functions inherited from Acts::PortalLinkBase | |
| PortalLinkBase (std::shared_ptr< RegularSurface > surface) | |
| Constructor from a surface. | |
Static Protected Member Functions | |
| static void | checkConsistency (const IGrid &grid, AxisDirection direction, const CylinderSurface &cyl) |
| Helper function to check consistency for grid on a cylinder surface. | |
| static void | checkConsistency (const IGrid &grid, AxisDirection direction, const DiscSurface &disc) |
| Helper function to check consistency for grid on a disc surface. | |
| static void | checkConsistency (const IGrid &grid, AxisDirection direction, const PlaneSurface &plane) |
| Helper function to check consistency for grid on a plane surface. | |
| static void | fillGrid1dTo2d (FillDirection dir, const GridPortalLink &grid1d, GridPortalLink &grid2d) |
| Helper function to fill a 2D grid from a 1D grid, by extending all bins along the different direction. | |
| Static Protected Member Functions inherited from Acts::PortalLinkBase | |
| static void | checkMergePreconditions (const PortalLinkBase &a, const PortalLinkBase &b, AxisDirection direction) |
| Helper function to check a number of preconditions before merging is executed. | |
Additional Inherited Members | |
| Protected Attributes inherited from Acts::PortalLinkBase | |
| std::shared_ptr< RegularSurface > | m_surface |
| Surface associated with this portal link. | |
GridPortalLink implements a subdivided surface where the target volume depends on the position on the surface.
The link can be in two states:
|
strongprotected |
|
protected |
Constructor from a surface and a direction, for initialization by derived class.
| surface | The surface |
| direction | The binning direction |
|
override |
Override the destructor so we can get away with forward declaration of TrivialPortalLink.
| std::span< const TrivialPortalLink > Acts::GridPortalLink::artifactPortalLinks | ( | ) | const |
Get the artifact portal links.
|
staticprotected |
Helper function to check consistency for grid on a cylinder surface.
| grid | the grid to check |
| direction | The binning direction |
| cyl | The cylinder surface |
|
staticprotected |
Helper function to check consistency for grid on a disc surface.
| grid | the grid to check |
| direction | The binning direction |
| disc | The disc surface |
|
staticprotected |
Helper function to check consistency for grid on a plane surface.
| grid | the grid to check |
| direction | The binning direction |
| plane | The plane surface |
|
pure virtual |
Get the number of dimensions of the grid.
Implemented in Acts::GridPortalLinkT< Axes >.
| AxisDirection Acts::GridPortalLink::direction | ( | ) | const |
The binning direction of the grid.
|
pure virtual |
Expand a 1D grid to a 2D one, by using the provided axis along the missing direction.
| other | The axis to use for the missing direction, can be null for auto determination |
Implemented in Acts::GridPortalLinkT< Axes >.
|
protected |
Expand a 1D grid to a 2D one for a cylinder surface.
| surface | The cylinder surface |
| other | The axis to use for the missing direction, can be null for auto determination |
|
protected |
Expand a 1D grid to a 2D one for a disc surface.
| surface | The disc surface |
| other | The axis to use for the missing direction, can be null for auto determination |
|
protected |
Expand a 1D grid to a 2D one for a plane surface.
| surface | The plane surface |
| other | The axis to use for the missing direction, can be null for auto determination |
|
staticprotected |
Helper function to fill a 2D grid from a 1D grid, by extending all bins along the different direction.
| dir | The direction to fill |
| grid1d | The 1D grid |
| grid2d | The 2D grid |
|
static |
Helper function to fill the bin contents after merging.
This called by the merging routine, and requires access to the internal grid state.
| a | The first grid portal link |
| b | The second grid portal link |
| merged | The merged grid portal link |
| direction | The merging direction |
| logger | The logger to use for messages |
|
pure virtual |
Return the associated grid in a type-erased form.
Implemented in Acts::GridPortalLinkT< Axes >.
|
pure virtual |
Return the associated grid in a type-erased form.
Implemented in Acts::GridPortalLinkT< Axes >.
|
static |
Factory function for an automatically sized one-dimensional grid.
This produces a single-bin grid with boundaries taken from the bounds of surface along direction.
| surface | The surface |
| volume | The tracking volume |
| direction | The binning direction |
|
static |
Factory function for a two-dimensional grid portal link, which allows using template deduction to figure out the right type.
| axis_1_t | The first axis type |
| axis_2_t | The second axis type |
| surface | The surface |
| axis1 | The first axis to use for the binning |
| axis2 | The second axis to use for the binning |
surface.
|
static |
Factory function for a one-dimensional grid portal link, which allows using template deduction to figure out the right type.
| axis_t | The axis type |
| surface | The surface |
| direction | The binning direction |
| axis | The axis to use for the binning |
surface.
|
static |
Merge two grid portal links into a single one.
The routine can merge one-dimensional, two-dimensional and mixed links. The merge will try to preserve equidistant binning in case bin widths match. Otherwise, the merge falls back to variable binning.
1D merge scenarios:
Two grid along a shared direction are merged along their shared direction
Two grids along a shared direction a merged in the direction that is orthogonal to their shared direction.
Two grids whose directions are not shared are merged (ordering does not matter here). The routine will expand one of the grids to match the other's binning, by subdividing the grid in the as-of-yet unbinned direction, while filling all bins with the original bin contents. Afterwards, a conventional mixed-dimension merge is performed.
Mixed merge scenarios The order is normalized by always taking the 2D grid as the left hand side. The 1D grid is expanded to match the binning in the as-of-yet unbinned direction with the binning taken from the 2D grid.
2D merges The grids need to already share a common axis. If that is not the case, the merge routine returns a nullptr. This can be handled by composite merging as a fallback if needed. Ordering and direction does not matter here.
| a | The first grid portal link |
| b | The second grid portal link |
| direction | The merging direction |
| logger | The logger to use for messages |
| void Acts::GridPortalLink::printContents | ( | std::ostream & | os | ) | const |
Helper function that prints a textual representation of the grid with the volume names.
| os | The output stream |
| void Acts::GridPortalLink::setArtifactPortalLinks | ( | std::vector< TrivialPortalLink > | links | ) |
Set the artifact portal links.
| links | Vector of trivial portal links to set |
|
pure virtual |
Set the volume on all grid bins.
| volume | The volume to set |
Implemented in Acts::GridPortalLinkT< Axes >.