ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
|
Provides Surface binning in N dimensions. More...
#include <acts/blob/master/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, std::shared_ptr< const Transform3D > transform=nullptr) | |
Default constructor which takes a SurfaceLookup and a vector of surfaces. | |
SurfaceArray (std::shared_ptr< const Surface > srf) | |
Constructor which takes concrete type SurfaceGridLookup. | |
SurfaceVector & | at (const Vector3D &position) |
Get all surfaces in bin given by position. | |
const SurfaceVector & | at (const Vector3D &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. | |
SurfaceVector | neighbors (const Vector3D &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. | |
Vector3D | 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 Transform3D & | transform () const |
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 |
std::shared_ptr< const Transform3D > | 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 31 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 31 of file SurfaceArray.hpp
Acts::SurfaceArray::SurfaceArray | ( | std::unique_ptr< ISurfaceGridLookup > | gridLookup, |
std::vector< std::shared_ptr< const Surface >> | surfaces, | ||
std::shared_ptr< const Transform3D > | transform = nullptr |
||
) |
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 19 of file SurfaceArray.cpp.
View newest version in sPHENIX GitHub at line 19 of file SurfaceArray.cpp
Acts::SurfaceArray::SurfaceArray | ( | std::shared_ptr< const Surface > | srf | ) |
Constructor which takes concrete type SurfaceGridLookup.
gridLookup | The grid storage. Is static casted to ISurfaceGridLookup |
surfaces | The input vector of surfaces. This is only for bookkeeping, so we can ask |
transform | Optional additional transform for this SurfaceArray |
SingleElementLookup
srf | The one and only surface |
Definition at line 28 of file SurfaceArray.cpp.
View newest version in sPHENIX GitHub at line 28 of file SurfaceArray.cpp
|
inline |
Get all surfaces in bin given by position.
position | the lookup position |
SurfaceVector
contained in bin at that position Definition at line 444 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 444 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 452 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 452 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 459 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 459 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 464 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 464 of file SurfaceArray.hpp
References p_gridLookup.
|
inline |
Get vector of axes spanning the grid as AnyAxis
.
AnyAxis
Definition at line 500 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 500 of file SurfaceArray.hpp
References p_gridLookup.
Referenced by Acts::Test::BOOST_FIXTURE_TEST_CASE().
|
inline |
Get the center of the bin identified by global bin index bin
.
bin | the global bin index |
Definition at line 487 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 487 of file SurfaceArray.hpp
References p_gridLookup.
|
inline |
Checks if global bin is valid.
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.
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 |
size | How many neighbors we want in each direction. (default: 1) |
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 475 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 475 of file SurfaceArray.hpp
References p_gridLookup.
Referenced by Acts::Test::BOOST_FIXTURE_TEST_CASE().
|
inline |
Get the size of the underlying grid structure including under/overflow bins.
Definition at line 482 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 482 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 494 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 494 of file SurfaceArray.hpp
References m_surfacesRawPointers.
Referenced by Acts::LayerCreator::associateSurfacesToLayer(), Acts::LayerCreator::checkBinning(), FW::RootMaterialWriter::collectMaterial(), and Acts::JsonGeometryConverter::convertToRep().
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 35 of file SurfaceArray.cpp.
View newest version in sPHENIX GitHub at line 35 of file SurfaceArray.cpp
References e.
Referenced by Acts::Test::BOOST_FIXTURE_TEST_CASE().
|
inline |
Definition at line 509 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 509 of file SurfaceArray.hpp
References m_transform.
|
private |
Definition at line 520 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 520 of file SurfaceArray.hpp
|
private |
Definition at line 523 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 523 of file SurfaceArray.hpp
Referenced by surfaces().
|
private |
Definition at line 526 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 526 of file SurfaceArray.hpp
Referenced by transform().
|
private |
Definition at line 518 of file SurfaceArray.hpp.
View newest version in sPHENIX GitHub at line 518 of file SurfaceArray.hpp
Referenced by at(), getAxes(), getBinCenter(), isValidBin(), neighbors(), and size().