Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:31:20

0001 //----------------------------------*-C++-*----------------------------------//
0002 // Copyright 2023-2024 UT-Battelle, LLC, and other Celeritas developers.
0003 // See the top-level COPYRIGHT file for details.
0004 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
0005 //---------------------------------------------------------------------------//
0006 //! \file celeritas/ext/detail/GeantModelImporter.hh
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 
0010 #include <vector>
0011 
0012 #include "celeritas/Types.hh"
0013 #include "celeritas/io/ImportMaterial.hh"
0014 #include "celeritas/io/ImportModel.hh"
0015 #include "celeritas/phys/PDGNumber.hh"
0016 
0017 class G4VEmModel;
0018 class G4Material;
0019 class G4ParticleDefinition;
0020 
0021 namespace celeritas
0022 {
0023 namespace detail
0024 {
0025 //---------------------------------------------------------------------------//
0026 /*!
0027  * Convert models for a single process.
0028  */
0029 class GeantModelImporter
0030 {
0031   public:
0032     //!@{
0033     //! \name Type aliases
0034     using VecMaterial = std::vector<ImportPhysMaterial>;
0035     //!@}
0036 
0037   public:
0038     // Construct with materials, primary, and secondary
0039     GeantModelImporter(VecMaterial const& materials,
0040                        PDGNumber particle,
0041                        PDGNumber secondary);
0042 
0043     ImportModel operator()(G4VEmModel const& model) const;
0044 
0045   private:
0046     //// DATA ////
0047     VecMaterial const& materials_;
0048     PDGNumber particle_{};
0049     PDGNumber secondary_{};
0050     G4ParticleDefinition const* g4particle_{nullptr};
0051 
0052     //// FUNCTIONS ////
0053     double get_cutoff(size_type mat_idx) const;
0054 };
0055 
0056 //---------------------------------------------------------------------------//
0057 }  // namespace detail
0058 }  // namespace celeritas