44 template <
typename detector_element_t>
59 std::vector<std::shared_ptr<const Acts::ISurfaceMaterial>>
72 std::vector<std::shared_ptr<const Acts::ISurfaceMaterial>>
88 std::unique_ptr<const Acts::Logger>
logger =
123 template <
typename detector_element_t>
128 cLayers.reserve(m_cfg.centralProtoLayers.size());
131 for (
auto& cpl : m_cfg.centralProtoLayers) {
134 gctx, cpl.surfaces, cpl.bins0, cpl.bins1, cpl.protoLayer);
137 if (m_cfg.centralLayerMaterial.size()) {
138 std::shared_ptr<const Acts::ISurfaceMaterial> layerMaterialPtr =
139 m_cfg.centralLayerMaterial.at(icl);
141 if (m_cfg.centralLayerMaterialConcentration.at(icl) == 0.) {
143 cLayer->surfaceRepresentation().assignSurfaceMaterial(layerMaterialPtr);
144 ACTS_VERBOSE(
"- and material at central layer surface.");
149 auto approachSurfaces =
150 cLayer->approachDescriptor()->containedSurfaces();
151 if (m_cfg.centralLayerMaterialConcentration.at(icl) > 0) {
152 auto mutableOuterSurface =
155 ACTS_VERBOSE(
"- and material at outer approach surface");
157 auto mutableInnerSurface =
160 ACTS_VERBOSE(
"- and material at inner approach surface");
165 cLayers.push_back(cLayer);
171 template <
typename detector_element_t>
174 return constructEndcapLayers(gctx, -1);
177 template <
typename detector_element_t>
180 return constructEndcapLayers(gctx, 1);
183 template <
typename detector_element_t>
186 std::unique_ptr<const Acts::Logger> log)
187 : Acts::ILayerBuilder(), m_cfg(cfg), m_logger(std::move(log)) {}
189 template <
typename detector_element_t>
194 const auto& protoLayers =
195 (side < 0) ? m_cfg.negativeProtoLayers : m_cfg.positiveProtoLayers;
199 eLayers.reserve(protoLayers.size());
204 for (
auto& ple : protoLayers) {
207 gctx, ple.surfaces, ple.bins0, ple.bins1, ple.protoLayer);
210 if (m_cfg.posnegLayerMaterial.size()) {
211 std::shared_ptr<const Acts::ISurfaceMaterial> layerMaterialPtr =
212 m_cfg.posnegLayerMaterial[ipnl];
214 if (m_cfg.posnegLayerMaterialConcentration.at(ipnl) == 0.) {
217 eLayer->surfaceRepresentation().assignSurfaceMaterial(layerMaterialPtr);
218 ACTS_VERBOSE(
"- and material at central layer surface.");
223 auto approachSurfaces =
224 eLayer->approachDescriptor()->containedSurfaces();
225 if (m_cfg.posnegLayerMaterialConcentration.at(ipnl) > 0.) {
226 int sf = side < 0 ? 0 : 1;
227 auto mutableInnerSurface =
230 ACTS_VERBOSE(
"- and material at outer approach surfaces.");
232 int sf = side < 0 ? 1 : 0;
233 auto mutableOuterSurface =
236 ACTS_VERBOSE(
"- and material at inner approach surfaces.");
241 eLayers.push_back(eLayer);