Skip to content

Commit

Permalink
removing old mentions of bin*
Browse files Browse the repository at this point in the history
  • Loading branch information
asalzburger committed Nov 7, 2024
1 parent d233f80 commit 466ced2
Show file tree
Hide file tree
Showing 17 changed files with 44 additions and 43 deletions.
2 changes: 1 addition & 1 deletion Core/include/Acts/Detector/CuboidalContainerBuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class IGeometryIdGenerator;
/// that will be executed in a chain
///
/// @note allowed AxisDirection(s) for the cuboid container builder are
/// {binX}, {binY}, {binZ}.
/// {AxisX}, {AxisY}, {AxisZ}.
///
/// @note Connecting containers isn't functional yet due to the underlying
/// issues in the CuboidDetectorHelper
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/Detector/CylindricalContainerBuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class IGeometryIdGenerator;
/// that will be executed in a chain
///
/// @note allowed AxisDirection(s) for the cylindrical container builder are
/// {binZ}, {binR}, {binPhi}, {binZ, binR}, whereas the last option indicates
/// a wrapping setup.
/// {AxisZ}, {AxisR}, {AxisPhi}, {AxisZ, AxisR}, whereas the last option
/// indicates a wrapping setup.
class CylindricalContainerBuilder : public IDetectorComponentBuilder {
public:
/// Nested configuration object
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/Geometry/GeometryObjectSorter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ class DistanceSorterT {
using Acts::VectorHelpers::eta;
using Acts::VectorHelpers::perp;
using Acts::VectorHelpers::phi;
// switch the binning value
// - binX, binY, AxisZ, binR, binPhi, binRPhi, binH, binEta
// switch the possible sorting values are
// - AxisX, AxisY, AxisZ, AxisR, AxisPhi, AxisRPhi, AxisTheta, AxisEta
switch (m_binningValue) {
// compare on diff x
case AxisDirection::AxisX: {
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/Geometry/SurfaceArrayCreator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ class SurfaceArrayCreator {
/// @param [in] gctx the geometry context for this call
/// @param surfaces are the sensitive surfaces to be
/// @param bValue the AxisDirection in which direction should be binned
/// (currently possible: binPhi, binR, AxisZ)
/// (currently possible: AxisPhi, AixisR, AxisZ)
/// @param protoLayer Instance of @c ProtoLayer holding generic layer info
/// @param transform is the (optional) additional transform applied
/// @return Instance of @c ProtoAxis containing determined properties
Expand All @@ -338,7 +338,7 @@ class SurfaceArrayCreator {
/// @param [in] gctx the geometry context for this call
/// @param surfaces are the sensitive surfaces to be
/// @param bValue the AxisDirection in which direction should be binned
/// (currently possible: binPhi, binR, AxisZ)
/// (currently possible: AxisPhi, AxisR, AxisZ)
/// @param protoLayer Instance of @c ProtoLayer holding generic layer info
/// @param transform is the (optional) additional transform applied
/// @param nBins Number of bins to use, 0 means determine automatically
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Surfaces/CylinderSurface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class CylinderSurface : public RegularSurface {
/// @note The surfaces need to be *compatible*, i.e. have cylinder bounds
/// that align, and have the same radius
/// @param other The other cylinder surface to merge with
/// @param direction The binning direction: either @c AxisZ or @c binRPhi
/// @param direction The binning direction: either @c AxisZ or @c AxisRPhi
/// @param externalRotation If true, any phi rotation is done in the transform
/// @param logger The logger to use
/// @return The merged cylinder surface and a boolean indicating if surfaces are reversed
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Surfaces/DiscSurface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ class DiscSurface : public RegularSurface {
/// @note The surfaces need to be *compatible*, i.e. have disc bounds
/// that align
/// @param other The other disc surface to merge with
/// @param direction The binning direction: either @c binR or @c binPhi
/// @param direction The binning direction: either @c AxisR or @c AxisPhi
/// @param externalRotation If true, any phi rotation is done in the transform
/// @param logger The logger to use
/// @return The merged disc surface and a boolean indicating if surfaces are reversed
Expand Down
4 changes: 2 additions & 2 deletions Core/src/Geometry/GridPortalLink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ std::unique_ptr<GridPortalLink> GridPortalLink::extendTo2dImpl(
assert(dim() == 1);
if (direction() == AxisDirection::AxisRPhi) {
const auto& axisRPhi = *grid().axes().front();
// 1D direction is binRPhi, so add a Z axis
// 1D direction is AxisRPhi, so add a Z axis
ActsScalar hlZ = surface->bounds().get(CylinderBounds::eHalfLengthZ);

auto grid = axisRPhi.visit([&](const auto& axis0) {
Expand Down Expand Up @@ -398,7 +398,7 @@ std::unique_ptr<GridPortalLink> GridPortalLink::extendTo2dImpl(
}
} else {
const auto& axisPhi = *grid().axes().front();
// 1D direction is binPhi, so add an R axis
// 1D direction is AxisPhi, so add an R axis
ActsScalar rMin = bounds->get(RadialBounds::eMinR);
ActsScalar rMax = bounds->get(RadialBounds::eMaxR);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ ActsExamples::Telescope::buildDetector(
std::make_shared<Acts::HomogeneousSurfaceMaterial>(matProp);

// Construct the rotation
// This assumes the binValue is binX, AxisY or AxisZ. No reset is necessary in
// case of AxisZ
// This assumes the binValue is AxisX, AxisY or AxisZ. No reset is necessary
// in case of AxisZ
Acts::RotationMatrix3 rotation = Acts::RotationMatrix3::Identity();
if (binValue == Acts::AxisDirection::AxisX) {
rotation.col(0) = Acts::Vector3(0, 0, -1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ class RootMaterialDecorator : public Acts::IMaterialDecorator {
std::string sentag = "_sen";
/// The bin number tag
std::string ntag = "n";
/// The value tag -> binning values: AxisZ, binR, binPhi, etc.
/// The value tag -> binning values: AxisZ, AxisR, AxisPhi, etc.
std::string vtag = "v";
/// The option tag -> binning options: open, AxisBoundaryType::Closed
/// The option tag -> binning options: AxisBoundaryType::Bound,
/// AxisBoundaryType::Closed
std::string otag = "o";
/// The range min tag: min value
std::string mintag = "min";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ class RootMaterialWriter : public IMaterialWriter {
std::string sentag = "_sen";
/// The bin number tag
std::string ntag = "n";
/// The value tag -> binning values: AxisZ, binR, binPhi, etc.
/// The value tag -> binning values: AxisZ, AxisR, AxisPhi, etc.
std::string vtag = "v";
/// The option tag -> binning options: open, AxisBoundaryType::Closed
/// The option tag -> binning options: AxisBoundartyType::Bound,
/// AxisBoundaryType::Closed
std::string otag = "o";
/// The range min tag: min value
std::string mintag = "min";
Expand Down
18 changes: 9 additions & 9 deletions Examples/Python/src/Base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,15 +360,15 @@ void addBinning(Context& ctx) {
auto& m = ctx.get("main");

auto binningValue = py::enum_<AxisDirection>(m, "AxisDirection")
.value("binX", AxisDirection::AxisX)
.value("binY", AxisDirection::AxisY)
.value("binZ", AxisDirection::AxisZ)
.value("binR", AxisDirection::AxisR)
.value("binPhi", AxisDirection::AxisPhi)
.value("binRPhi", AxisDirection::AxisRPhi)
.value("binH", AxisDirection::AxisTheta)
.value("binEta", AxisDirection::AxisEta)
.value("binMag", AxisDirection::AxisMag);
.value("AxisX", AxisDirection::AxisX)
.value("AxisY", AxisDirection::AxisY)
.value("AxisZ", AxisDirection::AxisZ)
.value("AxisR", AxisDirection::AxisR)
.value("AxisPhi", AxisDirection::AxisPhi)
.value("AxisRPhi", AxisDirection::AxisRPhi)
.value("AxisTheta", AxisDirection::AxisTheta)
.value("AxisEta", AxisDirection::AxisEta)
.value("AxisMag", AxisDirection::AxisMag);

auto axisBoundaryType = py::enum_<AxisBoundaryType>(m, "AxisBoundaryType")
.value("Bound", AxisBoundaryType::Bound)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ struct Options {

/// Convert an ACTS grid into a actsvg protogrid, it currently works with
///
/// - 1D: [ AxisX ] , [ AxisY ], [ binR ] , [ binPhi ]
/// - 2D: [ binX, AxisY ], [ AxisZ, binPhi ], [ binR, binPhi ]
/// - 1D: [ AxisX ] , [ AxisY ], [ AxisR ] , [ AxisPhi ]
/// - 2D: [ AxisX, AxisY ], [ AxisZ, AxisPhi ], [ AxisR, AxisPhi ]
///
/// @tparam grid_type is the type of the grid to be converted
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void addDiscLayerProtoMaterial(dd4hep::DetElement detElement, Layer& discLayer,

/// Helper method to be called for Cylinder and Disc Proto material
///
/// For both, cylinder and disc, the closed binning value is "binPhi"
/// For both, cylinder and disc, the closed binning value is "AxisPhi"
///
/// @param params An instance of @c DD4hep::VariantParameters
/// @param layer the Layer to assign the proto material
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ void from_json(const nlohmann::json& j, Range1D<Type>& r) {
}

NLOHMANN_JSON_SERIALIZE_ENUM(AxisDirection,
{{AxisDirection::AxisX, "binX"},
{AxisDirection::AxisY, "binY"},
{AxisDirection::AxisZ, "binZ"},
{AxisDirection::AxisR, "binR"},
{AxisDirection::AxisPhi, "binPhi"},
{AxisDirection::AxisRPhi, "binRPhi"},
{AxisDirection::AxisTheta, "binH"},
{AxisDirection::AxisEta, "binEta"},
{AxisDirection::AxisMag, "binMag"}})
{{AxisDirection::AxisX, "AxisX"},
{AxisDirection::AxisY, "AxisY"},
{AxisDirection::AxisZ, "AxisZ"},
{AxisDirection::AxisR, "AxisR"},
{AxisDirection::AxisPhi, "AxisPhi"},
{AxisDirection::AxisRPhi, "AxisRPhi"},
{AxisDirection::AxisTheta, "AxisTheta"},
{AxisDirection::AxisEta, "AxisEta"},
{AxisDirection::AxisMag, "AxisMag"}})

} // namespace Acts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ BOOST_AUTO_TEST_CASE(ContainerConnection) {
Acts::GeometryView3D::drawDetectorVolume(obj, *volumeC, tContext);
Acts::GeometryView3D::drawDetectorVolume(obj, *volumeD, tContext);

obj.write("ConnectContainers_binX.obj");
obj.write("ConnectContainers_AxisX.obj");
}

BOOST_AUTO_TEST_SUITE_END()
2 changes: 1 addition & 1 deletion Tests/UnitTests/Core/Geometry/PortalTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ BOOST_AUTO_TEST_CASE(Cylinder) {
.value(),
nullptr);

// Cannot merge in binRPhi
// Cannot merge in AxisRPhi
BOOST_CHECK_THROW(
Portal::merge(gctx, portal1, portal2, AxisDirection::AxisRPhi, *logger),
SurfaceMergingException);
Expand Down
5 changes: 2 additions & 3 deletions Tests/UnitTests/Plugins/ActSVG/GridSvgConverterTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,8 @@ BOOST_AUTO_TEST_CASE(ClosedDiscGridRPhi) {

std::vector<std::string> captionText = {
"Binning schema for global and local bins: ",
"- axis 0 : AxisBoundaryType::Bound, (100., 400, 3), binR",
"- axis 1 : AxisBoundaryType::Closed, (-PI, PI, 4), "
"binPhi"};
"- axis 0 : AxisBoundaryType::Bound, (100., 400, 3) in r",
"- axis 1 : AxisBoundaryType::Closed, (-PI, PI, 4) in phi"};

auto caption = actsvg::draw::text("caption", {-180, -420}, captionText);
auto oGrid = actsvg::display::grid("ClosedDiscGridRPhi", pGrid);
Expand Down

0 comments on commit 466ced2

Please sign in to comment.