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

This is the central definition of the Acts payload object regarding detector geometry status (e.g. More...

#include <Acts/Geometry/GeometryContext.hpp>

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

Public Member Functions

template<typename T>
requires (!std::is_same_v<std::decay_t<T>, GeometryContext> && !std::is_base_of_v<ContextType, std::decay_t<T> >)
 GeometryContext (const T &value)
 Copy construct from arbitrary type (inherited from ContextType).
template<typename T>
requires (!std::is_same_v<std::decay_t<T>, GeometryContext> && !std::is_base_of_v<ContextType, std::decay_t<T> >)
 GeometryContext (T &&value)
 Move construct from arbitrary type (inherited from ContextType).

Static Public Member Functions

static GeometryContext dangerouslyDefaultConstruct ()
 Static factory method for default construction.

Detailed Description

This is the central definition of the Acts payload object regarding detector geometry status (e.g.

alignment)

It is propagated through the code to allow for event/thread dependent geometry changes.

Construction

For typical use cases with alignment or conditions data:

MyAlignmentData alignment = ...;
GeometryContext gctx{alignment};
GeometryContext(T &&value)
Move construct from arbitrary type (inherited from ContextType).
Definition GeometryContext.hpp:64

For testing or simple applications without alignment:

static GeometryContext dangerouslyDefaultConstruct()
Static factory method for default construction.
Definition GeometryContext.hpp:52
Note
The default constructor is deprecated. Use the factory method dangerouslyDefaultConstruct() to make empty context creation explicit.

Constructor & Destructor Documentation

◆ GeometryContext() [1/2]

template<typename T>
requires (!std::is_same_v<std::decay_t<T>, GeometryContext> && !std::is_base_of_v<ContextType, std::decay_t<T> >)
Acts::GeometryContext::GeometryContext ( T && value)
explicit

Move construct from arbitrary type (inherited from ContextType).

Template Parameters
TThe type of the value to construct from
Parameters
valueThe value to construct from

◆ GeometryContext() [2/2]

template<typename T>
requires (!std::is_same_v<std::decay_t<T>, GeometryContext> && !std::is_base_of_v<ContextType, std::decay_t<T> >)
Acts::GeometryContext::GeometryContext ( const T & value)
explicit

Copy construct from arbitrary type (inherited from ContextType).

Template Parameters
TThe type of the value to construct from
Parameters
valueThe value to construct from

Member Function Documentation

◆ dangerouslyDefaultConstruct()

GeometryContext Acts::GeometryContext::dangerouslyDefaultConstruct ( )
static

Static factory method for default construction.

Note
Use this when you need a default context for testing or simple applications without alignment/conditions data
Returns
A default-constructed GeometryContext