IAP GITLAB

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

adapted examples

parent 52625005
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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;
......
......@@ -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);
......
......@@ -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};
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
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