diff --git a/Processes/Pythia/Decay.cc b/Processes/Pythia/Decay.cc index 21f9d92a25a08c251006bb0593cda8ea0550a115..ea81121009d25363335ce8fb0261d5327fa39f37 100644 --- a/Processes/Pythia/Decay.cc +++ b/Processes/Pythia/Decay.cc @@ -28,14 +28,7 @@ using Track = Trajectory; namespace corsika::process::pythia { - Decay::Decay() {} - Decay::Decay(std::set<particles::Code> vHandled) - : handleAllDecays_(false) - , handledDecays_(vHandled) {} - - Decay::~Decay() { cout << "Pythia::Decay n=" << fCount << endl; } - - void Decay::Init() { + Decay::Decay() { // set random number generator in pythia Pythia8::RndmEngine* rndm = new corsika::process::pythia::Random(); @@ -77,6 +70,12 @@ namespace corsika::process::pythia { throw std::runtime_error("Pythia::Decay: Initialization failed!"); } + Decay::Decay(std::set<particles::Code> vHandled) + : handleAllDecays_(false) + , handledDecays_(vHandled) {} + + Decay::~Decay() { cout << "Pythia::Decay n=" << fCount << endl; } + bool Decay::CanHandleDecay(const particles::Code vParticleCode) { using namespace corsika::particles; // if known to pythia and not proton, electron or neutrino it can decay diff --git a/Processes/Pythia/Decay.h b/Processes/Pythia/Decay.h index 4e2d423a2f2ac8037feb4c8e02ea28f83b68a787..dfa1a25808579cb969dfd756d4a1f704a79c12e0 100644 --- a/Processes/Pythia/Decay.h +++ b/Processes/Pythia/Decay.h @@ -26,7 +26,6 @@ namespace corsika::process { Decay(); Decay(std::set<particles::Code>); ~Decay(); - void Init(); // is Pythia::Decay set to handle the decay of this particle? bool IsDecayHandled(const corsika::particles::Code); diff --git a/Processes/Pythia/Interaction.cc b/Processes/Pythia/Interaction.cc index 0b22b5b5e742e3b97ad88b53d70539a0bdeaa9bf..f6b2a01403ce6bc3462c6d476fb94f1299c6bbf3 100644 --- a/Processes/Pythia/Interaction.cc +++ b/Processes/Pythia/Interaction.cc @@ -29,9 +29,10 @@ namespace corsika::process::pythia { typedef corsika::geometry::Vector<corsika::units::si::hepmomentum_d> MomentumVector; - Interaction::~Interaction() { cout << "Pythia::Interaction n=" << fCount << endl; } + Interaction::~Interaction() {} - void Interaction::Init() { + Interaction::Interaction() { + cout << "Pythia::Interaction n=" << fCount << endl; using random::RNGManager; diff --git a/Processes/Pythia/Interaction.h b/Processes/Pythia/Interaction.h index 117c2325185fc9d56c03319dc82bd0cc41d70542..d6e3862bf72c3b1728c75931ee7bffb509adeed2 100644 --- a/Processes/Pythia/Interaction.h +++ b/Processes/Pythia/Interaction.h @@ -24,11 +24,9 @@ namespace corsika::process::pythia { bool fInitialized = false; public: - Interaction() {} + Interaction(); ~Interaction(); - void Init(); - void SetParticleListStable(std::vector<particles::Code> const&); void SetUnstable(const corsika::particles::Code); void SetStable(const corsika::particles::Code); diff --git a/Processes/Pythia/testPythia8.cc b/Processes/Pythia/testPythia8.cc index 1a7ba3cc2b7910c40499e885a5c45120c383da84..f947a8b813fbe20add8fbc869f79313fb527b7f1 100644 --- a/Processes/Pythia/testPythia8.cc +++ b/Processes/Pythia/testPythia8.cc @@ -65,8 +65,6 @@ TEST_CASE("Pythia", "[processes]") { random::RNGManager::GetInstance().RegisterRandomStream("pythia"); process::pythia::Decay model; - - model.Init(); } } @@ -136,7 +134,7 @@ TEST_CASE("pythia process") { auto projectile = view.GetProjectile(); process::pythia::Decay model; - model.Init(); + [[maybe_unused]] const TimeType time = model.GetLifetime(particle); model.DoDecay(projectile); CHECK(stack.GetSize() == 3); @@ -186,7 +184,7 @@ TEST_CASE("pythia process") { auto projectile = view.GetProjectile(); process::pythia::Interaction model; - model.Init(); + [[maybe_unused]] const process::EProcessReturn ret = model.DoInteraction(projectile); [[maybe_unused]] const GrammageType length = model.GetInteractionLength(particle); }