diff --git a/examples/cascade_example.cpp b/examples/cascade_example.cpp index 6d09fe1522628bc8f475b57747836fcbff44f6ef..8f846ac8130a3336ef6ec242d8398e7f72f7c214 100644 --- a/examples/cascade_example.cpp +++ b/examples/cascade_example.cpp @@ -136,8 +136,7 @@ int main() { RNGManager<>::getInstance().registerRandomStream("sibyll"); RNGManager<>::getInstance().registerRandomStream("pythia"); - corsika::sibyll::Interaction sibyll; - corsika::sibyll::NuclearInteraction sibyllNuc(sibyll, env); + corsika::sibyll::Interaction sibyll{env}; corsika::sibyll::Decay decay; // cascade with only HE model ==> HE cut @@ -148,8 +147,7 @@ int main() { output.add("tracks", trackWriter); // register TrackWriter // assemble all processes into an ordered process list - auto sequence = make_sequence(stackInspect, make_sequence(sibyllNuc, sibyll), decay, - eLoss, cut, trackWriter); + auto sequence = make_sequence(stackInspect, sibyll, decay, eLoss, cut, trackWriter); // define air shower object, run simulation Cascade EAS(env, tracking, sequence, output, stack); diff --git a/examples/cascade_proton_example.cpp b/examples/cascade_proton_example.cpp index bc30603fbee0af5feea6f0d08014d14743f62f5b..62ce71079ddbeebf50e39115cfa7729ac42f9bb0 100644 --- a/examples/cascade_proton_example.cpp +++ b/examples/cascade_proton_example.cpp @@ -122,7 +122,6 @@ int main() { setup::Tracking tracking; StackInspector<setup::Stack<EnvType>> stackInspect(1000, true, E0); - RNGManager<>::getInstance().registerRandomStream("sibyll"); RNGManager<>::getInstance().registerRandomStream("pythia"); corsika::pythia8::Interaction pythia; corsika::pythia8::Decay decay; diff --git a/examples/corsika.cpp b/examples/corsika.cpp index 9d4e05656025716094f2dd53d93fba482931a70a..112e1fd9d1977ae38adae642005c6e3d23c993bd 100644 --- a/examples/corsika.cpp +++ b/examples/corsika.cpp @@ -286,11 +286,8 @@ int main(int argc, char** argv) { TrackWriter tracks; output.add("tracks", tracks); - corsika::sibyll::Interaction sibyll; - InteractionCounter sibyllCounted(sibyll); - corsika::sibyll::NuclearInteraction sibyllNuc(sibyll, env); - InteractionCounter sibyllNucCounted(sibyllNuc); - auto heModelCounted = make_sequence(sibyllNucCounted, sibyllCounted); + corsika::sibyll::Interaction sibyll{env}; + InteractionCounter sibyllCounted{sibyll}; corsika::pythia8::Decay decayPythia; @@ -324,7 +321,8 @@ int main(int argc, char** argv) { // energy threshold for high energy hadronic model. Affects LE/HE switch for hadron // interactions and the hadronic photon model in proposal HEPEnergyType heHadronModelThreshold = 63.1_GeV; - corsika::proposal::Interaction emCascade(env, sibyll, heHadronModelThreshold); + corsika::proposal::Interaction emCascade(env, sibyll.getHadronInteractionModel(), + heHadronModelThreshold); // NOT available for PROPOSAL due to interface trouble: // InteractionCounter emCascadeCounted(emCascade); // corsika::proposal::ContinuousProcess<SubWriter<decltype(dEdX)>> emContinuous(env); @@ -346,7 +344,7 @@ int main(int argc, char** argv) { bool operator()(const Particle& p) const { return (p.getKineticEnergy() < cutE_); } }; auto hadronSequence = - make_select(EnergySwitch(heHadronModelThreshold), urqmdCounted, heModelCounted); + make_select(EnergySwitch(heHadronModelThreshold), urqmdCounted, sibyllCounted); auto decaySequence = make_sequence(decayPythia, decaySibyll); TrackWriter trackWriter{tracks}; @@ -420,8 +418,7 @@ int main(int argc, char** argv) { observationLevel.getEnergyGround() / 1_GeV, (Efinal / E0 - 1) * 100); // auto const hists = heModelCounted.getHistogram() + urqmdCounted.getHistogram(); - auto const hists = sibyllCounted.getHistogram() + sibyllNucCounted.getHistogram() + - urqmdCounted.getHistogram(); + auto const hists = sibyllCounted.getHistogram() + urqmdCounted.getHistogram(); save_hist(hists.labHist(), labHist_file, true); save_hist(hists.CMSHist(), cMSHist_file, true); diff --git a/examples/em_shower.cpp b/examples/em_shower.cpp index aec2e1a3e355ad90dfdee2c8228cf2ed759ae3b4..f8fb0fd406fa57a45d00108ef13fa912ff845078 100644 --- a/examples/em_shower.cpp +++ b/examples/em_shower.cpp @@ -163,9 +163,10 @@ int main(int argc, char** argv) { ParticleCut<SubWriter<decltype(dEdX)>> cut(60_GeV, 60_GeV, 100_PeV, 100_PeV, true, dEdX); - corsika::sibyll::Interaction sibyll; + corsika::sibyll::Interaction sibyll{env}; HEPEnergyType heThresholdNN = 80_GeV; - corsika::proposal::Interaction emCascade(env, sibyll, heThresholdNN); + corsika::proposal::Interaction emCascade(env, sibyll.getHadronInteractionModel(), + heThresholdNN); corsika::proposal::ContinuousProcess<SubWriter<decltype(dEdX)>> emContinuous(env, dEdX); // BetheBlochPDG<SubWriter<decltype(dEdX)>> emContinuous{dEdX}; diff --git a/examples/hybrid_MC.cpp b/examples/hybrid_MC.cpp index 0cb65570bd3230332d416328b5115142c401ac11..f232ee720c823173f7aa2bc22530177c0f7d029e 100644 --- a/examples/hybrid_MC.cpp +++ b/examples/hybrid_MC.cpp @@ -234,11 +234,8 @@ int main(int argc, char** argv) { // setup processes, decays and interactions - corsika::sibyll::Interaction sibyll; - InteractionCounter sibyllCounted(sibyll); - - corsika::sibyll::NuclearInteraction sibyllNuc(sibyll, env); - InteractionCounter sibyllNucCounted(sibyllNuc); + corsika::sibyll::Interaction sibyll{env}; + InteractionCounter sibyllCounted{sibyll}; corsika::pythia8::Decay decayPythia; @@ -303,8 +300,7 @@ int main(int argc, char** argv) { return (p.getEnergy() < cutE_); } }; - auto hadronSequence = make_select(EnergySwitch(55_GeV), urqmdCounted, - make_sequence(sibyllNucCounted, sibyllCounted)); + auto hadronSequence = make_select(EnergySwitch(55_GeV), urqmdCounted, sibyllCounted); auto decaySequence = make_sequence(decayPythia, decaySibyll); auto sequence = make_sequence(hadronSequence, decaySequence, eLoss, cut, conex_model, longprof, observationLevel, trackCheck); @@ -327,8 +323,7 @@ int main(int argc, char** argv) { "relative difference (%): {}", Efinal / 1_GeV, (Efinal / E0 - 1) * 100); - auto const hists = sibyllCounted.getHistogram() + sibyllNucCounted.getHistogram() + - urqmdCounted.getHistogram(); + auto const hists = sibyllCounted.getHistogram() + urqmdCounted.getHistogram(); save_hist(hists.labHist(), "inthist_lab_hybrid.npz", true); save_hist(hists.CMSHist(), "inthist_cms_hybrid.npz", true); diff --git a/examples/mars.cpp b/examples/mars.cpp index df9e531fa906a687801e49d529824442f6b54314..e6d77b1cf89154a5b18202137399bb37922a6f59 100644 --- a/examples/mars.cpp +++ b/examples/mars.cpp @@ -322,11 +322,8 @@ int main(int argc, char** argv) { ParticleCut<SubWriter<decltype(dEdX)>> cut(emcut, emcut, hadcut, hadcut, true, dEdX); /* === START: SETUP PROCESS LIST === */ - corsika::sibyll::Interaction sibyll; + corsika::sibyll::Interaction sibyll{env}; InteractionCounter sibyllCounted(sibyll); - corsika::sibyll::NuclearInteraction sibyllNuc(sibyll, env); - InteractionCounter sibyllNucCounted(sibyllNuc); - auto heModelCounted = make_sequence(sibyllNucCounted, sibyllCounted); corsika::pythia8::Decay decayPythia; @@ -357,7 +354,8 @@ int main(int argc, char** argv) { // interactions and the hadronic photon model in proposal HEPEnergyType heHadronModelThreshold = 63.1_GeV; - corsika::proposal::Interaction emCascade(env, sibyll, heHadronModelThreshold); + corsika::proposal::Interaction emCascade(env, sibyll.getHadronInteractionModel(), + heHadronModelThreshold); // NOT possible right now, due to interface difference for PROPOSAL: // InteractionCounter emCascadeCounted(emCascade); // corsika::proposal::ContinuousProcess<SubWriter<decltype(dEdX)>> @@ -380,7 +378,7 @@ int main(int argc, char** argv) { bool operator()(Particle const& p) const { return (p.getKineticEnergy() < cutE_); } }; auto hadronSequence = - make_select(EnergySwitch(heHadronModelThreshold), urqmdCounted, heModelCounted); + make_select(EnergySwitch(heHadronModelThreshold), urqmdCounted, sibyllCounted); auto decaySequence = make_sequence(decayPythia, decaySibyll); // track writer @@ -450,8 +448,7 @@ int main(int argc, char** argv) { "relative difference (%): {}", Efinal / 1_GeV, (Efinal / E0 - 1) * 100); - auto const hists = sibyllCounted.getHistogram() + sibyllNucCounted.getHistogram() + - urqmdCounted.getHistogram(); + auto const hists = sibyllCounted.getHistogram() + urqmdCounted.getHistogram(); save_hist(hists.labHist(), labHist_file, true); save_hist(hists.CMSHist(), cMSHist_file, true); diff --git a/examples/vertical_EAS.cpp b/examples/vertical_EAS.cpp index b5e5f163327fec18a28242bc8bdfc27908c7a761..d5117be365afffed1abbcab7dd00e384a8cae1ce 100644 --- a/examples/vertical_EAS.cpp +++ b/examples/vertical_EAS.cpp @@ -223,11 +223,8 @@ int main(int argc, char** argv) { // setup processes, decays and interactions - corsika::sibyll::Interaction sibyll; - InteractionCounter sibyllCounted(sibyll); - - corsika::sibyll::NuclearInteraction sibyllNuc(sibyll, env); - InteractionCounter sibyllNucCounted(sibyllNuc); + corsika::sibyll::Interaction sibyll{env}; + InteractionCounter sibyllCounted{sibyll}; corsika::pythia8::Decay decayPythia; @@ -265,8 +262,7 @@ int main(int argc, char** argv) { : cutE_(cutE) {} bool operator()(const Particle& p) const { return (p.getEnergy() < cutE_); } }; - auto hadronSequence = make_select(EnergySwitch(55_GeV), urqmdCounted, - make_sequence(sibyllNucCounted, sibyllCounted)); + auto hadronSequence = make_select(EnergySwitch(55_GeV), urqmdCounted, sibyllCounted)); auto decaySequence = make_sequence(decayPythia, decaySibyll); // directory for outputs @@ -299,8 +295,7 @@ int main(int argc, char** argv) { EAS.run(); output.endOfShower(); - auto const hists = sibyllCounted.getHistogram() + sibyllNucCounted.getHistogram() + - urqmdCounted.getHistogram(); + auto const hists = sibyllCounted.getHistogram() + urqmdCounted.getHistogram(); save_hist(hists.labHist(), labHist_file, true); save_hist(hists.CMSHist(), cMSHist_file, true);