diff --git a/corsika/detail/modules/thinning/EMThinning.inl b/corsika/detail/modules/thinning/EMThinning.inl new file mode 100644 index 0000000000000000000000000000000000000000..9eea31d14a59dd1dffbdc49390603ccb350a4a43 --- /dev/null +++ b/corsika/detail/modules/thinning/EMThinning.inl @@ -0,0 +1,29 @@ +/* + * (c) Copyright 2022 CORSIKA Project, corsika-project@lists.kit.edu + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + +#pragma once + +#include <corsika/framework/core/PhysicalUnits.hpp> +#include <corsika/framework/process/SecondariesProcess.hpp> + +namespace corsika { + +EMThinning::EMThinning(HEPEnergyType threshold, double maxWeight) : threshold_{threshold}, maxWeight_{maxWeight} {} + +template <typename TStackView> + void EMThinning::doSecondaries(TStackView& view) { + if (view.size() != 2) return; + auto particle1 = view.begin(); + auto particle2 = std::next(particle1); + + if (.getCode()) + corsika::HEPEnergyType const E0 = + +} + +} diff --git a/corsika/modules/thinning/EMThinning.hpp b/corsika/modules/thinning/EMThinning.hpp index 43ffe1bb91f9cdad43a01a339c0173a3fe7f2de7..017d0b770562c0884f2f200b5b30d50b14fb4413 100644 --- a/corsika/modules/thinning/EMThinning.hpp +++ b/corsika/modules/thinning/EMThinning.hpp @@ -17,17 +17,26 @@ namespace corsika { class EMThinning : public SecondariesProcess<EMThinning> { public: - + /** + * Construct a new EMThinning process. + * + * @param threshold: thinning applied below this energy + * @param maxWeight: maximum allowed weight + */ + EMThinning(HEPEnergyType threshold, double maxWeight); /** - * Apply thinning to secondaries. + * Apply thinning to secondaries. Only EM primaries with two EM secondaries are considered. * * @tparam TStackView */ template <typename TStackView> void doSecondaries(TStackView&); +private: + HEPEnergyType const threshold_; + double const maxWeight_; }; }