24 #include <boost/foreach.hpp>
25 #include <boost/tokenizer.hpp>
28 const dd4hep::rec::VariantParameters& params,
const std::string& valueTag,
29 const std::vector<std::pair<const std::string, Acts::BinningOption> >&
32 using namespace std::string_literals;
37 for (
auto& bin : binning) {
50 int bins = params.get<
int>(valueTag +
"_"s + bin.first);
51 ACTS_VERBOSE(
" - material binning for " << bin.first <<
" on " << valueTag
57 return std::make_shared<Acts::ProtoSurfaceMaterial>(bu);
61 const dd4hep::rec::VariantParameters& params, Layer&
layer,
62 const std::vector<std::pair<const std::string, Acts::BinningOption> >&
64 const Logger& logger) {
67 std::vector<std::string> materialOptions = {
"layer_material_representing"};
68 std::vector<const Surface*> materialSurfaces = {
69 &(layer.surfaceRepresentation())};
71 auto aDescriptor = layer.approachDescriptor();
72 if (aDescriptor !=
nullptr and aDescriptor->containedSurfaces().size() >= 2) {
74 const std::vector<const Surface*>& aSurfaces =
75 aDescriptor->containedSurfaces();
76 materialOptions.push_back(
"layer_material_inner");
77 materialSurfaces.push_back(aSurfaces[0]);
78 materialOptions.push_back(
"layer_material_outer");
79 materialSurfaces.push_back(aSurfaces[1]);
83 for (
unsigned int is = 0; is < materialOptions.size(); ++is) {
85 ACTS_VERBOSE(
" - checking material for: " << materialOptions[is]);
86 if (params.contains(materialOptions[is])) {
94 surface->assignSurfaceMaterial(psMaterial);
100 Layer& cylinderLayer,
101 const Logger& logger) {
103 "Translating DD4hep material into Acts material for CylinderLayer : "
104 << detElement.name());
110 if (getParamOr<bool>(
"layer_material", detElement,
false)) {
118 Layer& discLayer,
const Logger& logger) {
119 ACTS_VERBOSE(
"Translating DD4hep material into Acts material for DiscLayer : "
120 << detElement.name());
127 if (getParamOr<bool>(
"layer_material", detElement,
false)) {