|
ATLAS Offline Software
|
Go to the documentation of this file.
25 m_fullCompoundCalculation(false)
27 declareInterface<Trk::ILayerMaterialCreator>(
this);
50 ATH_MSG_DEBUG(
"BinUtility provided, creating binned array in dimensions " << binUtility->
max(0)+1 <<
" x " << binUtility->
max(1)+1 );
52 return createCompoundLayerMaterial(materialMatrix,*binUtility);
66 size_t nBins0 = bUtility->
max(0)+1;
67 size_t nBins1 = bUtility->
max(1)+1;
70 materialMatrix.reserve(nBins1);
72 for (
size_t ibin1 = 0; ibin1 < nBins1; ++ibin1) {
75 materialVector.reserve(nBins0);
77 for (
size_t ibin0 = 0; ibin0 < nBins0; ++ibin0) {
80 materialVector.push_back(mProperties);
83 materialMatrix.push_back(materialVector);
87 ATH_MSG_VERBOSE(
"Converting the MaterialPropertiesMatrix into a CompressedLayerMaterial.");
88 bLayerMaterial = createCompoundLayerMaterial(materialMatrix,*bUtility);
92 ATH_MSG_DEBUG(
"No BinUtility provided - return a simple clone.");
93 bLayerMaterial = lmProperties.
clone();
96 return bLayerMaterial;
104 double tMin = 10e10, xMin = 10e10, lMin = 10e10, aMin = 10e10, zMin = 10e10, rMin = 10e10;
105 double tMax = 0., xMax = 0., lMax = 0., aMax = 0., zMax = 0., rMax = 0.;
108 for (
const auto & mo : materialMatrix)
109 for (
const auto & mi : mo) {
122 ATH_MSG_DEBUG(
"Preparing the store: min/max values for t, x0, l0, a, z, rho estimated." );
136 tStore.
valueStep = fabs(tMin-tMax)<10
e-8 ? 0. : (tMax-tMin)/
double(
static_cast<int>(UCHAR_MAX)-1);
137 xStore.
valueStep = (xMax-xMin)/
double(
static_cast<int>(UCHAR_MAX)-1);
138 lStore.
valueStep = (lMax-lMin)/
double(
static_cast<int>(UCHAR_MAX)-1);
139 aStore.
valueStep = (aMax-aMin)/
double(
static_cast<int>(UCHAR_MAX)-1);
140 zStore.
valueStep = (zMax-zMin)/
double(
static_cast<int>(UCHAR_MAX)-1);
141 rStore.
valueStep = (rMax-rMin)/
double(
static_cast<int>(UCHAR_MAX)-1);
154 ATH_MSG_VERBOSE(
"Thickness has been estimated to be constant - matrix is not prepared.");
161 ATH_MSG_VERBOSE(
"Material stores prepared, now preparing composition matrix." );
164 std::vector< std::vector< Trk::MaterialComposition > > compositionMatrix( lBinUtility.
max(1)+1, std::vector< Trk::MaterialComposition >( lBinUtility.
max(0)+1,
Trk::MaterialComposition()) );
170 for (
const auto & mo : materialMatrix){
172 for (
const auto & mi : mo) {
194 return new Trk::CompoundLayerMaterial(lBinUtility, tStore, xStore, lStore, aStore, zStore, rStore, compositionMatrix, m_fullCompoundCalculation);
float averageA() const
Return the average A of the material [gram/mole].
size_t max(size_t ba=0) const
First bin maximal value.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
#define minMaxValue(currentMin, currentMax, test)
std::string m_layerMaterialDirectory
LayerMaterialProperties * createCompoundLayerMaterial(const MaterialPropertiesMatrix &lmm, const BinUtility &lmbu) const
private method that can be called by both create/convertLayerMaterial
float averageRho() const
Return the average density of the material.
float x0() const
Return the radiation length.
virtual const MaterialProperties * material(size_t ib0, size_t ib1) const =0
Direct access via bins to the MaterialProperties.
#define ATH_MSG_VERBOSE(x)
const Material & material() const
Return the stored Material.
std::string m_layerMaterialName
std::vector< const MaterialProperties * > MaterialPropertiesVector
Useful typedefs.
float thickness() const
Return the thickness in mm.
ValueMatrix valueBinMatrix
const MaterialPropertiesMatrix & associatedLayerMaterial() const
return method for the LayerMaterial
const Trk::BinUtility * binUtility() const
return the BinUtility
CompoundLayerMaterialCreator(const std::string &, const std::string &, const IInterface *)
Constructor.
~CompoundLayerMaterialCreator()
Destructor.
virtual const BinUtility * binUtility() const =0
Return the BinUtility.
LayerMaterialProperties * convertLayerMaterial(const LayerMaterialProperties &lmr) const
create layer material properties from layer material properties - simply clones
std::vector< std::vector< const MaterialProperties * > > MaterialPropertiesMatrix
std::vector< ValueVector > ValueMatrix
bool m_fullCompoundCalculation
#define ATH_MSG_WARNING(x)
float averageZ() const
Returns the average Z of the material.
virtual LayerMaterialProperties * clone() const =0
Pseudo-Constructor clone()
MaterialComposition * composition
std::vector< unsigned char > ValueVector
LayerMaterialProperties * createLayerMaterial(const LayerMaterialRecord &lmr) const
process the material properties
float l0() const
Return the nuclear interaction length.