IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 97928643 authored by ralfulrich's avatar ralfulrich
Browse files

improved/simplified interface to LayeredSp...Atm..Builder

parent 3f6d2b51
No related branches found
No related tags found
No related merge requests found
...@@ -72,9 +72,6 @@ void registerRandomStreams(const int seed) { ...@@ -72,9 +72,6 @@ void registerRandomStreams(const int seed) {
random::RNGManager::GetInstance().SeedAll(seed); random::RNGManager::GetInstance().SeedAll(seed);
} }
template <typename T>
using MEnv = environment::UniformMediumType<environment::UniformMagneticField<T>>;
int main(int argc, char** argv) { int main(int argc, char** argv) {
logging::SetLevel(logging::level::info); logging::SetLevel(logging::level::info);
...@@ -104,20 +101,30 @@ int main(int argc, char** argv) { ...@@ -104,20 +101,30 @@ int main(int argc, char** argv) {
{{particles::Code::Nitrogen, particles::Code::Oxygen}, {{particles::Code::Nitrogen, particles::Code::Oxygen},
{0.7847f, 1.f - 0.7847f}}); // values taken from AIRES manual, Ar removed for now {0.7847f, 1.f - 0.7847f}}); // values taken from AIRES manual, Ar removed for now
builder.addExponentialLayer<MEnv>(1222.6562_g / (1_cm * 1_cm), 994186.38_cm, 4_km, builder.addExponentialLayer<
environment::EMediumType::eAir, environment::UniformMediumType<environment::UniformMagneticField<
geometry::Vector(rootCS, 0_T, 0_T, 1_T)); SlidingPlanarExponential<setup::EnvironmentInterface>>>>(
builder.addExponentialLayer<MEnv>(1144.9069_g / (1_cm * 1_cm), 878153.55_cm, 10_km, 1222.6562_g / (1_cm * 1_cm), 994186.38_cm, 4_km, environment::EMediumType::eAir,
environment::EMediumType::eAir, geometry::Vector(rootCS, 0_T, 0_T, 1_T));
geometry::Vector(rootCS, 0_T, 0_T, 1_T)); builder.addExponentialLayer<
builder.addExponentialLayer<MEnv>(1305.5948_g / (1_cm * 1_cm), 636143.04_cm, 40_km, environment::UniformMediumType<environment::UniformMagneticField<
environment::EMediumType::eAir, SlidingPlanarExponential<setup::EnvironmentInterface>>>>(
geometry::Vector(rootCS, 0_T, 0_T, 1_T)); 1144.9069_g / (1_cm * 1_cm), 878153.55_cm, 10_km, environment::EMediumType::eAir,
builder.addExponentialLayer<MEnv>(540.1778_g / (1_cm * 1_cm), 772170.16_cm, 100_km, geometry::Vector(rootCS, 0_T, 0_T, 1_T));
environment::EMediumType::eAir, builder.addExponentialLayer<
geometry::Vector(rootCS, 0_T, 0_T, 1_T)); environment::UniformMediumType<environment::UniformMagneticField<
builder.addLinearLayer<MEnv>(1e9_cm, 112.8_km, environment::EMediumType::eAir, SlidingPlanarExponential<setup::EnvironmentInterface>>>>(
geometry::Vector(rootCS, 0_T, 0_T, 1_T)); 1305.5948_g / (1_cm * 1_cm), 636143.04_cm, 40_km, environment::EMediumType::eAir,
geometry::Vector(rootCS, 0_T, 0_T, 1_T));
builder.addExponentialLayer<
environment::UniformMediumType<environment::UniformMagneticField<
SlidingPlanarExponential<setup::EnvironmentInterface>>>>(
540.1778_g / (1_cm * 1_cm), 772170.16_cm, 100_km, environment::EMediumType::eAir,
geometry::Vector(rootCS, 0_T, 0_T, 1_T));
builder.addLinearLayer<environment::UniformMediumType<
environment::UniformMagneticField<HomogeneousMedium<setup::EnvironmentInterface>>>>(
1e9_cm, 112.8_km, environment::EMediumType::eAir,
geometry::Vector(rootCS, 0_T, 0_T, 1_T));
builder.assemble(env); builder.assemble(env);
......
...@@ -63,20 +63,30 @@ TEST_CASE("CONEXSourceCut") { ...@@ -63,20 +63,30 @@ TEST_CASE("CONEXSourceCut") {
{{particles::Code::Nitrogen, particles::Code::Oxygen}, {{particles::Code::Nitrogen, particles::Code::Oxygen},
{0.7847f, 1.f - 0.7847f}}); // values taken from AIRES manual, Ar removed for now {0.7847f, 1.f - 0.7847f}}); // values taken from AIRES manual, Ar removed for now
builder.addExponentialLayer<MEnv>(1222.6562_g / (1_cm * 1_cm), 994186.38_cm, 4_km, builder.addExponentialLayer<
environment::EMediumType::eAir, environment::UniformMediumType<environment::UniformMagneticField<
geometry::Vector(rootCS, 0_T, 0_T, 1_T)); SlidingPlanarExponential<setup::EnvironmentInterface>>>>(
builder.addExponentialLayer<MEnv>(1144.9069_g / (1_cm * 1_cm), 878153.55_cm, 10_km, 1222.6562_g / (1_cm * 1_cm), 994186.38_cm, 4_km, environment::EMediumType::eAir,
environment::EMediumType::eAir, geometry::Vector(rootCS, 0_T, 0_T, 1_T));
geometry::Vector(rootCS, 0_T, 0_T, 1_T)); builder.addExponentialLayer<
builder.addExponentialLayer<MEnv>(1305.5948_g / (1_cm * 1_cm), 636143.04_cm, 40_km, environment::UniformMediumType<environment::UniformMagneticField<
environment::EMediumType::eAir, SlidingPlanarExponential<setup::EnvironmentInterface>>>>(
geometry::Vector(rootCS, 0_T, 0_T, 1_T)); 1144.9069_g / (1_cm * 1_cm), 878153.55_cm, 10_km, environment::EMediumType::eAir,
builder.addExponentialLayer<MEnv>(540.1778_g / (1_cm * 1_cm), 772170.16_cm, 100_km, geometry::Vector(rootCS, 0_T, 0_T, 1_T));
environment::EMediumType::eAir, builder.addExponentialLayer<
geometry::Vector(rootCS, 0_T, 0_T, 1_T)); environment::UniformMediumType<environment::UniformMagneticField<
builder.addLinearLayer<MEnv>(1e9_cm, 112.8_km, environment::EMediumType::eAir, SlidingPlanarExponential<setup::EnvironmentInterface>>>>(
geometry::Vector(rootCS, 0_T, 0_T, 1_T)); 1305.5948_g / (1_cm * 1_cm), 636143.04_cm, 40_km, environment::EMediumType::eAir,
geometry::Vector(rootCS, 0_T, 0_T, 1_T));
builder.addExponentialLayer<
environment::UniformMediumType<environment::UniformMagneticField<
SlidingPlanarExponential<setup::EnvironmentInterface>>>>(
540.1778_g / (1_cm * 1_cm), 772170.16_cm, 100_km, environment::EMediumType::eAir,
geometry::Vector(rootCS, 0_T, 0_T, 1_T));
builder.addLinearLayer<environment::UniformMediumType<
environment::UniformMagneticField<HomogeneousMedium<setup::EnvironmentInterface>>>>(
1e9_cm, 112.8_km, environment::EMediumType::eAir,
geometry::Vector(rootCS, 0_T, 0_T, 1_T));
builder.assemble(env); builder.assemble(env);
...@@ -102,8 +112,7 @@ TEST_CASE("CONEXSourceCut") { ...@@ -102,8 +112,7 @@ TEST_CASE("CONEXSourceCut") {
[[maybe_unused]] process::sibyll::NuclearInteraction sibyllNuc(sibyll, env); [[maybe_unused]] process::sibyll::NuclearInteraction sibyllNuc(sibyll, env);
corsika::process::conex_source_cut::CONEXSourceCut conex( corsika::process::conex_source_cut::CONEXSourceCut conex(
center, showerAxis, t, injectionHeight, E0, center, showerAxis, t, injectionHeight, E0, particles::Code::Proton);
particles::GetPDG(particles::Code::Proton));
HEPEnergyType const Eem{1_PeV}; HEPEnergyType const Eem{1_PeV};
auto const momentum = showerAxis.GetDirection() * Eem; auto const momentum = showerAxis.GetDirection() * Eem;
......
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