Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: Remove implicit default layer from CuboidVolumeBuilder #2681

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions Core/src/Geometry/CuboidVolumeBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,30 +152,6 @@ std::shared_ptr<Acts::TrackingVolume> Acts::CuboidVolumeBuilder::buildVolume(
auto bounds = std::make_shared<const CuboidVolumeBounds>(
cfg.length.x() * 0.5, cfg.length.y() * 0.5, cfg.length.z() * 0.5);

if (cfg.layerCfg.empty()) {
paulgessinger marked this conversation as resolved.
Show resolved Hide resolved
// Build dummy layer if no layer is given (tmp solution)
SurfaceConfig sCfg;
sCfg.position = cfg.position;
// Rotation of the surfaces: +pi/2 around axis y
Vector3 xPos(0., 0., 1.);
Vector3 yPos(0., 1., 0.);
Vector3 zPos(-1., 0., 0.);
sCfg.rotation.col(0) = xPos;
sCfg.rotation.col(1) = yPos;
sCfg.rotation.col(2) = zPos;
// Bounds
sCfg.rBounds = std::make_shared<const RectangleBounds>(
RectangleBounds(cfg.length.y() * 0.5, cfg.length.z() * 0.5));

LayerConfig lCfg;
lCfg.surfaceCfg = {sCfg};
lCfg.envelopeX = {0.1 * UnitConstants::mm, 0.1 * UnitConstants::mm};
lCfg.envelopeY = {0.1 * UnitConstants::mm, 0.1 * UnitConstants::mm};
lCfg.envelopeZ = {0.1 * UnitConstants::mm, 0.1 * UnitConstants::mm};

cfg.layerCfg.push_back(lCfg);
}

// Gather the layers
LayerVector layVec;
if (cfg.layers.empty()) {
Expand Down
2 changes: 1 addition & 1 deletion Core/src/Geometry/LayerArrayCreator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ std::unique_ptr<const Acts::LayerArray> Acts::LayerArrayCreator::layerArray(
double navigationValue =
0.5 * (boundaries.at(boundaries.size() - 1) + max);
// create navigation layer only when necessary
if (navigationValue != max) {
if (navigationValue != max && lastLayer != nullptr) {
// create the navigation layer surface from the layer
std::shared_ptr<const Surface> navLayerSurface =
createNavigationSurface(gctx, *lastLayer, bValue,
Expand Down
Loading