Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-11 09:40:23

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "Acts/Definitions/Common.hpp"
0012 #include "Acts/Material/Material.hpp"
0013 #include "Acts/Material/MaterialSlab.hpp"
0014 
0015 #include <memory>
0016 #include <string>
0017 #include <utility>
0018 #include <vector>
0019 
0020 class TGeoMaterial;
0021 
0022 namespace ActsPlugins {
0023 struct TGeoMaterialConverter {
0024   /// @brief Nested options struct
0025   /// to steer the conversion process
0026   struct Options {
0027     /// @brief  Convert input TGeo unit to ACTS unit
0028     double unitLengthScalor = 10.;
0029     /// @brief  Convert input TGeo unit to ACTS unit
0030     double unitMassScalor = 1.;
0031   };
0032 
0033   /// @brief Helper method to convert a TGeoMaterial into Acts::MaterialSlab
0034   ///
0035   /// @param tgMaterial The TGeoMaterial to be converted
0036   /// @param thicknessIn The thickness of the ingoing material slab
0037   /// @param thicknessOut The thickness of the outgoing material slab
0038   /// @param options The conversion options with the unit scalors
0039   ///
0040   /// @return a material slab object
0041   static Acts::MaterialSlab materialSlab(const TGeoMaterial& tgMaterial,
0042                                          double thicknessIn,
0043                                          double thicknessOut,
0044                                          const Options& options);
0045 };
0046 }  // namespace ActsPlugins