51 Acts::Material::ParametersVector::Zero();
52 for (
auto i = params.size(); 0 <
i--;) {
67 Material mat(j[
"material"].get<Material>());
73 for (
auto& outer : j) {
75 for (
auto& inner : outer) {
77 mpVector.emplace_back(mat);
84 nlohmann::json jMaterial;
89 if (psMaterial !=
nullptr) {
98 bUtility = &(psMaterial->binUtility());
101 for (
size_t ibin = 0;
ibin < binningData.size(); ++
ibin) {
107 nlohmann::json jBin(*bUtility);
115 if (hsMaterial !=
nullptr) {
123 nlohmann::json jmat(hsMaterial->materialSlab(0, 0));
134 if (bsMaterial !=
nullptr) {
142 bUtility = &(bsMaterial->binUtility());
146 for (
const auto& mpVector : bsMaterial->fullMaterial()) {
148 for (
const auto& mp : mpVector) {
149 nlohmann::json jmat(mp);
150 mvec.push_back(jmat);
156 nlohmann::json jBin(*bUtility);
181 for (
auto& [key,
value] : jMaterial.items()) {
193 if (mpMatrix.empty()) {
195 }
else if (bUtility.
bins() == 1) {
203 nlohmann::json jMaterial;
208 if (pvMaterial !=
nullptr) {
213 bUtility = &(pvMaterial->binUtility());
216 for (
size_t ibin = 0;
ibin < binningData.size(); ++
ibin) {
223 nlohmann::json jBin(*bUtility);
231 if (hvMaterial !=
nullptr) {
236 nlohmann::json jmat(hvMaterial->material({0, 0, 0}));
247 if (bvMaterial2D !=
nullptr) {
251 bUtility = &(bvMaterial2D->binUtility());
255 for (
size_t bin = 0; bin < grid.
size(); bin++) {
256 nlohmann::json jmat(Material(grid.
at(bin)));
257 mmat.push_back(jmat);
261 nlohmann::json jBin(*bUtility);
270 if (bvMaterial3D !=
nullptr) {
274 bUtility = &(bvMaterial3D->binUtility());
278 for (
size_t bin = 0; bin < grid.
size(); bin++) {
279 nlohmann::json jmat(Material(grid.
at(bin)));
280 mmat.push_back(jmat);
284 nlohmann::json jBin(*bUtility);
303 std::vector<Acts::Material> mmat;
304 for (
auto& [key,
value] : jMaterial.items()) {
309 for (
const auto& bin :
value) {
320 if (mmat.size() == 1) {
325 std::function<Acts::Vector2(Acts::Vector3)> transfoGlobalToLocal;
338 for (
size_t bin = 0; bin < mmat.size(); bin++) {
339 mGrid.
at(bin) = mmat[bin].parameters();
349 std::function<Acts::Vector3(Acts::Vector3)> transfoGlobalToLocal;
363 for (
size_t bin = 0; bin < mmat.size(); bin++) {
364 mGrid.
at(bin) = mmat[bin].parameters();