Analysis Software
Documentation for sPHENIX simulation software
|
#include <acts/blob/sPHENIX/Core/include/Acts/Geometry/SurfaceArrayCreator.hpp>
Classes | |
struct | Config |
struct | ProtoAxis |
Public Member Functions | |
SurfaceArrayCreator (std::unique_ptr< const Logger > logger=getDefaultLogger("SurfaceArrayCreator", Logging::INFO)) | |
SurfaceArrayCreator (const Config &cfg, std::unique_ptr< const Logger > logger=getDefaultLogger("SurfaceArrayCreator", Logging::INFO)) | |
virtual | ~SurfaceArrayCreator ()=default |
Destructor. | |
std::unique_ptr< SurfaceArray > | surfaceArrayOnCylinder (const GeometryContext &gctx, std::vector< std::shared_ptr< const Surface >> surfaces, size_t binsPhi, size_t binsZ, std::optional< ProtoLayer > protoLayerOpt=std::nullopt, const Transform3 &transform=Transform3::Identity()) const |
std::unique_ptr < Acts::SurfaceArray > | 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 |
std::unique_ptr< SurfaceArray > | surfaceArrayOnDisc (const GeometryContext &gctx, std::vector< std::shared_ptr< const Surface >> surfaces, size_t binsR, size_t binsPhi, std::optional< ProtoLayer > protoLayerOpt=std::nullopt, const Transform3 &transform=Transform3::Identity()) const |
std::unique_ptr < Acts::SurfaceArray > | 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 |
std::unique_ptr< SurfaceArray > | surfaceArrayOnPlane (const GeometryContext &gctx, std::vector< std::shared_ptr< const Surface >> surfaces, size_t bins1, size_t bins2, BinningValue bValue, std::optional< ProtoLayer > protoLayerOpt=std::nullopt, const Transform3 &transform=Transform3::Identity()) const |
SurfaceArrayCreator interface method - create an array on a plane. | |
void | setLogger (std::unique_ptr< const Logger > logger) |
Static Public Member Functions | |
static bool | isSurfaceEquivalent (const GeometryContext &gctx, BinningValue bValue, const Surface *a, const Surface *b) |
Private Member Functions | |
const Logger & | logger () const |
Private access to logger. | |
std::vector< const Surface * > | findKeySurfaces (const std::vector< const Surface * > &surfaces, const std::function< bool(const Surface *, const Surface *)> &equal) const |
size_t | determineBinCount (const GeometryContext &gctx, const std::vector< const Surface * > &surfaces, BinningValue bValue) const |
ProtoAxis | createVariableAxis (const GeometryContext &gctx, const std::vector< const Surface * > &surfaces, BinningValue bValue, const ProtoLayer &protoLayer, Transform3 &transform) const |
ProtoAxis | createEquidistantAxis (const GeometryContext &gctx, const std::vector< const Surface * > &surfaces, BinningValue bValue, const ProtoLayer &protoLayer, Transform3 &transform, size_t nBins=0) const |
void | completeBinning (const GeometryContext &gctx, SurfaceArray::ISurfaceGridLookup &sl, const std::vector< const Surface * > &surfaces) const |
std::vector< Acts::Vector3 > | makeGlobalVertices (const GeometryContext &gctx, const Acts::Surface &surface, const std::vector< Acts::Vector2 > &locVertices) const |
Static Private Member Functions | |
template<detail::AxisBoundaryType bdtA, detail::AxisBoundaryType bdtB, typename F1 , typename F2 > | |
static std::unique_ptr < SurfaceArray::ISurfaceGridLookup > | makeSurfaceGridLookup2D (F1 globalToLocal, F2 localToGlobal, ProtoAxis pAxisA, ProtoAxis pAxisB) |
Creates a SurfaceGridLookup instance within an any This is essentially a factory which absorbs some if/else logic that is required by the templating. | |
Private Attributes | |
Config | m_cfg |
configuration object | |
std::unique_ptr< const Logger > | m_logger |
logging instance | |
Friends | |
struct | Acts::Test::SurfaceArrayCreatorFixture |
class | Acts::SurfaceArray |
It is designed create sub surface arrays to be ordered on Surfaces
Definition at line 54 of file SurfaceArrayCreator.hpp.
View newest version in sPHENIX GitHub at line 54 of file SurfaceArrayCreator.hpp
|
inline |
Constructor with default config
logger | logging instance |
Definition at line 96 of file SurfaceArrayCreator.hpp.
View newest version in sPHENIX GitHub at line 96 of file SurfaceArrayCreator.hpp
|
inline |
Constructor with explicit config
cfg | Explicit config struct |
logger | logging instance |
Definition at line 103 of file SurfaceArrayCreator.hpp.
View newest version in sPHENIX GitHub at line 103 of file SurfaceArrayCreator.hpp
|
virtualdefault |
Destructor.
|
inlineprivate |
Private helper method to complete the binning
given a grid point o
0 | x | | | | x | 1 | | | o | | | 2 | x | | | | x |
This is being called when you chose to use more bins thans surfaces I.e. to put a finer granularity binning onto your surface Neighbour bins are then filled to contain pointers as well This method delegates to SurfaceGridLookup itself.
[in] | gctx | the geometry context for this call |
sl | The SurfaceGridLookup | |
surfaces | the surfaces |
Definition at line 435 of file SurfaceArrayCreator.hpp.
View newest version in sPHENIX GitHub at line 435 of file SurfaceArrayCreator.hpp
References Acts::ACTS_VERBOSE(), and Acts::SurfaceArray::ISurfaceGridLookup::completeBinning().
Referenced by surfaceArrayOnCylinder().
|
private |
SurfaceArrayCreator internal method Creates a equidistant ProtoAxis
when the extremas and the bin number are It loops through the surfaces and finds out the needed information First the surfaces are sorted in the binning direction and the so called "key" surfaces (surfaces with different positions in the binning direction) are extracted. The number of key surfaces euqals the number of bins. Afterwards the minimum and maximum are calculated by subtracting/adding half of a bin size to the center position (in the binning direction) to the first/last surface.
[in] | gctx | the geometry context for this call |
surfaces | are the sensitive surfaces to be | |
bValue | the BinningValue in which direction should be binned (currently possible: binPhi, binR, binZ) | |
protoLayer | Instance of ProtoLayer holding generic layer info | |
transform | is the (optional) additional transform applied | |
nBins | Number of bins to use, 0 means determine automatically |
ProtoAxis
containing determined properties Definition at line 552 of file SurfaceArrayCreator.cpp.
View newest version in sPHENIX GitHub at line 552 of file SurfaceArrayCreator.cpp
References KFPMath::a, Acts::ACTS_VERBOSE(), KFPMath::b, Acts::GeometryObject::binningPosition(), Acts::binPhi, Acts::binR, Acts::SurfaceArrayCreator::ProtoAxis::bType, Acts::SurfaceArrayCreator::ProtoAxis::bValue, Acts::equidistant, gctx, m_cfg(), Acts::SurfaceArrayCreator::ProtoAxis::max, Acts::ProtoLayer::max(), Acts::SurfaceArrayCreator::ProtoAxis::min, Acts::ProtoLayer::min(), Acts::SurfaceArrayCreator::ProtoAxis::nBins, ActsTests::PropagationDatasets::phi, step, and Acts::Test::transform.
Referenced by Acts::Test::SurfaceArrayCreatorFixture::createEquidistantAxis(), and surfaceArrayOnCylinder().
|
private |
SurfaceArrayCreator internal method Creates a variable ProtoAxis
from a vector of (unsorted) surfaces with PlanarBounds It loops through the surfaces and finds out the needed information First the surfaces are sorted in the binning direction and the so called "key" surfaces (surfaces with different positions in the binning direction) are extracted. The boundary value between two surfaces is the mean value of the two center position in the binning direction. The first and the last boundaries are calculated from the vertices of the first and last surface.
[in] | gctx | the geometry context for this call |
surfaces | are the sensitive surfaces to be | |
bValue | the BinningValue in which direction should be binned (currently possible: binPhi, binR, binZ) | |
protoLayer | Instance of ProtoLayer holding generic layer info | |
transform | is the (optional) additional transform applied |
ProtoAxis
containing determined properties Definition at line 412 of file SurfaceArrayCreator.cpp.
View newest version in sPHENIX GitHub at line 412 of file SurfaceArrayCreator.cpp
References KFPMath::a, ACTS_ERROR, Acts::ACTS_VERBOSE(), Acts::arbitrary, KFPMath::b, Acts::GeometryObject::binningPosition(), Acts::binPhi, Acts::binR, Acts::binZ, Acts::Surface::bounds(), Acts::SurfaceArrayCreator::ProtoAxis::bType, gctx, i, m_cfg(), Acts::ProtoLayer::max(), Acts::Test::maxPhi, Acts::ProtoLayer::min(), Acts::VectorHelpers::perp(), ActsTests::PropagationDatasets::phi, Acts::Experimental::detail::BlueprintHelper::sort(), writeMapConfig::surface, Acts::Test::transform, and Acts::PlanarBounds::vertices().
Referenced by Acts::Test::SurfaceArrayCreatorFixture::createVariableAxis().
|
private |
Definition at line 399 of file SurfaceArrayCreator.cpp.
View newest version in sPHENIX GitHub at line 399 of file SurfaceArrayCreator.cpp
References KFPMath::a, KFPMath::b, gctx, and m_cfg().
|
private |
Definition at line 379 of file SurfaceArrayCreator.cpp.
View newest version in sPHENIX GitHub at line 379 of file SurfaceArrayCreator.cpp
References Acts::Concepts::exists.
|
inlinestatic |
Static check function for surface equivalent
[in] | gctx | the geometry context for this check |
bValue | the binning value for the binning | |
a | first surface for checking | |
b | second surface for checking |
Definition at line 238 of file SurfaceArrayCreator.hpp.
View newest version in sPHENIX GitHub at line 238 of file SurfaceArrayCreator.hpp
References Acts::GeometryObject::binningPosition(), Acts::binPhi, Acts::binR, Acts::binZ, and Acts::VectorHelpers::perp().
|
inlineprivate |
Private access to logger.
Definition at line 286 of file SurfaceArrayCreator.hpp.
View newest version in sPHENIX GitHub at line 286 of file SurfaceArrayCreator.hpp
References m_logger.
|
private |
Private helper method to transform the vertices of surface bounds into global coordinates
[in] | gctx | the geometry context for this call |
surface | the surface associated with the given vertices | |
locVertices | a vector of the vertices in local coordinates |
Definition at line 655 of file SurfaceArrayCreator.cpp.
View newest version in sPHENIX GitHub at line 655 of file SurfaceArrayCreator.cpp
References Acts::Surface::localToGlobal().
|
inlinestaticprivate |
Creates a SurfaceGridLookup instance within an any This is essentially a factory which absorbs some if/else logic that is required by the templating.
SurfaceArrayCreator internal method
bdtA | AxisBoundaryType of axis A |
bdtB | AxisBoundaryType of axis B |
F1 | type-deducted value of g2l lambda |
F2 | type-deducted value of l2g lambda |
globalToLocal | transform callable |
localToGlobal | transform callable |
pAxisA | ProtoAxis object for axis A |
pAxisB | ProtoAxis object for axis B |
Definition at line 367 of file SurfaceArrayCreator.hpp.
View newest version in sPHENIX GitHub at line 367 of file SurfaceArrayCreator.hpp
References Acts::arbitrary, Acts::SurfaceArrayCreator::ProtoAxis::binEdges, Acts::SurfaceArrayCreator::ProtoAxis::bType, Acts::SurfaceArrayCreator::ProtoAxis::bValue, Acts::equidistant, std::tr1::make_tuple(), Acts::SurfaceArrayCreator::ProtoAxis::max, Acts::SurfaceArrayCreator::ProtoAxis::min, and Acts::SurfaceArrayCreator::ProtoAxis::nBins.
Referenced by Acts::Test::SurfaceArrayCreatorFixture::makeSurfaceGridLookup2D(), and surfaceArrayOnCylinder().
|
inline |
Set logging instance
logger | is the logging instance to be set |
Definition at line 277 of file SurfaceArrayCreator.hpp.
View newest version in sPHENIX GitHub at line 277 of file SurfaceArrayCreator.hpp
References m_logger, and testing::internal::move().
std::unique_ptr< Acts::SurfaceArray > Acts::SurfaceArrayCreator::surfaceArrayOnCylinder | ( | const GeometryContext & | gctx, |
std::vector< std::shared_ptr< const Surface >> | surfaces, | ||
size_t | binsPhi, | ||
size_t | binsZ, | ||
std::optional< ProtoLayer > | protoLayerOpt = std::nullopt , |
||
const Transform3 & | transform = Transform3::Identity() |
||
) | const |
SurfaceArrayCreator interface method
surfaces | is the vector of pointers to sensitive surfaces to be ordered on the cylinder |
[in] | gctx | The gometry context for this building call |
protoLayerOpt | The proto layer containing the layer size | |
binsPhi | is the number of bins in phi for the surfaces | |
binsZ | is the number of bin in Z for the surfaces | |
transform | is the (optional) additional transform applied |
Definition at line 30 of file SurfaceArrayCreator.cpp.
View newest version in sPHENIX GitHub at line 30 of file SurfaceArrayCreator.cpp
References Acts::ACTS_VERBOSE(), Acts::binPhi, Acts::binR, Acts::binZ, completeBinning(), createEquidistantAxis(), loc, makeSurfaceGridLookup2D(), Acts::ProtoLayer::medium(), testing::internal::move(), ActsTests::PropagationDatasets::phi, Acts::Test::pos, Acts::IntegrationTest::R, Acts::Test::transform, and Acts::unpack_shared_vector().
std::unique_ptr< Acts::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
surfaces | is the vector of pointers to sensitive surfaces to be ordered on the cylinder |
[in] | gctx | The gometry context for this building call |
protoLayerOpt | The proto layer containing the layer size | |
bTypePhi | the binning type in phi direction (equidistant/arbitrary) | |
bTypeZ | the binning type in z direction (equidistant/arbitrary) | |
transform | is the (optional) additional transform applied |
Definition at line 77 of file SurfaceArrayCreator.cpp.
View newest version in sPHENIX GitHub at line 77 of file SurfaceArrayCreator.cpp
References Acts::ACTS_VERBOSE(), Acts::binPhi, Acts::binR, Acts::binZ, Acts::equidistant, Acts::SurfaceArray::ISurfaceGridLookup::fill(), Acts::SurfaceArray::ISurfaceGridLookup::getAxes(), loc, Acts::ProtoLayer::medium(), testing::internal::move(), ActsTests::PropagationDatasets::phi, Acts::Test::pos, Acts::IntegrationTest::R, Acts::Test::transform, and Acts::unpack_shared_vector().
std::unique_ptr< Acts::SurfaceArray > Acts::SurfaceArrayCreator::surfaceArrayOnDisc | ( | const GeometryContext & | gctx, |
std::vector< std::shared_ptr< const Surface >> | surfaces, | ||
size_t | binsR, | ||
size_t | binsPhi, | ||
std::optional< ProtoLayer > | protoLayerOpt = std::nullopt , |
||
const Transform3 & | transform = Transform3::Identity() |
||
) | const |
SurfaceArrayCreator interface method
surfaces | is the vector of pointers to sensitive surfaces to be ordered on the disc |
[in] | gctx | The gometry context for this building call |
protoLayerOpt | The proto layer containing the layer size | |
binsPhi | is the number of bins in phi for the surfaces | |
binsR | is the number of bin in R for the surfaces | |
transform | is the (optional) additional transform applied |
Definition at line 143 of file SurfaceArrayCreator.cpp.
View newest version in sPHENIX GitHub at line 143 of file SurfaceArrayCreator.cpp
References Acts::ACTS_VERBOSE(), Acts::binPhi, Acts::binR, Acts::binZ, Acts::SurfaceArray::ISurfaceGridLookup::fill(), Acts::SurfaceArray::ISurfaceGridLookup::getAxes(), loc, Acts::ProtoLayer::medium(), testing::internal::move(), Acts::VectorHelpers::perp(), ActsTests::PropagationDatasets::phi, Acts::Test::pos, Acts::Test::transform, Acts::unpack_shared_vector(), and SVM_v1::Z.
std::unique_ptr< Acts::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
surfaces | is the vector of pointers to sensitive surfaces to be ordered on the disc |
[in] | gctx | The gometry context for this building call |
protoLayerOpt | The proto layer containing the layer size | |
bTypeR | the binning type in r direction (equidistant/arbitrary) | |
bTypePhi | the binning type in phi direction (equidistant/arbitrary) | |
transform | is the (optional) additional transform applied |
Definition at line 196 of file SurfaceArrayCreator.cpp.
View newest version in sPHENIX GitHub at line 196 of file SurfaceArrayCreator.cpp
References KFPMath::a, Acts::ACTS_VERBOSE(), KFPMath::b, Acts::binPhi, Acts::binR, Acts::binZ, Acts::equidistant, Acts::SurfaceArray::ISurfaceGridLookup::fill(), gctx, Acts::SurfaceArray::ISurfaceGridLookup::getAxes(), Acts::SurfaceArrayCreator::ProtoAxis::getBin(), loc, m_cfg(), Acts::ProtoLayer::medium(), testing::internal::move(), Acts::SurfaceArrayCreator::ProtoAxis::nBins, Acts::VectorHelpers::perp(), ActsTests::PropagationDatasets::phi, Acts::Test::pos, Acts::Test::transform, Acts::unpack_shared_vector(), and SVM_v1::Z.
std::unique_ptr< Acts::SurfaceArray > Acts::SurfaceArrayCreator::surfaceArrayOnPlane | ( | const GeometryContext & | gctx, |
std::vector< std::shared_ptr< const Surface >> | surfaces, | ||
size_t | bins1, | ||
size_t | bins2, | ||
BinningValue | bValue, | ||
std::optional< ProtoLayer > | protoLayerOpt = std::nullopt , |
||
const Transform3 & | transform = Transform3::Identity() |
||
) | const |
SurfaceArrayCreator interface method - create an array on a plane.
SurfaceArrayCreator interface method
[in] | gctx | The gometry context for this building call |
[in] | surfaces | is the vector of pointers to sensitive surfaces to be ordered on the plane |
[in] | bins1 | is the number of bins in the orthogonal direction to bValue |
[in] | bins2 | is the number of bins in the orthogonal direction to bValue |
[in] | bValue | Direction of the aligned surfaces |
[in] | protoLayerOpt | Optional ProtoLayer instance |
[in] | transform | is the (optional) additional transform applied |
<
Definition at line 304 of file SurfaceArrayCreator.cpp.
View newest version in sPHENIX GitHub at line 304 of file SurfaceArrayCreator.cpp
References Acts::ACTS_VERBOSE(), Acts::binX, Acts::binY, Acts::binZ, Acts::SurfaceArray::ISurfaceGridLookup::fill(), loc, testing::internal::move(), Acts::Test::pos, Acts::Test::transform, and Acts::unpack_shared_vector().
Referenced by Acts::Test::Layers::BOOST_AUTO_TEST_CASE().
|
friend |
Definition at line 57 of file SurfaceArrayCreator.hpp.
View newest version in sPHENIX GitHub at line 57 of file SurfaceArrayCreator.hpp
|
friend |
Definition at line 56 of file SurfaceArrayCreator.hpp.
View newest version in sPHENIX GitHub at line 56 of file SurfaceArrayCreator.hpp
|
private |
configuration object
Definition at line 283 of file SurfaceArrayCreator.hpp.
View newest version in sPHENIX GitHub at line 283 of file SurfaceArrayCreator.hpp
|
private |
logging instance
Definition at line 416 of file SurfaceArrayCreator.hpp.
View newest version in sPHENIX GitHub at line 416 of file SurfaceArrayCreator.hpp
Referenced by logger(), and setLogger().