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/GeantMicroXsCalculator.hh
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 
0010 #include <vector>
0011 
0012 #include "celeritas/Quantities.hh"
0013 
0014 class G4Element;
0015 class G4Material;
0016 class G4ParticleDefinition;
0017 class G4VEmModel;
0018 
0019 namespace celeritas
0020 {
0021 namespace detail
0022 {
0023 //---------------------------------------------------------------------------//
0024 /*!
0025  * Calculate microscopic cross sections for an EM model.
0026  *
0027  * The input energy is in MeV, and the output units are in Celeritas native
0028  * area units.
0029  */
0030 class GeantMicroXsCalculator
0031 {
0032   public:
0033     //!@{
0034     //! \name Type aliases
0035     using EnergyUnits = units::Mev;
0036     using XsUnits = units::Native;  // len^2
0037     using VecDouble = std::vector<double>;
0038     using VecVecDouble = std::vector<std::vector<double>>;
0039     //!@}
0040 
0041   public:
0042     GeantMicroXsCalculator(G4VEmModel const& model,
0043                            G4ParticleDefinition const& particle,
0044                            G4Material const& material,
0045                            double secondary_production_cut);
0046 
0047     // Calculate micro cross sections for all elements in the material
0048     void operator()(VecDouble const& energy, VecVecDouble* xs) const;
0049 
0050   private:
0051     G4VEmModel& model_;
0052     G4ParticleDefinition const& particle_;
0053     G4Material const& material_;
0054     double secondary_cut_;
0055 };
0056 
0057 //---------------------------------------------------------------------------//
0058 }  // namespace detail
0059 }  // namespace celeritas