IAP GITLAB

Skip to content
Snippets Groups Projects
Commit c3fdd3fb authored by Remy Prechelt's avatar Remy Prechelt
Browse files

Add outputs to vertical_EAS example.

parent ba248ab0
No related branches found
No related tags found
1 merge request!317Output infrastructure and Python analysis library.
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include <corsika/framework/core/Cascade.hpp> #include <corsika/framework/core/Cascade.hpp>
#include <corsika/framework/geometry/PhysicalGeometry.hpp> #include <corsika/framework/geometry/PhysicalGeometry.hpp>
#include <corsika/output/OutputManager.hpp>
#include <corsika/media/Environment.hpp> #include <corsika/media/Environment.hpp>
#include <corsika/media/FlatExponential.hpp> #include <corsika/media/FlatExponential.hpp>
#include <corsika/media/HomogeneousMedium.hpp> #include <corsika/media/HomogeneousMedium.hpp>
...@@ -188,6 +190,9 @@ int main(int argc, char** argv) { ...@@ -188,6 +190,9 @@ int main(int argc, char** argv) {
ShowerAxis const showerAxis{injectionPos, (showerCore - injectionPos) * 1.5, env}; ShowerAxis const showerAxis{injectionPos, (showerCore - injectionPos) * 1.5, env};
// create the output manager that we then register outputs with
OutputManager output("vertical_EAS_outputs");
// setup processes, decays and interactions // setup processes, decays and interactions
corsika::sibyll::Interaction sibyll; corsika::sibyll::Interaction sibyll;
...@@ -232,8 +237,10 @@ int main(int argc, char** argv) { ...@@ -232,8 +237,10 @@ int main(int argc, char** argv) {
LongitudinalProfile longprof{showerAxis}; LongitudinalProfile longprof{showerAxis};
Plane const obsPlane(showerCore, DirectionVector(rootCS, {0., 0., 1.})); Plane const obsPlane(showerCore, DirectionVector(rootCS, {0., 0., 1.}));
ObservationPlane observationLevel(obsPlane, DirectionVector(rootCS, {1., 0., 0.}), ObservationPlane observationLevel(obsPlane, DirectionVector(rootCS, {1., 0., 0.}));
"particles.dat");
// register the observation plane with the output
output.add("obsplane", observationLevel);
corsika::urqmd::UrQMD urqmd; corsika::urqmd::UrQMD urqmd;
InteractionCounter urqmdCounted{urqmd}; InteractionCounter urqmdCounted{urqmd};
...@@ -260,12 +267,14 @@ int main(int argc, char** argv) { ...@@ -260,12 +267,14 @@ int main(int argc, char** argv) {
// define air shower object, run simulation // define air shower object, run simulation
setup::Tracking tracking; setup::Tracking tracking;
Cascade EAS(env, tracking, sequence, stack); Cascade EAS(env, tracking, sequence, output, stack);
// to fix the point of first interaction, uncomment the following two lines: // to fix the point of first interaction, uncomment the following two lines:
// EAS.forceInteraction(); // EAS.forceInteraction();
output.startOfRun();
EAS.run(); EAS.run();
output.endOfRun();
cut.showResults(); cut.showResults();
em_continuous.showResults(); em_continuous.showResults();
......
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