diff --git a/corsika/detail/media/LayeredSphericalAtmosphereBuilder.inl b/corsika/detail/media/LayeredSphericalAtmosphereBuilder.inl index 88a49ee76c299bcfc560fac490e52609b9467efb..efa57f50f27d68a871b4af6c5c74e29ae5c73709 100644 --- a/corsika/detail/media/LayeredSphericalAtmosphereBuilder.inl +++ b/corsika/detail/media/LayeredSphericalAtmosphereBuilder.inl @@ -167,7 +167,7 @@ namespace corsika { template <typename TMediumInterface, template <typename> typename MExtraEnvirnoment> struct make_layered_spherical_atmosphere_builder { template <typename... TArgs> - static auto create(Point const& center, LengthType const earthRadius, TArgs... args) { + static auto create(Point const& center, LengthType const planetRadius, TArgs... args) { return LayeredSphericalAtmosphereBuilder<TMediumInterface, MExtraEnvirnoment, TArgs...>{std::forward<TArgs>(args)..., center, planetRadius}; diff --git a/examples/corsika.cpp b/examples/corsika.cpp index f57ec5f133749f34122636710de35268eea8ce2f..668b5c2d90dbf3e8d313de5204f14db6dc36e313 100644 --- a/examples/corsika.cpp +++ b/examples/corsika.cpp @@ -158,24 +158,29 @@ int main(int argc, char** argv) { ->default_str("info") ->check(CLI::IsMember({"warn", "info", "debug", "trace"})) ->group("Misc."); + app.add_option("-v,--verbosity", "Verbosity level: warn, info, debug, trace.") + ->default_val("info") + ->check(CLI::IsMember({"warn", "info", "debug", "trace"})) + ->group("Misc."); // parse the command line options into the variables CLI11_PARSE(app, argc, argv); - string const loglevel = - (app.count("--verbosity") ? app["--verbosity"]->as<string>() : "info"); - if (loglevel == "warn") { - logging::set_level(logging::level::warn); - } else if (loglevel == "info") { - logging::set_level(logging::level::info); - } else if (loglevel == "debug") { - logging::set_level(logging::level::debug); - } else if (loglevel == "trace") { + if (app.count("--verbosity")) { + string const loglevel = app["verbosity"]->as<string>(); + if (loglevel == "warn") { + logging::set_level(logging::level::warn); + } else if (loglevel == "info") { + logging::set_level(logging::level::info); + } else if (loglevel == "debug") { + logging::set_level(logging::level::debug); + } else if (loglevel == "trace") { #ifndef DEBUG - CORSIKA_LOG_ERROR("trace log level requires a Debug build."); - return 1; + CORSIKA_LOG_ERROR("trace log level requires a Debug build."); + return 1; #endif - logging::set_level(logging::level::trace); + logging::set_level(logging::level::trace); + } } // check that we got either PDG or A/Z @@ -217,7 +222,7 @@ int main(int argc, char** argv) { /* === END: SETUP ENVIRONMENT AND ROOT COORDINATE SYSTEM === */ ofstream atmout("earth.dat"); - for (LengthType h = 0_m; h < 110_km; h += 10_m) { + for (LengthType h = 0_m; h < 110_km; h += 100_m) { Point const ptest{rootCS, 0_m, 0_m, builder.getPlanetRadius() + h}; auto rho = env.getUniverse()->getContainingNode(ptest)->getModelProperties().getMassDensity( @@ -228,6 +233,8 @@ int main(int argc, char** argv) { /* === START: CONSTRUCT PRIMARY PARTICLE === */ + /* === START: CONSTRUCT PRIMARY PARTICLE === */ + // parse the primary ID as a PDG or A/Z code Code beamCode;