Skip to content

Commit 44863e5

Browse files
authored
Make layer envelope dimensions configurable (#1)
1 parent 889267b commit 44863e5

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

Examples/Detectors/TGeoDetector/include/ActsExamples/TGeoDetector/TGeoDetector.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ struct TGeoDetector {
5454
double beamPipeRadius{0};
5555
double beamPipeHalflengthZ{0};
5656
double beamPipeLayerThickness{0};
57+
double beampipeEnvelopeR{1.0};
58+
double layerEnvelopeR{1.0};
5759

5860
double unitScalor = 1.0;
5961

Examples/Detectors/TGeoDetector/src/TGeoDetector.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ std::vector<Acts::TGeoLayerBuilder::Config> makeLayerBuilderConfigs(
8282
lConfig.volumeName = volume.subVolumeName.at(ncp);
8383
lConfig.sensorNames = volume.sensitiveNames.at(ncp);
8484
lConfig.localAxes = volume.sensitiveAxes.at(ncp);
85+
lConfig.envelope = {config.layerEnvelopeR, config.layerEnvelopeR};
8586

8687
auto rR = volume.rRange.at(ncp);
8788
auto rMin = rR.lower.value_or(0.);
@@ -203,8 +204,8 @@ std::shared_ptr<const Acts::TrackingGeometry> buildTGeoDetector(
203204
bpvConfig.trackingVolumeHelper = cylinderVolumeHelper;
204205
bpvConfig.volumeName = "BeamPipe";
205206
bpvConfig.layerBuilder = beamPipeBuilder;
206-
bpvConfig.layerEnvelopeR = {1. * Acts::UnitConstants::mm,
207-
1. * Acts::UnitConstants::mm};
207+
bpvConfig.layerEnvelopeR = {config.beampipeEnvelopeR,
208+
config.beampipeEnvelopeR};
208209
bpvConfig.buildToRadiusZero = true;
209210
auto beamPipeVolumeBuilder =
210211
std::make_shared<const Acts::CylinderVolumeBuilder>(
@@ -266,8 +267,8 @@ std::shared_ptr<const Acts::TrackingGeometry> buildTGeoDetector(
266267
volumeConfig.trackingVolumeHelper = cylinderVolumeHelper;
267268
volumeConfig.volumeName = lbc.configurationName;
268269
volumeConfig.buildToRadiusZero = volumeBuilders.empty();
269-
volumeConfig.layerEnvelopeR = {1. * Acts::UnitConstants::mm,
270-
5. * Acts::UnitConstants::mm};
270+
volumeConfig.layerEnvelopeR = {config.layerEnvelopeR,
271+
config.layerEnvelopeR};
271272
auto ringLayoutConfiguration =
272273
[&](const std::vector<Acts::TGeoLayerBuilder::LayerConfig>& lConfigs)
273274
-> void {

Examples/Python/src/Detector.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ void addDetector(Context& ctx) {
203203
ACTS_PYTHON_MEMBER(beamPipeRadius);
204204
ACTS_PYTHON_MEMBER(beamPipeHalflengthZ);
205205
ACTS_PYTHON_MEMBER(beamPipeLayerThickness);
206+
ACTS_PYTHON_MEMBER(beampipeEnvelopeR);
207+
ACTS_PYTHON_MEMBER(layerEnvelopeR);
206208
ACTS_PYTHON_MEMBER(unitScalor);
207209
ACTS_PYTHON_MEMBER(volumes);
208210
ACTS_PYTHON_STRUCT_END();

0 commit comments

Comments
 (0)