20 for (
unsigned int ibin2 = 0; ibin2 < (
unsigned int)binutility.
max(1) + 1;
24 matVec.reserve(binutility.
max(0) + 1);
25 for (
unsigned int ibin = 0; ibin < (
unsigned int)binutility.
max(0) + 1;
27 matVec.push_back(
nullptr);
36 m_binUtility(binutility.
clone()) {
47 m_binUtility(binutility.
clone()),
48 m_fullMaterial(fullProperties) {}
58 m_binUtility(lmp.m_binUtility->
clone()) {
68 Trk::LayerMaterialProperties::operator=(lmp);
86 for (
auto& matMatrixIter : m_fullMaterial) {
87 for (
auto& matIter : matMatrixIter)
delete matIter;
90 m_fullMaterial.clear();
95 m_fullMaterial.reserve(m_binUtility->max(1) + 1);
96 for (
const auto& matMatrixIter : matMatrix) {
99 matVector.reserve(m_binUtility->max(0) + 1);
101 for (
const auto& matIter : matMatrixIter)
102 matVector.push_back(matIter ? matIter->clone() :
nullptr);
103 m_fullMaterial.push_back(matVector);
109 unsigned int imat2 = 0;
110 for (
auto& matMatrixIter : m_fullMaterial) {
111 unsigned int imat1 = 0;
113 for (
auto& matIter : matMatrixIter) {
118 m_fullMaterial[imat2][imat1] = mprop;
129 if (m_fullMaterial.empty() || !m_binUtility)
return nullptr;
131 size_t ibin1 = m_binUtility->bin(gp, 0);
132 size_t ibin2 = m_binUtility->max(1) ? m_binUtility->bin(gp, 1) : 0;
133 return m_fullMaterial[ibin2][ibin1];
137 sl <<
"Trk::BinnedLayerMaterial : " << std::endl;
138 sl <<
" - Number of Material bins (1/2) : " << m_binUtility->max(0) + 1
139 <<
" / " << m_binUtility->max(1) + 1 << std::endl;
140 sl <<
" - Parse full update material : " << std::endl;
142 unsigned int imat2 = 0;
143 for (
const auto& matMatrixIter : m_fullMaterial) {
144 unsigned int imat1 = 0;
146 for (
const auto& matIter : matMatrixIter) {
148 sl <<
" Bin [" << imat2 <<
"][" << imat1 <<
"] - " << (*matIter)
151 sl <<
" Bin [" << imat2 <<
"][" << imat1 <<
"] - empty " << std::endl;
160 sl <<
"Trk::BinnedLayerMaterial : " << std::endl;
161 sl <<
" - Number of Material bins (1/2) : " << m_binUtility->max(0) + 1
162 <<
" / " << m_binUtility->max(1) + 1 << std::endl;
163 sl <<
" - Parse full update material : " << std::endl;
165 unsigned int imat2 = 0;
166 for (
const auto& matMatrixIter : m_fullMaterial) {
167 unsigned int imat1 = 0;
169 for (
const auto& matIter : matMatrixIter) {
171 sl <<
" Bin [" << imat2 <<
"][" << imat1 <<
"] - " << (*matIter)
174 sl <<
" Bin [" << imat2 <<
"][" << imat1 <<
"] - empty " << std::endl;