42 std::reference_wrapper<const GeometryContext>
geoContext;
46 std::reference_wrapper<const GeometryContext>
gctx)
50 std::vector<std::unique_ptr<const DetectorElementStub>>
detectorStore = {};
55 double radius,
double zStagger,
double moduleHalfLength,
double lOverlap,
56 const std::pair<int, int>& binningSchema) {
57 int nPhiBins = binningSchema.first;
58 int nZbins = binningSchema.second;
60 std::vector<Vector3D> mPositions;
61 mPositions.reserve(nPhiBins * nZbins);
63 double phiStep = 2 *
M_PI / (nPhiBins);
65 double zStart = -0.5 * (nZbins - 1) * (2 * moduleHalfLength - lOverlap);
66 double zStep = 2 *
std::abs(zStart) / (nZbins - 1);
68 for (
size_t zBin = 0; zBin < size_t(nZbins); ++zBin) {
70 double moduleZ = zStart + zBin * zStep;
72 (zBin % 2) != 0
u ? radius - 0.5 * zStagger : radius + 0.5 * zStagger;
73 for (
size_t phiBin = 0; phiBin < size_t(nPhiBins); ++phiBin) {
75 double modulePhi = minPhi + phiBin * phiStep;
76 mPositions.push_back(
Vector3D(moduleR * cos(modulePhi),
77 moduleR * sin(modulePhi), moduleZ));
85 using namespace Acts::UnitLiterals;
92 auto surfaceArrayCreator = std::make_shared<const SurfaceArrayCreator>(
97 auto layerCreator = std::make_shared<const LayerCreator>(
101 auto layerArrayCreator = std::make_shared<const LayerArrayCreator>(
106 auto tVolumeArrayCreator =
107 std::make_shared<const TrackingVolumeArrayCreator>(
113 cvhConfig.trackingVolumeArrayCreator = tVolumeArrayCreator;
114 auto cylinderVolumeHelper = std::make_shared<const CylinderVolumeHelper>(
121 bplConfig.centralLayerRadii = std::vector<double>(1, 19.);
122 bplConfig.centralLayerHalflengthZ = std::vector<double>(1, 1000.);
123 bplConfig.centralLayerThickness = std::vector<double>(1, 0.8);
124 bplConfig.centralLayerMaterial = {
125 std::make_shared<const HomogeneousSurfaceMaterial>(beamPipeMaterial)};
126 auto beamPipeBuilder = std::make_shared<const PassiveLayerBuilder>(
131 bpvConfig.volumeName =
"BeamPipe";
132 bpvConfig.layerBuilder = beamPipeBuilder;
133 bpvConfig.layerEnvelopeR = {1
_mm, 1
_mm};
134 bpvConfig.buildToRadiusZero =
true;
135 bpvConfig.volumeSignature = 0;
136 auto beamPipeVolumeBuilder = std::make_shared<const CylinderVolumeBuilder>(
140 auto beamPipeBounds =
141 std::make_shared<const CylinderVolumeBounds>(0., 25., 1100.);
142 auto beamPipeVolume = beamPipeVolumeBuilder->trackingVolume(
150 std::shared_ptr<const ISurfaceMaterial> layerMaterialPtr =
151 std::shared_ptr<const ISurfaceMaterial>(
157 std::vector<double> pLayerRadii = {32., 72., 116., 172.};
158 std::vector<std::pair<int, int>> pLayerBinning = {
159 {16, 14}, {32, 14}, {52, 14}, {78, 14}};
160 std::vector<double> pModuleTiltPhi = {0.145, 0.145, 0.145, 0.145};
161 std::vector<double> pModuleHalfX = {8.4, 8.4, 8.4, 8.4};
162 std::vector<double> pModuleHalfY = {36., 36., 36., 36.};
163 std::vector<double> pModuleThickness = {0.15, 0.15, 0.15, 0.15};
165 std::vector<LayerPtr> pLayers;
167 for (
size_t ilp = 0; ilp < pLayerRadii.size(); ++ilp) {
168 std::vector<std::shared_ptr<const Surface>> layerModules;
172 pModuleThickness[ilp]);
174 std::shared_ptr<const ISurfaceMaterial> moduleMaterialPtr =
175 std::shared_ptr<const ISurfaceMaterial>(
179 auto mBounds = std::make_shared<RectangleBounds>(pModuleHalfX[ilp],
183 pLayerRadii[ilp], 2
_mm, pModuleHalfY[ilp], 5
_mm, pLayerBinning[ilp]);
185 for (
auto& mCenter : moduleCenters) {
189 Vector3D moduleLocalZ(cos(modulePhi + pModuleTiltPhi[ilp]),
190 sin(modulePhi + pModuleTiltPhi[ilp]), 0.);
194 Vector3D moduleLocalX(-sin(modulePhi + pModuleTiltPhi[ilp]),
195 cos(modulePhi + pModuleTiltPhi[ilp]), 0.);
198 moduleRotation.col(0) = moduleLocalX;
199 moduleRotation.col(1) = moduleLocalY;
200 moduleRotation.col(2) = moduleLocalZ;
202 std::shared_ptr<Transform3D> mModuleTransform =
206 auto detElement = std::make_unique<const DetectorElementStub>(
207 mModuleTransform, mBounds, pModuleThickness[ilp],
210 layerModules.push_back(detElement->surface().getSharedPtr());
215 protoLayer.
envR = {0.5, 0.5};
216 auto pLayer = layerCreator->cylinderLayer(
217 geoContext, std::move(layerModules), pLayerBinning[ilp].first,
218 pLayerBinning[ilp].
second, protoLayer);
219 auto approachSurfaces = pLayer->approachDescriptor()->containedSurfaces();
220 auto mutableOuterSurface =
224 pLayers.push_back(pLayer);
229 auto pLayerArray = layerArrayCreator->layerArray(
geoContext, pLayers, 25.,
232 std::make_shared<const CylinderVolumeBounds>(25., 300., 1100.);
235 std::move(pLayerArray),
nullptr, {},
239 auto detectorVolume = cylinderVolumeHelper->createContainerTrackingVolume(
243 return std::make_shared<const TrackingGeometry>(detectorVolume);