Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-13 08:53:29

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