Skip to content

Commit

Permalink
feat: Make layer envelope dimensions configurable (#1982)
Browse files Browse the repository at this point in the history
The idea of this PR is to make the radial envelope parameters of the layer/volume builder configurable. This is important for the geometries with closely located layers: the standard (and hardcoded) dimensions of the envelopes result in volume overlapping.
I also realized that there are two envelopes built around each layer and I'm not sure I understand the idea behind it. 
@asalzburger, @paulgessinger could you comment on that?
I introduced two parameters, `beampipeEnvelopeR` and `layerEnvelopeR` that configure the radial envelope dimensions.


Co-authored-by: Andreas Salzburger <26623879+asalzburger@users.noreply.github.com>
  • Loading branch information
plariono and asalzburger committed May 25, 2023
1 parent ee8718b commit 55b07bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ struct TGeoDetector {
double beamPipeRadius{0};
double beamPipeHalflengthZ{0};
double beamPipeLayerThickness{0};
double beamPipeEnvelopeR{1.0};
double layerEnvelopeR{1.0};

double unitScalor = 1.0;

Expand Down
9 changes: 5 additions & 4 deletions Examples/Detectors/TGeoDetector/src/TGeoDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ std::vector<Acts::TGeoLayerBuilder::Config> makeLayerBuilderConfigs(
lConfig.volumeName = volume.subVolumeName.at(ncp);
lConfig.sensorNames = volume.sensitiveNames.at(ncp);
lConfig.localAxes = volume.sensitiveAxes.at(ncp);
lConfig.envelope = {config.layerEnvelopeR, config.layerEnvelopeR};

auto rR = volume.rRange.at(ncp);
auto rMin = rR.lower.value_or(0.);
Expand Down Expand Up @@ -203,8 +204,8 @@ std::shared_ptr<const Acts::TrackingGeometry> buildTGeoDetector(
bpvConfig.trackingVolumeHelper = cylinderVolumeHelper;
bpvConfig.volumeName = "BeamPipe";
bpvConfig.layerBuilder = beamPipeBuilder;
bpvConfig.layerEnvelopeR = {1. * Acts::UnitConstants::mm,
1. * Acts::UnitConstants::mm};
bpvConfig.layerEnvelopeR = {config.beamPipeEnvelopeR,
config.beamPipeEnvelopeR};
bpvConfig.buildToRadiusZero = true;
auto beamPipeVolumeBuilder =
std::make_shared<const Acts::CylinderVolumeBuilder>(
Expand Down Expand Up @@ -266,8 +267,8 @@ std::shared_ptr<const Acts::TrackingGeometry> buildTGeoDetector(
volumeConfig.trackingVolumeHelper = cylinderVolumeHelper;
volumeConfig.volumeName = lbc.configurationName;
volumeConfig.buildToRadiusZero = volumeBuilders.empty();
volumeConfig.layerEnvelopeR = {1. * Acts::UnitConstants::mm,
5. * Acts::UnitConstants::mm};
volumeConfig.layerEnvelopeR = {config.layerEnvelopeR,
config.layerEnvelopeR};
auto ringLayoutConfiguration =
[&](const std::vector<Acts::TGeoLayerBuilder::LayerConfig>& lConfigs)
-> void {
Expand Down
2 changes: 2 additions & 0 deletions Examples/Python/src/Detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ void addDetector(Context& ctx) {
ACTS_PYTHON_MEMBER(beamPipeRadius);
ACTS_PYTHON_MEMBER(beamPipeHalflengthZ);
ACTS_PYTHON_MEMBER(beamPipeLayerThickness);
ACTS_PYTHON_MEMBER(beamPipeEnvelopeR);
ACTS_PYTHON_MEMBER(layerEnvelopeR);
ACTS_PYTHON_MEMBER(unitScalor);
ACTS_PYTHON_MEMBER(volumes);
ACTS_PYTHON_STRUCT_END();
Expand Down

0 comments on commit 55b07bc

Please sign in to comment.