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

A implementation of a detector element, that is constructed from a JSON description of a surface. More...

#include <ActsPlugins/Json/JsonDetectorElement.hpp>

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

Public Member Functions

 JsonDetectorElement (const nlohmann::json &jSurface, double thickness)
 Constructor from JSON surface description.
bool isSensitive () const override
 Returns whether the placement corresponds to a surface on which the measurements from the experiment are represented, i.e.
const Transform3localToGlobalTransform (const GeometryContext &gctx) const override
 Return the transform for this detector element.
const Surfacesurface () const override
 Return const reference to the surface.
Surfacesurface () override
 Return mutable reference to the surface.
double thickness () const
 Return the thickness of the detector element.
Public Member Functions inherited from Acts::SurfacePlacementBase
virtual ~SurfacePlacementBase ()=default
 Virtual default constructor.

Detailed Description

A implementation of a detector element, that is constructed from a JSON description of a surface.

The idea behind this is that it helps importing whole tracking geometries from JSON files. In some parts of the codebase, the existence of a detector element associated to a surface has a specific meaning (e.g., flags surfaces as sensitive).

Constructor & Destructor Documentation

◆ JsonDetectorElement()

Acts::JsonDetectorElement::JsonDetectorElement ( const nlohmann::json & jSurface,
double thickness )

Constructor from JSON surface description.

Parameters
jSurfaceJSON object describing the surface
thicknessThickness of the detector element

Member Function Documentation

◆ isSensitive()

bool Acts::JsonDetectorElement::isSensitive ( ) const
overridevirtual

Returns whether the placement corresponds to a surface on which the measurements from the experiment are represented, i.e.

it is

Implements Acts::SurfacePlacementBase.

◆ localToGlobalTransform()

const Transform3 & Acts::JsonDetectorElement::localToGlobalTransform ( const GeometryContext & gctx) const
overridevirtual

Return the transform for this detector element.

Parameters
gctxGeometry context (unused for this implementation)
Returns
Transform matrix for this detector element

Implements Acts::SurfacePlacementBase.

◆ surface() [1/2]

const Surface & Acts::JsonDetectorElement::surface ( ) const
overridevirtual

Return const reference to the surface.

Returns
Const reference to the associated surface

Implements Acts::SurfacePlacementBase.

◆ surface() [2/2]

Surface & Acts::JsonDetectorElement::surface ( )
overridevirtual

Return mutable reference to the surface.

Returns
Mutable reference to the associated surface

Implements Acts::SurfacePlacementBase.

◆ thickness()

double Acts::JsonDetectorElement::thickness ( ) const

Return the thickness of the detector element.

Returns
Thickness value