Analysis Software
Documentation for sPHENIX simulation software
|
Provides Surface binning in N dimensions. More...
#include <acts/blob/sPHENIX/Core/include/Acts/Surfaces/SurfaceArray.hpp>
Classes | |
struct | ISurfaceGridLookup |
Base interface for all surface lookups. More... | |
struct | SingleElementLookup |
Lookup implementation which wraps one element and always returns this element when lookup is called. More... | |
struct | SurfaceGridLookup |
Lookup helper which encapsulates a Grid . More... | |
Public Member Functions | |
SurfaceArray (std::unique_ptr< ISurfaceGridLookup > gridLookup, std::vector< std::shared_ptr< const Surface >> surfaces, const Transform3 &transform=Transform3::Identity()) | |
Default constructor which takes a SurfaceLookup and a vector of surfaces. | |
SurfaceArray (std::shared_ptr< const Surface > srf) | |
Constructor with a single surface. | |
SurfaceVector & | at (const Vector3 &position) |
Get all surfaces in bin given by position. | |
const SurfaceVector & | at (const Vector3 &position) const |
Get all surfaces in bin given by position pos . | |
SurfaceVector & | at (size_t bin) |
Get all surfaces in bin given by global bin index bin . | |
const SurfaceVector & | at (size_t bin) const |
Get all surfaces in bin given by global bin index. | |
const SurfaceVector & | neighbors (const Vector3 &position) const |
Get all surfaces in bin at pos and its neighbors. | |
size_t | size () const |
Get the size of the underlying grid structure including under/overflow bins. | |
Vector3 | getBinCenter (size_t bin) |
Get the center of the bin identified by global bin index bin . | |
const SurfaceVector & | surfaces () const |
Get all surfaces attached to this SurfaceArray . | |
std::vector< const IAxis * > | getAxes () const |
Get vector of axes spanning the grid as AnyAxis . | |
bool | isValidBin (size_t bin) const |
Checks if global bin is valid. | |
const Transform3 & | transform () const |
std::vector< BinningValue > | binningValues () const |
The binning values described by this surface grid lookup They are in order of the axes. | |
std::ostream & | toStream (const GeometryContext &gctx, std::ostream &sl) const |
String representation of this SurfaceArray . | |
Private Attributes | |
std::unique_ptr < ISurfaceGridLookup > | p_gridLookup |
std::vector< std::shared_ptr < const Surface > > | m_surfaces |
SurfaceVector | m_surfacesRawPointers |
Transform3 | m_transform |
Provides Surface binning in N dimensions.
Uses Grid
under the hood to implement the storage and lookup Contains a lookup struct which talks to the Grid
and performs utility actions. This struct needs to be initialised externally and passed to SurfaceArray
on construction.
Definition at line 32 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 32 of file SurfaceArray.hpp
Acts::SurfaceArray::SurfaceArray | ( | std::unique_ptr< ISurfaceGridLookup > | gridLookup, |
std::vector< std::shared_ptr< const Surface >> | surfaces, | ||
const Transform3 & | transform = Transform3::Identity() |
||
) |
Default constructor which takes a SurfaceLookup
and a vector of surfaces.
gridLookup | The grid storage. SurfaceArray does not fill it on its own |
surfaces | The input vector of surfaces. This is only for bookkeeping, so we can ask |
transform | Optional additional transform for this SurfaceArray |
Definition at line 21 of file SurfaceArray.cpp.
View newest version in sPHENIX GitHub at line 21 of file SurfaceArray.cpp
Acts::SurfaceArray::SurfaceArray | ( | std::shared_ptr< const Surface > | srf | ) |
Constructor with a single surface.
srf | The one and only surface |
Definition at line 30 of file SurfaceArray.cpp.
View newest version in sPHENIX GitHub at line 30 of file SurfaceArray.cpp
References testing::internal::move().
|
inline |
Get all surfaces in bin given by position.
position | the lookup position |
SurfaceVector
contained in bin at that position Definition at line 465 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 465 of file SurfaceArray.hpp
References p_gridLookup.
Referenced by Acts::Test::BOOST_FIXTURE_TEST_CASE(), Acts::Test::LayerCreatorFixture::checkBinContentSize(), and Acts::LayerCreator::checkBinning().
|
inline |
Get all surfaces in bin given by position pos
.
position | the lookup position |
SurfaceVector
contained in bin at that position Definition at line 473 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 473 of file SurfaceArray.hpp
References p_gridLookup.
|
inline |
Get all surfaces in bin given by global bin index bin
.
bin | the global bin index |
SurfaceVector
contained in bin Definition at line 480 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 480 of file SurfaceArray.hpp
References p_gridLookup.
|
inline |
Get all surfaces in bin given by global bin index.
bin | the global bin index |
SurfaceVector
contained in bin Definition at line 485 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 485 of file SurfaceArray.hpp
References p_gridLookup.
|
inline |
The binning values described by this surface grid lookup They are in order of the axes.
Definition at line 533 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 533 of file SurfaceArray.hpp
References p_gridLookup.
Referenced by Acts::Svg::SurfaceArrayConverter::convert(), and Acts::GeometryView3D::drawSurfaceArray().
|
inline |
Get vector of axes spanning the grid as AnyAxis
.
AnyAxis
Definition at line 520 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 520 of file SurfaceArray.hpp
References p_gridLookup.
Referenced by Acts::Test::BOOST_FIXTURE_TEST_CASE(), Acts::Svg::SurfaceArrayConverter::convert(), and Acts::GeometryView3D::drawSurfaceArray().
|
inline |
Get the center of the bin identified by global bin index bin
.
bin | the global bin index |
Definition at line 507 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 507 of file SurfaceArray.hpp
References p_gridLookup.
|
inline |
Checks if global bin is valid.
bin | the global bin index |
Definition at line 527 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 527 of file SurfaceArray.hpp
References p_gridLookup.
Referenced by Acts::Test::LayerCreatorFixture::checkBinContentSize(), and Acts::LayerCreator::checkBinning().
|
inline |
Get all surfaces in bin at pos
and its neighbors.
position | The position to lookup as nominal |
SurfaceVector
of neighbors and nominal SurfaceVector
will be combined. For technical reasons, the different bin content vectors have to be copied, so the resulting vector contains copies. Definition at line 495 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 495 of file SurfaceArray.hpp
References p_gridLookup.
Referenced by Acts::Test::BOOST_FIXTURE_TEST_CASE(), and Acts::Svg::SurfaceArrayConverter::convert().
|
inline |
Get the size of the underlying grid structure including under/overflow bins.
Definition at line 502 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 502 of file SurfaceArray.hpp
References p_gridLookup.
Referenced by Acts::Test::LayerCreatorFixture::checkBinContentSize(), and Acts::LayerCreator::checkBinning().
|
inline |
Get all surfaces attached to this SurfaceArray
.
SurfaceVector
containing all surfaces Definition at line 514 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 514 of file SurfaceArray.hpp
References m_surfacesRawPointers.
Referenced by Acts::LayerCreator::associateSurfacesToLayer(), Acts::LayerCreator::checkBinning(), ActsExamples::RootMaterialWriter::collectMaterial(), Acts::Svg::SurfaceArrayConverter::convert(), and Acts::GeometryView3D::drawSurfaceArray().
std::ostream & Acts::SurfaceArray::toStream | ( | const GeometryContext & | gctx, |
std::ostream & | sl | ||
) | const |
String representation of this SurfaceArray
.
gctx | The current geometry context object, e.g. alignment |
sl | Output stream to write to |
sl
Definition at line 37 of file SurfaceArray.cpp.
View newest version in sPHENIX GitHub at line 37 of file SurfaceArray.cpp
References Acts::UnitConstants::e, i, and j.
Referenced by Acts::Test::BOOST_FIXTURE_TEST_CASE().
|
inline |
Definition at line 529 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 529 of file SurfaceArray.hpp
References m_transform.
|
private |
Definition at line 546 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 546 of file SurfaceArray.hpp
|
private |
Definition at line 549 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 549 of file SurfaceArray.hpp
Referenced by surfaces().
|
private |
Definition at line 552 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 552 of file SurfaceArray.hpp
Referenced by transform().
|
private |
Definition at line 544 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 544 of file SurfaceArray.hpp
Referenced by at(), binningValues(), getAxes(), getBinCenter(), isValidBin(), neighbors(), and size().