Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
TGeoMaterialConverter.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TGeoMaterialConverter.cpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2023 CERN for the benefit of the Acts project
4
//
5
// This Source Code Form is subject to the terms of the Mozilla Public
6
// License, v. 2.0. If a copy of the MPL was not distributed with this
7
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9
#include "
Acts/Plugins/TGeo/TGeoMaterialConverter.hpp
"
10
11
#include "
Acts/Material/Material.hpp
"
12
13
#include "TGeoMaterial.h"
14
15
Acts::MaterialSlab
Acts::TGeoMaterialConverter::materialSlab
(
16
const
TGeoMaterial& tgMaterial,
ActsScalar
thicknessIn,
17
ActsScalar
thicknessOut,
const
Options
&
options
) {
18
// Scalable properties
19
ActsScalar
matX0 = tgMaterial.GetRadLen();
20
ActsScalar
matL0 = tgMaterial.GetIntLen();
21
ActsScalar
matRho = tgMaterial.GetDensity();
22
23
// X0, L0, rho scale with the thickness
24
ActsScalar
cFactor = thicknessIn / thicknessOut;
25
ActsScalar
uScalor = options.
unitLengthScalor
;
26
ActsScalar
rScalar =
27
options.
unitMassScalor
/ pow(options.
unitLengthScalor
, 3);
28
29
auto
material
=
Material::fromMassDensity
(
30
matX0 * uScalor / cFactor, matL0 * uScalor / cFactor, tgMaterial.GetA(),
31
tgMaterial.GetZ(), matRho * rScalar * cFactor);
32
33
return
MaterialSlab
(
material
, thicknessOut);
34
}
acts
blob
sPHENIX
Plugins
TGeo
src
TGeoMaterialConverter.cpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:42
using
1.8.2 with
sPHENIX GitHub integration