diff --git a/Framework/Cascade/Cascade.h b/Framework/Cascade/Cascade.h index 29c99d28e926937a86e22c70b0a53b9741c3f38b..5527fdc4acbe8cc0c2ef0814c79b435686598504 100644 --- a/Framework/Cascade/Cascade.h +++ b/Framework/Cascade/Cascade.h @@ -31,7 +31,6 @@ #include <cassert> #include <cmath> -#include <iostream> #include <limits> #include <type_traits> @@ -303,7 +302,6 @@ namespace corsika::cascade { assert(assertion()); // numerical and logical nodes don't match } else { // boundary crossing, step is limited by volume boundary - // C8LOG_DEBUG("boundary crossing! next node = {}", int(nextVol)); vParticle.SetNode(nextVol); /* DoBoundary may delete the particle (or not) diff --git a/Framework/Cascade/testCascade.cc b/Framework/Cascade/testCascade.cc index 57d565d55f68948ad4cf9f0e4a4db4a757da687a..02f974f5245f487c29bd49d00f14216b36312f7d 100644 --- a/Framework/Cascade/testCascade.cc +++ b/Framework/Cascade/testCascade.cc @@ -32,7 +32,6 @@ using namespace corsika::units; using namespace corsika::units::si; using namespace corsika::geometry; -#include <iostream> #include <limits> using namespace std; @@ -112,8 +111,8 @@ public: } ++p; // next particle } - cout << "ProcessCut::DoSecondaries size=" << vS.getEntries() << " count=" << fCount - << endl; + C8LOG_INFO(fmt::format("ProcessCut::DoSecondaries size={} count={}", vS.getEntries(), + fCount)); return EProcessReturn::eOk; } diff --git a/Framework/StackInterface/StackIteratorInterface.h b/Framework/StackInterface/StackIteratorInterface.h index f420be28812f0ba619186242dabce8a6672f92c5..a7a65bd14b45cb87c987f69b63d019aa80f7a623 100644 --- a/Framework/StackInterface/StackIteratorInterface.h +++ b/Framework/StackInterface/StackIteratorInterface.h @@ -12,7 +12,7 @@ namespace corsika::history { template <typename T, template <typename> typename ParticleInterface> - class HistorySecondaryProducer; // forward decl. + class HistorySecondaryProducer; // forward decl. } namespace corsika::stack { @@ -87,11 +87,11 @@ namespace corsika::stack { template <typename T1, // best fix this to: TStackData, template <typename> typename M1, // best fix this to: TParticleInterface, template <typename T, template <typename> typename T3> typename M2> - friend class SecondaryView; // access grant for SecondaryView + friend class SecondaryView; // access grant for SecondaryView template <typename T, template <typename> typename ParticleInterface> friend class corsika::history::HistorySecondaryProducer; - + friend class ConstStackIteratorInterface<TStackData, TParticleInterface, StackType>; protected: @@ -252,14 +252,12 @@ namespace corsika::stack { TParticleInterface>; // for access to GetIndex for Stack friend class Stack<TStackData&, TParticleInterface>; // for access to GetIndex - friend class ParticleBase< - ConstStackIteratorInterface>; // for access to GetStackData + friend class ParticleBase<ConstStackIteratorInterface>; // for access to GetStackData - template <typename T1, // best fix to: TStackData, - template <typename> - typename M1, // best fix to: TParticleInterface, + template <typename T1, // best fix to: TStackData, + template <typename> typename M1, // best fix to: TParticleInterface, template <class T2, template <class> class T3> class MSecondaryProducer> - friend class SecondaryView; // access for SecondaryView + friend class SecondaryView; // access for SecondaryView friend class StackIteratorInterface<TStackData, TParticleInterface, StackType>; diff --git a/Framework/StackInterface/testCombinedStack.cc b/Framework/StackInterface/testCombinedStack.cc index 2f09327269eeaa20bedf596449d0b7ecd5c3896c..9e4d9274f256544a8ea12e0541a2f87b3d130955 100644 --- a/Framework/StackInterface/testCombinedStack.cc +++ b/Framework/StackInterface/testCombinedStack.cc @@ -16,7 +16,6 @@ // test-build, and inluce file is obtained from CMAKE_CURRENT_SOURCE_DIR #include <iomanip> -#include <iostream> #include <vector> #include <catch2/catch.hpp> @@ -384,7 +383,6 @@ TEST_CASE("Combined Stack - secondary view") { StackTest2 stack; auto particle = stack.AddParticle(std::tuple{9.9}); - // cout << boost::typeindex::type_id_runtime(particle).pretty_name() << endl; StackTestView view(particle); auto projectile = view.GetProjectile(); diff --git a/Framework/StackInterface/testSecondaryView.cc b/Framework/StackInterface/testSecondaryView.cc index ede66dc8657ac0bfa7e513e943efc040f09a6e05..8c3f5e87dbf0ffedb311adef0086178948f56601 100644 --- a/Framework/StackInterface/testSecondaryView.cc +++ b/Framework/StackInterface/testSecondaryView.cc @@ -15,7 +15,6 @@ // test-build, and inluce file is obtained from CMAKE_CURRENT_SOURCE_DIR #include <iomanip> -#include <iostream> #include <vector> #include <catch2/catch.hpp> diff --git a/Framework/StackInterface/testStackInterface.cc b/Framework/StackInterface/testStackInterface.cc index 854888b52e269dd99c3fcc3415a9c68712e99664..25ba3e1af0bdfb582b4e814f93782422ec8cd49c 100644 --- a/Framework/StackInterface/testStackInterface.cc +++ b/Framework/StackInterface/testStackInterface.cc @@ -15,7 +15,6 @@ // CMAKE_CURRENT_SOURCE_DIR #include <iomanip> -#include <iostream> #include <tuple> #include <vector> @@ -118,11 +117,6 @@ TEST_CASE("Stack", "[Stack]") { CHECK(s.getSize() == 1); p.AddSecondary(std::tuple{4.4}); CHECK(s.getSize() == 2); - /*p.AddSecondary(3.3, 2.2); - CHECK(s.getSize() == 3); - double v = 0; - for (auto& p : s) { v += p.GetData(); } - CHECK(v == 9.9 + 4.4 + 3.3 + 2.2);*/ } SECTION("get next particle") { diff --git a/Framework/StackInterface/testTestStack.h b/Framework/StackInterface/testTestStack.h index 88e5fa1c6c9e06d1e55481f5f44849a92d6d8bc6..9765dda8b5cf449844ff0e44a6b922007d8f0cb2 100644 --- a/Framework/StackInterface/testTestStack.h +++ b/Framework/StackInterface/testTestStack.h @@ -78,13 +78,6 @@ public: std::tuple<double> v) { SetData(std::get<0>(v)); } - /// alternative set-particle data for non-standard construction from different inputs - /* - void SetParticleData(const double v, const double p) { SetData(v + p); } - void SetParticleData(TestParticleInterface<StackIteratorInterface>&, - const double v, const double p) { - SetData(v + p); - }*/ // here are the fundamental methods for access to TestStackData data void SetData(const double v) { GetStackData().SetData(GetIndex(), v); } diff --git a/Processes/Sibyll/Decay.cc b/Processes/Sibyll/Decay.cc index 805c0f76aea0ad8f49e39da08531c0b0b64b9b1c..62d0b45819be56c8fcbec7b67360a17c96650b73 100644 --- a/Processes/Sibyll/Decay.cc +++ b/Processes/Sibyll/Decay.cc @@ -14,8 +14,7 @@ #include <corsika/setup/SetupStack.h> #include <corsika/setup/SetupTrajectory.h> -using std::cout; -using std::endl; +using std::make_tuple; using std::tuple; using std::vector; @@ -41,7 +40,7 @@ namespace corsika::process::sibyll { SetAllStable(); } - Decay::~Decay() { cout << "Sibyll::Decay n=" << fCount << endl; } + Decay::~Decay() { C8LOG_DEBUG(fmt::format("Sibyll::Decay n={}", fCount)); } bool Decay::CanHandleDecay(const particles::Code vParticleCode) { using namespace corsika::particles; @@ -61,7 +60,7 @@ namespace corsika::process::sibyll { void Decay::SetHandleDecay(const particles::Code vParticleCode) { handleAllDecays_ = false; - cout << "Sibyll::Decay: set to handle decay of " << vParticleCode << endl; + C8LOG_DEBUG(fmt::format("Sibyll::Decay: set to handle decay of {}", vParticleCode)); if (Decay::CanHandleDecay(vParticleCode)) handledDecays_.insert(vParticleCode); else @@ -103,13 +102,13 @@ namespace corsika::process::sibyll { } void Decay::SetUnstable(const particles::Code vCode) { - cout << "Sibyll::Decay: setting " << vCode << " unstable.." << endl; + C8LOG_DEBUG(fmt::format("Sibyll::Decay: setting {} unstable. ", vCode)); const int s_id = abs(process::sibyll::ConvertToSibyllRaw(vCode)); s_csydec_.idb[s_id - 1] = abs(s_csydec_.idb[s_id - 1]); } void Decay::SetStable(const particles::Code vCode) { - cout << "Sibyll::Decay: setting " << vCode << " stable.." << endl; + C8LOG_DEBUG(fmt::format("Sibyll::Decay: setting {} stable. ", vCode)); const int s_id = abs(process::sibyll::ConvertToSibyllRaw(vCode)); s_csydec_.idb[s_id - 1] = (-1) * abs(s_csydec_.idb[s_id - 1]); } @@ -123,23 +122,23 @@ namespace corsika::process::sibyll { } void Decay::PrintDecayConfig(const particles::Code vCode) { - cout << "Decay: Sibyll decay configuration:" << endl; const int sibCode = process::sibyll::ConvertToSibyllRaw(vCode); const int absSibCode = abs(sibCode); - cout << vCode << " is "; - if (s_csydec_.idb[absSibCode - 1] <= 0) - cout << "stable" << endl; - else - cout << "unstable" << endl; + C8LOG_DEBUG( + fmt::format("Decay: Sibyll decay configuration: {} is {}", vCode, + (s_csydec_.idb[absSibCode - 1] <= 0) ? "stable" : "unstable")); } void Decay::PrintDecayConfig() { - cout << "Sibyll::Decay: decay configuration:" << endl; - if (handleAllDecays_) - cout << " all particles known to Sibyll are handled by Sibyll::Decay!" << endl; - else - for (auto& pCode : handledDecays_) - cout << "Decay of " << pCode << " is handled by Sibyll!" << endl; + C8LOG_DEBUG(fmt::format("Sibyll::Decay: decay configuration:")); + if (handleAllDecays_) { + C8LOG_DEBUG(fmt::format( + " all particles known to Sibyll are handled by Sibyll::Decay!")); + } else { + for (auto& pCode : handledDecays_) { + C8LOG_DEBUG(fmt::format(" Decay of {} is handled by Sibyll!", pCode)); + } + } } template <> @@ -158,17 +157,17 @@ namespace corsika::process::sibyll { const auto mkin = (E * E - vP.GetMomentum().squaredNorm()); // delta_mass(vP.GetMomentum(), E, m); - cout << "Sibyll::Decay: code: " << vP.GetPID() << endl; - cout << "Sibyll::Decay: MinStep: t0: " << t0 << endl; - cout << "Sibyll::Decay: MinStep: energy: " << E / 1_GeV << " GeV" << endl; - cout << "Sibyll::Decay: momentum: " << vP.GetMomentum().GetComponents() / 1_GeV - << " GeV" << endl; - cout << "Sibyll::Decay: momentum: shell mass-kin. inv. mass " - << mkin / 1_GeV / 1_GeV << " " << m / 1_GeV * m / 1_GeV << endl; + C8LOG_DEBUG(fmt::format("Sibyll::Decay: code: {} ", vP.GetPID())); + C8LOG_DEBUG(fmt::format("Sibyll::Decay: MinStep: t0: {} ", t0)); + C8LOG_DEBUG(fmt::format("Sibyll::Decay: MinStep: energy: {} GeV ", E / 1_GeV)); + C8LOG_DEBUG(fmt::format("Sibyll::Decay: momentum: {} GeV ", + vP.GetMomentum().GetComponents() / 1_GeV)); + C8LOG_DEBUG(fmt::format("Sibyll::Decay: momentum: shell mass-kin. inv. mass {} {}", + mkin / 1_GeV / 1_GeV, m / 1_GeV * m / 1_GeV)); auto sib_id = process::sibyll::ConvertToSibyllRaw(vP.GetPID()); - cout << "Sibyll::Decay: sib mass: " << get_sibyll_mass2(sib_id) << endl; - cout << "Sibyll::Decay: MinStep: gamma: " << gamma << endl; - cout << "Sibyll::Decay: MinStep: tau (s): " << lifetime / 1_s << endl; + C8LOG_DEBUG(fmt::format("Sibyll::Decay: sib mass: {}", get_sibyll_mass2(sib_id))); + C8LOG_DEBUG(fmt::format("Sibyll::Decay: MinStep: gamma: {}", gamma)); + C8LOG_DEBUG(fmt::format("Sibyll::Decay: MinStep: tau {} s: ", lifetime / 1_s)); return lifetime; } else @@ -207,7 +206,7 @@ namespace corsika::process::sibyll { PrintDecayConfig(pCode); // call sibyll decay - cout << "Decay: calling Sibyll decay routine.." << endl; + C8LOG_DEBUG(fmt::format("Decay: calling Sibyll decay routine..")); decsib_(); // print output @@ -222,11 +221,8 @@ namespace corsika::process::sibyll { // FOR NOW: skip particles that have decayed in Sibyll, move to iterator? if (psib.HasDecayed()) continue; // add to corsika stack - view.AddSecondary( - tuple<particles::Code, units::si::HEPEnergyType, corsika::stack::MomentumVector, - geometry::Point, units::si::TimeType>{ - process::sibyll::ConvertFromSibyll(psib.GetPID()), psib.GetEnergy(), - psib.GetMomentum(), decayPoint, t0}); + view.AddSecondary(make_tuple(process::sibyll::ConvertFromSibyll(psib.GetPID()), + psib.GetEnergy(), psib.GetMomentum(), decayPoint, t0)); } // empty sibyll stack ss.Clear(); diff --git a/Processes/Sibyll/Interaction.cc b/Processes/Sibyll/Interaction.cc index 50da5e0f90729b0c56e7d0b45cd472aa37530842..b028ca8769e3761c8adf6453b6162478271a756e 100644 --- a/Processes/Sibyll/Interaction.cc +++ b/Processes/Sibyll/Interaction.cc @@ -20,8 +20,7 @@ #include <tuple> -using std::cout; -using std::endl; +using std::make_tuple; using std::tuple; using namespace corsika; @@ -45,7 +44,7 @@ namespace corsika::process::sibyll { } Interaction::~Interaction() { - cout << "Sibyll::Interaction n=" << count_ << " Nnuc=" << nucCount_ << endl; + C8LOG_DEBUG(fmt::format("Sibyll::Interaction n={}, Nnuc={}", count_, nucCount_)); } void Interaction::SetAllStable() { @@ -112,10 +111,12 @@ namespace corsika::process::sibyll { const HEPEnergyType ECoM = sqrt( (Elab + pTotLabNorm) * (Elab - pTotLabNorm)); // binomial for numerical accuracy - cout << "Interaction: LambdaInt: \n" - << " input energy: " << vP.GetEnergy() / 1_GeV << endl - << " beam can interact:" << kInteraction << endl - << " beam pid:" << vP.GetPID() << endl; + C8LOG_DEBUG( + fmt::format("Interaction: LambdaInt: \n" + " input energy: {} GeV " + " beam can interact: {} " + " beam pid: {}", + vP.GetEnergy() / 1_GeV, kInteraction, vP.GetPID())); // TODO: move limits into variables // FR: removed && Elab >= 8.5_GeV @@ -137,16 +138,18 @@ namespace corsika::process::sibyll { return std::get<0>(this->GetCrossSection(corsikaBeamId, targetID, ECoM)); }); - cout << "Interaction: " - << "IntLength: weighted CrossSection (mb): " << weightedProdCrossSection / 1_mb - << endl; + C8LOG_DEBUG( + fmt::format("Interaction: " + "IntLength: weighted CrossSection (mb): {} ", + weightedProdCrossSection / 1_mb)); // calculate interaction length in medium GrammageType const int_length = mediumComposition.GetAverageMassNumber() * units::constants::u / weightedProdCrossSection; - cout << "Interaction: " - << "interaction length (g/cm2): " << int_length / (0.001_kg) * 1_cm * 1_cm - << endl; + C8LOG_DEBUG( + fmt::format("Interaction: " + "interaction length (g/cm2): {} ", + int_length / (0.001_kg) * 1_cm * 1_cm)); return int_length; } @@ -169,9 +172,10 @@ namespace corsika::process::sibyll { auto const projectile = view.GetProjectile(); const auto corsikaBeamId = projectile.GetPID(); - cout << "ProcessSibyll: " - << "DoInteraction: " << corsikaBeamId << " interaction? " - << process::sibyll::CanInteract(corsikaBeamId) << endl; + C8LOG_DEBUG( + fmt::format("ProcessSibyll: " + "DoInteraction: {} interaction? ", + corsikaBeamId, process::sibyll::CanInteract(corsikaBeamId))); if (particles::IsNucleus(corsikaBeamId)) { // nuclei handled by different process, this should not happen @@ -195,11 +199,14 @@ namespace corsika::process::sibyll { const auto pTargetLab = MomentumVector(originalCS, 0_GeV, 0_GeV, 0_GeV); const FourVector PtargLab(eTargetLab, pTargetLab); - cout << "Interaction: ebeam lab: " << eProjectileLab / 1_GeV << endl - << "Interaction: pbeam lab: " << pProjectileLab.GetComponents() / 1_GeV - << endl; - cout << "Interaction: etarget lab: " << eTargetLab / 1_GeV << endl - << "Interaction: ptarget lab: " << pTargetLab.GetComponents() / 1_GeV << endl; + C8LOG_DEBUG( + fmt::format("Interaction: ebeam lab: {} GeV" + "Interaction: pbeam lab: {} GeV", + eProjectileLab / 1_GeV, pProjectileLab.GetComponents())); + C8LOG_DEBUG( + fmt::format("Interaction: etarget lab: {} GeV " + "Interaction: ptarget lab: {} GeV", + eTargetLab / 1_GeV, pTargetLab.GetComponents() / 1_GeV)); const FourVector PprojLab(eProjectileLab, pProjectileLab); @@ -216,17 +223,20 @@ namespace corsika::process::sibyll { // boost target auto const PtargCoM = boost.toCoM(PtargLab); - cout << "Interaction: ebeam CoM: " << PprojCoM.GetTimeLikeComponent() / 1_GeV - << endl - << "Interaction: pbeam CoM: " - << PprojCoM.GetSpaceLikeComponents().GetComponents(csPrime) / 1_GeV << endl; - cout << "Interaction: etarget CoM: " << PtargCoM.GetTimeLikeComponent() / 1_GeV - << endl - << "Interaction: ptarget CoM: " - << PtargCoM.GetSpaceLikeComponents().GetComponents(csPrime) / 1_GeV << endl; - - cout << "Interaction: position of interaction: " << pOrig.GetCoordinates() << endl; - cout << "Interaction: time: " << tOrig << endl; + C8LOG_DEBUG( + fmt::format("Interaction: ebeam CoM: {} GeV " + "Interaction: pbeam CoM: {} GeV ", + PprojCoM.GetTimeLikeComponent() / 1_GeV, + PprojCoM.GetSpaceLikeComponents().GetComponents(csPrime) / 1_GeV)); + C8LOG_DEBUG( + fmt::format("Interaction: etarget CoM: {} GeV " + "Interaction: ptarget CoM: {} GeV ", + PtargCoM.GetTimeLikeComponent() / 1_GeV, + PtargCoM.GetSpaceLikeComponents().GetComponents(csPrime) / 1_GeV)); + + C8LOG_DEBUG(fmt::format("Interaction: position of interaction: {} ", + pOrig.GetCoordinates())); + C8LOG_DEBUG(fmt::format("Interaction: time: {} ", tOrig)); HEPEnergyType Etot = eProjectileLab + eTargetLab; MomentumVector Ptot = projectile.GetMomentum(); @@ -255,7 +265,7 @@ namespace corsika::process::sibyll { const auto targetCode = mediumComposition.SampleTarget(cross_section_of_components, RNG_); - cout << "Interaction: target selected: " << targetCode << endl; + C8LOG_DEBUG(fmt::format("Interaction: target selected: {} ", targetCode)); /* FOR NOW: allow nuclei with A<18 or protons only. when medium composition becomes more complex, approximations will have to be @@ -264,7 +274,7 @@ namespace corsika::process::sibyll { int targetSibCode = -1; if (IsNucleus(targetCode)) targetSibCode = GetNucleusA(targetCode); if (targetCode == particles::Proton::GetCode()) targetSibCode = 1; - cout << "Interaction: sibyll code: " << targetSibCode << endl; + C8LOG_DEBUG(fmt::format("Interaction: sibyll code: {}", targetSibCode)); if (targetSibCode > maxTargetMassNumber_ || targetSibCode < 1) throw std::runtime_error( "Sibyll target outside range. Only nuclei with A<18 or protons are " @@ -273,16 +283,19 @@ namespace corsika::process::sibyll { // beam id for sibyll const int kBeam = process::sibyll::ConvertToSibyllRaw(corsikaBeamId); - cout << "Interaction: " - << " DoInteraction: E(GeV):" << eProjectileLab / 1_GeV - << " Ecm(GeV): " << Ecm / 1_GeV << endl; + C8LOG_DEBUG( + fmt::format("Interaction: " + " DoInteraction: E(GeV): {} " + " Ecm(GeV): {} ", + eProjectileLab / 1_GeV, Ecm / 1_GeV)); if (Ecm > GetMaxEnergyCoM()) throw std::runtime_error("Interaction::DoInteraction: CoM energy too high!"); // FR: removed eProjectileLab < 8.5_GeV || if (Ecm < GetMinEnergyCoM()) { - cout << "Interaction: " - << " DoInteraction: should have dropped particle.. " - << "THIS IS AN ERROR" << endl; + C8LOG_DEBUG( + fmt::format("Interaction: " + " DoInteraction: should have dropped particle.. " + "THIS IS AN ERROR")); throw std::runtime_error("energy too low for SIBYLL"); } else { count_++; @@ -319,24 +332,26 @@ namespace corsika::process::sibyll { // add to corsika stack auto pnew = view.AddSecondary( - tuple<particles::Code, units::si::HEPEnergyType, stack::MomentumVector, - geometry::Point, units::si::TimeType>{ - process::sibyll::ConvertFromSibyll(psib.GetPID()), - Plab.GetTimeLikeComponent(), p3lab, pOrig, tOrig}); + make_tuple(process::sibyll::ConvertFromSibyll(psib.GetPID()), + Plab.GetTimeLikeComponent(), p3lab, pOrig, tOrig)); Plab_final += pnew.GetMomentum(); Elab_final += pnew.GetEnergy(); Ecm_final += psib.GetEnergy(); } - cout << "conservation (all GeV):" << endl - << "Ecm_initial(per nucleon)=" << Ecm / 1_GeV << " Ecm_final(per nucleon)=" - << Ecm_final * 2. / (get_nwounded() + 1) / 1_GeV << endl - << "Elab_initial=" << Etot / 1_GeV << " Elab_final=" << Elab_final / 1_GeV - << " diff (%)=" << (Elab_final / Etot / get_nwounded() - 1) * 100 - << " E in nucleons=" << constants::nucleonMass * get_nwounded() / 1_GeV - << endl - << "Plab_initial=" << (pProjectileLab / 1_GeV).GetComponents() - << ", Plab_final=" << (Plab_final / 1_GeV).GetComponents() << endl; + C8LOG_DEBUG(fmt::format( + "conservation (all GeV):" + "Ecm_initial(per nucleon)={}, Ecm_final(per nucleon)={}, " + "Elab_initial={}, Elab_final={}, " + "diff (%)={}, " + "E in nucleons={}, " + "Plab_initial={}, " + "Plab_final={} ", + Ecm / 1_GeV, Ecm_final * 2. / (get_nwounded() + 1) / 1_GeV, Etot / 1_GeV, + Elab_final / 1_GeV, (Elab_final / Etot / get_nwounded() - 1) * 100, + constants::nucleonMass * get_nwounded() / 1_GeV, + (pProjectileLab / 1_GeV).GetComponents(), + (Plab_final / 1_GeV).GetComponents())); } } return process::EProcessReturn::eOk; diff --git a/Processes/Sibyll/NuclearInteraction.cc b/Processes/Sibyll/NuclearInteraction.cc index 09580884c795ad462c488ab6f3c60734ebeb773b..c53beeae7a6934dd090af9ea5302deacf342b681 100644 --- a/Processes/Sibyll/NuclearInteraction.cc +++ b/Processes/Sibyll/NuclearInteraction.cc @@ -24,6 +24,7 @@ #include <set> #include <sstream> +using std::make_tuple; using std::tuple; using std::vector; @@ -554,19 +555,13 @@ namespace corsika::process::sibyll { if (nuclA == 1) // add nucleon - projectile.AddSecondary( - tuple<particles::Code, units::si::HEPEnergyType, stack::MomentumVector, - geometry::Point, units::si::TimeType>{ - specCode, Plab.GetTimeLikeComponent(), Plab.GetSpaceLikeComponents(), - pOrig, tOrig}); + projectile.AddSecondary(make_tuple(specCode, Plab.GetTimeLikeComponent(), + Plab.GetSpaceLikeComponents(), pOrig, tOrig)); else // add nucleus - projectile.AddSecondary( - tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, units::si::TimeType, - unsigned short, unsigned short>{specCode, Plab.GetTimeLikeComponent(), - Plab.GetSpaceLikeComponents(), pOrig, - tOrig, nuclA, nuclZ}); + projectile.AddSecondary(make_tuple(specCode, Plab.GetTimeLikeComponent(), + Plab.GetSpaceLikeComponents(), pOrig, tOrig, + nuclA, nuclZ)); } // add elastic nucleons to corsika stack @@ -583,11 +578,8 @@ namespace corsika::process::sibyll { const double mass_ratio = particles::GetMass(elaNucCode) / ProjMass; auto const Plab = PprojLab * mass_ratio; - projectile.AddSecondary( - tuple<particles::Code, units::si::HEPEnergyType, corsika::stack::MomentumVector, - geometry::Point, units::si::TimeType>{ - elaNucCode, Plab.GetTimeLikeComponent(), Plab.GetSpaceLikeComponents(), - pOrig, tOrig}); + projectile.AddSecondary(make_tuple(elaNucCode, Plab.GetTimeLikeComponent(), + Plab.GetSpaceLikeComponents(), pOrig, tOrig)); } // add inelastic interactions @@ -600,10 +592,8 @@ namespace corsika::process::sibyll { setup::Stack nucleonStack; // auto inelasticNucleon = projectile.AddSecondary( auto inelasticNucleon = nucleonStack.AddParticle( - tuple<particles::Code, units::si::HEPEnergyType, corsika::stack::MomentumVector, - geometry::Point, units::si::TimeType>{ - pCode, PprojNucLab.GetTimeLikeComponent(), - PprojNucLab.GetSpaceLikeComponents(), pOrig, tOrig}); + make_tuple(pCode, PprojNucLab.GetTimeLikeComponent(), + PprojNucLab.GetSpaceLikeComponents(), pOrig, tOrig)); inelasticNucleon.SetNode(projectile.GetNode()); // create inelastic interaction for each nucleon C8LOG_TRACE("calling HadronicInteraction..."); @@ -613,11 +603,9 @@ namespace corsika::process::sibyll { hadronicInteraction_.DoInteraction(nucleon_secondaries); // inelasticNucleon.Delete(); // this is just a temporary object for (const auto& pSec : nucleon_secondaries) { - projectile.AddSecondary( - tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{ - pSec.GetPID(), pSec.GetEnergy(), pSec.GetMomentum(), pSec.GetPosition(), - pSec.GetTime()}); + projectile.AddSecondary(make_tuple(pSec.GetPID(), pSec.GetEnergy(), + pSec.GetMomentum(), pSec.GetPosition(), + pSec.GetTime())); } } diff --git a/Processes/Sibyll/testSibyll.cc b/Processes/Sibyll/testSibyll.cc index d8e9e14fc4573aa64bc99b3f47e4dfdf5e9f0c76..dae9741fcb3cba2641d6bd5a9ff885cb3752ed1c 100644 --- a/Processes/Sibyll/testSibyll.cc +++ b/Processes/Sibyll/testSibyll.cc @@ -19,6 +19,7 @@ #include <corsika/units/PhysicalUnits.h> #include <catch2/catch.hpp> +#include <tuple> using namespace corsika; using namespace corsika::process::sibyll; @@ -123,10 +124,8 @@ TEST_CASE("SibyllInterface", "[processes]") { sqrt(E0 * E0 - particles::Proton::GetMass() * particles::Proton::GetMass()); auto plab = corsika::stack::MomentumVector(cs, {P0, 0_eV, 0_eV}); geometry::Point pos(cs, 0_m, 0_m, 0_m); - auto particle = stack.AddParticle( - std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{ - particles::Code::Proton, E0, plab, pos, 0_ns}); + auto particle = + stack.AddParticle(std::make_tuple(particles::Code::Proton, E0, plab, pos, 0_ns)); particle.SetNode(nodePtr); corsika::setup::StackView view(particle); @@ -208,10 +207,8 @@ TEST_CASE("SibyllInterface", "[processes]") { sqrt(E0 * E0 - particles::Proton::GetMass() * particles::Proton::GetMass()); auto plab = corsika::stack::MomentumVector(cs, {P0, 0_eV, 0_eV}); geometry::Point pos(cs, 0_m, 0_m, 0_m); - auto particle = stack.AddParticle( - std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{ - particles::Code::Proton, E0, plab, pos, 0_ns}); + auto particle = + stack.AddParticle(std::make_tuple(particles::Code::Proton, E0, plab, pos, 0_ns)); particle.SetNode(nodePtr); corsika::setup::StackView view(particle); @@ -237,11 +234,8 @@ TEST_CASE("SibyllInterface", "[processes]") { auto plab = corsika::stack::MomentumVector(cs, {0_GeV, 0_GeV, -P0}); geometry::Point pos(cs, 0_m, 0_m, 0_m); - auto particle = - stack.AddParticle(std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, - units::si::TimeType, unsigned short, unsigned short>{ - particles::Code::Nucleus, E0, plab, pos, 0_ns, 4, 2}); + auto particle = stack.AddParticle( + std::make_tuple(particles::Code::Nucleus, E0, plab, pos, 0_ns, 4, 2)); particle.SetNode(nodePtr); corsika::setup::StackView view(particle); @@ -260,10 +254,8 @@ TEST_CASE("SibyllInterface", "[processes]") { sqrt(E0 * E0 - particles::Proton::GetMass() * particles::Proton::GetMass()); auto plab = corsika::stack::MomentumVector(cs, {0_GeV, 0_GeV, -P0}); geometry::Point pos(cs, 0_m, 0_m, 0_m); - auto particle = stack.AddParticle( - std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{ - particles::Code::Lambda0, E0, plab, pos, 0_ns}); + auto particle = + stack.AddParticle(std::make_tuple(particles::Code::Lambda0, E0, plab, pos, 0_ns)); corsika::setup::StackView view(particle); Decay model; diff --git a/Stack/GeometryNodeStackExtension/testGeometryNodeStackExtension.cc b/Stack/GeometryNodeStackExtension/testGeometryNodeStackExtension.cc index 596d7b0a126c1d5245e20c85a426f7b5ffcb7cad..be14441ec5e726e7f937b165306ce428649daa7b 100644 --- a/Stack/GeometryNodeStackExtension/testGeometryNodeStackExtension.cc +++ b/Stack/GeometryNodeStackExtension/testGeometryNodeStackExtension.cc @@ -49,7 +49,7 @@ TEST_CASE("GeometryNodeStackExtension", "[stack]") { const int data = 5; TestStack s; - s.AddParticle(std::tuple<dummy::NoData>{noData}, std::tuple<const int*>{&data}); + s.AddParticle(std::make_tuple(noData), std::tuple<const int*>{&data}); CHECK(s.GetSize() == 1); } @@ -58,7 +58,7 @@ TEST_CASE("GeometryNodeStackExtension", "[stack]") { const int data = 15; TestStack s; - auto p = s.AddParticle(std::tuple<dummy::NoData>{noData}); + auto p = s.AddParticle(std::make_tuple(noData)); p.SetNode(&data); CHECK(s.GetSize() == 1); diff --git a/Stack/History/testHistoryView.cc b/Stack/History/testHistoryView.cc index 1592254edeb62c57776790ed4870a16de4214c4c..6853571c4b4fca15ac7c717d32f71b4bf0f51c3c 100644 --- a/Stack/History/testHistoryView.cc +++ b/Stack/History/testHistoryView.cc @@ -53,14 +53,11 @@ using TheTestStackView = corsika::stack::SecondaryView<typename TestStack::Stack StackWithHistoryInterface, history::HistorySecondaryProducer>; #elif defined(__GNUC__) || defined(__GNUG__) -// using TheTestStackView = corsika::stack::MakeView<TestStack, -// history::HistorySecondaryProducer>::type; using TheTestStackView = corsika::stack::MakeView<TestStack, history::HistorySecondaryProducer>::type; #endif -using TestStackView = - TheTestStackView; // history::HistorySecondaryProducer<TheTestStackView>; +using TestStackView = TheTestStackView; template <typename Event> int count_generations(Event const* event) { @@ -85,11 +82,9 @@ TEST_CASE("HistoryStackExtension", "[stack]") { // add primary particle auto p0 = stack.AddParticle( - std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{ - particles::Code::Electron, 1.5_GeV, - corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), - Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s}); + std::make_tuple(particles::Code::Electron, 1.5_GeV, + corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), + Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s)); CHECK(stack.getEntries() == 1); corsika::history::EventPtr evt = p0.GetEvent(); @@ -108,12 +103,10 @@ TEST_CASE("HistoryStackExtension", "[stack]") { // add 5 secondaries for (int i = 0; i < 5; ++i) { - auto sec = hview0.AddSecondary(std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, - geometry::Point, units::si::TimeType>{ - particles::Code::Electron, 1.5_GeV, - corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), - Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s}); + auto sec = hview0.AddSecondary( + std::make_tuple(particles::Code::Electron, 1.5_GeV, + corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), + Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s)); CHECK(sec.GetParentEventIndex() == i); CHECK(sec.GetEvent() != nullptr); @@ -132,12 +125,10 @@ TEST_CASE("HistoryStackExtension", "[stack]") { // add second generation of secondaries // add 10 secondaries for (int i = 0; i < 10; ++i) { - auto sec = hview1.AddSecondary(std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, - geometry::Point, units::si::TimeType>{ - particles::Code::Electron, 1.5_GeV, - corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), - Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s}); + auto sec = hview1.AddSecondary( + std::make_tuple(particles::Code::Electron, 1.5_GeV, + corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), + Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s)); CHECK(sec.GetParentEventIndex() == i); CHECK(sec.GetEvent()->parentEvent() == ev1); @@ -161,12 +152,10 @@ TEST_CASE("HistoryStackExtension", "[stack]") { for (int i = 0; i < 15; ++i) { C8LOG_TRACE("loop, view: " + std::to_string(i)); - auto sec = hview2.AddSecondary(std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, - geometry::Point, units::si::TimeType>{ - particles::Code::Electron, 1.5_GeV, - corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), - Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s}); + auto sec = hview2.AddSecondary( + std::make_tuple(particles::Code::Electron, 1.5_GeV, + corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), + Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s)); C8LOG_TRACE("loop, ---- "); CHECK(sec.GetParentEventIndex() == i); @@ -226,12 +215,10 @@ TEST_CASE("HistoryStackExtension", "[stack]") { // add 5 secondaries for (int i = 0; i < 5; ++i) { C8LOG_TRACE("loop " + std::to_string(i)); - auto sec = proj0.AddSecondary(std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, - geometry::Point, units::si::TimeType>{ - particles::Code::Electron, 1.5_GeV, - corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), - Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s}); + auto sec = proj0.AddSecondary( + std::make_tuple(particles::Code::Electron, 1.5_GeV, + corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), + Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s)); CHECK(sec.GetParentEventIndex() == i); CHECK(sec.GetEvent() != nullptr); @@ -249,12 +236,10 @@ TEST_CASE("HistoryStackExtension", "[stack]") { // add second generation of secondaries // add 10 secondaries for (int i = 0; i < 10; ++i) { - auto sec = proj1.AddSecondary(std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, - geometry::Point, units::si::TimeType>{ - particles::Code::Electron, 1.5_GeV, - corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), - Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s}); + auto sec = proj1.AddSecondary( + std::make_tuple(particles::Code::Electron, 1.5_GeV, + corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), + Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s)); CHECK(sec.GetParentEventIndex() == i); CHECK(sec.GetEvent()->parentEvent() == ev1); diff --git a/Stack/NuclearStackExtension/testNuclearStackExtension.cc b/Stack/NuclearStackExtension/testNuclearStackExtension.cc index 372b6317262aff5508fe1830f456e7c26cac50f7..6896953a6079ba0c66b4ba630cf96a2c78a3bd48 100644 --- a/Stack/NuclearStackExtension/testNuclearStackExtension.cc +++ b/Stack/NuclearStackExtension/testNuclearStackExtension.cc @@ -30,11 +30,9 @@ TEST_CASE("NuclearStackExtension", "[stack]") { ExtendedParticleInterfaceType> s; s.AddParticle( - std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{ - particles::Code::Electron, 1.5_GeV, - corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), - Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s}); + std::make_tuple(particles::Code::Electron, 1.5_GeV, + corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), + Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s)); CHECK(s.getEntries() == 1); } @@ -42,34 +40,27 @@ TEST_CASE("NuclearStackExtension", "[stack]") { NuclearStackExtension<corsika::stack::super_stupid::SuperStupidStack, ExtendedParticleInterfaceType> s; - s.AddParticle(std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, - units::si::TimeType, unsigned short, unsigned short>{ + s.AddParticle(std::make_tuple( particles::Code::Nucleus, 1.5_GeV, corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), - Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, 10, 10}); + Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, 10, 10)); CHECK(s.getEntries() == 1); } SECTION("write invalid nucleus") { ParticleDataStack s; - CHECK_THROWS( - s.AddParticle(std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, - units::si::TimeType, unsigned short, unsigned short>{ - particles::Code::Nucleus, 1.5_GeV, - corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), - Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, 0, 0})); + CHECK_THROWS(s.AddParticle( + std::make_tuple(particles::Code::Nucleus, 1.5_GeV, + corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), + Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, 0, 0))); } SECTION("read non nucleus") { ParticleDataStack s; s.AddParticle( - std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{ - particles::Code::Electron, 1.5_GeV, - corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), - Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s}); + std::make_tuple(particles::Code::Electron, 1.5_GeV, + corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), + Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s)); const auto pout = s.GetNextParticle(); CHECK(pout.GetPID() == particles::Code::Electron); CHECK(pout.GetEnergy() == 1.5_GeV); @@ -78,12 +69,10 @@ TEST_CASE("NuclearStackExtension", "[stack]") { SECTION("read nucleus") { ParticleDataStack s; - s.AddParticle(std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, - units::si::TimeType, unsigned short, unsigned short>{ - particles::Code::Nucleus, 1.5_GeV, - corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), - Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, 10, 9}); + s.AddParticle( + std::make_tuple(particles::Code::Nucleus, 1.5_GeV, + corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), + Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, 10, 9)); const auto pout = s.GetNextParticle(); CHECK(pout.GetPID() == particles::Code::Nucleus); CHECK(pout.GetEnergy() == 1.5_GeV); @@ -95,11 +84,9 @@ TEST_CASE("NuclearStackExtension", "[stack]") { SECTION("read invalid nucleus") { ParticleDataStack s; s.AddParticle( - std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{ - particles::Code::Electron, 1.5_GeV, - corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), - Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s}); + std::make_tuple(particles::Code::Electron, 1.5_GeV, + corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), + Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s)); const auto pout = s.GetNextParticle(); CHECK_THROWS(pout.GetNuclearA()); CHECK_THROWS(pout.GetNuclearZ()); @@ -111,19 +98,15 @@ TEST_CASE("NuclearStackExtension", "[stack]") { // add 99 particles, each 10th particle is a nucleus with A=i and Z=A/2! for (int i = 0; i < 99; ++i) { if ((i + 1) % 10 == 0) { - s.AddParticle(std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, - units::si::TimeType, unsigned short, unsigned short>{ + s.AddParticle(std::make_tuple( particles::Code::Nucleus, 1.5_GeV, corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), - Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, i, i / 2}); + Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, i, i / 2)); } else { - s.AddParticle(std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, - units::si::TimeType>{ + s.AddParticle(std::make_tuple( particles::Code::Electron, 1.5_GeV, corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), - Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s}); + Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s)); } } @@ -138,19 +121,15 @@ TEST_CASE("NuclearStackExtension", "[stack]") { // add 99 particles, each 10th particle is a nucleus with A=i and Z=A/2! for (int i = 0; i < 99; ++i) { if ((i + 1) % 10 == 0) { - s.AddParticle(std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, - units::si::TimeType, unsigned short, unsigned short>{ + s.AddParticle(std::make_tuple( particles::Code::Nucleus, i * 15_GeV, corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), - Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, i, i / 2}); + Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s, i, i / 2)); } else { - s.AddParticle(std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, - units::si::TimeType>{ + s.AddParticle(std::make_tuple( particles::Code::Electron, i * 1.5_GeV, corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), - Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s}); + Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s)); } } diff --git a/Stack/SuperStupidStack/testSuperStupidStack.cc b/Stack/SuperStupidStack/testSuperStupidStack.cc index 474df8d012474094599de63f72480a1affd5491a..a9f4fadc90d9d21125a92173b13b652e5aa7af90 100644 --- a/Stack/SuperStupidStack/testSuperStupidStack.cc +++ b/Stack/SuperStupidStack/testSuperStupidStack.cc @@ -30,10 +30,10 @@ TEST_CASE("SuperStupidStack", "[stack]") { SECTION("read+write") { SuperStupidStack s; - s.AddParticle(std::make_tuple{ - particles::Code::Electron, 1.5_GeV, - corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), - Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s}); + s.AddParticle( + std::make_tuple(particles::Code::Electron, 1.5_GeV, + corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), + Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s)); // read CHECK(s.getEntries() == 1); @@ -49,10 +49,9 @@ TEST_CASE("SuperStupidStack", "[stack]") { SuperStupidStack s; for (int i = 0; i < 99; ++i) s.AddParticle( - std::make_tuple{ - particles::Code::Electron, 1.5_GeV, - corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), - Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s}); + std::make_tuple(particles::Code::Electron, 1.5_GeV, + corsika::stack::MomentumVector(dummyCS, {1_GeV, 1_GeV, 1_GeV}), + Point(dummyCS, {1 * meter, 1 * meter, 1 * meter}), 100_s)); CHECK(s.getSize() == 99);