IAP GITLAB

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

exporting symbols in release build; use momentum instead of Elab

parent 0f2496b9
No related branches found
No related tags found
1 merge request!468Resolve "Add FLUKA"
...@@ -92,17 +92,16 @@ namespace corsika::fluka { ...@@ -92,17 +92,16 @@ namespace corsika::fluka {
FourMomentum const projectileLab4mom = targetRestBoost.toCoM(projectileP4); FourMomentum const projectileLab4mom = targetRestBoost.toCoM(projectileP4);
HEPEnergyType const Elab = projectileLab4mom.getTimeLikeComponent(); HEPEnergyType const Elab = projectileLab4mom.getTimeLikeComponent();
auto constexpr invGeV = 1 / 1_GeV; auto constexpr invGeV = 1 / 1_GeV;
double const EkinLab = (Elab - get_mass(projectileId)) * invGeV;
double const labMomentum = double const labMomentum =
projectileLab4mom.getSpaceLikeComponents().getNorm() * invGeV; projectileLab4mom.getSpaceLikeComponents().getNorm() * invGeV;
auto const plab = projectileLab4mom.getSpaceLikeComponents(); auto const plab = projectileLab4mom.getSpaceLikeComponents();
CORSIKA_LOGGER_DEBUG(logger_, fmt::format("Elab = {} GeV", Elab * invGeV)); CORSIKA_LOGGER_DEBUG(logger_, fmt::format("Elab = {} GeV", Elab * invGeV));
CORSIKA_LOGGER_DEBUG(logger_, fmt::format("EkinLab = {} GeV", EkinLab * invGeV));
CrossSectionType const xs = ::fluka::sgmxyz_(&flukaCodeProj, &flukaMaterial, &EkinLab, double const dummyEkin = 0;
&labMomentum, &iflxyz_) * CrossSectionType const xs = ::fluka::sgmxyz_(&flukaCodeProj, &flukaMaterial,
&dummyEkin, &labMomentum, &iflxyz_) *
1_mb; 1_mb;
return xs; return xs;
} }
...@@ -129,18 +128,17 @@ namespace corsika::fluka { ...@@ -129,18 +128,17 @@ namespace corsika::fluka {
COMBoost const targetRestBoost{targetP4.getSpaceLikeComponents(), get_mass(targetId)}; COMBoost const targetRestBoost{targetP4.getSpaceLikeComponents(), get_mass(targetId)};
FourMomentum const projectileLab4mom = targetRestBoost.toCoM(projectileP4); FourMomentum const projectileLab4mom = targetRestBoost.toCoM(projectileP4);
HEPEnergyType const Elab = projectileLab4mom.getTimeLikeComponent();
auto constexpr invGeV = 1 / 1_GeV; auto constexpr invGeV = 1 / 1_GeV;
double const EkinLab = (Elab - get_mass(projectileId)) * invGeV;
auto const plab = projectileLab4mom.getSpaceLikeComponents(); auto const plab = projectileLab4mom.getSpaceLikeComponents();
auto const& cs = plab.getCoordinateSystem(); auto const& cs = plab.getCoordinateSystem();
auto const labMomentum = plab.getNorm(); auto const labMomentum = plab.getNorm();
double const labMomentumGeV = labMomentum * invGeV * 0; double const labMomentumGeV = labMomentum * invGeV;
auto const direction = (plab / labMomentum).getComponents().getEigenVector(); auto const direction = (plab / labMomentum).getComponents().getEigenVector();
::fluka::evtxyz_(&flukaCodeProj, &flukaMaterial, &EkinLab, &labMomentumGeV, double const dummyEkin = 0;
::fluka::evtxyz_(&flukaCodeProj, &flukaMaterial, &dummyEkin, &labMomentumGeV,
&direction[0], &direction[1], &direction[2], &iflxyz_, cumsgx_.get(), &direction[0], &direction[1], &direction[2], &iflxyz_, cumsgx_.get(),
cumsgx_.get() + materials_.size(), cumsgx_.get() + materials_.size(),
cumsgx_.get() + materials_.size() * 2); cumsgx_.get() + materials_.size() * 2);
......
...@@ -22,11 +22,11 @@ namespace fluka { ...@@ -22,11 +22,11 @@ namespace fluka {
* won't get dropped from the final file during linking. * won't get dropped from the final file during linking.
*/ */
[[maybe_unused]] auto* const hepevt_ptr = &hepevt_; [[maybe_unused]] extern auto* const hepevt_ptr = &hepevt_;
[[maybe_unused]] auto* const stpxyc_ptr = &stpxyz_; [[maybe_unused]] extern auto* const stpxyc_ptr = &stpxyz_;
[[maybe_unused]] auto* const evtxyz_ptr = &evtxyz_; [[maybe_unused]] extern auto* const evtxyz_ptr = &evtxyz_;
[[maybe_unused]] auto* const sgmxyz_ptr = &sgmxyz_; [[maybe_unused]] extern auto* const sgmxyz_ptr = &sgmxyz_;
[[maybe_unused]] auto* const ndmhep_ptr = &ndmhep_; [[maybe_unused]] extern auto* const ndmhep_ptr = &ndmhep_;
} }
} // namespace fluka } // 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