26 declareInterface<Trk::ILayerMaterialCreator>(
this);
44 ATH_MSG_DEBUG(
"BinUtility provided, creating binned array in dimensions " << binUtility->
max(0)+1 <<
" x " << binUtility->
max(1)+1 );
60 size_t nBins0 = bUtility->
max(0)+1;
61 size_t nBins1 = bUtility->
max(1)+1;
64 materialMatrix.reserve(nBins1);
66 for (
size_t ibin1 = 0; ibin1 < nBins1; ++ibin1) {
69 materialVector.reserve(nBins0);
71 for (
size_t ibin0 = 0; ibin0 < nBins0; ++ibin0) {
74 materialVector.push_back(mProperties);
77 materialMatrix.push_back(materialVector);
81 ATH_MSG_VERBOSE(
"Converting the MaterialPropertiesMatrix into a CompressedLayerMaterial.");
86 ATH_MSG_DEBUG(
"No BinUtility provided - return a simple clone.");
87 bLayerMaterial = lmProperties.
clone();
90 return bLayerMaterial;
112 for (
const auto & mo : materialMatrix)
113 for (
const auto & mi : mo) {
126 ATH_MSG_DEBUG(
"Preparing the store: min/max values for t, x0, l0, a, z, rho estimated." );
145 tStore.
valueStep = fabs(tMin-tMax)<10e-8 ? 0. : (tMax-tMin)/
double(
static_cast<int>(UCHAR_MAX)-1);
146 xStore.
valueStep = (xMax-xMin)/
double(
static_cast<int>(UCHAR_MAX)-1);
147 lStore.
valueStep = (lMax-lMin)/
double(
static_cast<int>(UCHAR_MAX)-1);
148 aStore.
valueStep = (aMax-aMin)/
double(
static_cast<int>(UCHAR_MAX)-1);
149 zStore.
valueStep = (zMax-zMin)/
double(
static_cast<int>(UCHAR_MAX)-1);
150 rStore.
valueStep = (rMax-rMin)/
double(
static_cast<int>(UCHAR_MAX)-1);
163 ATH_MSG_VERBOSE(
"Thickness has been estimated to be constant - matrix is not prepared.");
170 ATH_MSG_VERBOSE(
"Material stores prepared, now preparing composition matrix." );
173 std::vector< std::vector< Trk::MaterialComposition > > compositionMatrix( lBinUtility.
max(1)+1, std::vector< Trk::MaterialComposition >( lBinUtility.
max(0)+1,
Trk::MaterialComposition()) );
179 for (
const auto & mo : materialMatrix){
181 for (
const auto & mi : mo) {
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define minMaxValue(currentMin, currentMax, test)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
A generic symmetric BinUtility, for fully symmetric binning in terms of binning grid and binning type...
size_t max(size_t ba=0) const
First bin maximal value.
CompoundLayerMaterialCreator(const std::string &, const std::string &, const IInterface *)
Constructor.
LayerMaterialProperties * createLayerMaterial(const LayerMaterialRecord &lmr) const
process the material properties
LayerMaterialProperties * createCompoundLayerMaterial(const MaterialPropertiesMatrix &lmm, const BinUtility &lmbu) const
private method that can be called by both create/convertLayerMaterial
Gaudi::Property< bool > m_fullCompoundCalculation
LayerMaterialProperties * convertLayerMaterial(const LayerMaterialProperties &lmr) const
create layer material properties from layer material properties - simply clones
It extends the LayerMaterialProperties base class, and has a intrinsic accuracy of about 0....
std::string m_layerMaterialName
std::string m_layerMaterialDirectory
This virtual base class encapsulates the logics to build pre/post/full update material for Layer stru...
virtual LayerMaterialProperties * clone() const =0
Pseudo-Constructor clone().
virtual const BinUtility * binUtility() const =0
Return the BinUtility.
virtual const MaterialProperties * material(size_t ib0, size_t ib1) const =0
Direct access via bins to the MaterialProperties.
Helper Class to record the material during the GeantinoNtupleMappingProcess.
const MaterialPropertiesMatrix & associatedLayerMaterial() const
return method for the LayerMaterial
const Trk::BinUtility * binUtility() const
return the BinUtility
Material with information about thickness of material.
float averageRho() const
Return the average density of the material.
float averageA() const
Return the average A of the material [gram/mole].
float averageZ() const
Returns the average Z of the material.
const Material & material() const
Return the stored Material.
float l0() const
Return the nuclear interaction length.
float x0() const
Return the radiation length.
float thickness() const
Return the thickness in mm.
MaterialComposition * composition
std::vector< ValueVector > ValueMatrix
std::vector< const MaterialProperties * > MaterialPropertiesVector
Useful typedefs.
std::vector< unsigned char > ValueVector
std::vector< std::vector< const MaterialProperties * > > MaterialPropertiesMatrix
ValueMatrix valueBinMatrix