28 m_materialStepCollectionName(
"RandomMaterialSteps"),
29 m_layerMaterialCollectionName(
"RandomLayerMaterialMap"),
30 m_elementTableName(
"RandomElementTable")
64 ATH_MSG_VERBOSE(
"Recording MaterialStepCollection '" << m_materialStepCollectionName <<
"'.");
66 if (!m_materialStepCollectionName.empty() && (evtStore()->record(msCollection, m_materialStepCollectionName)).isFailure() ) {
67 ATH_MSG_WARNING(
"Could not record the material collection " << m_materialStepCollectionName);
68 return StatusCode::FAILURE;
71 ATH_MSG_VERBOSE(
"Recording LayerMaterialMap '" << m_layerMaterialCollectionName <<
"'.");
94 if ( !m_elementTableName.empty() && (evtStore()->record(eTable, m_elementTableName)).isFailure() ) {
95 ATH_MSG_WARNING(
"Could not record the element table " << m_elementTableName);
96 return StatusCode::FAILURE;
112 std::vector< std::vector< const Trk::MaterialProperties* > > materialMatrix(300, std::vector<const Trk::MaterialProperties*>(200, (
Trk::MaterialProperties*)
nullptr) );
113 for (
size_t iob = 0; iob < 300; ++iob)
114 for (
size_t iib = 0; iib < 200; ++iib)
126 std::vector< const Trk::MaterialProperties*> materialVector;
127 std::vector< unsigned short int > materialIndices;
128 materialVector.reserve(200);
129 materialIndices.reserve(200);
130 for (
size_t iib = 0; iib < 200; ++iib){
152 thicknessMatrix.reserve(25);
153 x0Matrix.reserve(25);
154 l0Matrix.reserve(25);
157 rhoMatrix.reserve(25);
159 std::vector< std::vector< Trk::MaterialComposition > > materialCompositionMatrix;
161 for (
size_t iob = 0; iob < 200; ++iob){
163 std::vector<unsigned char> thicknessVector; thicknessVector.reserve(25);
164 std::vector<unsigned char> x0Vector; x0Vector.reserve(25);
165 std::vector<unsigned char> l0Vector; l0Vector.reserve(25);
166 std::vector<unsigned char> aVector; aVector.reserve(25);
167 std::vector<unsigned char> zVector; zVector.reserve(25);
168 std::vector<unsigned char> rhoVector; rhoVector.reserve(25);
169 std::vector< Trk::MaterialComposition > materialCompositionVector;
170 materialCompositionVector.reserve(25);
171 for (
size_t iib = 0; iib < 25; ++iib){
177 std::vector< Trk::ElementFraction > elements;
178 for (
size_t iic = 0; iic < 5; ++iic){
182 materialCompositionVector.emplace_back(elements);
184 thicknessMatrix.push_back(thicknessVector);
185 x0Matrix.push_back(x0Vector);
186 l0Matrix.push_back(l0Vector);
187 aMatrix.push_back(aVector);
188 zMatrix.push_back(zVector);
189 rhoMatrix.push_back(rhoVector);
190 materialCompositionMatrix.push_back(materialCompositionVector);
217 zBins.valueBinMatrix = zMatrix;
231 materialCompositionMatrix);
236 if ( (evtStore()->record(lmMap.release(), m_layerMaterialCollectionName)).isFailure() ) {
237 ATH_MSG_WARNING(
"Could not record the material collection " << m_layerMaterialCollectionName);
238 return StatusCode::FAILURE;
246 if ( (evtStore()->
retrieve(lmMap, m_layerMaterialCollectionName)).isFailure() ) {
247 ATH_MSG_WARNING(
"Could not read the material collection " << m_layerMaterialCollectionName);
248 return StatusCode::FAILURE;
250 ATH_MSG_INFO(
"Successfully read a LayerMaterialMap with size " << lmMap->size());
254 return StatusCode::SUCCESS;