File indexing completed on 2025-10-13 08:18:30
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Definitions/Units.hpp"
0013 #include "Acts/Geometry/GeometryContext.hpp"
0014 #include "Acts/Geometry/LayerArrayCreator.hpp"
0015 #include "Acts/Geometry/LayerCreator.hpp"
0016 #include "Acts/Geometry/TrackingGeometry.hpp"
0017 #include "Acts/Geometry/TrackingVolume.hpp"
0018 #include "ActsTests/CommonHelpers/DetectorElementStub.hpp"
0019
0020 #include <vector>
0021
0022 namespace ActsTests {
0023
0024 struct CylindricalTrackingGeometry {
0025 constexpr static double kBeamPipeRadius = 19. * Acts::UnitConstants::mm;
0026 constexpr static double kBeamPipeHalfLengthZ =
0027 1000. * Acts::UnitConstants::mm;
0028 constexpr static double kBeamPipeThickness = 0.8 * Acts::UnitConstants::mm;
0029
0030 inline static const std::vector<double> kLayerRadii = {32., 72., 116., 172.};
0031 inline static const std::vector<std::pair<int, int>> kLayerBinning = {
0032 {16, 14}, {32, 14}, {52, 14}, {78, 14}};
0033 inline static const std::vector<double> kModuleTiltPhi = {0.145, 0.145, 0.145,
0034 0.145};
0035 inline static const std::vector<double> kModuleHalfX = {8.4, 8.4, 8.4, 8.4};
0036 inline static const std::vector<double> kModuleHalfY = {36., 36., 36., 36.};
0037 inline static const std::vector<double> kModuleThickness = {0.15, 0.15, 0.15,
0038 0.15};
0039
0040 std::reference_wrapper<const Acts::GeometryContext> geoContext;
0041 bool gen3 = false;
0042
0043
0044 explicit CylindricalTrackingGeometry(const Acts::GeometryContext& gctx,
0045 bool gen3_ = false)
0046 : geoContext(gctx), gen3(gen3_) {}
0047
0048 using DetectorStore =
0049 std::vector<std::unique_ptr<const ActsTests::DetectorElementStub>>;
0050
0051
0052 DetectorStore detectorStore = {};
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068 std::vector<Acts::Surface*> surfacesRing(
0069 DetectorStore& detStore, double moduleHalfXminY, double moduleHalfXmaxY,
0070 double moduleHalfY, double moduleThickness, double moduleTilt,
0071 double ringRadius, double ringZ, double zStagger, int nPhi);
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086 std::vector<Acts::Surface*> surfacesCylinder(
0087 DetectorStore& detStore, double moduleHalfX, double moduleHalfY,
0088 double moduleThickness, double moduleTiltPhi, double layerRadius,
0089 double radialStagger, double longitudinalOverlap,
0090 const std::pair<int, int>& binningSchema);
0091
0092
0093
0094 std::vector<Acts::Vector3> modulePositionsCylinder(
0095 double radius, double zStagger, double moduleHalfLength, double lOverlap,
0096 const std::pair<int, int>& binningSchema);
0097
0098
0099 std::shared_ptr<Acts::TrackingGeometry> operator()();
0100
0101 private:
0102 std::shared_ptr<Acts::TrackingGeometry> buildGen1();
0103 std::shared_ptr<Acts::TrackingGeometry> buildGen3();
0104 };
0105
0106 }