File indexing completed on 2025-01-18 09:12:27
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Plugins/TGeo/TGeoMaterialConverter.hpp"
0010
0011 #include "Acts/Material/Material.hpp"
0012
0013 #include "TGeoMaterial.h"
0014
0015 Acts::MaterialSlab Acts::TGeoMaterialConverter::materialSlab(
0016 const TGeoMaterial& tgMaterial, double thicknessIn, double thicknessOut,
0017 const Options& options) {
0018
0019 double matX0 = tgMaterial.GetRadLen();
0020 double matL0 = tgMaterial.GetIntLen();
0021 double matRho = tgMaterial.GetDensity();
0022
0023
0024 double cFactor = thicknessIn / thicknessOut;
0025 double uScalor = options.unitLengthScalor;
0026 double rScalar = options.unitMassScalor / pow(options.unitLengthScalor, 3);
0027
0028 auto material = Material::fromMassDensity(
0029 matX0 * uScalor / cFactor, matL0 * uScalor / cFactor, tgMaterial.GetA(),
0030 tgMaterial.GetZ(), matRho * rScalar * cFactor);
0031
0032 return MaterialSlab(material, thicknessOut);
0033 }