IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 0f2496b9 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

check HEPEVT dimension vis FLUKA ndmhep()

parent c5748994
No related branches found
No related tags found
1 merge request!468Resolve "Add FLUKA"
......@@ -27,6 +27,8 @@
#include <corsika/framework/core/PhysicalUnits.hpp>
#include <corsika/modules/fluka/ParticleConversion.hpp>
#include <FLUKA.hpp>
namespace corsika::fluka {
template <typename TEnvironment>
inline InteractionModel::InteractionModel(TEnvironment const& env)
......@@ -36,6 +38,12 @@ namespace corsika::fluka {
CORSIKA_LOGGER_DEBUG(logger_, "FLUKA material initialization: {} -> {}",
get_name(code, full_name{}), matno);
}
if (int const ndmhep = ::fluka::ndmhep_(); ::fluka::nmxhep != ndmhep) {
CORSIKA_LOGGER_CRITICAL(logger_, "HEPEVT dimension mismatch. FLUKA reports %d",
ndmhep);
throw std::runtime_error{"FLUKA HEPEVT dimension mismatch"};
}
}
inline bool InteractionModel::isValid(Code projectileID, int material,
......
......@@ -204,6 +204,25 @@ namespace fluka {
*----------------------------------------------------------------------*/
void fllhep_();
/**----------------------------------------------------------------------*
* *
* Copyright (C) 2023-2023 by Alfredo Ferrari & Paola Sala *
* All Rights Reserved. *
* *
* N DiMension of the HEP common: *
* *
* Authors: Alfredo Ferrari & Paola Sala *
* *
* *
* Created on 09 March 2023 by Alfredo Ferrari & Paola Sala *
* Private Private *
* *
* Last change on 09-Mar-23 by Alfredo Ferrari *
* Private *
* *
*----------------------------------------------------------------------*/
int ndmhep_();
//! random-number generator called from within FLUKA
double flrndm_();
}
......
......@@ -26,6 +26,7 @@ namespace fluka {
[[maybe_unused]] auto* const stpxyc_ptr = &stpxyz_;
[[maybe_unused]] auto* const evtxyz_ptr = &evtxyz_;
[[maybe_unused]] auto* const sgmxyz_ptr = &sgmxyz_;
[[maybe_unused]] auto* const ndmhep_ptr = &ndmhep_;
}
} // namespace fluka
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment