18 const std::vector<std::vector<MaterialComposition> >& composition,
20 : m_binUtility(binutility.
clone()),
21 m_thicknessBins(thicknessBins),
27 m_composition(composition),
28 m_fullComposition(fComposition),
37 m_binUtility(clm.m_binUtility->
clone()),
38 m_thicknessBins(clm.m_thicknessBins),
39 m_x0Bins(clm.m_x0Bins),
40 m_l0Bins(clm.m_l0Bins),
43 m_rhoBins(clm.m_rhoBins),
44 m_composition(clm.m_composition),
45 m_fullComposition(clm.m_fullComposition),
46 m_elementTable(clm.m_elementTable)
55 m_materialProperties.clear();
68 resizeMaterialProperties();
90 size_t bin0 = m_binUtility->bin(gp, 0);
92 size_t bin1 = (m_binUtility->max(1) == 0) ? 0 : m_binUtility->bin(gp, 1);
93 return material(bin0,
bin1);
97 size_t bin0,
size_t bin1)
const
102 const double thickness = m_thicknessBins.value(bin0,
bin1);
104 if (thickness == 0.)
return nullptr;
111 if (m_fullComposition && m_elementTable.get()) {
113 for (
const auto& eFraction : m_composition[
bin1][bin0]) {
114 double fraction = eFraction.fraction();
116 m_elementTable->element(eFraction.element());
118 x0 += material->
X0 * fraction;
119 l0 += material->
L0 * fraction;
120 a += material->
A * fraction;
121 z += material->
Z * fraction;
122 rho += material->
rho * fraction;
126 x0 = m_x0Bins.value(bin0,
bin1);
127 l0 = m_l0Bins.value(bin0,
bin1);
128 a = m_aBins.value(bin0,
bin1);
129 z = m_zBins.value(bin0,
bin1);
130 rho = m_rhoBins.value(bin0,
bin1);
141 p.set (std::make_unique<Trk::MaterialProperties>
148 sl <<
"Trk::CompoundLayerMaterial : \n";
149 sl <<
" - Number of Material bins (1/2) : " << m_binUtility->max(0) + 1
150 <<
" / " << m_binUtility->max(1) + 1 <<
"\n";
155 sl <<
"Trk::CompoundLayerMaterial : " << std::endl;
156 sl <<
" - Number of Material bins (1/2) : " << m_binUtility->max(0) + 1
157 <<
" / " << m_binUtility->max(1) + 1 << std::endl;
164 m_materialProperties.clear();
165 m_materialProperties.resize (m_thicknessBins.valueBinMatrix.size());
166 for (
size_t i = 0;
i < m_materialProperties.size();
i++) {
167 m_materialProperties[
i].resize (m_thicknessBins.valueBinMatrix[
i].size());