-
Notifications
You must be signed in to change notification settings - Fork 45
Add CHIPS gamma-nuclear cross sections #2149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 8 commits
0b03511
03d7de4
010c135
478b0c4
14a0346
08bb48a
e0f940a
998495f
f5d821e
c43607d
2cdb77c
7007577
7bc64ab
bb5df6c
8d3c5ae
724dfd1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| //------------------------------- -*- C++ -*- -------------------------------// | ||
| // Copyright Celeritas contributors: see top-level COPYRIGHT file for details | ||
| // SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
| //---------------------------------------------------------------------------// | ||
| //! \file celeritas/g4/EmExtraPhysicsHelper.cc | ||
| //---------------------------------------------------------------------------// | ||
| #include "EmExtraPhysicsHelper.hh" | ||
|
|
||
| #include <G4GammaNuclearXS.hh> | ||
|
|
||
| namespace celeritas | ||
| { | ||
| //---------------------------------------------------------------------------// | ||
| /*! | ||
| * Construct with Geant4 provided cross section classes | ||
| */ | ||
| EmExtraPhysicsHelper::EmExtraPhysicsHelper() | ||
| { | ||
| gn_xs_ = std::make_shared<G4GammaNuclearXS>(); | ||
| } | ||
|
|
||
| //---------------------------------------------------------------------------// | ||
| /*! | ||
| * Calculate the gamma-nuclear element cross section using G4GammaNuclearXS | ||
| * in the native Geant4 unit [mb] | ||
| */ | ||
| double EmExtraPhysicsHelper::GammaNuclearElementXS(double energy, int z) | ||
| { | ||
| return gn_xs_->ElementCrossSection(energy, z); | ||
| } | ||
|
|
||
| //---------------------------------------------------------------------------// | ||
| } // namespace celeritas |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| //------------------------------- -*- C++ -*- -------------------------------// | ||
| // Copyright Celeritas contributors: see top-level COPYRIGHT file for details | ||
| // SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||
| //---------------------------------------------------------------------------// | ||
| //! \file celeritas/g4/EmExtraPhysicsHelper.hh | ||
| //---------------------------------------------------------------------------// | ||
| #pragma once | ||
|
|
||
| #include <memory> | ||
|
|
||
| class G4GammaNuclearXS; | ||
|
|
||
| namespace celeritas | ||
| { | ||
|
|
||
| //---------------------------------------------------------------------------// | ||
| /*! | ||
| * A helper class to interface with Geant4 cross sections. | ||
sethrj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| */ | ||
| class EmExtraPhysicsHelper | ||
| { | ||
| public: | ||
| // Construct EM extra physics helper | ||
| EmExtraPhysicsHelper(); | ||
|
|
||
| // Calculate gamma-nuclear element cross section | ||
| double GammaNuclearElementXS(double energy, int z); | ||
|
||
|
|
||
| // The maximum high energy of G4PhotoNuclearCrossSection | ||
| static constexpr double max_high_energy() | ||
| { | ||
| return 5e+4; // clhep::MeV | ||
|
||
| } | ||
|
|
||
| private: | ||
| //// DATA //// | ||
| std::shared_ptr<G4GammaNuclearXS> gn_xs_; | ||
| }; | ||
|
|
||
| //---------------------------------------------------------------------------// | ||
| } // namespace celeritas | ||
Uh oh!
There was an error while loading. Please reload this page.