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

It is designed create sub surface arrays to be ordered on Surfaces. More...

#include <Acts/Geometry/SurfaceArrayCreator.hpp>

Classes

struct  Config
struct  ProtoAxis

Public Member Functions

 SurfaceArrayCreator (const Config &cfg, std::unique_ptr< const Logger > logger=getDefaultLogger("SurfaceArrayCreator", Logging::INFO))
 Constructor with explicit config.
 SurfaceArrayCreator (std::unique_ptr< const Logger > logger=getDefaultLogger("SurfaceArrayCreator", Logging::INFO))
 Constructor with default config.
virtual ~SurfaceArrayCreator ()=default
 Destructor.
void setLogger (std::unique_ptr< const Logger > logger)
 Set logging instance.
std::unique_ptr< SurfaceArraysurfaceArrayOnCylinder (const GeometryContext &gctx, std::vector< std::shared_ptr< const Surface > > surfaces, BinningType bTypePhi=equidistant, BinningType bTypeZ=equidistant, std::optional< ProtoLayer > protoLayerOpt=std::nullopt, const Transform3 &transform=Transform3::Identity()) const
 SurfaceArrayCreator interface method.
std::unique_ptr< SurfaceArraysurfaceArrayOnCylinder (const GeometryContext &gctx, std::vector< std::shared_ptr< const Surface > > surfaces, std::size_t binsPhi, std::size_t binsZ, std::optional< ProtoLayer > protoLayerOpt=std::nullopt, const Transform3 &transform=Transform3::Identity()) const
 SurfaceArrayCreator interface method.
std::unique_ptr< SurfaceArraysurfaceArrayOnDisc (const GeometryContext &gctx, std::vector< std::shared_ptr< const Surface > > surfaces, BinningType bTypeR, BinningType bTypePhi, std::optional< ProtoLayer > protoLayerOpt=std::nullopt, const Transform3 &transform=Transform3::Identity()) const
 SurfaceArrayCreator interface method.
std::unique_ptr< SurfaceArraysurfaceArrayOnDisc (const GeometryContext &gctx, std::vector< std::shared_ptr< const Surface > > surfaces, std::size_t binsR, std::size_t binsPhi, std::optional< ProtoLayer > protoLayerOpt=std::nullopt, const Transform3 &transform=Transform3::Identity()) const
 SurfaceArrayCreator interface method.
std::unique_ptr< SurfaceArraysurfaceArrayOnPlane (const GeometryContext &gctx, std::vector< std::shared_ptr< const Surface > > surfaces, std::size_t bins1, std::size_t bins2, AxisDirection aDir, std::optional< ProtoLayer > protoLayerOpt=std::nullopt, const Transform3 &transform=Transform3::Identity()) const
 SurfaceArrayCreator interface method.

Static Public Member Functions

static bool isSurfaceEquivalent (const GeometryContext &gctx, AxisDirection aDir, const Surface *a, const Surface *b)
 Static check function for surface equivalent.

Detailed Description

It is designed create sub surface arrays to be ordered on Surfaces.

Todo
write more documentation on how this is done

Constructor & Destructor Documentation

◆ SurfaceArrayCreator() [1/2]

Acts::SurfaceArrayCreator::SurfaceArrayCreator ( std::unique_ptr< const Logger > logger = getDefaultLogger("SurfaceArrayCreator",                                                    Logging::INFO))
explicit

Constructor with default config.

Parameters
loggerlogging instance

◆ SurfaceArrayCreator() [2/2]

Acts::SurfaceArrayCreator::SurfaceArrayCreator ( const Config & cfg,
std::unique_ptr< const Logger > logger = getDefaultLogger("SurfaceArrayCreator",                                                    Logging::INFO) )
explicit

Constructor with explicit config.

Parameters
cfgExplicit config struct
loggerlogging instance

◆ ~SurfaceArrayCreator()

virtual Acts::SurfaceArrayCreator::~SurfaceArrayCreator ( )
virtualdefault

Destructor.

Member Function Documentation

◆ isSurfaceEquivalent()

bool Acts::SurfaceArrayCreator::isSurfaceEquivalent ( const GeometryContext & gctx,
AxisDirection aDir,
const Surface * a,
const Surface * b )
static

Static check function for surface equivalent.

Parameters
[in]gctxthe geometry context for this check
aDirthe axis direction for the binning
afirst surface for checking
bsecond surface for checking
Returns
true if surfaces are equivalent for binning purposes

◆ setLogger()

void Acts::SurfaceArrayCreator::setLogger ( std::unique_ptr< const Logger > logger)

Set logging instance.

Parameters
loggeris the logging instance to be set

◆ surfaceArrayOnCylinder() [1/2]

std::unique_ptr< SurfaceArray > Acts::SurfaceArrayCreator::surfaceArrayOnCylinder ( const GeometryContext & gctx,
std::vector< std::shared_ptr< const Surface > > surfaces,
BinningType bTypePhi = equidistant,
BinningType bTypeZ = equidistant,
std::optional< ProtoLayer > protoLayerOpt = std::nullopt,
const Transform3 & transform = Transform3::Identity() ) const

SurfaceArrayCreator interface method.

  • create an array in a cylinder, binned in phi, z when extremas and bin numbers are unknown - this method goes through the surfaces and finds out the needed information
    Warning
    This function requires the cylinder aligned with the z-axis
    Parameters
    surfacesis the vector of pointers to sensitive surfaces to be ordered on the cylinder
    Precondition
    the pointers to the sensitive surfaces in the surfaces vectors all need to be valid, since no check is performed
    Parameters
    [in]gctxThe geometry context for this building call
    protoLayerOptThe proto layer containing the layer size
    bTypePhithe binning type in phi direction (equidistant/arbitrary)
    bTypeZthe binning type in z direction (equidistant/arbitrary)
    transformis the (optional) additional transform applied
    Returns
    a unique pointer a new SurfaceArray

◆ surfaceArrayOnCylinder() [2/2]

std::unique_ptr< SurfaceArray > Acts::SurfaceArrayCreator::surfaceArrayOnCylinder ( const GeometryContext & gctx,
std::vector< std::shared_ptr< const Surface > > surfaces,
std::size_t binsPhi,
std::size_t binsZ,
std::optional< ProtoLayer > protoLayerOpt = std::nullopt,
const Transform3 & transform = Transform3::Identity() ) const

SurfaceArrayCreator interface method.

  • create an array in a cylinder, binned in phi, z when extremas and bin numbers are known
    Warning
    This function requires the cylinder aligned with the z-axis
    Parameters
    surfacesis the vector of pointers to sensitive surfaces to be ordered on the cylinder
    Precondition
    the pointers to the sensitive surfaces in the surfaces vectors all need to be valid, since no check is performed
    Parameters
    [in]gctxThe geometry context for this building call
    protoLayerOptThe proto layer containing the layer size
    binsPhiis the number of bins in phi for the surfaces
    binsZis the number of bin in Z for the surfaces
    transformis the (optional) additional transform applied
    Returns
    a unique pointer to a new SurfaceArray

◆ surfaceArrayOnDisc() [1/2]

std::unique_ptr< SurfaceArray > Acts::SurfaceArrayCreator::surfaceArrayOnDisc ( const GeometryContext & gctx,
std::vector< std::shared_ptr< const Surface > > surfaces,
BinningType bTypeR,
BinningType bTypePhi,
std::optional< ProtoLayer > protoLayerOpt = std::nullopt,
const Transform3 & transform = Transform3::Identity() ) const

SurfaceArrayCreator interface method.

  • create an array in a cylinder, binned in phi, r when extremas and bin numbers are unknown - this method goes through the surfaces and finds out the needed information
    Parameters
    surfacesis the vector of pointers to sensitive surfaces to be ordered on the disc
    Precondition
    the pointers to the sensitive surfaces in the surfaces vectors all need to be valid, since no check is performed
    Warning
    This function requires the disc aligned with the z-axis
    Parameters
    [in]gctxThe geometry context for this building call
    protoLayerOptThe proto layer containing the layer size
    bTypeRthe binning type in r direction (equidistant/arbitrary)
    bTypePhithe binning type in phi direction (equidistant/arbitrary)
    transformis the (optional) additional transform applied
    Returns
    a unique pointer a new SurfaceArray
    Note
    If there is more than on R-Ring, number of phi bins will be set to lowest number of surfaces of any R-ring. This ignores bTypePhi and produces equidistant binning in phi

◆ surfaceArrayOnDisc() [2/2]

std::unique_ptr< SurfaceArray > Acts::SurfaceArrayCreator::surfaceArrayOnDisc ( const GeometryContext & gctx,
std::vector< std::shared_ptr< const Surface > > surfaces,
std::size_t binsR,
std::size_t binsPhi,
std::optional< ProtoLayer > protoLayerOpt = std::nullopt,
const Transform3 & transform = Transform3::Identity() ) const

SurfaceArrayCreator interface method.

  • create an array on a disc, binned in r, phi when extremas and bin numbers are known
Parameters
surfacesis the vector of pointers to sensitive surfaces to be ordered on the disc
Precondition
the pointers to the sensitive surfaces in the surfaces vectors all need to be valid, since no check is performed
Warning
This function requires the disc aligned with the z-axis
Parameters
[in]gctxThe geometry context for this building call
protoLayerOptThe proto layer containing the layer size
binsPhiis the number of bins in phi for the surfaces
binsRis the number of bin in R for the surfaces
transformis the (optional) additional transform applied
Returns
a unique pointer a new SurfaceArray

◆ surfaceArrayOnPlane()

std::unique_ptr< SurfaceArray > Acts::SurfaceArrayCreator::surfaceArrayOnPlane ( const GeometryContext & gctx,
std::vector< std::shared_ptr< const Surface > > surfaces,
std::size_t bins1,
std::size_t bins2,
AxisDirection aDir,
std::optional< ProtoLayer > protoLayerOpt = std::nullopt,
const Transform3 & transform = Transform3::Identity() ) const

SurfaceArrayCreator interface method.

  • create an array on a plane
Parameters
[in]gctxThe geometry context for this building call
[in]surfacesis the vector of pointers to sensitive surfaces to be ordered on the plane
Precondition
the pointers to the sensitive surfaces in the surfaces vectors all need to be valid, since no check is performed
Warning
This function requires the plane aligned with either the x-, y- or z-axis
Parameters
[in]bins1is the number of bins in the orthogonal direction to aDir
[in]bins2is the number of bins in the orthogonal direction to aDir
[in]aDirDirection of the aligned surfaces
[in]protoLayerOptOptional ProtoLayer instance
[in]transformis the (optional) additional transform applied
Returns
a unique pointer a new SurfaceArray