-
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?
Conversation
Test summary 504 files 817 suites 26s ⏱️ For more details on these failures, see this check. Results for commit 724dfd1. ♻️ This comment has been updated with latest results. |
sethrj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @whokion .
| * Build CHIPS gamma-nuclear element cross sections using G4GammaNuclearXS | ||
| * above the upper energy limit of G4PARTICLEXS/gamma (IAEA) data. The cross | ||
| * sections are derived from the parameterization developed by M. V. Kossov | ||
| * (CERN/ITEP Moscow) in the high energy region (106 MeV < E < 50 GeV) and | ||
| * from a Reggeon-based parameterization in the ultra-high-energy region | ||
| * (E > 50 GeV). G4GammaNuclearXS uses CHIPS (G4PhotoNuclearCrossSection) | ||
| * above 150 MeV and performs linear interpolation between the upper energy | ||
| * limit of G4PARTICLEXS/gamma (IAEA) data and 150 MeV. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our user/methods manual pulls in documentation only from the class documentation (in the .hh file): should we move this to the class docs where it's more visible? Does the Kossov citation have a reference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I move the description to the header and add a citation for the CHIPS gamma-nuclear cross section parameterization in the doc - assume that I do not need to add the paper itself to zotero"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zotero exports the bibliography entries into our references, so we do need it there, so I've added it myself. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
@sethrj Thanks a lot for your review and comments - will take care of them accordingly. Also, I find that there is a link error. Do you have any quick idea to resolve it or am I doing something wrong? Thanks again. |
…g and move the class description to the header
|
@whokion Thanks for the quick update. Regarding the link error: we support Geant4-free builds for fast CI testing and mini-apps on HPC platforms, so you'll need to add #if !CELERITAS_USE_GEANT4
inline GeantImporter::GeantImporter()
{
CELER_NOT_CONFIGURED("Geant4");
}
inline GeantImporter::GeantImporter(GeantSetup&&)
{
CELER_NOT_CONFIGURED("Geant4");
}
inline ImportData GeantImporter::operator()(DataSelection const&)
{
CELER_ASSERT_UNREACHABLE();
}
#endif |
sethrj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good @whokion !
| EmExtraPhysicsHelper(); | ||
|
|
||
| // Calculate gamma-nuclear element cross section | ||
| double GammaNuclearElementXS(double energy, int z); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is an interface class and not meant to plug in to existing Geant4 code, please use style and unit conventions from Celeritas:
XsMmSq calc_gamma_nuclear_xs(AtomicNumber z, MevEnergy energy) const;Also, if you're going to reuse this for multiple XS types, it could be changed in the future to simply hold a G4VCrossSectionDataSet shared pointer, and be initialized with "GammaNuclearXS" or "PhotoNuclearXS" so that it can use G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(name) as the physics list constructors do.
And if you don't need max_high_energy below, then you could make this class a function-like DatasetMicroXsCalculator (or whatever) with an operator().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the method as suggested. Thanks for the additional recommendations! I will consider and take into account the suggestion when adding ElectroNuclearCrossSection and other features in following MRs.
| // The maximum high energy of G4PhotoNuclearCrossSection | ||
| static constexpr double max_high_energy() | ||
| { | ||
| return 5e+4; // clhep::MeV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way to get this programmatically from Geant4? Or should this live in GammaNuclearModel?
|
|
||
| private: | ||
| //// DATA //// | ||
| std::shared_ptr<EmExtraPhysicsHelper> helper_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't need to be class data; it should be constructed temporarily at load time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry that I did not fully get this suggestion. Thanks for clarification.
| result.x.insert(result.x.end(), ultra.begin(), ultra.end()); | ||
|
|
||
| // Tabulate the cross section from emin to emax | ||
| Quantity<UnitProduct<units::Millimeter, units::Millimeter>, double> xs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can make this a type alias inside the DatasetMicroXsCalculator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move it to EmExtraPhysicsHelper for now.
This MR adds gamma–nuclear cross sections (CHIPS) in the high-energy region.