29 namespace ActsExamples {
43 template <
typename detector_element_t>
58 std::vector<std::shared_ptr<const Acts::ISurfaceMaterial>>
71 std::vector<std::shared_ptr<const Acts::ISurfaceMaterial>>
87 std::unique_ptr<const Acts::Logger>
logger =
122 template <
typename detector_element_t>
127 cLayers.reserve(
m_cfg.centralProtoLayers.size());
130 for (
auto& cpl :
m_cfg.centralProtoLayers) {
133 gctx, cpl.surfaces, cpl.bins0, cpl.bins1, cpl.protoLayer);
136 if (!
m_cfg.centralLayerMaterial.empty()) {
137 std::shared_ptr<const Acts::ISurfaceMaterial> layerMaterialPtr =
138 m_cfg.centralLayerMaterial.at(icl);
140 if (
m_cfg.centralLayerMaterialConcentration.at(icl) == 0.) {
142 cLayer->surfaceRepresentation().assignSurfaceMaterial(layerMaterialPtr);
143 ACTS_VERBOSE(
"- and material at central layer surface.");
148 auto approachSurfaces =
149 cLayer->approachDescriptor()->containedSurfaces();
150 if (
m_cfg.centralLayerMaterialConcentration.at(icl) > 0) {
151 auto mutableOuterSurface =
154 ACTS_VERBOSE(
"- and material at outer approach surface");
156 auto mutableInnerSurface =
159 ACTS_VERBOSE(
"- and material at inner approach surface");
164 cLayers.push_back(cLayer);
170 template <
typename detector_element_t>
173 return constructEndcapLayers(gctx, -1);
176 template <
typename detector_element_t>
179 return constructEndcapLayers(gctx, 1);
182 template <
typename detector_element_t>
185 std::unique_ptr<const Acts::Logger> log)
188 template <
typename detector_element_t>
193 const auto& protoLayers =
194 (side < 0) ?
m_cfg.negativeProtoLayers :
m_cfg.positiveProtoLayers;
198 eLayers.reserve(protoLayers.size());
203 for (
auto& ple : protoLayers) {
206 gctx, ple.surfaces, ple.bins0, ple.bins1, ple.protoLayer);
209 if (!
m_cfg.posnegLayerMaterial.empty()) {
210 std::shared_ptr<const Acts::ISurfaceMaterial> layerMaterialPtr =
211 m_cfg.posnegLayerMaterial[ipnl];
213 if (
m_cfg.posnegLayerMaterialConcentration.at(ipnl) == 0.) {
216 eLayer->surfaceRepresentation().assignSurfaceMaterial(layerMaterialPtr);
217 ACTS_VERBOSE(
"- and material at central layer surface.");
222 auto approachSurfaces =
223 eLayer->approachDescriptor()->containedSurfaces();
224 if (
m_cfg.posnegLayerMaterialConcentration.at(ipnl) > 0.) {
225 int sf = side < 0 ? 0 : 1;
226 auto mutableInnerSurface =
229 ACTS_VERBOSE(
"- and material at outer approach surfaces.");
231 int sf = side < 0 ? 1 : 0;
232 auto mutableOuterSurface =
235 ACTS_VERBOSE(
"- and material at inner approach surfaces.");
240 eLayers.push_back(eLayer);