diff --git a/.gitignore b/.gitignore index 5cef2aaf9a5d56626a6dc4a4258774dfd9b3bba0..5b91f5458c93576fe61ceed0f8077081ca233822 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ flymd.html flymd.md Testing tags +Environment/GeneratedMediaProperties.inc diff --git a/CMakeLists.txt b/CMakeLists.txt index af8d04ff8a4e99a55130d62c56c8fb8d9cba8615..b126b3eed5da47088f15ed56d50078c6aa9dbbe2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,7 +77,7 @@ endif (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) # enable warnings and disallow non-standard language # configure the various build types here, too # FYI: optimizer flags: -O2 would not trade speed for size, neither O2/3 use fast-math -# debug: O0, relwithdebinfo: 02, release: O3, minsizerel: Os (all defaults) +# debug: O0, relwithdebinfo: 02, release: O3, minsizerel: Os (all defaults), coverage -> O0 set (CMAKE_CXX_FLAGS "-Wall -pedantic -Wextra -Wno-ignored-qualifiers") set (CMAKE_Fortran_FLAGS "-std=legacy -Wfunction-elimination") @@ -104,7 +104,9 @@ if (CMAKE_BUILD_TYPE STREQUAL Coverage) find_package (Perl REQUIRED) # compile coverage under -O2 to remove unused functions - add_compile_options ("-O2") + # add_compile_options ("-O2") + # compile coverage under -O0 to avoid any optimization, function elimation etc. + add_compile_options ("-O0") set (GCOV gcov CACHE STRING "gcov executable" FORCE) set (LCOV_BIN_DIR "${PROJECT_SOURCE_DIR}/ThirdParty/lcov/bin") diff --git a/Documentation/Examples/CMakeLists.txt b/Documentation/Examples/CMakeLists.txt index 62c9d6bd3b9b05e28cf7985a4c9766a7ed4570c4..adbbca31ce43a2a4cfcca7808f9930d6cbbe1b27 100644 --- a/Documentation/Examples/CMakeLists.txt +++ b/Documentation/Examples/CMakeLists.txt @@ -67,7 +67,6 @@ if (Pythia8_FOUND) ProcessPythia8 ProcessUrQMD CORSIKAcascade - ProcessCONEXSourceCut ProcessEnergyLoss ProcessTrackWriter ProcessStackInspector @@ -106,7 +105,38 @@ if (Pythia8_FOUND) ProcessOnShellCheck ProcessStackInspector ProcessLongitudinalProfile + CORSIKAprocesses + CORSIKAcascade + CORSIKAparticles + CORSIKAgeometry + CORSIKAenvironment + CORSIKAprocesssequence + CORSIKAhistory # for HistoryObservationPlane + ) + + CORSIKA_ADD_EXAMPLE (hybrid_MC RUN_OPTIONS 4 2 10000.) + target_link_libraries (hybrid_MC + CORSIKAsetup + CORSIKAunits + CORSIKAlogging + CORSIKArandom + CORSIKAhistory ProcessCONEXSourceCut + ProcessInteractionCounter + ProcessSibyll + ProcessPythia8 + ProcessUrQMD + CORSIKAcascade + ProcessPythia8 + ProcessObservationPlane + ProcessInteractionCounter + ProcessTrackWriter + ProcessEnergyLoss + ProcessTrackingLine + ProcessParticleCut + ProcessOnShellCheck + ProcessStackInspector + ProcessLongitudinalProfile CORSIKAprocesses CORSIKAcascade CORSIKAparticles @@ -146,7 +176,6 @@ target_link_libraries (em_shower ProcessPythia8 ProcessUrQMD CORSIKAcascade - ProcessCONEXSourceCut ProcessEnergyLoss ProcessObservationPlane ProcessInteractionCounter diff --git a/Documentation/Examples/boundary_example.cc b/Documentation/Examples/boundary_example.cc index 9bf4e188ae18a1e668e86c9e8294d52a1c9642b1..c8fa31e6edf2c0457e5fe6617897656bac5bb5f4 100644 --- a/Documentation/Examples/boundary_example.cc +++ b/Documentation/Examples/boundary_example.cc @@ -45,7 +45,6 @@ using namespace corsika::process; using namespace corsika::units; using namespace corsika::particles; using namespace corsika::random; -using namespace corsika::setup; using namespace corsika::geometry; using namespace corsika::environment; @@ -95,7 +94,7 @@ int main() { random::RNGManager::GetInstance().RegisterRandomStream("cascade"); // setup environment, geometry - using EnvType = Environment<setup::IEnvironmentModel>; + using EnvType = setup::Environment; EnvType env; auto& universe = *(env.GetUniverse()); @@ -105,12 +104,16 @@ int main() { auto world = EnvType::CreateNode<Sphere>( Point{rootCS, 0_m, 0_m, 0_m}, 1_km * std::numeric_limits<double>::infinity()); - auto const props = - world->SetModelProperties<environment::HomogeneousMedium<setup::IEnvironmentModel>>( - 1_kg / (1_m * 1_m * 1_m), - environment::NuclearComposition( - std::vector<particles::Code>{particles::Code::Proton}, - std::vector<float>{1.f})); + using MyHomogeneousModel = + environment::MediumPropertyModel<environment::UniformMagneticField< + environment::HomogeneousMedium<setup::EnvironmentInterface>>>; + + auto const props = world->SetModelProperties<MyHomogeneousModel>( + environment::Medium::AirDry1Atm, Vector(rootCS, 0_T, 0_T, 0_T), + 1_kg / (1_m * 1_m * 1_m), + environment::NuclearComposition( + std::vector<particles::Code>{particles::Code::Proton}, + std::vector<float>{1.f})); // add a "target" sphere with 5km readius at 0,0,0 auto target = EnvType::CreateNode<Sphere>(Point{rootCS, 0_m, 0_m, 0_m}, 5_km); diff --git a/Documentation/Examples/cascade_example.cc b/Documentation/Examples/cascade_example.cc index 64ed627e03c8c7687a2b75330dd50d46e1168627..f3cd9c19aa48d5eb02c7276d10d07752f2a2cfbc 100644 --- a/Documentation/Examples/cascade_example.cc +++ b/Documentation/Examples/cascade_example.cc @@ -45,7 +45,6 @@ using namespace corsika::process; using namespace corsika::units; using namespace corsika::particles; using namespace corsika::random; -using namespace corsika::setup; using namespace corsika::geometry; using namespace corsika::environment; @@ -57,7 +56,7 @@ using namespace corsika::units::si; // int main() { - logging::SetLevel(logging::level::debug); + logging::SetLevel(logging::level::info); std::cout << "cascade_example" << std::endl; @@ -68,33 +67,34 @@ int main() { random::RNGManager::GetInstance().RegisterRandomStream("cascade"); // setup environment, geometry - using EnvType = environment::Environment<setup::IEnvironmentModel>; - EnvType env; + setup::Environment env; auto& universe = *(env.GetUniverse()); const CoordinateSystem& rootCS = env.GetCoordinateSystem(); - auto outerMedium = EnvType::CreateNode<Sphere>( + auto world = setup::Environment::CreateNode<Sphere>( Point{rootCS, 0_m, 0_m, 0_m}, 1_km * std::numeric_limits<double>::infinity()); + using MyHomogeneousModel = + environment::MediumPropertyModel<environment::UniformMagneticField< + environment::HomogeneousMedium<setup::EnvironmentInterface>>>; + // fraction of oxygen const float fox = 0.20946; - auto const props = - outerMedium - ->SetModelProperties<environment::HomogeneousMedium<setup::IEnvironmentModel>>( - 1_kg / (1_m * 1_m * 1_m), - environment::NuclearComposition( - std::vector<particles::Code>{particles::Code::Nitrogen, - particles::Code::Oxygen}, - std::vector<float>{1.f - fox, fox})); + auto const props = world->SetModelProperties<MyHomogeneousModel>( + environment::Medium::AirDry1Atm, Vector(rootCS, 0_T, 0_T, 0_T), + 1_kg / (1_m * 1_m * 1_m), + environment::NuclearComposition( + std::vector<particles::Code>{particles::Code::Nitrogen, + particles::Code::Oxygen}, + std::vector<float>{1.f - fox, fox})); - auto innerMedium = EnvType::CreateNode<Sphere>(Point{rootCS, 0_m, 0_m, 0_m}, 5000_m); + auto innerMedium = + setup::Environment::CreateNode<Sphere>(Point{rootCS, 0_m, 0_m, 0_m}, 5000_m); innerMedium->SetModelProperties(props); - - outerMedium->AddChild(std::move(innerMedium)); - - universe.AddChild(std::move(outerMedium)); + world->AddChild(std::move(innerMedium)); + universe.AddChild(std::move(world)); // setup particle stack, and add primary particle setup::Stack stack; diff --git a/Documentation/Examples/cascade_proton_example.cc b/Documentation/Examples/cascade_proton_example.cc index 4ca053f377d67d2aa597b8e377575c4f960cd305..2c5e1489e4fe9baa98d6e879e3fe1fee0b70ee79 100644 --- a/Documentation/Examples/cascade_proton_example.cc +++ b/Documentation/Examples/cascade_proton_example.cc @@ -49,7 +49,6 @@ using namespace corsika::process; using namespace corsika::units; using namespace corsika::particles; using namespace corsika::random; -using namespace corsika::setup; using namespace corsika::geometry; using namespace corsika::environment; @@ -70,24 +69,26 @@ int main() { random::RNGManager::GetInstance().RegisterRandomStream("cascade"); // setup environment, geometry - using EnvType = Environment<setup::IEnvironmentModel>; + using EnvType = setup::Environment; EnvType env; auto& universe = *(env.GetUniverse()); + const CoordinateSystem& rootCS = env.GetCoordinateSystem(); + + auto theMedium = EnvType::CreateNode<Sphere>( + Point{rootCS, 0_m, 0_m, 0_m}, 1_km * std::numeric_limits<double>::infinity()); - auto theMedium = - EnvType::CreateNode<Sphere>(Point{env.GetCoordinateSystem(), 0_m, 0_m, 0_m}, - 1_km * std::numeric_limits<double>::infinity()); + using MyHomogeneousModel = + environment::MediumPropertyModel<environment::UniformMagneticField< + environment::HomogeneousMedium<setup::EnvironmentInterface>>>; - using MyHomogeneousModel = HomogeneousMedium<IMediumModel>; theMedium->SetModelProperties<MyHomogeneousModel>( + environment::Medium::AirDry1Atm, geometry::Vector(rootCS, 0_T, 0_T, 1_T), 1_kg / (1_m * 1_m * 1_m), NuclearComposition(std::vector<particles::Code>{particles::Code::Hydrogen}, std::vector<float>{(float)1.})); universe.AddChild(std::move(theMedium)); - const CoordinateSystem& rootCS = env.GetCoordinateSystem(); - // setup particle stack, and add primary particle setup::Stack stack; stack.Clear(); diff --git a/Documentation/Examples/em_shower.cc b/Documentation/Examples/em_shower.cc index c41d4574755db08489665f1bfde06fcded43d4c0..594a95845c9a2e8d8640aeda4c7847ed591d9420 100644 --- a/Documentation/Examples/em_shower.cc +++ b/Documentation/Examples/em_shower.cc @@ -42,7 +42,6 @@ using namespace corsika::process; using namespace corsika::units; using namespace corsika::particles; using namespace corsika::random; -using namespace corsika::setup; using namespace corsika::geometry; using namespace corsika::environment; @@ -55,6 +54,9 @@ void registerRandomStreams() { random::RNGManager::GetInstance().SeedAll(); } +template <typename T> +using MyExtraEnv = environment::MediumPropertyModel<environment::UniformMagneticField<T>>; + int main(int argc, char** argv) { logging::SetLevel(logging::level::info); @@ -68,11 +70,15 @@ int main(int argc, char** argv) { registerRandomStreams(); // setup environment, geometry - using EnvType = Environment<setup::IEnvironmentModel>; + using EnvType = setup::Environment; EnvType env; const CoordinateSystem& rootCS = env.GetCoordinateSystem(); Point const center{rootCS, 0_m, 0_m, 0_m}; - environment::LayeredSphericalAtmosphereBuilder builder{center}; + auto builder = environment::make_layered_spherical_atmosphere_builder< + setup::EnvironmentInterface, + MyExtraEnv>::create(center, units::constants::EarthRadius::Mean, + environment::Medium::AirDry1Atm, + geometry::Vector{rootCS, 0_T, 0_T, 1_T}); builder.setNuclearComposition( {{particles::Code::Nitrogen, particles::Code::Oxygen}, {0.7847f, 1.f - 0.7847f}}); // values taken from AIRES manual, Ar removed for now @@ -82,7 +88,6 @@ int main(int argc, char** argv) { builder.addExponentialLayer(1305.5948_g / (1_cm * 1_cm), 636143.04_cm, 40_km); builder.addExponentialLayer(540.1778_g / (1_cm * 1_cm), 772170.16_cm, 100_km); builder.addLinearLayer(1e9_cm, 112.8_km); - builder.assemble(env); // setup particle stack, and add primary particle @@ -162,16 +167,16 @@ int main(int argc, char** argv) { EAS.Run(); cut.ShowResults(); - em_continuous.ShowResults(); + em_continuous.showResults(); observationLevel.ShowResults(); const HEPEnergyType Efinal = cut.GetCutEnergy() + cut.GetInvEnergy() + - cut.GetEmEnergy() + em_continuous.GetEnergyLost() + + cut.GetEmEnergy() + em_continuous.energyLost() + observationLevel.GetEnergyGround(); cout << "total cut energy (GeV): " << Efinal / 1_GeV << endl << "relative difference (%): " << (Efinal / E0 - 1) * 100 << endl; observationLevel.Reset(); cut.Reset(); - em_continuous.Reset(); + em_continuous.reset(); auto const hists = proposalCounted.GetHistogram(); hists.saveLab("inthist_lab_emShower.npz"); diff --git a/Documentation/Examples/hybrid_MC.cc b/Documentation/Examples/hybrid_MC.cc new file mode 100644 index 0000000000000000000000000000000000000000..c6647209bb13d4843020c2bce4d0354486f97753 --- /dev/null +++ b/Documentation/Examples/hybrid_MC.cc @@ -0,0 +1,281 @@ +/* + * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + +/* clang-format off */ +// InteractionCounter used boost/histogram, which +// fails if boost/type_traits have been included before. Thus, we have +// to include it first... +#include <corsika/process/interaction_counter/InteractionCounter.hpp> +/* clang-format on */ +#include <corsika/cascade/Cascade.h> +#include <corsika/environment/Environment.h> +#include <corsika/environment/FlatExponential.h> +#include <corsika/environment/LayeredSphericalAtmosphereBuilder.h> +#include <corsika/environment/NuclearComposition.h> +#include <corsika/environment/ShowerAxis.h> +#include <corsika/geometry/Plane.h> +#include <corsika/geometry/Sphere.h> +#include <corsika/logging/Logging.h> +#include <corsika/process/ProcessSequence.h> +#include <corsika/process/SwitchProcessSequence.h> +#include <corsika/process/StackProcess.h> +#include <corsika/process/conex_source_cut/CONEXSourceCut.h> +#include <corsika/process/energy_loss/EnergyLoss.h> +#include <corsika/process/longitudinal_profile/LongitudinalProfile.h> +#include <corsika/process/observation_plane/ObservationPlane.h> +#include <corsika/process/on_shell_check/OnShellCheck.h> +#include <corsika/process/particle_cut/ParticleCut.h> +#include <corsika/process/pythia/Decay.h> +#include <corsika/process/sibyll/Decay.h> +#include <corsika/process/sibyll/Interaction.h> +#include <corsika/process/sibyll/NuclearInteraction.h> +#include <corsika/process/tracking_line/TrackingLine.h> +#include <corsika/process/urqmd/UrQMD.h> +#include <corsika/random/RNGManager.h> +#include <corsika/setup/SetupStack.h> +#include <corsika/setup/SetupTrajectory.h> +#include <corsika/units/PhysicalUnits.h> +#include <corsika/utl/CorsikaFenv.h> + +#include <iomanip> +#include <iostream> +#include <limits> +#include <string> + +using namespace corsika; +using namespace corsika::process; +using namespace corsika::units; +using namespace corsika::particles; +using namespace corsika::random; +using namespace corsika::geometry; +using namespace corsika::environment; + +using namespace std; +using namespace corsika::units::si; + +void registerRandomStreams(const int seed) { + random::RNGManager::GetInstance().RegisterRandomStream("cascade"); + random::RNGManager::GetInstance().RegisterRandomStream("qgsjet"); + random::RNGManager::GetInstance().RegisterRandomStream("sibyll"); + random::RNGManager::GetInstance().RegisterRandomStream("pythia"); + random::RNGManager::GetInstance().RegisterRandomStream("urqmd"); + random::RNGManager::GetInstance().RegisterRandomStream("proposal"); + + if (seed == 0) + random::RNGManager::GetInstance().SeedAll(); + else + random::RNGManager::GetInstance().SeedAll(seed); +} + +template <typename T> +using MyExtraEnv = environment::MediumPropertyModel<environment::UniformMagneticField<T>>; + +int main(int argc, char** argv) { + + logging::SetLevel(logging::level::info); + + C8LOG_INFO("hybrid_MC"); + + if (argc < 4) { + std::cerr << "usage: hybrid_MC <A> <Z> <energy/GeV> [seed]" << std::endl; + std::cerr << " if no seed is given, a random seed is chosen" << std::endl; + return 1; + } + feenableexcept(FE_INVALID); + + int seed = 0; + if (argc > 4) seed = std::stoi(std::string(argv[4])); + // initialize random number sequence(s) + registerRandomStreams(seed); + + // setup environment, geometry + using EnvType = setup::Environment; + EnvType env; + const CoordinateSystem& rootCS = env.GetCoordinateSystem(); + Point const center{rootCS, 0_m, 0_m, 0_m}; + auto builder = environment::make_layered_spherical_atmosphere_builder< + setup::EnvironmentInterface, + MyExtraEnv>::create(center, units::constants::EarthRadius::Mean, + environment::Medium::AirDry1Atm, + geometry::Vector{rootCS, 0_T, 0_T, 1_T}); + builder.setNuclearComposition( + {{particles::Code::Nitrogen, particles::Code::Oxygen}, + {0.7847f, 1.f - 0.7847f}}); // values taken from AIRES manual, Ar removed for now + + builder.addExponentialLayer(1222.6562_g / (1_cm * 1_cm), 994186.38_cm, 4_km); + builder.addExponentialLayer(1144.9069_g / (1_cm * 1_cm), 878153.55_cm, 10_km); + builder.addExponentialLayer(1305.5948_g / (1_cm * 1_cm), 636143.04_cm, 40_km); + builder.addExponentialLayer(540.1778_g / (1_cm * 1_cm), 772170.16_cm, 100_km); + builder.addLinearLayer(1e9_cm, 112.8_km); + builder.assemble(env); + + // setup particle stack, and add primary particle + setup::Stack stack; + stack.Clear(); + const Code beamCode = Code::Nucleus; + unsigned short const A = std::stoi(std::string(argv[1])); + unsigned short Z = std::stoi(std::string(argv[2])); + auto const mass = particles::GetNucleusMass(A, Z); + const HEPEnergyType E0 = 1_GeV * std::stof(std::string(argv[3])); + double theta = 0.; + auto const thetaRad = theta / 180. * M_PI; + + auto elab2plab = [](HEPEnergyType Elab, HEPMassType m) { + return sqrt((Elab - m) * (Elab + m)); + }; + HEPMomentumType P0 = elab2plab(E0, mass); + auto momentumComponents = [](double thetaRad, HEPMomentumType ptot) { + return std::make_tuple(ptot * sin(thetaRad), 0_eV, -ptot * cos(thetaRad)); + }; + + auto const [px, py, pz] = momentumComponents(thetaRad, P0); + auto plab = corsika::stack::MomentumVector(rootCS, {px, py, pz}); + cout << "input particle: " << beamCode << endl; + cout << "input angles: theta=" << theta << endl; + cout << "input momentum: " << plab.GetComponents() / 1_GeV << ", norm = " << plab.norm() + << endl; + + auto const observationHeight = 0_km + builder.getEarthRadius(); + auto const injectionHeight = 112.75_km + builder.getEarthRadius(); + auto const t = -observationHeight * cos(thetaRad) + + sqrt(-units::static_pow<2>(sin(thetaRad) * observationHeight) + + units::static_pow<2>(injectionHeight)); + Point const showerCore{rootCS, 0_m, 0_m, observationHeight}; + Point const injectionPos = + showerCore + + Vector<dimensionless_d>{rootCS, {-sin(thetaRad), 0, cos(thetaRad)}} * t; + + std::cout << "point of injection: " << injectionPos.GetCoordinates() << std::endl; + + if (A != 1) { + stack.AddParticle(std::tuple<particles::Code, units::si::HEPEnergyType, + corsika::stack::MomentumVector, geometry::Point, + units::si::TimeType, unsigned short, unsigned short>{ + beamCode, E0, plab, injectionPos, 0_ns, A, Z}); + + } else { + stack.AddParticle( + std::tuple<particles::Code, units::si::HEPEnergyType, + corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{ + particles::Code::Proton, E0, plab, injectionPos, 0_ns}); + } + + std::cout << "shower axis length: " << (showerCore - injectionPos).norm() * 1.02 + << std::endl; + + environment::ShowerAxis const showerAxis{injectionPos, + (showerCore - injectionPos) * 1.02, env}; + + // setup processes, decays and interactions + + process::sibyll::Interaction sibyll; + process::interaction_counter::InteractionCounter sibyllCounted(sibyll); + + process::sibyll::NuclearInteraction sibyllNuc(sibyll, env); + process::interaction_counter::InteractionCounter sibyllNucCounted(sibyllNuc); + + process::pythia::Decay decayPythia; + + // use sibyll decay routine for decays of particles unknown to pythia + process::sibyll::Decay decaySibyll{{ + Code::N1440Plus, + Code::N1440MinusBar, + Code::N1440_0, + Code::N1440_0Bar, + Code::N1710Plus, + Code::N1710MinusBar, + Code::N1710_0, + Code::N1710_0Bar, + + Code::Pi1300Plus, + Code::Pi1300Minus, + Code::Pi1300_0, + + Code::KStar0_1430_0, + Code::KStar0_1430_0Bar, + Code::KStar0_1430_Plus, + Code::KStar0_1430_MinusBar, + }}; + + decaySibyll.PrintDecayConfig(); + + process::particle_cut::ParticleCut cut{60_GeV, false, true}; + process::energy_loss::EnergyLoss eLoss{showerAxis, cut.GetECut()}; + + corsika::process::conex_source_cut::CONEXSourceCut conex( + center, showerAxis, t, injectionHeight, E0, + particles::GetPDG(particles::Code::Proton)); + + process::on_shell_check::OnShellCheck reset_particle_mass(1.e-3, 1.e-1, false); + + process::longitudinal_profile::LongitudinalProfile longprof{showerAxis}; + + Plane const obsPlane(showerCore, Vector<dimensionless_d>(rootCS, {0., 0., 1.})); + process::observation_plane::ObservationPlane observationLevel(obsPlane, + "particles.dat"); + + process::UrQMD::UrQMD urqmd; + process::interaction_counter::InteractionCounter urqmdCounted{urqmd}; + + // assemble all processes into an ordered process list + struct EnergySwitch { + HEPEnergyType cutE_; + EnergySwitch(HEPEnergyType cutE) + : cutE_(cutE) {} + process::SwitchResult operator()(const setup::Stack::ParticleType& p) { + if (p.GetEnergy() < cutE_) + return process::SwitchResult::First; + else + return process::SwitchResult::Second; + } + }; + auto hadronSequence = + process::select(urqmdCounted, process::sequence(sibyllNucCounted, sibyllCounted), + EnergySwitch(55_GeV)); + auto decaySequence = process::sequence(decayPythia, decaySibyll); + auto sequence = process::sequence(hadronSequence, reset_particle_mass, decaySequence, + eLoss, cut, conex, longprof, observationLevel); + + // define air shower object, run simulation + tracking_line::TrackingLine tracking; + cascade::Cascade EAS(env, tracking, sequence, stack); + + // to fix the point of first interaction, uncomment the following two lines: + // EAS.SetNodes(); + // EAS.forceInteraction(); + + EAS.Run(); + + cut.ShowResults(); + eLoss.showResults(); + observationLevel.ShowResults(); + const HEPEnergyType Efinal = cut.GetCutEnergy() + cut.GetInvEnergy() + + cut.GetEmEnergy() + eLoss.energyLost() + + observationLevel.GetEnergyGround(); + cout << "total cut energy (GeV): " << Efinal / 1_GeV << endl + << "relative difference (%): " << (Efinal / E0 - 1) * 100 << endl; + observationLevel.Reset(); + cut.Reset(); + eLoss.reset(); + + conex.SolveCE(); + + auto const hists = sibyllCounted.GetHistogram() + sibyllNucCounted.GetHistogram() + + urqmdCounted.GetHistogram(); + + hists.saveLab("inthist_lab.txt"); + hists.saveCMS("inthist_cms.txt"); + + hists.saveLab("inthist_lab.txt"); + hists.saveCMS("inthist_cms.txt"); + + longprof.save("longprof.txt"); + + std::ofstream finish("finished"); + finish << "run completed without error" << std::endl; +} diff --git a/Documentation/Examples/vertical_EAS.cc b/Documentation/Examples/vertical_EAS.cc index 14eeea8b94560f4f7233c8d385606702fd5e6294..c6f2dbe6111e7141f2880e320c83a4bdead4a030 100644 --- a/Documentation/Examples/vertical_EAS.cc +++ b/Documentation/Examples/vertical_EAS.cc @@ -53,7 +53,6 @@ using namespace corsika::process; using namespace corsika::units; using namespace corsika::particles; using namespace corsika::random; -using namespace corsika::setup; using namespace corsika::geometry; using namespace corsika::environment; @@ -76,6 +75,9 @@ void registerRandomStreams(const int seed) { random::RNGManager::GetInstance().SeedAll(seed); } +template <typename T> +using MyExtraEnv = environment::MediumPropertyModel<environment::UniformMagneticField<T>>; + int main(int argc, char** argv) { logging::SetLevel(logging::level::info); @@ -95,11 +97,15 @@ int main(int argc, char** argv) { registerRandomStreams(seed); // setup environment, geometry - using EnvType = Environment<setup::IEnvironmentModel>; + using EnvType = setup::Environment; EnvType env; const CoordinateSystem& rootCS = env.GetCoordinateSystem(); Point const center{rootCS, 0_m, 0_m, 0_m}; - environment::LayeredSphericalAtmosphereBuilder builder{center}; + auto builder = environment::make_layered_spherical_atmosphere_builder< + setup::EnvironmentInterface, + MyExtraEnv>::create(center, units::constants::EarthRadius::Mean, + environment::Medium::AirDry1Atm, + geometry::Vector{rootCS, 0_T, 0_T, 1_T}); builder.setNuclearComposition( {{particles::Code::Nitrogen, particles::Code::Oxygen}, {0.7847f, 1.f - 0.7847f}}); // values taken from AIRES manual, Ar removed for now @@ -109,7 +115,6 @@ int main(int argc, char** argv) { builder.addExponentialLayer(1305.5948_g / (1_cm * 1_cm), 636143.04_cm, 40_km); builder.addExponentialLayer(540.1778_g / (1_cm * 1_cm), 772170.16_cm, 100_km); builder.addLinearLayer(1e9_cm, 112.8_km); - builder.assemble(env); // setup particle stack, and add primary particle @@ -245,16 +250,16 @@ int main(int argc, char** argv) { EAS.Run(); cut.ShowResults(); - em_continuous.ShowResults(); + em_continuous.showResults(); observationLevel.ShowResults(); const HEPEnergyType Efinal = cut.GetCutEnergy() + cut.GetInvEnergy() + - cut.GetEmEnergy() + em_continuous.GetEnergyLost() + + cut.GetEmEnergy() + em_continuous.energyLost() + observationLevel.GetEnergyGround(); cout << "total cut energy (GeV): " << Efinal / 1_GeV << endl << "relative difference (%): " << (Efinal / E0 - 1) * 100 << endl; observationLevel.Reset(); cut.Reset(); - em_continuous.Reset(); + em_continuous.reset(); auto const hists = sibyllCounted.GetHistogram() + sibyllNucCounted.GetHistogram() + urqmdCounted.GetHistogram() + proposalCounted.GetHistogram(); diff --git a/Environment/CMakeLists.txt b/Environment/CMakeLists.txt index f0adcf74a8fcbd55abf8eaec6b75a42700630f6d..c02aa95868b68b5c0304e1b76287b084a6b0debe 100644 --- a/Environment/CMakeLists.txt +++ b/Environment/CMakeLists.txt @@ -1,6 +1,18 @@ +add_custom_command ( + OUTPUT ${PROJECT_BINARY_DIR}/Environment/GeneratedMediaProperties.inc + COMMAND ${PROJECT_SOURCE_DIR}/Environment/readProperties.py + ${PROJECT_SOURCE_DIR}/Environment/properties8.dat + DEPENDS readProperties.py + properties8.dat + WORKING_DIRECTORY + ${PROJECT_BINARY_DIR}/Environment + COMMENT "Read NIST properties8 data file and produce C++ source code GeneratedMediaProperties.inc" + VERBATIM + ) + + set ( ENVIRONMENT_SOURCES - LayeredSphericalAtmosphereBuilder.cc ShowerAxis.cc ) @@ -25,6 +37,10 @@ set ( UniformMagneticField.h IRefractiveIndexModel.h UniformRefractiveIndex.h + IMediumPropertyModel.h + MediumProperties.h + MediumPropertyModel.h + ${PROJECT_BINARY_DIR}/Environment/GeneratedMediaProperties.inc # this one is auto-generated ) set ( @@ -43,6 +59,19 @@ set_target_properties ( PUBLIC_HEADER "${ENVIRONMENT_HEADERS}" ) +# .................................................... +# since GeneratedMediaProperties.inc is an automatically produced file in the build directory, +# create a symbolic link into the source tree, so that it can be found and edited more easily +# this is not needed for the build to succeed! ....... +add_custom_command ( + OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/GeneratedParticleProperties.inc + COMMAND ${CMAKE_COMMAND} -E create_symlink ${PROJECT_BINARY_DIR}/include/corsika/environment/GeneratedMediaProperties.inc ${CMAKE_CURRENT_SOURCE_DIR}/GeneratedMediaProperties.inc + COMMENT "Generate link in source-dir: ${CMAKE_CURRENT_SOURCE_DIR}/GeneratedMediaProperties.inc" + ) +add_custom_target (SourceDirLinkMedia DEPENDS ${PROJECT_BINARY_DIR}/Environment/GeneratedMediaProperties.inc) +add_dependencies (CORSIKAenvironment SourceDirLinkMedia) +# ..................................................... + # target dependencies on other libraries (also the header onlys) target_link_libraries ( CORSIKAenvironment diff --git a/Environment/Environment.h b/Environment/Environment.h index ef86670e8e35c1d772ecc88e80b6bfe3c1b84358..774b7492761469affbfc2d6bf326cac5501dbbf2 100644 --- a/Environment/Environment.h +++ b/Environment/Environment.h @@ -38,8 +38,6 @@ namespace corsika::environment { , fUniverse(std::make_unique<BaseNodeType>( std::make_unique<Universe>(fCoordinateSystem))) {} - // using IEnvironmentModel = corsika::setup::IEnvironmentModel; - auto& GetUniverse() { return fUniverse; } auto const& GetUniverse() const { return fUniverse; } @@ -61,7 +59,4 @@ namespace corsika::environment { typename BaseNodeType::VTNUPtr fUniverse; }; - // using SetupBaseNodeType = VolumeTreeNode<corsika::setup::IEnvironmentModel>; - // using SetupEnvironment = Environment<corsika::setup::IEnvironmentModel>; - } // namespace corsika::environment diff --git a/Environment/IMediumPropertyModel.h b/Environment/IMediumPropertyModel.h new file mode 100644 index 0000000000000000000000000000000000000000..759517af71ce73a95bb9fedecf19cbdf4b0ac6ab --- /dev/null +++ b/Environment/IMediumPropertyModel.h @@ -0,0 +1,43 @@ +/* + * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + +#pragma once + +#include <corsika/environment/MediumProperties.h> + +#include <corsika/geometry/Point.h> +#include <corsika/units/PhysicalUnits.h> + +namespace corsika::environment { + + /** + * An interface for type of media, needed e.g. to determine energy losses + * + * This is the base interface for media types. + * + */ + template <typename Model> + class IMediumPropertyModel : public Model { + + public: + /** + * Evaluate the medium type at a given location. + * + * @param point The location to evaluate at. + * @returns The media type + */ + virtual Medium medium(corsika::geometry::Point const&) const = 0; + + /** + * A virtual default destructor. + */ + virtual ~IMediumPropertyModel() = default; + + }; // END: class IMediumTypeModel + +} // namespace corsika::environment diff --git a/Environment/LayeredSphericalAtmosphereBuilder.cc b/Environment/LayeredSphericalAtmosphereBuilder.cc deleted file mode 100644 index 4f5b33857d19718e1b9502b11751e90aec5d1f7c..0000000000000000000000000000000000000000 --- a/Environment/LayeredSphericalAtmosphereBuilder.cc +++ /dev/null @@ -1,83 +0,0 @@ -/* - * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu - * - * This software is distributed under the terms of the GNU General Public - * Licence version 3 (GPL Version 3). See file LICENSE for a full version of - * the license. - */ - -#include <corsika/environment/FlatExponential.h> -#include <corsika/environment/HomogeneousMedium.h> -#include <corsika/environment/LayeredSphericalAtmosphereBuilder.h> -#include <corsika/environment/SlidingPlanarExponential.h> - -using namespace corsika::environment; - -void LayeredSphericalAtmosphereBuilder::checkRadius(units::si::LengthType r) const { - if (r <= previousRadius_) { - throw std::runtime_error("radius must be greater than previous"); - } -} - -void LayeredSphericalAtmosphereBuilder::setNuclearComposition( - NuclearComposition composition) { - composition_ = std::make_unique<NuclearComposition>(composition); -} - -void LayeredSphericalAtmosphereBuilder::addExponentialLayer( - units::si::GrammageType b, units::si::LengthType c, - units::si::LengthType upperBoundary) { - auto const radius = earthRadius_ + upperBoundary; - checkRadius(radius); - previousRadius_ = radius; - - auto node = std::make_unique<VolumeTreeNode<IMediumModel>>( - std::make_unique<geometry::Sphere>(center_, radius)); - - auto const rho0 = b / c; - std::cout << "rho0 = " << rho0 << ", c = " << c << std::endl; - - node->SetModelProperties<SlidingPlanarExponential<IMediumModel>>( - center_, rho0, -c, *composition_, earthRadius_); - - layers_.push(std::move(node)); -} - -void LayeredSphericalAtmosphereBuilder::addLinearLayer( - units::si::LengthType c, units::si::LengthType upperBoundary) { - using namespace units::si; - - auto const radius = earthRadius_ + upperBoundary; - checkRadius(radius); - previousRadius_ = radius; - - units::si::GrammageType constexpr b = 1 * 1_g / (1_cm * 1_cm); - auto const rho0 = b / c; - - std::cout << "rho0 = " << rho0; - - auto node = std::make_unique<VolumeTreeNode<environment::IMediumModel>>( - std::make_unique<geometry::Sphere>(center_, radius)); - node->SetModelProperties<HomogeneousMedium<IMediumModel>>(rho0, *composition_); - - layers_.push(std::move(node)); -} - -Environment<IMediumModel> LayeredSphericalAtmosphereBuilder::assemble() { - Environment<IMediumModel> env; - assemble(env); - return env; -} - -void LayeredSphericalAtmosphereBuilder::assemble(Environment<IMediumModel>& env) { - auto& universe = env.GetUniverse(); - auto* outmost = universe.get(); - - while (!layers_.empty()) { - auto l = std::move(layers_.top()); - auto* tmp = l.get(); - outmost->AddChild(std::move(l)); - layers_.pop(); - outmost = tmp; - } -} diff --git a/Environment/LayeredSphericalAtmosphereBuilder.h b/Environment/LayeredSphericalAtmosphereBuilder.h index ad945cb8461a378145e1d3606461f30711dc69cf..096f9b181cb9596da1b93a844792a3b07cae9ece 100644 --- a/Environment/LayeredSphericalAtmosphereBuilder.h +++ b/Environment/LayeredSphericalAtmosphereBuilder.h @@ -7,52 +7,213 @@ */ #include <corsika/environment/Environment.h> +#include <corsika/environment/FlatExponential.h> +#include <corsika/environment/HomogeneousMedium.h> #include <corsika/environment/IMediumModel.h> #include <corsika/environment/NuclearComposition.h> +#include <corsika/environment/SlidingPlanarExponential.h> #include <corsika/environment/VolumeTreeNode.h> + #include <corsika/geometry/Point.h> #include <corsika/units/PhysicalConstants.h> #include <corsika/units/PhysicalUnits.h> +#include <functional> #include <memory> #include <stack> +#include <tuple> +#include <type_traits> namespace corsika::environment { + // forward-decl + template <typename TMediumInterface, template <typename> typename MExtraEnvirnoment> + struct make_layered_spherical_atmosphere_builder; + + /** + * Helper class to setup concentric spheres of layered atmosphere + * with spcified density profiles (exponential, linear, ...). + * + * This can be used most importantly to replicate CORSIKA7 + * atmospheres. + * + * Each layer by definition has a density profile and a (constant) + * nuclear composition model. + * + */ + + namespace detail { + + struct NoExtraModelInner {}; + + template <typename M> + struct NoExtraModel {}; + + template <template <typename> typename M> + struct has_extra_models : std::true_type {}; + + template <> + struct has_extra_models<NoExtraModel> : std::false_type {}; + + } // namespace detail + + template <typename TMediumInterface = environment::IMediumModel, + template <typename> typename TMediumModelExtra = detail::NoExtraModel, + typename... TModelArgs> class LayeredSphericalAtmosphereBuilder { std::unique_ptr<NuclearComposition> composition_; geometry::Point center_; units::si::LengthType previousRadius_{units::si::LengthType::zero()}; units::si::LengthType earthRadius_; + std::tuple<TModelArgs...> const additionalModelArgs_; - std::stack<VolumeTreeNode<environment::IMediumModel>::VTNUPtr> + std::stack<typename VolumeTreeNode<TMediumInterface>::VTNUPtr> layers_; // innermost layer first - void checkRadius(units::si::LengthType) const; + void checkRadius(units::si::LengthType r) const { + if (r <= previousRadius_) { + throw std::runtime_error("radius must be greater than previous"); + } + } - public: - LayeredSphericalAtmosphereBuilder( - corsika::geometry::Point center, - units::si::LengthType earthRadius = units::constants::EarthRadius::Mean) + LayeredSphericalAtmosphereBuilder() = delete; + LayeredSphericalAtmosphereBuilder(const LayeredSphericalAtmosphereBuilder&) = delete; + LayeredSphericalAtmosphereBuilder(const LayeredSphericalAtmosphereBuilder&&) = delete; + LayeredSphericalAtmosphereBuilder& operator=( + const LayeredSphericalAtmosphereBuilder&) = delete; + + // friend, to allow construction + template <typename, template <typename> typename> + friend struct make_layered_spherical_atmosphere_builder; + + protected: + LayeredSphericalAtmosphereBuilder(TModelArgs... args, corsika::geometry::Point center, + units::si::LengthType earthRadius) : center_(center) - , earthRadius_(earthRadius) {} + , earthRadius_(earthRadius) + , additionalModelArgs_{args...} {} + + public: + void setNuclearComposition(NuclearComposition composition) { + composition_ = std::make_unique<NuclearComposition>(composition); + } + + void addExponentialLayer(units::si::GrammageType b, units::si::LengthType c, + units::si::LengthType upperBoundary) { + using namespace units::si; + + auto const radius = earthRadius_ + upperBoundary; + checkRadius(radius); + previousRadius_ = radius; - void setNuclearComposition(NuclearComposition); + auto node = std::make_unique<VolumeTreeNode<TMediumInterface>>( + std::make_unique<geometry::Sphere>(center_, radius)); - void addExponentialLayer(units::si::GrammageType, units::si::LengthType, - units::si::LengthType); + auto const rho0 = b / c; + std::cout << "rho0 = " << rho0 << ", c = " << c << std::endl; - auto size() const { return layers_.size(); } + if constexpr (detail::has_extra_models<TMediumModelExtra>::value) { + // helper lambda in which the last 5 arguments to make_shared<...> are bound + auto lastBound = [&](auto... argPack) { + return std::make_shared< + TMediumModelExtra<environment::SlidingPlanarExponential<TMediumInterface>>>( + argPack..., center_, rho0, -c, *composition_, earthRadius_); + }; - void addLinearLayer(units::si::LengthType, units::si::LengthType); + // now unpack the additional arguments + auto model = std::apply(lastBound, additionalModelArgs_); + node->SetModelProperties(std::move(model)); + } else { + node->template SetModelProperties<SlidingPlanarExponential<TMediumInterface>>( + center_, rho0, -c, *composition_, earthRadius_); + } - void assemble(Environment<IMediumModel>&); - Environment<IMediumModel> assemble(); + layers_.push(std::move(node)); + } + + void addLinearLayer(units::si::LengthType c, units::si::LengthType upperBoundary) { + using namespace units::si; + + auto const radius = earthRadius_ + upperBoundary; + checkRadius(radius); + previousRadius_ = radius; + + auto node = std::make_unique<VolumeTreeNode<TMediumInterface>>( + std::make_unique<geometry::Sphere>(center_, radius)); + + units::si::GrammageType constexpr b = 1 * 1_g / (1_cm * 1_cm); + auto const rho0 = b / c; + + std::cout << "rho0 = " << rho0; + + if constexpr (detail::has_extra_models<TMediumModelExtra>::value) { + // helper lambda in which the last 2 arguments to make_shared<...> are bound + auto lastBound = [&](auto... argPack) { + return std::make_shared< + TMediumModelExtra<environment::HomogeneousMedium<TMediumInterface>>>( + argPack..., rho0, *composition_); + }; + + // now unpack the additional arguments + auto model = std::apply(lastBound, additionalModelArgs_); + + node->SetModelProperties(std::move(model)); + } else { + node->template SetModelProperties< + environment::HomogeneousMedium<TMediumInterface>>(rho0, *composition_); + } + + layers_.push(std::move(node)); + } + + int size() const { return layers_.size(); } + + void assemble(Environment<TMediumInterface>& env) { + auto& universe = env.GetUniverse(); + auto* outmost = universe.get(); + + while (!layers_.empty()) { + auto l = std::move(layers_.top()); + auto* tmp = l.get(); + outmost->AddChild(std::move(l)); + layers_.pop(); + outmost = tmp; + } + } + + Environment<TMediumInterface> assemble() { + Environment<TMediumInterface> env; + assemble(env); + return env; + } /** * Get the current Earth radius. */ - units::si::LengthType getEarthRadius() const { return earthRadius_; }; + units::si::LengthType getEarthRadius() const { return earthRadius_; } + + }; // end class LayeredSphericalAtmosphereBuilder + + /** + * \class make_layered_spherical_atmosphere_builder + * + * Helper class to create LayeredSphericalAtmosphereBuilder, the + * extra environment models have to be passed as template-template + * argument to make_layered_spherical_atmosphere_builder, the member + * function `create` does then take an unspecified number of extra + * parameters to internalize those models for all layers later + * produced. + **/ + template <typename TMediumInterface = environment::IMediumModel, + template <typename> typename MExtraEnvirnoment = detail::NoExtraModel> + struct make_layered_spherical_atmosphere_builder { + template <typename... TArgs> + static auto create(geometry::Point const& center, units::si::LengthType earthRadius, + TArgs... args) { + return environment::LayeredSphericalAtmosphereBuilder<TMediumInterface, + MExtraEnvirnoment, TArgs...>{ + std::forward<TArgs>(args)..., center, earthRadius}; + } }; } // namespace corsika::environment diff --git a/Environment/MediumProperties.h b/Environment/MediumProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..969f34c0c51734e96e75a1c8a218269789b3afdc --- /dev/null +++ b/Environment/MediumProperties.h @@ -0,0 +1,92 @@ +/* + * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + +#pragma once + +namespace corsika::environment { + + /** + * Medium types are useful most importantly for effective models + * like energy losses. a particular medium (mixture of components) + * may have specif properties not reflected by its mixture of + * components. + **/ + + enum class MediumType { + Unknown, + Element, + RadioactiveElement, + InorganicCompound, + OrganicCompound, + Polymer, + Mixture, + BiologicalDosimetry + }; + + enum class State { Unknown, Solid, Liquid, Gas, DiatomicGas }; + + enum class Medium : int16_t; + using MediumIntType = std::underlying_type<Medium>::type; + + /** + * \struct MediumData + * + * Simple object to group together a number of properties + * + **/ + struct MediumData { + std::string name_; + std::string pretty_name_; + double weight_; + int weight_significant_figure_; + int weight_error_last_digit_; + double Z_over_A_; + double sternheimer_density_; + double corrected_density_; + State state_; + MediumType type_; + std::string symbol_; + double Ieff_; + double Cbar_; + double x0_; + double x1_; + double aa_; + double sk_; + double dlt0_; + + std::string name() const { return name_; } + std::string pretty_name() const { return pretty_name_; } + double weight() const { return weight_; } + int weight_significant_figure() const { return weight_significant_figure_; } + int weight_error_last_digit() const { return weight_error_last_digit_; } + double Z_over_A() const { return Z_over_A_; } + double sternheimer_density() const { return sternheimer_density_; } + double corrected_density() const { return corrected_density_; } + State state() const { return state_; } + MediumType type() const { return type_; } + std::string symbol() const { return symbol_; } + double Ieff() const { return Ieff_; } + double Cbar() const { return Cbar_; } + double x0() const { return x0_; } + double x1() const { return x1_; } + double aa() const { return aa_; } + double sk() const { return sk_; } + double dlt0() const { return dlt0_; } + }; + +} // namespace corsika::environment + +#include <corsika/environment/GeneratedMediaProperties.inc> + +namespace corsika::environment { + + constexpr MediumData const& mediumData(Medium const m) { + return detail::medium_data[static_cast<MediumIntType>(m)]; + } + +} // namespace corsika::environment diff --git a/Environment/MediumPropertyModel.h b/Environment/MediumPropertyModel.h new file mode 100644 index 0000000000000000000000000000000000000000..bf05be4dcae04c5d56f1291e1e8caa886480a82b --- /dev/null +++ b/Environment/MediumPropertyModel.h @@ -0,0 +1,55 @@ +/* + * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu + * + * This software is distributed under the terms of the GNU General Public + * Licence version 3 (GPL Version 3). See file LICENSE for a full version of + * the license. + */ + +#pragma once + +#include <corsika/environment/IMediumPropertyModel.h> + +namespace corsika::environment { + + /** + * A uniform refractive index. + * + * This class returns the same refractive index + * for all evaluated locations. + * + */ + template <typename T> + class MediumPropertyModel : public T { + + Medium medium_; ///< The medium code + + public: + /** + * Construct a MediumPropertyModel + * + * This is initialized with a fixed refractive index + * and returns this refractive index at all locations. + * + * @param field The refractive index to return everywhere. + */ + template <typename... Args> + MediumPropertyModel(const Medium medium, Args&&... args) + : T(std::forward<Args>(args)...) + , medium_(medium) {} + + /** + * Evaluate the medium type at a given location. + * + * @param point The location to evaluate at. + * @returns The medium type as enum environment::Medium + */ + Medium medium(corsika::geometry::Point const&) const final override { + return medium_; + } + + void set_medium(Medium v) { medium_ = v; } + + }; // END: class MediumPropertyModel + +} // namespace corsika::environment diff --git a/Environment/VolumeTreeNode.h b/Environment/VolumeTreeNode.h index 523eac4ecfc8861f33a4e0e8d3361b2224085d52..3acb988e85dbf2f097cf2c3517202af3cf65166f 100644 --- a/Environment/VolumeTreeNode.h +++ b/Environment/VolumeTreeNode.h @@ -107,7 +107,7 @@ namespace corsika::environment { template <typename ModelProperties, typename... Args> auto SetModelProperties(Args&&... args) { static_assert(std::is_base_of_v<IModelProperties, ModelProperties>, - "unusable type provided"); + "unusable model properties type provided"); fModelProperties = std::make_shared<ModelProperties>(std::forward<Args>(args)...); return fModelProperties; diff --git a/Environment/properties8.dat b/Environment/properties8.dat new file mode 100644 index 0000000000000000000000000000000000000000..2881bb194a91fd2366371f322d131c077ab6c6d5 --- /dev/null +++ b/Environment/properties8.dat @@ -0,0 +1,2917 @@ + 1 Hydro 3 1.0080000000 7 0.99212 8.3748E-05 8.3755E-05 D 1 1 4 E +H hydrogen_gas +hydrogen gas (H%2#) + 19.2 9.5835 1.8639 3.2718 0.14092 5.7273 0.00 + 1 1.000000 1.000000 +Boiling point -252.87 20.267 K +Melting point -259.34 13.82 K +Index of ref (n-1)*E6 132.0 http://www.kayelaby.npl.co.uk/ +Note: The mass of atomic <SUP>1</SUP>H is 1.007 276 522 6 (13) u (mass of the proton less binding energy of 13.61 eV = 1.461E-09 u). +---------------------------------------------------------------------------- + 2 Heliu 6 4.0026020000 2 0.49967 1.6632E-04 1.6632E-04 G 1 1 2 E +He helium_gas_He +helium gas (He) + 41.8 11.1393 2.2017 3.6122 0.13443 5.8347 0.00 + 2 1.000000 1.000000 +Boiling point -268.93 +Index of ref (n-1)*E6 35.0 http://www.kayelaby.npl.co.uk/ +---------------------------------------------------------------------------- + 3 Lithi 2 6.9400000000 2 0.43221 5.3400E-01 5.3400E-01 S 1 1 2 E +Li lithium_Li +lithium (Li) + 40.0 3.1221 0.1304 1.6397 0.95136 2.4993 0.14 + 3 1.000000 1.000000 +melting point 180.5 +boiling point 1342. +---------------------------------------------------------------------------- + 4 Beryl 7 9.0121831000 5 0.44384 1.8480E+00 1.8480E+00 S 1 1 2 E +Be beryllium_Be +beryllium (Be) + 63.7 2.7847 0.0592 1.6922 0.80392 2.4339 0.14 + 4 1.000000 1.000000 +melting point 1287. +boiling point 2471. +---------------------------------------------------------------------------- + 5 Boron 2 10.8100000000 7 0.46249 2.3700E+00 2.3700E+00 S 1 1 0 E +B boron_B +boron (B) + 76.0 2.8477 0.0305 1.9688 0.56224 2.4512 0.14 + 5 1.000000 1.000000 +---------------------------------------------------------------------------- + 6 Carbo 4 12.0107000000 8 0.49955 2.0000E+00 2.0000E+00 S 1 1 0 E +C carbon_amorphous_C +carbon (amorphous) (C) + 78.0 2.9925 -0.0351 2.4860 0.20240 3.0036 0.10 + 6 1.000000 1.000000 +---------------------------------------------------------------------------- + 7 Nitro 3 14.0070000000 2 0.49976 1.1653E-03 1.1653E-03 D 1 1 3 E +N nitrogen_gas +nitrogen gas (N%2#) + 82.0 10.5400 1.7378 4.1323 0.15349 3.2125 0.00 + 7 1.000000 1.000000 +Melting point (C) -210.00 +Boiling point (C) -195.86 +Index of ref (n-1)*E6 298.0 http://www.kayelaby.npl.co.uk/ +---------------------------------------------------------------------------- + 8 Oxyge 3 15.9990000000 3 0.50002 1.3315E-03 1.3315E-03 D 1 1 3 E +O oxygen_gas +oxygen gas (O%2#) + 95.0 10.7004 1.7541 4.3213 0.11778 3.2913 0.00 + 8 1.000000 1.000000 +Melting point (C) -218.79 +Boiling point (C) -182.95 +Index of ref (n-1)*E6 271.0 http://www.kayelaby.npl.co.uk/ +---------------------------------------------------------------------------- + 9 Fluor 9 18.9984031630 6 0.47372 1.5803E-03 1.5803E-03 D 1 1 3 E +F fluorine_gas +fluorine gas (F%2#) + 115.0 10.9653 1.8433 4.4096 0.11083 3.2962 0.00 + 9 1.000000 1.000000 +Melting point -219.62 +Boiling point -188.12 +Index ref (n-1) 195. +---------------------------------------------------------------------------- + 10 Neon 4 20.1797000000 6 0.49555 8.3851E-04 8.3851E-04 G 1 1 3 E +Ne neon_gas_Ne +neon gas (Ne) + 137.0 11.9041 2.0735 4.6421 0.08064 3.5771 0.00 + 10 1.000000 1.000000 +Boiling point -246.08 +Melting point -248.59 +Index ref 67.1 +---------------------------------------------------------------------------- + 11 Sodiu 8 22.9897692800 2 0.47847 9.7100E-01 9.7100E-01 S 1 1 0 E +Na sodium_Na +sodium (Na) + 149.0 5.0526 0.2880 3.1962 0.07772 3.6452 0.08 + 11 1.000000 1.000000 +---------------------------------------------------------------------------- + 12 Magne 3 24.3050000000 6 0.49373 1.7400E+00 1.7400E+00 S 1 1 0 E +Mg magnesium_Mg +magnesium (Mg) + 156.0 4.5297 0.1499 3.0668 0.08163 3.6166 0.08 + 12 1.000000 1.000000 +---------------------------------------------------------------------------- + 13 Alumi 7 26.9815385000 7 0.48181 2.6989E+00 2.6989E+00 S 1 1 2 E +Al aluminum_Al +aluminum (Al) + 166.0 4.2395 0.1708 3.0127 0.08024 3.6345 0.12 + 13 1.000000 1.000000 +melti 660.32 Aluminum +boili 2519. Aluminum +---------------------------------------------------------------------------- + 14 Silic 4 28.0855000000 3 0.49848 2.3300E+00 2.3290E+00 S 1 1 3 E +Si silicon_Si +silicon (Si) + 173.0 4.4351 0.2014 2.8715 0.14921 3.2546 0.14 + 14 1.000000 1.000000 +Index of ref 3.95 +Melting point 1414. +Boiling point 3265. +---------------------------------------------------------------------------- + 15 Phosp 9 30.9737619980 5 0.48428 2.2000E+00 2.2000E+00 S 1 1 0 E +P phosphorus_P +phosphorus (P) + 173.0 4.5214 0.1696 2.7815 0.23610 2.9158 0.14 + 15 1.000000 1.000000 +---------------------------------------------------------------------------- + 16 Sulfu 3 32.0650000000 5 0.49899 2.0000E+00 2.0000E+00 S 1 1 0 E +S sulfur_S +sulfur (S) + 180.0 4.6659 0.1580 2.7159 0.33992 2.6456 0.14 + 16 1.000000 1.000000 +---------------------------------------------------------------------------- + 17 Chlor 3 35.4530000000 2 0.47951 2.9947E-03 2.9800E-03 D 1 1 3 E +Cl chlorine_gas +chlorine gas (Cl%2#) + 174.0 11.1421 1.5555 4.2994 0.19849 2.9702 0.00 + 17 1.000000 1.000000 +Melting point -101.5 +Boiling point -34.04 +Index of ref (n-1)*E6 773.0 http://www.kayelaby.npl.co.uk/ +---------------------------------------------------------------------------- + 18 Argon 3 39.9480000000 1 0.45059 1.6620E-03 1.6620E-03 G 1 1 3 E +Ar argon_gas_Ar +argon gas (Ar) + 188.0 11.9480 1.7635 4.4855 0.19714 2.9618 0.00 + 18 1.000000 1.000000 +Boiling point -185.89 +Melting point -189.3442 +Index of ref (n-1)*E6 281.0 http://www.kayelaby.npl.co.uk/ +---------------------------------------------------------------------------- + 19 Potas 4 39.0983000000 1 0.48595 8.6200E-01 8.6200E-01 S 1 1 0 E +K potassium_K +potassium (K) + 190.0 5.6423 0.3851 3.1724 0.19827 2.9233 0.10 + 19 1.000000 1.000000 +---------------------------------------------------------------------------- + 20 Calci 3 40.0780000000 4 0.49903 1.5500E+00 1.5500E+00 S 1 1 0 E +Ca calcium_Ca +calcium (Ca) + 191.0 5.0396 0.3228 3.1191 0.15643 3.0745 0.14 + 20 1.000000 1.000000 +---------------------------------------------------------------------------- + 21 Scand 6 44.9559080000 5 0.46712 2.9890E+00 2.9890E+00 S 1 1 0 E +Sc scandium_Sc +scandium (Sc) + 216.0 4.6949 0.1640 3.0593 0.15754 3.0517 0.10 + 21 1.000000 1.000000 +---------------------------------------------------------------------------- + 22 Titan 3 47.8670000000 1 0.45961 4.5400E+00 4.5400E+00 S 1 1 2 E +Ti titanium_Ti +titanium (Ti) + 233.0 4.4450 0.0957 3.0386 0.15662 3.0302 0.12 + 22 1.000000 1.000000 +melti 1668. Titanium +boili 3287. Titanium +---------------------------------------------------------------------------- + 23 Vanad 4 50.9415000000 1 0.45150 6.1100E+00 6.1100E+00 S 1 1 0 E +V vanadium_V +vanadium (V) + 245.0 4.2659 0.0691 3.0322 0.15436 3.0163 0.14 + 23 1.000000 1.000000 +---------------------------------------------------------------------------- + 24 Chrom 4 51.9961000000 6 0.46157 7.1800E+00 7.1800E+00 S 1 1 0 E +Cr chromium_Cr +chromium (Cr) + 257.0 4.1781 0.0340 3.0451 0.15419 2.9896 0.14 + 24 1.000000 1.000000 +---------------------------------------------------------------------------- + 25 Manga 6 54.9380440000 3 0.45506 7.4400E+00 7.4400E+00 S 1 1 0 E +Mn manganese_Mn +manganese (Mn) + 272.0 4.2702 0.0447 3.1074 0.14973 2.9796 0.14 + 25 1.000000 1.000000 +---------------------------------------------------------------------------- + 26 Iron 3 55.8450000000 2 0.46557 7.8740E+00 7.8740E+00 S 1 1 2 E +Fe iron_Fe +iron (Fe) + 286.0 4.2911 -0.0012 3.1531 0.14680 2.9632 0.12 + 26 1.000000 1.000000 +Melting point C 1538. +Boiling point C 2861. +---------------------------------------------------------------------------- + 27 Cobal 6 58.9331940000 4 0.45815 8.9000E+00 8.9000E+00 S 1 1 0 E +Co cobalt_Co +cobalt (Co) + 297.0 4.2601 -0.0187 3.1790 0.14474 2.9502 0.12 + 27 1.000000 1.000000 +---------------------------------------------------------------------------- + 28 Nicke 4 58.6934000000 4 0.47706 8.9020E+00 8.9020E+00 S 1 1 0 E +Ni nickel_Ni +nickel (Ni) + 311.0 4.3115 -0.0566 3.1851 0.16496 2.8430 0.10 + 28 1.000000 1.000000 +---------------------------------------------------------------------------- + 29 Coppe 3 63.5460000000 3 0.45636 8.9600E+00 8.9600E+00 S 1 1 2 E +Cu copper_Cu +copper (Cu) + 322.0 4.4190 -0.0254 3.2792 0.14339 2.9044 0.08 + 29 1.000000 1.000000 +melti 1084.62 Copper +boili 2562. Copper +---------------------------------------------------------------------------- + 30 Zinc 2 65.3800000000 2 0.45886 7.1330E+00 7.1330E+00 S 1 1 0 E +Zn zinc_Zn +zinc (Zn) + 330.0 4.6906 0.0049 3.3668 0.14714 2.8652 0.08 + 30 1.000000 1.000000 +---------------------------------------------------------------------------- + 31 Galli 3 69.7230000000 1 0.44462 5.9040E+00 5.9040E+00 S 1 1 0 E +Ga gallium_Ga +gallium (Ga) + 334.0 4.9353 0.2267 3.5434 0.09440 3.1314 0.14 + 31 1.000000 1.000000 +---------------------------------------------------------------------------- + 32 Germa 3 72.6300000000 1 0.44053 5.3230E+00 5.3230E+00 S 1 1 2 E +Ge germanium_Ge +germanium (Ge) + 350.0 5.1411 0.3376 3.6096 0.07188 3.3306 0.14 + 32 1.000000 1.000000 +melti 938.25 Germanium +boili 2833. Germanium +---------------------------------------------------------------------------- + 33 Arsen 6 74.9215950000 6 0.44046 5.7300E+00 5.7300E+00 S 1 1 0 E +As arsenic_As +arsenic (As) + 347.0 5.0510 0.1767 3.5702 0.06633 3.4176 0.08 + 33 1.000000 1.000000 +---------------------------------------------------------------------------- + 34 Selen 3 78.9710000000 8 0.43060 4.5000E+00 4.5000E+00 S 1 1 0 E +Se selenium_Se +selenium (Se) + 348.0 5.3210 0.2258 3.6264 0.06568 3.4317 0.10 + 34 1.000000 1.000000 +---------------------------------------------------------------------------- + 35 Bromi 3 79.9040000000 1 0.43803 7.0722E-03 7.0722E-03 D 1 1 2 E +Br bromine_gas +bromine gas (Br%2#) + 343.0 11.7307 1.5262 4.9899 0.06335 3.4670 0.00 + 35 1.000000 1.000000 +melting point -7.2 +boiling point 58.78 +---------------------------------------------------------------------------- + 36 Krypt 3 83.7980000000 2 0.42960 3.4783E-03 3.4856E-03 G 1 1 2 E +Kr krypton_gas_Kr +krypton gas (Kr) + 352.0 12.5115 1.7158 5.0748 0.07446 3.4051 0.00 + 36 1.000000 1.000000 +melting point -157.36 +boiling point -153.22 +---------------------------------------------------------------------------- + 37 Rubid 4 85.4678000000 3 0.43291 1.5320E+00 1.5320E+00 S 1 1 0 E +Rb rubidium_Rb +rubidium (Rb) + 363.0 6.4776 0.5737 3.7995 0.07261 3.4177 0.14 + 37 1.000000 1.000000 +---------------------------------------------------------------------------- + 38 Stron 2 87.6200000000 1 0.43369 2.5400E+00 2.5400E+00 S 1 1 0 E +Sr strontium_Sr +strontium (Sr) + 366.0 5.9867 0.4585 3.6778 0.07165 3.4435 0.14 + 38 1.000000 1.000000 +---------------------------------------------------------------------------- + 39 Yttri 5 88.9058400000 2 0.43867 4.4690E+00 4.4690E+00 S 1 1 0 E +Y yttrium_Y +yttrium (Y) + 379.0 5.4801 0.3608 3.5542 0.07138 3.4585 0.14 + 39 1.000000 1.000000 +---------------------------------------------------------------------------- + 40 Zirco 3 91.2240000000 2 0.43848 6.5060E+00 6.5060E+00 S 1 1 0 E +Zr zirconium_Zr +zirconium (Zr) + 393.0 5.1774 0.2957 3.4890 0.07177 3.4533 0.14 + 40 1.000000 1.000000 +---------------------------------------------------------------------------- + 41 Niobi 5 92.9063700000 2 0.44130 8.5700E+00 8.5700E+00 S 1 1 0 E +Nb niobium_Nb +niobium (Nb) + 417.0 5.0141 0.1785 3.2201 0.13883 3.0930 0.14 + 41 1.000000 1.000000 +---------------------------------------------------------------------------- + 42 Molyb 2 95.9500000000 1 0.43768 1.0220E+01 1.0220E+01 S 1 1 0 E +Mo molybdenum_Mo +molybdenum (Mo) + 424.0 4.8793 0.2267 3.2784 0.10525 3.2549 0.14 + 42 1.000000 1.000000 +---------------------------------------------------------------------------- + 43 Techn 5 97.9072200000 3 0.43919 1.1500E+01 1.1500E+01 S 1 1 3 R +Tc technetium_Tc +technetium (Tc) + 428.0 4.7769 0.0949 3.1253 0.16572 2.9738 0.14 + 43 1.000000 1.000000 +melting 2157. +boiling 4265. +Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +---------------------------------------------------------------------------- + 44 Ruthe 2 101.0700000000 2 0.43534 1.2410E+01 1.2410E+01 S 1 1 0 E +Ru ruthenium_Ru +ruthenium (Ru) + 441.0 4.7694 0.0599 3.0834 0.19342 2.8707 0.14 + 44 1.000000 1.000000 +---------------------------------------------------------------------------- + 45 Rhodi 5 102.9055000000 2 0.43729 1.2410E+01 1.2410E+01 S 1 1 0 E +Rh rhodium_Rh +rhodium (Rh) + 449.0 4.8008 0.0576 3.1069 0.19205 2.8633 0.14 + 45 1.000000 1.000000 +---------------------------------------------------------------------------- + 46 Palla 2 106.4200000000 1 0.43225 1.2020E+01 1.2020E+01 S 1 1 0 E +Pd palladium_Pd +palladium (Pd) + 470.0 4.9358 0.0563 3.0555 0.24178 2.7239 0.14 + 46 1.000000 1.000000 +---------------------------------------------------------------------------- + 47 Silve 4 107.8682000000 2 0.43572 1.0500E+01 1.0500E+01 S 1 1 0 E +Ag silver_Ag +silver (Ag) + 470.0 5.0630 0.0657 3.1074 0.24585 2.6899 0.14 + 47 1.000000 1.000000 +---------------------------------------------------------------------------- + 48 Cadmi 3 112.4140000000 4 0.42700 8.6500E+00 8.6500E+00 S 1 1 0 E +Cd cadmium_Cd +cadmium (Cd) + 469.0 5.2727 0.1281 3.1667 0.24609 2.6772 0.14 + 48 1.000000 1.000000 +---------------------------------------------------------------------------- + 49 Indiu 3 114.8180000000 3 0.42676 7.3100E+00 7.3100E+00 S 1 1 0 E +In indium_In +indium (In) + 488.0 5.5211 0.2406 3.2032 0.23879 2.7144 0.14 + 49 1.000000 1.000000 +---------------------------------------------------------------------------- + 50 Tin 3 118.7100000000 7 0.42119 7.3100E+00 7.3100E+00 S 1 1 2 E +Sn tin_Sn +tin (Sn) + 488.0 5.5340 0.2879 3.2959 0.18689 2.8576 0.14 + 50 1.000000 1.000000 +melti 231.93 Tin +boili 2602. Tin +---------------------------------------------------------------------------- + 51 Antim 3 121.7600000000 1 0.41886 6.6910E+00 6.6910E+00 S 1 1 0 E +Sb antimony_Sb +antimony (Sb) + 487.0 5.6241 0.3189 3.3489 0.16652 2.9319 0.14 + 51 1.000000 1.000000 +---------------------------------------------------------------------------- + 52 Tellu 2 127.6000000000 3 0.40752 6.2400E+00 6.2400E+00 S 1 1 0 E +Te tellurium_Te +tellurium (Te) + 485.0 5.7131 0.3296 3.4418 0.13815 3.0354 0.14 + 52 1.000000 1.000000 +---------------------------------------------------------------------------- + 53 Iodin 5 126.9044700000 3 0.41764 4.9300E+00 4.9300E+00 S 1 1 2 E +I iodine_I +iodine (I) + 491.0 5.9488 0.0549 3.2596 0.23766 2.7276 0.00 + 53 1.000000 1.000000 +melting point 113.7 +boiling point 184.4 +---------------------------------------------------------------------------- + 54 Xenon 3 131.2930000000 6 0.41129 5.4854E-03 5.4830E-03 G 1 1 3 E +Xe xenon_gas_Xe +xenon gas (Xe) + 482.0 12.7281 1.5630 4.7371 0.23314 2.7414 0.00 + 54 1.000000 1.000000 +Index ref 701. +Melting point -111.75 +Boiling point -108.0 +---------------------------------------------------------------------------- + 55 Caesi 8 132.9054519600 6 0.41383 1.8730E+00 1.8730E+00 S 1 1 0 E +Cs caesium_Cs +caesium (Cs) + 488.0 6.9135 0.5473 3.5914 0.18233 2.8866 0.14 + 55 1.000000 1.000000 +---------------------------------------------------------------------------- + 56 Bariu 3 137.3270000000 7 0.40779 3.5000E+00 3.5000E+00 S 1 1 0 E +Ba barium_Ba +barium (Ba) + 491.0 6.3153 0.4190 3.4547 0.18268 2.8906 0.14 + 56 1.000000 1.000000 +---------------------------------------------------------------------------- + 57 Lanth 5 138.9054700000 7 0.41035 6.1540E+00 6.1450E+00 S 1 1 0 E +La lanthanum_La +lanthanum (La) + 501.0 5.7850 0.3161 3.3293 0.18591 2.8828 0.14 + 57 1.000000 1.000000 +---------------------------------------------------------------------------- + 58 Ceriu 3 140.1160000000 1 0.41394 6.6570E+00 6.7700E+00 S 1 1 0 E +Ce cerium_Ce +cerium (Ce) + 523.0 5.7837 0.2713 3.3432 0.18885 2.8592 0.14 + 58 1.000000 1.000000 +---------------------------------------------------------------------------- + 59 Prase 5 140.9076600000 2 0.41871 6.7100E+00 6.7730E+00 S 1 1 0 E +Pr praseodymium_Pr +praseodymium (Pr) + 535.0 5.8096 0.2333 3.2773 0.23265 2.7331 0.14 + 59 1.000000 1.000000 +---------------------------------------------------------------------------- + 60 Neody 3 144.2420000000 3 0.41597 6.9000E+00 7.0080E+00 S 1 1 0 E +Nd neodymium_Nd +neodymium (Nd) + 546.0 5.8290 0.1984 3.3063 0.23530 2.7050 0.14 + 60 1.000000 1.000000 +---------------------------------------------------------------------------- + 61 Prome 5 144.9127500000 3 0.42094 7.2200E+00 7.2640E+00 S 1 1 1 R +Pm promethium_Pm +promethium (Pm) + 560.0 5.8224 0.1627 3.3199 0.24280 2.6674 0.14 + 61 1.000000 1.000000 +Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +---------------------------------------------------------------------------- + 62 Samar 2 150.3600000000 2 0.41234 7.4600E+00 7.5200E+00 S 1 1 0 E +Sm samarium_Sm +samarium (Sm) + 574.0 5.8597 0.1520 3.3460 0.24698 2.6403 0.14 + 62 1.000000 1.000000 +---------------------------------------------------------------------------- + 63 Europ 3 151.9640000000 1 0.41457 5.2430E+00 5.2440E+00 S 1 1 0 E +Eu europium_Eu +europium (Eu) + 580.0 6.2278 0.1888 3.4633 0.24448 2.6245 0.14 + 63 1.000000 1.000000 +---------------------------------------------------------------------------- + 64 Gadol 2 157.2500000000 3 0.40700 7.9004E+00 7.9010E+00 S 1 1 0 E +Gd gadolinium_Gd +gadolinium (Gd) + 591.0 5.8738 0.1058 3.3932 0.25109 2.5977 0.14 + 64 1.000000 1.000000 +---------------------------------------------------------------------------- + 65 Terbi 5 158.9253500000 2 0.40900 8.2290E+00 8.2300E+00 S 1 1 0 E +Tb terbium_Tb +terbium (Tb) + 614.0 5.9045 0.0947 3.4224 0.24453 2.6056 0.14 + 65 1.000000 1.000000 +---------------------------------------------------------------------------- + 66 Dyspr 3 162.5000000000 1 0.40615 8.5500E+00 8.5510E+00 S 1 1 0 E +Dy dysprosium_Dy +dysprosium (Dy) + 628.0 5.9183 0.0822 3.4474 0.24665 2.5849 0.14 + 66 1.000000 1.000000 +---------------------------------------------------------------------------- + 67 Holmi 5 164.9303300000 2 0.40623 8.7950E+00 8.7950E+00 S 1 1 0 E +Ho holmium_Ho +holmium (Ho) + 650.0 5.9587 0.0761 3.4782 0.24638 2.5726 0.14 + 67 1.000000 1.000000 +---------------------------------------------------------------------------- + 68 Erbiu 3 167.2590000000 3 0.40656 9.0660E+00 9.0260E+00 S 1 1 0 E +Er erbium_Er +erbium (Er) + 658.0 5.9521 0.0648 3.4922 0.24823 2.5573 0.14 + 68 1.000000 1.000000 +---------------------------------------------------------------------------- + 69 Thuli 5 168.9342200000 2 0.40844 9.3210E+00 9.3210E+00 S 1 1 0 E +Tm thulium_Tm +thulium (Tm) + 674.0 5.9677 0.0812 3.5085 0.24889 2.5469 0.14 + 69 1.000000 1.000000 +---------------------------------------------------------------------------- + 70 Ytter 3 173.0540000000 5 0.40450 6.7300E+00 6.9030E+00 S 1 1 0 E +Yb ytterbium_Yb +ytterbium (Yb) + 684.0 6.3325 0.1199 3.6246 0.25295 2.5141 0.14 + 70 1.000000 1.000000 +---------------------------------------------------------------------------- + 71 Lutet 4 174.9668000000 1 0.40579 9.8400E+00 9.8410E+00 S 1 1 0 E +Lu lutetium_Lu +lutetium (Lu) + 694.0 5.9785 0.1560 3.5218 0.24033 2.5643 0.14 + 71 1.000000 1.000000 +---------------------------------------------------------------------------- + 72 Hafni 2 178.4900000000 2 0.40338 1.3310E+01 1.3310E+01 S 1 1 0 E +Hf hafnium_Hf +hafnium (Hf) + 705.0 5.7139 0.1965 3.4337 0.22918 2.6155 0.14 + 72 1.000000 1.000000 +---------------------------------------------------------------------------- + 73 Tanta 5 180.9478800000 2 0.40343 1.6654E+01 1.6654E+01 S 1 1 0 E +Ta tantalum_Ta +tantalum (Ta) + 718.0 5.5262 0.2117 3.4805 0.17798 2.7623 0.14 + 73 1.000000 1.000000 +---------------------------------------------------------------------------- + 74 Tungs 2 183.8400000000 1 0.40252 1.9300E+01 1.9300E+01 S 1 1 2 E +W tungsten_W +tungsten (W) + 727.0 5.4059 0.2167 3.4960 0.15509 2.8447 0.14 + 74 1.000000 1.000000 +melti 3422. Tungsten +boili 5555. Tungsten +---------------------------------------------------------------------------- + 75 Rheni 3 186.2070000000 1 0.40278 2.1020E+01 2.1020E+01 S 1 1 0 E +Re rhenium_Re +rhenium (Re) + 736.0 5.3445 0.0559 3.4845 0.15184 2.8627 0.08 + 75 1.000000 1.000000 +---------------------------------------------------------------------------- + 76 Osmiu 2 190.2300000000 3 0.39952 2.2570E+01 2.2570E+01 S 1 1 0 E +Os osmium_Os +osmium (Os) + 746.0 5.3083 0.0891 3.5414 0.12751 2.9608 0.10 + 76 1.000000 1.000000 +---------------------------------------------------------------------------- + 77 Iridi 3 192.2170000000 3 0.40059 2.2420E+01 2.2420E+01 S 1 1 0 E +Ir iridium_Ir +iridium (Ir) + 757.0 5.3418 0.0819 3.5480 0.12690 2.9658 0.10 + 77 1.000000 1.000000 +---------------------------------------------------------------------------- + 78 Plati 3 195.0840000000 9 0.39983 2.1450E+01 2.1450E+01 S 1 1 2 E +Pt platinum_Pt +platinum (Pt) + 790.0 5.4732 0.1484 3.6212 0.11128 3.0417 0.12 + 78 1.000000 1.000000 +melti 1768.4 Platinum +boili 3825. Platinum +---------------------------------------------------------------------------- + 79 Gold 6 196.9665690000 5 0.40108 1.9320E+01 1.9320E+01 S 1 1 2 E +Au gold_Au +gold (Au) + 790.0 5.5747 0.2021 3.6979 0.09756 3.1101 0.14 + 79 1.000000 1.000000 +melti 1064.18 Gold +boili 2856. Gold +---------------------------------------------------------------------------- + 80 Mercu 3 200.5920000000 2 0.39882 1.3546E+01 1.3546E+01 L 1 1 0 E +Hg mercury_Hg +mercury (Hg) + 800.0 5.9605 0.2756 3.7275 0.11014 3.0519 0.14 + 80 1.000000 1.000000 +---------------------------------------------------------------------------- + 81 Thall 2 204.3800000000 2 0.39631 1.1720E+01 1.1720E+01 S 1 1 0 E +Tl thallium_Tl +thallium (Tl) + 810.0 6.1365 0.3491 3.8044 0.09455 3.1450 0.14 + 81 1.000000 1.000000 +---------------------------------------------------------------------------- + 82 Lead 1 207.2000000000 1 0.39575 1.1350E+01 1.1350E+01 S 1 1 2 E +Pb lead_Pb +lead (Pb) + 823.0 6.2018 0.3776 3.8073 0.09359 3.1608 0.14 + 82 1.000000 1.000000 +melti 327.46 Lead +boili 1749. Lead +---------------------------------------------------------------------------- + 83 Bismu 5 208.9804000000 1 0.39717 9.7470E+00 9.7470E+00 S 1 1 0 E +Bi bismuth_Bi +bismuth (Bi) + 823.0 6.3505 0.4152 3.8248 0.09410 3.1671 0.14 + 83 1.000000 1.000000 +---------------------------------------------------------------------------- + 84 Polon 5 208.9824300000 2 0.40195 9.3200E+00 9.3200E+00 S 1 1 1 R +Po polonium_Po +polonium (Po) + 830.0 6.4003 0.4267 3.8293 0.09282 3.1830 0.14 + 84 1.000000 1.000000 +Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +---------------------------------------------------------------------------- + 85 H-liq 3 1.0080000000 7 0.99212 6.0000E-02 7.0800E-02 L 1 1 3 E +H hydrogen_liquid +liquid hydrogen (H%2#) + 21.8 3.2632 0.4759 1.9215 0.13483 5.6249 0.00 + 1 1.000000 1.000000 +Melting point -259.34 Rubber Bible +Boiling point -252.87 Rubber Bible +Index of ref 1.112 +---------------------------------------------------------------------------- + 86 Radon 5 222.0175800000 2 0.38736 9.0662E-03 9.0662E-03 G 1 1 3 R +Rn radon_Rn +radon (Rn) + 794.0 13.2839 1.5368 4.9889 0.20798 2.7409 0.00 + 86 1.000000 1.000000 +Melting point -71. +Boiling point -61.7 +Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +---------------------------------------------------------------------------- + 87 C (gr 4 12.0107000000 8 0.49955 1.7000E+00 2.2100E+00 S 1 1 2 E +C carbon_graphite_C +carbon (graphite) (C) + 78.0 3.1550 0.0480 2.5387 0.20762 2.9532 0.14 + 6 1.000000 1.000000 +Sublimation point 3825.0 +Note: Density may vary 2.09 to 2.23 +---------------------------------------------------------------------------- + 88 Radiu 5 226.0254100000 2 0.38934 5.0000E+00 5.0000E+00 S 1 1 1 R +Ra radium_Ra +radium (Ra) + 826.0 7.0452 0.5991 3.9428 0.08804 3.2454 0.14 + 88 1.000000 1.000000 +Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +---------------------------------------------------------------------------- + 89 Actin 5 227.0277500000 2 0.39202 1.0070E+01 1.0070E+01 S 1 1 1 R +Ac actinium_Ac +actinium (Ac) + 841.0 6.3742 0.4559 3.7966 0.08567 3.2683 0.14 + 89 1.000000 1.000000 +Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +---------------------------------------------------------------------------- + 90 Thori 4 232.0377000000 4 0.38787 1.1720E+01 1.1720E+01 S 1 1 3 R +Th thorium_Th +thorium (Th) + 847.0 6.2473 0.4202 3.7681 0.08655 3.2610 0.14 + 90 1.000000 1.000000 +melting 1135. +boiling 4131. +Note: There is a well-defined terrestrial aboundance for thorium even though it is radioactive. +---------------------------------------------------------------------------- + 91 Prota 5 231.0358800000 2 0.39388 1.5370E+01 1.5370E+01 S 1 1 2 R +Pa protactinium_Pa +protactinium (Pa) + 878.0 6.0327 0.3144 3.5079 0.14770 2.9845 0.14 + 91 1.000000 1.000000 +melting 1572. +Note: There is a well-defined terrestrial aboundance for protactinium even though it is radioactive. +---------------------------------------------------------------------------- + 92 Urani 5 238.0289100000 3 0.38651 1.8950E+01 1.8950E+01 S 1 1 3 R +U uranium_U +uranium (U) + 890.0 5.8694 0.2260 3.3721 0.19677 2.8171 0.14 + 92 1.000000 1.000000 +melti 1135. Uranium +boili 4131. Uranium +Note: There is a well-defined terrestrial aboundance for uranium even though it is radioactive. +---------------------------------------------------------------------------- + 93 Neptu 5 237.0481700000 2 0.39233 2.0250E+01 2.0250E+01 S 1 1 1 R +Np neptunium_Np +neptunium (Np) + 902.0 5.8149 0.1869 3.3690 0.19741 2.8082 0.14 + 93 1.000000 1.000000 +Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +---------------------------------------------------------------------------- + 94 Pluto 5 244.0642000000 4 0.38514 1.9840E+01 1.9840E+01 S 1 1 1 R +Pu plutonium_Pu +plutonium (Pu) + 921.0 5.8748 0.1557 3.3981 0.20419 2.7679 0.14 + 94 1.000000 1.000000 +Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +---------------------------------------------------------------------------- + 95 Ameri 5 243.0613800000 2 0.39085 1.3670E+01 1.3670E+01 S 1 1 1 R +Am americium_Am +americium (Am) + 934.0 6.2813 0.2274 3.5021 0.20308 2.7615 0.14 + 95 1.000000 1.000000 +Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +---------------------------------------------------------------------------- + 96 Curiu 5 247.0703500000 3 0.38855 1.3510E+01 1.3510E+01 S 1 1 2 R +Cm curium_Cm +curium (Cm) + 939.0 6.3097 0.2484 3.5160 0.20257 2.7579 0.14 + 96 1.000000 1.000000 +Melting 1345. +Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +---------------------------------------------------------------------------- + 97 Berke 5 247.0703100000 4 0.39260 0.9860E+00 0.9860E+01 S 1 1 2 R +Bk berkelium_Bk +berkelium (Bk) + 952.0 6.2912 0.5509 3.0000 0.25556 3.0000 0.00 + 97 1.000000 1.000000 +Melting point 986. +Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +---------------------------------------------------------------------------- + 98 Carbo 4 12.0107000000 8 0.49955 2.2650E+00 2.2650E+00 S 1 1 0 R +C carbon_compact_C +carbon (compact) (C) + 78.0 2.8680 -0.0178 2.3415 0.26142 2.8697 0.12 + 6 1.000000 1.000000 +---------------------------------------------------------------------------- + 99 A-150 5 -1.0000000000 0.54903 1.1270E+00 1.1270E+00 S 6 1 0 B + a-150_tissue-equivalent_plastic +a-150 tissue-equivalent plastic + 65.1 3.1100 0.1329 2.6234 0.10783 3.4442 0.00 + 1 1.000000 0.101327 + 6 0.642279 0.775501 + 7 0.024897 0.035057 + 8 0.032527 0.052316 + 9 0.009122 0.017422 + 20 0.004561 0.018378 +---------------------------------------------------------------------------- + 100 Aceto 5 -1.0000000000 0.55097 7.8990E-01 7.8990E-01 L 3 6 1 O + acetone +acetone (CH%3#COCH%3#) + 64.2 3.4341 0.2197 2.6928 0.11100 3.4047 0.00 + 1 6.000000 0.104122 + 6 3.000201 0.620405 + 8 1.000043 0.275473 +Index of ref 1.36 +---------------------------------------------------------------------------- + 101 Acety 5 -1.0000000000 0.53768 1.0967E-03 1.0967E-03 G 2 2 0 O + acetylene_CHCH +acetylene (CHCH) + 58.2 9.8419 1.6017 4.0074 0.12167 3.4277 0.00 + 1 2.000000 0.077418 + 6 2.000135 0.922582 +---------------------------------------------------------------------------- + 102 Adeni 5 -1.0000000000 0.51903 1.3500E+00 1.3500E+00 S 3 5 0 O + adenine +adenine (C%5#H%5#N%5#) + 71.4 3.1724 0.1295 2.4219 0.20908 3.0271 0.00 + 1 5.000000 0.037294 + 6 5.000354 0.444430 + 7 5.000218 0.518275 +---------------------------------------------------------------------------- + 103 Adip- 5 -1.0000000000 0.55947 9.2000E-01 9.2000E-01 S 13 1 0 B + adipose_tissue_ICRP +adipose tissue (ICRP) + 63.2 3.2367 0.1827 2.6530 0.10278 3.4817 0.00 + 1 1.000000 0.119477 + 6 0.447595 0.637240 + 7 0.004800 0.007970 + 8 0.122506 0.232333 + 11 0.000183 0.000500 + 12 0.000007 0.000020 + 15 0.000044 0.000160 + 16 0.000192 0.000730 + 17 0.000283 0.001190 + 19 0.000069 0.000320 + 20 0.000004 0.000020 + 26 0.000003 0.000020 + 30 0.000003 0.000020 +---------------------------------------------------------------------------- + 104 Air 5 -1.0000000000 0.49919 1.2048E-03 1.2048E-03 G 4 0 2 M + air_dry_1_atm +air (dry, 1 atm) + 85.7 10.5961 1.7418 4.2759 0.10914 3.3994 0.00 + 6 0.000124 0.000124 + 7 0.755267 0.755267 + 8 0.231871 0.231781 + 18 0.012827 0.012827 +Boiling point -194.35 +Index of ref 288.6 http://emtoolbox.nist.gov/ +---------------------------------------------------------------------------- + 105 Alani 5 -1.0000000000 0.53976 1.4200E+00 1.4200E+00 S 4 7 0 O + alanine +alanine (C%3#H%7#NO%2#) + 71.9 3.0965 0.1354 2.6336 0.11484 3.3526 0.00 + 1 7.000000 0.079190 + 6 3.000178 0.404439 + 7 1.000032 0.157213 + 8 2.000071 0.359159 +---------------------------------------------------------------------------- + 106 Al2O3 5 -1.0000000000 0.49038 3.9700E+00 3.9700E+00 S 2 3 3 I + aluminum_oxide_sapphire +aluminum oxide (sapphire, Al%2#O%3#) + 145.2 3.5682 0.0402 2.8665 0.08500 3.5458 0.00 + 8 3.000000 0.470749 + 13 2.000002 0.529251 +Index of refraction 1.77 +Melting point 2054. +Boiling point 3000. approximate +---------------------------------------------------------------------------- + 107 Amber 5 -1.0000000000 0.55179 1.1000E+00 1.1000E+00 S 3 16 0 O + amber +amber (C%10#H%16#O) + 63.2 3.0701 0.1335 2.5610 0.11934 3.4098 0.00 + 1 16.000000 0.105930 + 6 10.000679 0.788973 + 8 1.000042 0.105096 +---------------------------------------------------------------------------- + 108 Ammon 5 -1.0000000000 0.59719 8.2602E-04 8.2602E-04 G 2 3 1 I + ammonia +ammonia (NH%3#) + 53.7 9.8763 1.6822 4.1158 0.08315 3.6464 0.00 + 1 3.000000 0.177547 + 7 1.000038 0.822453 +Index of ref (n-1)*E6 376.0 http://www.kayelaby.npl.co.uk/ +---------------------------------------------------------------------------- + 109 Anili 5 -1.0000000000 0.53699 1.0235E+00 1.0235E+00 L 3 7 0 O + aniline +aniline (C%6#H%5#NH%2#) + 66.2 3.2622 0.1618 2.5805 0.13134 3.3434 0.00 + 1 7.000000 0.075759 + 6 6.000400 0.773838 + 7 1.000041 0.150403 +---------------------------------------------------------------------------- + 110 Anthr 5 -1.0000000000 0.52740 1.2830E+00 1.2830E+00 S 2 10 0 O + anthracene +anthracene (C%14#H%10#) + 69.5 3.1514 0.1146 2.5213 0.14677 3.2831 0.00 + 1 10.000000 0.056550 + 6 14.000793 0.943450 +---------------------------------------------------------------------------- + 111 B-100 5 -1.0000000000 0.52740 1.4500E+00 1.4500E+00 S 6 1 0 B + b-100_Bone-equivalent_plastic +b-100 Bone-equivalent plastic + 85.9 3.4528 0.1252 3.0420 0.05268 3.7365 0.00 + 1 1.000000 0.065471 + 6 0.688251 0.536945 + 7 0.023631 0.021500 + 8 0.030873 0.032085 + 9 0.135660 0.167411 + 20 0.067833 0.176589 +---------------------------------------------------------------------------- + 112 Bakel 5 -1.0000000000 0.52792 1.2500E+00 1.2500E+00 S 3 38 0 P + bakelite +bakelite [(C%43#H%38#O%7#)%n#] + 72.4 3.2582 0.1471 2.6055 0.12713 3.3470 0.00 + 1 38.000000 0.057441 + 6 43.003166 0.774591 + 8 7.000340 0.167968 +---------------------------------------------------------------------------- + 113 Ba-F2 5 -1.0000000000 0.42207 4.8900E+00 4.8930E+00 S 2 2 3 I + barium_fluoride +barium fluoride (BaF%2#) + 375.9 5.4122 -0.0098 3.3871 0.15991 2.8867 0.00 + 9 2.000000 0.216720 + 56 1.000021 0.783280 +Melting point (C) 1368. +Boiling point (C) 2260. +Index of ref 1.4744 CRC2006 10-246 +---------------------------------------------------------------------------- + 114 Ba-SO 5 -1.0000000000 0.44561 4.5000E+00 4.5000E+00 S 3 4 0 I + barium_sulfate +barium sulfate BaSO%4# + 285.7 4.8923 -0.0128 3.4069 0.11747 3.0427 0.00 + 8 4.000000 0.274212 + 16 0.999811 0.137368 + 56 1.000020 0.588420 +---------------------------------------------------------------------------- + 115 Benze 5 -1.0000000000 0.53769 8.7865E-01 8.7865E-01 L 2 6 0 O + benzene +benzene C%6#H%6# + 63.4 3.3269 0.1710 2.5091 0.16519 3.2174 0.00 + 1 6.000000 0.077418 + 6 6.000406 0.922582 +---------------------------------------------------------------------------- + 116 Be-O 5 -1.0000000000 0.47979 3.0100E+00 3.0100E+00 S 2 1 0 I + beryllium_oxide_BeO +beryllium oxide (BeO) + 93.2 2.9801 0.0241 2.5846 0.10755 3.4927 0.00 + 4 1.000000 0.360320 + 8 1.000002 0.639680 +---------------------------------------------------------------------------- + 117 BGO 5 -1.0000000000 0.42065 7.1300E+00 7.1300E+00 S 3 12 3 I + bismuth_germanate_BGO +bismuth germanate (BGO) [(Bi%2#O%3#)%2#(GeO%2#)%3#] + 534.1 5.7409 0.0456 3.7816 0.09569 3.0781 0.00 + 8 12.000000 0.154126 + 32 2.999188 0.174820 + 83 4.000009 0.671054 +Melting point 1044. CRC2006 +Index of refraction 2.15 +Note: Evalite structure; less common is Bi{12}GeO{20} +---------------------------------------------------------------------------- + 118 Blood 5 -1.0000000000 0.54995 1.0600E+00 1.0600E+00 L 14 1 0 B + blood_ICRP +blood (ICRP) + 75.2 3.4581 0.2239 2.8017 0.08492 3.5406 0.00 + 1 1.000000 0.101866 + 6 0.082399 0.100020 + 7 0.020939 0.029640 + 8 0.469656 0.759414 + 11 0.000796 0.001850 + 12 0.000016 0.000040 + 14 0.000011 0.000030 + 15 0.000112 0.000350 + 16 0.000571 0.001850 + 17 0.000776 0.002780 + 19 0.000413 0.001630 + 20 0.000015 0.000060 + 26 0.000082 0.000460 + 30 0.000002 0.000010 +---------------------------------------------------------------------------- + 119 Bonec 5 -1.0000000000 0.53010 1.8500E+00 1.8500E+00 S 8 1 0 B + compact_bone_ICRU +compact bone (ICRU) + 91.9 3.3390 0.0944 3.0201 0.05822 3.6419 0.00 + 1 1.000000 0.063984 + 6 0.364619 0.278000 + 7 0.030366 0.027000 + 8 0.403702 0.410016 + 12 0.001296 0.002000 + 15 0.035601 0.070000 + 16 0.000983 0.002000 + 20 0.057780 0.147000 +---------------------------------------------------------------------------- + 120 Bonec 5 -1.0000000000 0.52130 1.8500E+00 1.8500E+00 S 9 1 0 B + cortical_bone_ICRP +cortical bone (ICRP) + 106.4 3.6488 0.1161 3.0919 0.06198 3.5919 0.00 + 1 1.000000 0.047234 + 6 0.256430 0.144330 + 7 0.063972 0.041990 + 8 0.594983 0.446096 + 12 0.001932 0.002200 + 15 0.072319 0.104970 + 16 0.002096 0.003150 + 20 0.111776 0.209930 + 30 0.000033 0.000100 +---------------------------------------------------------------------------- + 121 B4-C 5 -1.0000000000 0.47059 2.5200E+00 2.5200E+00 S 2 4 0 I + boron_carbide +boron carbide (B%4#C) + 84.7 2.9859 0.0093 2.1006 0.37087 2.8076 0.00 + 5 4.000000 0.782610 + 6 1.000119 0.217390 +---------------------------------------------------------------------------- + 122 B2-O3 5 -1.0000000000 0.49839 1.8120E+00 1.8120E+00 S 2 2 0 I + boron_oxide +boron oxide (B%2#O%3#) + 99.6 3.6027 0.1843 2.7379 0.11548 3.3832 0.00 + 5 2.000000 0.310551 + 8 3.000277 0.689449 +---------------------------------------------------------------------------- + 123 Brain 5 -1.0000000000 0.55423 1.0300E+00 1.0300E+00 S 13 1 0 B + brain_ICRP +brain (ICRP) + 73.3 3.4279 0.2206 2.8021 0.08255 3.5585 0.00 + 1 1.000000 0.110667 + 6 0.095108 0.125420 + 7 0.008635 0.013280 + 8 0.419958 0.737723 + 11 0.000729 0.001840 + 12 0.000056 0.000150 + 15 0.001041 0.003540 + 16 0.000503 0.001770 + 17 0.000606 0.002360 + 19 0.000722 0.003100 + 20 0.000020 0.000090 + 26 0.000008 0.000050 + 30 0.000001 0.000010 +---------------------------------------------------------------------------- + 124 Butan 5 -1.0000000000 0.59497 2.4934E-03 2.4890E-03 G 2 10 2 O + butane +butane (C%4#H%10#) + 48.3 8.5633 1.3788 3.7524 0.10852 3.4884 0.00 + 1 10.000000 0.173408 + 6 4.000262 0.826592 +Boiling point -0.5 +Melting point -138.2 +---------------------------------------------------------------------------- + 125 Butyl 5 -1.0000000000 0.56663 8.0980E-01 8.0980E-01 L 3 10 0 O + n-butyl_alcohol +n-butyl alcohol (C%4#H%9#OH) + 59.9 3.2425 0.1937 2.6439 0.10081 3.5139 0.00 + 1 10.000000 0.135978 + 6 4.000252 0.648171 + 8 1.000038 0.215851 +---------------------------------------------------------------------------- + 126 C-552 5 -1.0000000000 0.49969 1.7600E+00 1.7600E+00 S 5 1 0 B + C-552_air-equivalent_plastic +C-552 air-equivalent plastic + 86.8 3.3338 0.1510 2.7083 0.10492 3.4344 0.00 + 1 1.000000 0.024680 + 6 1.705640 0.501610 + 8 0.011556 0.004527 + 9 1.000047 0.465209 + 14 0.005777 0.003973 +---------------------------------------------------------------------------- + 127 Cd-Te 5 -1.0000000000 0.41665 6.2000E+00 6.2000E+00 S 2 1 0 I + cadmium_telluride_CdTe +cadmium telluride (CdTe) + 539.3 5.9096 0.0438 3.2836 0.24840 2.6665 0.00 + 48 1.000000 0.468355 + 52 1.000011 0.531645 +---------------------------------------------------------------------------- + 128 Cd-W- 5 -1.0000000000 0.42747 7.9000E+00 7.9000E+00 S 3 4 0 I + cadmium_tungstate +cadmium tungstate (CdWO%4#) + 468.3 5.3594 0.0123 3.5941 0.12861 2.9150 0.00 + 8 4.000000 0.177644 + 48 0.999992 0.312027 + 74 1.000054 0.510329 +---------------------------------------------------------------------------- + 129 Ca-C- 5 -1.0000000000 0.49955 2.8000E+00 2.8000E+00 S 3 1 0 I + calcium_carbonate +calcium carbonate (CaCO%3#) + 136.4 3.7738 0.0492 3.0549 0.08301 3.4120 0.00 + 6 1.000000 0.120003 + 8 2.999923 0.479554 + 20 1.000025 0.400443 +---------------------------------------------------------------------------- + 130 Ca-F2 5 -1.0000000000 0.49670 3.1800E+00 3.1800E+00 S 2 2 1 I + calcium_fluoride +calcium fluoride (CaF%2#) + 166.0 4.0653 0.0676 3.1683 0.06942 3.5263 0.00 + 9 2.000000 0.486659 + 20 1.000051 0.513341 +Index of ref 1.434 +---------------------------------------------------------------------------- + 131 Ca-O 5 -1.0000000000 0.49929 3.3000E+00 3.3000E+00 S 2 1 0 I + calcium_oxide_CaO +calcium oxide (CaO) + 176.1 4.1209 -0.0172 3.0171 0.12128 3.1936 0.00 + 8 1.000000 0.285299 + 20 1.000050 0.714701 +---------------------------------------------------------------------------- + 132 Ca-S- 5 -1.0000000000 0.49950 2.9600E+00 2.9600E+00 S 3 4 0 I + calcium_sulfate +calcium sulfate (CaSO%4#) + 152.3 3.9388 0.0587 3.1229 0.07708 3.4495 0.00 + 8 4.000000 0.470095 + 16 0.999813 0.235497 + 20 1.000050 0.294408 +---------------------------------------------------------------------------- + 133 Ca-W- 5 -1.0000000000 0.43761 6.0620E+00 6.0620E+00 S 3 4 0 I + calcium_tungstate +calcium tungstate (CaWO%4#) + 395.0 5.2603 0.0323 3.8932 0.06210 3.2649 0.00 + 8 4.000000 0.222270 + 20 1.000051 0.139202 + 74 1.000054 0.638529 +---------------------------------------------------------------------------- + 134 C-O2 5 -1.0000000000 0.49989 1.8421E-03 1.8421E-03 G 2 2 2 I + carbon_dioxide_gas +carbon dioxide gas (CO%2#) + 85.0 10.1537 1.6294 4.1825 0.11768 3.3227 0.00 + 6 2.000000 0.272916 + 8 3.999910 0.727084 +Index of ref (n-1)*E6 449.0 http://www.kayelaby.npl.co.uk/ +Sublimation point -78.4 194.7 K +---------------------------------------------------------------------------- + 135 C-Cl4 5 -1.0000000000 0.49107 1.5940E+00 1.5940E+00 L 2 1 0 O + carbon_tetrachloride +carbon tetrachloride (CCl%4#) + 166.3 4.7712 0.1773 2.9165 0.19018 3.0116 0.00 + 6 1.000000 0.078083 + 17 3.999948 0.921917 +---------------------------------------------------------------------------- + 136 Cello 5 -1.0000000000 0.53040 1.4200E+00 1.4200E+00 S 3 10 0 P + cellulose +cellulose [(C%6#H%10#O%5#)%n#] + 77.6 3.2647 0.1580 2.6778 0.11151 3.3810 0.00 + 1 10.000000 0.062162 + 6 6.000342 0.444462 + 8 5.000161 0.493376 +---------------------------------------------------------------------------- + 137 Cella 5 -1.0000000000 0.53279 1.2000E+00 1.2000E+00 S 3 22 0 P + cellulose_acetate_butyrate +cellulose acetate butyrate [(C%15#H%22#O%8#)%n#] + 74.6 3.3497 0.1794 2.6809 0.11444 3.3738 0.00 + 1 22.000000 0.067125 + 6 15.001071 0.545403 + 8 8.000363 0.387472 +---------------------------------------------------------------------------- + 138 Celln 5 -1.0000000000 0.51424 1.4900E+00 1.4900E+00 S 4 7 0 P + cellulose_nitrate +cellulose nitrate [(C%12#H%14#O%4#(ONO%2#)%6#)%n#] + 87.0 3.4762 0.1897 2.7253 0.11813 3.3237 0.00 + 1 7.000000 0.029216 + 6 5.454903 0.271296 + 7 2.090979 0.121276 + 8 8.727611 0.578212 +---------------------------------------------------------------------------- + 139 Cersu 5 -1.0000000000 0.55279 1.0300E+00 1.0300E+00 L 5 1 0 B + ceric_sulfate_dosimeter_solution +ceric sulfate dosimeter solution + 76.7 3.5212 0.2363 2.8769 0.07666 3.5607 0.00 + 1 1.000000 0.107596 + 7 0.000535 0.000800 + 8 0.512308 0.874976 + 16 0.004273 0.014627 + 58 0.000134 0.002001 +---------------------------------------------------------------------------- + 140 Cs-F 5 -1.0000000000 0.42132 4.1150E+00 4.1150E+00 S 2 1 0 I + cesium_fluoride_CsF +cesium fluoride (CsF) + 440.7 5.9046 0.0084 3.3374 0.22052 2.7280 0.00 + 9 1.000000 0.125069 + 55 0.999996 0.874931 +---------------------------------------------------------------------------- + 141 Cs-I 5 -1.0000000000 0.41569 4.5100E+00 4.5100E+00 S 2 1 3 I + cesium_iodide_CsI +cesium iodide (CsI) + 553.1 6.2807 0.0395 3.3353 0.25381 2.6657 0.00 + 53 1.000000 0.488451 + 55 1.000001 0.511549 +melti 621. Caesium iodide +boili 1280. Caesium iodide +Index 1.7873 CRC2006 10-147 +---------------------------------------------------------------------------- + 142 Chlor 5 -1.0000000000 0.51529 1.1058E+00 1.1058E+00 L 3 5 0 O + chlorobenzene +chlorobenzene C%6#H%5#Cl + 89.1 3.8201 0.1714 2.9272 0.09856 3.3797 0.00 + 1 5.000000 0.044772 + 6 6.000428 0.640254 + 17 1.000054 0.314974 +---------------------------------------------------------------------------- + 143 Chlor 5 -1.0000000000 0.48585 1.4832E+00 1.4832E+00 L 3 1 0 O + chloroform +chloroform (CHCl%3#) + 156.0 4.7055 0.1786 2.9581 0.16959 3.0627 0.00 + 1 1.000000 0.008443 + 6 1.000054 0.100613 + 17 3.000123 0.890944 +---------------------------------------------------------------------------- + 144 Concr 5 -1.0000000000 0.50274 2.3000E+00 2.3000E+00 S 10 1 2 M + shielding_concrete +shielding concrete + 135.2 3.9464 0.1301 3.0466 0.07515 3.5467 0.00 + 1 1.000000 0.010000 + 6 0.008392 0.001000 + 8 3.333301 0.529107 + 11 0.070149 0.016000 + 12 0.008294 0.002000 + 13 0.126534 0.033872 + 14 1.209510 0.337021 + 19 0.033514 0.013000 + 20 0.110658 0.044000 + 26 0.025268 0.014000 +Note: Standard shielding blocks, typical composition O%2# 0.52, Si 0.325, Ca 0.06, Na 0.015, Fe 0.02, Al 0.04 + plus reinforcing iron bars, from CERN-LRL-RHEL Shielding exp., UCRA-17841. +---------------------------------------------------------------------------- + 145 Cyclo 5 -1.0000000000 0.57034 7.7900E-01 7.7900E-01 L 2 12 0 O + cyclohexane +cyclohexane (C%6#H%12#) + 56.4 3.1544 0.1728 2.5549 0.12035 3.4278 0.00 + 1 12.000000 0.143711 + 6 6.000369 0.856289 +---------------------------------------------------------------------------- + 146 Dichl 5 -1.0000000000 0.50339 1.3048E+00 1.3048E+00 L 3 4 0 O + 12-dichlorobenzene +1,2-dichlorobenzene (C%6#H%4#Cl%2#) + 106.5 4.0348 0.1587 2.8276 0.16010 3.0836 0.00 + 1 4.000000 0.027425 + 6 6.000428 0.490233 + 17 2.000110 0.482342 +---------------------------------------------------------------------------- + 147 Dichl 5 -1.0000000000 0.51744 1.2199E+00 1.2199E+00 L 4 8 0 O + dichlorodiethyl_ether +dichlorodiethyl ether C%4#Cl%2#H%8#O + 103.3 4.0135 0.1773 3.1586 0.06799 3.5250 0.00 + 1 8.000000 0.056381 + 6 4.000257 0.335942 + 8 1.000040 0.111874 + 17 2.000096 0.495802 +---------------------------------------------------------------------------- + 148 Dichl 5 -1.0000000000 0.50526 1.2351E+00 1.2351E+00 L 3 4 0 O + 12-dichloroethane +1,2-dichloroethane C%2#H%4#C%12# + 111.9 4.1849 0.1375 2.9529 0.13383 3.1675 0.00 + 1 4.000000 0.040740 + 6 2.000126 0.242746 + 17 2.000090 0.716515 +---------------------------------------------------------------------------- + 149 Dieth 5 -1.0000000000 0.56663 7.1378E-01 7.1378E-01 L 3 10 0 O + diethyl_ether +diethyl ether [(CH%3#CH%2#)%2#O] + 60.0 3.3721 0.2231 2.6745 0.10550 3.4586 0.00 + 1 10.000000 0.135978 + 6 4.000252 0.648171 + 8 1.000038 0.215851 +---------------------------------------------------------------------------- + 150 Dimet 5 -1.0000000000 0.54724 9.4870E-01 9.4870E-01 S 4 7 0 O + mn-dimethyl_formamide +m,n-dimethyl formamide (C%3#H%6#NOH) + 66.6 3.3311 0.1977 2.6686 0.11470 3.3710 0.00 + 1 7.000000 0.096523 + 6 3.000196 0.492965 + 7 1.000039 0.191625 + 8 1.000042 0.218887 +---------------------------------------------------------------------------- + 151 Dimet 5 -1.0000000000 0.53757 1.1014E+00 1.1014E+00 S 4 6 0 O + dimethyl_sulfoxide +dimethyl sulfoxide (CH%3#)%2#SO + 98.6 3.9844 0.2021 3.1263 0.06619 3.5708 0.00 + 1 6.000000 0.077403 + 6 2.000130 0.307467 + 8 1.000037 0.204782 + 16 0.999852 0.410348 +---------------------------------------------------------------------------- + 152 Ethan 5 -1.0000000000 0.59861 1.2532E-03 1.2630E-03 G 2 6 4 O + ethane +ethane (C%2#H%6#) + 45.4 9.1043 1.5107 3.8743 0.09627 3.6095 0.00 + 1 6.000000 0.201115 + 6 2.000126 0.798885 +Boiling point -88.6 +Triple point -89.88 +Melting point -182.79 +Note: Density of liquid at - 88.6 C is 0.5645 +---------------------------------------------------------------------------- + 153 Ethan 5 -1.0000000000 0.56437 7.8930E-01 7.8930E-01 L 3 6 3 O + ethanol +ethanol (C%2#H%5#OH) + 62.9 3.3699 0.2218 2.7052 0.09878 3.4834 0.00 + 1 6.000000 0.131269 + 6 2.000130 0.521438 + 8 1.000040 0.347294 +Index of refraction 1.36 +Melting point -114.14 +Boiling point 78.29 +---------------------------------------------------------------------------- + 154 Ethyl 5 -1.0000000000 0.54405 1.1300E+00 1.1300E+00 S 3 22 0 P + ethyl_cellulose +ethyl cellulose ([C%12#H%22#O5)%n#] + 69.3 3.2415 0.1683 2.6527 0.11077 3.4098 0.00 + 1 22.000000 0.090027 + 6 12.000718 0.585182 + 8 5.000172 0.324791 +---------------------------------------------------------------------------- + 155 Ethyl 5 -1.0000000000 0.57034 1.1750E-03 1.1750E-03 G 2 4 0 O + ethylene +ethylene (C%2#H%4#) + 50.7 9.4380 1.5528 3.9327 0.10636 3.5387 0.00 + 1 4.000000 0.143711 + 6 2.000123 0.856289 +---------------------------------------------------------------------------- + 156 Eye-l 5 -1.0000000000 0.54977 1.1000E+00 1.1000E+00 S 4 1 0 B + eye_lens_ICRP +eye lens (ICRP) + 73.3 3.3720 0.2070 2.7446 0.09690 3.4550 0.00 + 1 1.000000 0.099269 + 6 0.163759 0.193710 + 7 0.038616 0.053270 + 8 0.414887 0.653751 +---------------------------------------------------------------------------- + 157 Fe2-O 5 -1.0000000000 0.47592 5.2000E+00 5.2000E+00 S 2 3 0 I + ferric_oxide +ferric oxide (Fe%2#O%3#) + 227.3 4.2245 -0.0074 3.2573 0.10478 3.1313 0.00 + 8 3.000000 0.300567 + 26 2.000071 0.699433 +---------------------------------------------------------------------------- + 158 Fe-B 5 -1.0000000000 0.46507 7.1500E+00 7.1500E+00 S 2 1 0 I + ferroboride_FeB +ferroboride (FeB) + 261.0 4.2057 -0.0988 3.1749 0.12911 3.0240 0.00 + 5 1.000000 0.162174 + 26 1.000125 0.837826 +---------------------------------------------------------------------------- + 159 Fe-O 5 -1.0000000000 0.47323 5.7000E+00 5.7000E+00 S 2 1 0 I + ferrous_oxide_FeO +ferrous oxide (FeO) + 248.6 4.3175 -0.0279 3.2002 0.12959 3.0168 0.00 + 8 1.000000 0.222689 + 26 1.000036 0.777311 +---------------------------------------------------------------------------- + 160 Fe-su 5 -1.0000000000 0.55329 1.0240E+00 1.0240E+00 L 7 1 0 B + ferrous_sulfate_dosimeter_solution +ferrous sulfate dosimeter solution + 76.4 3.5183 0.2378 2.8254 0.08759 3.4923 0.00 + 1 1.000000 0.108259 + 7 0.000018 0.000027 + 8 0.511300 0.878636 + 11 0.000009 0.000022 + 16 0.003765 0.012968 + 17 0.000009 0.000034 + 26 0.000009 0.000054 +---------------------------------------------------------------------------- + 161 Freon 5 -1.0000000000 0.47969 1.1200E+00 1.1200E+00 G 3 1 0 O + Freon-12 +Freon-12 (CF%2#Cl%2#) + 143.0 4.8251 0.3035 3.2659 0.07978 3.4626 0.00 + 6 1.000000 0.099335 + 9 1.999954 0.314247 + 17 1.999972 0.586418 +---------------------------------------------------------------------------- + 162 Freon 5 -1.0000000000 0.44901 1.8000E+00 1.8000E+00 G 3 1 0 O + Freon-12B2 +Freon-12B2 (CF%2#Br%2#) + 284.9 5.7976 0.3406 3.7956 0.05144 3.5565 0.00 + 6 1.000000 0.057245 + 9 1.999966 0.181096 + 35 1.999967 0.761659 +---------------------------------------------------------------------------- + 163 Freon 5 -1.0000000000 0.47966 9.5000E-01 9.5000E-01 G 3 1 0 O + Freon-13 +Freon-13 (CF%3#Cl) + 126.6 4.7483 0.3659 3.2337 0.07238 3.5551 0.00 + 6 1.000000 0.114983 + 9 2.999918 0.545622 + 17 0.999982 0.339396 +---------------------------------------------------------------------------- + 164 Freon 5 -1.0000000000 0.45665 1.5000E+00 1.5000E+00 G 3 1 0 O + Freon-13b1 +Freon-13b1 (CF%3#Br) + 210.5 5.3555 0.3522 3.7554 0.03925 3.7194 0.00 + 6 1.000000 0.080659 + 9 2.999939 0.382749 + 35 0.999980 0.536592 +---------------------------------------------------------------------------- + 165 Freon 5 -1.0000000000 0.43997 1.8000E+00 1.8000E+00 G 3 1 0 O + Freon-13i1 +Freon-13i1 (CF%3#I) + 293.5 5.8774 0.2847 3.7280 0.09112 3.1658 0.00 + 6 1.000000 0.061309 + 9 2.999898 0.290924 + 53 0.999968 0.647767 +---------------------------------------------------------------------------- + 166 Gd2-O 5 -1.0000000000 0.42266 7.4400E+00 7.4400E+00 S 3 2 0 I + gadolinium_oxysulfide +gadolinium oxysulfide (Gd%2#O%2#S) + 493.3 5.5347 -0.1774 3.4045 0.22161 2.6300 0.00 + 8 2.000000 0.084528 + 16 0.999817 0.084690 + 64 1.999998 0.830782 +---------------------------------------------------------------------------- + 167 Ga-As 5 -1.0000000000 0.44247 5.3100E+00 5.3100E+00 S 2 1 0 I + gallium_arsenide_GaAs +gallium arsenide (GaAs) + 384.9 5.3299 0.1764 3.6420 0.07152 3.3356 0.00 + 31 1.000000 0.482019 + 33 1.000043 0.517981 +---------------------------------------------------------------------------- + 168 Photo 5 -1.0000000000 0.53973 1.2914E+00 1.2914E+00 S 5 1 0 M + gel_in_photographic_emulsion +gel in photographic emulsion + 74.8 3.2687 0.1709 2.7058 0.10102 3.4418 0.00 + 1 1.000000 0.081180 + 6 0.430104 0.416060 + 7 0.098607 0.111240 + 8 0.295390 0.380640 + 16 0.004213 0.010880 +---------------------------------------------------------------------------- + 169 Pyrex 5 -1.0000000000 0.49707 2.2300E+00 2.2300E+00 S 6 1 0 M + borosilicate_glass_Pyrex_Corning_7740 +borosilicate glass (Pyrex Corning 7740) + 134.0 3.9708 0.1479 2.9933 0.08270 3.5224 0.00 + 5 1.000000 0.040061 + 8 9.100880 0.539564 + 11 0.330918 0.028191 + 13 0.116461 0.011644 + 14 3.624571 0.377220 + 19 0.022922 0.003321 +---------------------------------------------------------------------------- + 170 Lead 5 -1.0000000000 0.42101 6.2200E+00 6.2200E+00 S 5 1 0 M + lead_glass +lead glass + 526.4 5.8476 0.0614 3.8146 0.09544 3.0740 0.00 + 8 1.000000 0.156453 + 14 0.294445 0.080866 + 22 0.017288 0.008092 + 33 0.003618 0.002651 + 82 0.371118 0.751938 +---------------------------------------------------------------------------- + 171 Glass 5 -1.0000000000 0.49731 2.4000E+00 2.4000E+00 S 4 1 0 M + plate_glass +plate glass + 145.4 4.0602 0.1237 3.0649 0.07678 3.5381 0.00 + 8 1.000000 0.459800 + 11 0.145969 0.096441 + 14 0.416971 0.336553 + 20 0.093077 0.107205 +---------------------------------------------------------------------------- + 172 Gluco 5 -1.0000000000 0.53499 1.5400E+00 1.5400E+00 S 3 14 0 O + glucose_dextrose_monohydrate +glucose (dextrose monohydrate) (C%6#H%12#O%6#.H%2#O)) + 77.2 3.1649 0.1411 2.6700 0.10783 3.3946 0.00 + 1 14.000000 0.071204 + 6 6.000342 0.363652 + 8 7.000253 0.565144 +---------------------------------------------------------------------------- + 173 Gluta 5 -1.0000000000 0.53371 1.4600E+00 1.4600E+00 S 4 10 0 O + glutamine +glutamine (C%5#H%10#N%2#O%3#) + 73.3 3.1167 0.1347 2.6301 0.11931 3.3254 0.00 + 1 10.000000 0.068965 + 6 5.000360 0.410926 + 7 2.000082 0.191681 + 8 3.000137 0.328427 +---------------------------------------------------------------------------- + 174 Glyce 5 -1.0000000000 0.54292 1.2613E+00 1.2613E+00 L 3 8 0 O + glycerol +glycerol (C%3#H%5#(OH)%3#) + 72.6 3.2267 0.1653 2.6862 0.10168 3.4481 0.00 + 1 8.000000 0.087554 + 6 3.000185 0.391262 + 8 3.000108 0.521185 +---------------------------------------------------------------------------- + 175 Guani 5 -1.0000000000 0.51612 1.5800E+00 1.5800E+00 S 4 5 0 O + guanine +guanine (C%5#H%5#N%5#O) + 75.0 3.1171 0.1163 2.4296 0.20530 3.0186 0.00 + 1 5.000000 0.033346 + 6 5.000329 0.397380 + 7 5.000189 0.463407 + 8 1.000041 0.105867 +---------------------------------------------------------------------------- + 176 Gypsu 5 -1.0000000000 0.51113 2.3200E+00 2.3200E+00 S 4 4 0 I + gypsum_plaster_of_Paris +gypsum (plaster of Paris, CaSO%4#$\cdot$H%2#O) + 129.7 3.8382 0.0995 3.1206 0.06949 3.5134 0.00 + 1 4.000000 0.023416 + 8 6.000387 0.557572 + 16 0.999889 0.186215 + 20 1.000123 0.232797 +---------------------------------------------------------------------------- + 177 Hepta 5 -1.0000000000 0.57992 6.8376E-01 6.8376E-01 L 2 16 0 O + n-heptane +n-heptane (C%7#H%16#) + 54.4 3.1978 0.1928 2.5706 0.11255 3.4885 0.00 + 1 16.000000 0.160937 + 6 7.000435 0.839063 +---------------------------------------------------------------------------- + 178 Hexan 5 -1.0000000000 0.59020 6.6030E-01 6.6030E-01 L 2 14 0 O + n-hexane +n-hexane C%6#H%14# + 54.0 3.2156 0.1984 2.5757 0.11085 3.5027 0.00 + 1 14.000000 0.163741 + 6 6.000366 0.836259 +---------------------------------------------------------------------------- + 179 Kapto 5 -1.0000000000 0.51264 1.4200E+00 1.4200E+00 S 4 10 2 P + polyimide_film +polyimide film [(C%22#H%10#N%2#O%5#)%n#] + 79.6 3.3497 0.1509 2.5631 0.15972 3.1921 0.00 + 1 10.000000 0.026362 + 6 22.001366 0.691133 + 7 2.000071 0.073270 + 8 5.000195 0.209235 +Index of ref 1.70 +Note: DuPont's Kapton is <a href="../Kapton.pdf">poly-oxydiphenylene-pyromellitimide</a> +---------------------------------------------------------------------------- + 180 La-O- 5 -1.0000000000 0.42599 6.2800E+00 6.2800E+00 S 3 1 0 I + lanthanum_oxybromide_LaOBr +lanthanum oxybromide (LaOBr) + 439.7 5.4666 -0.0350 3.3288 0.17830 2.8457 0.00 + 8 1.000000 0.068138 + 35 1.000000 0.340294 + 57 0.999999 0.591568 +---------------------------------------------------------------------------- + 181 La2-O 5 -1.0000000000 0.42706 5.8600E+00 5.8600E+00 S 3 2 0 I + lanthanum_oxysulfide +lanthanum oxysulfide La%2#O%2#S + 421.2 5.4470 -0.0906 3.2664 0.21501 2.7298 0.00 + 8 2.000000 0.093600 + 16 0.999802 0.093778 + 57 1.999986 0.812622 +---------------------------------------------------------------------------- + 182 Pb-O 5 -1.0000000000 0.40323 9.5300E+00 9.5300E+00 S 2 1 0 I + lead_oxide_PbO +lead oxide (PbO) + 766.7 6.2162 0.0356 3.5456 0.19645 2.7299 0.00 + 8 1.000000 0.071682 + 82 1.000001 0.928318 +---------------------------------------------------------------------------- + 183 Li-N- 5 -1.0000000000 0.52257 1.1780E+00 1.1780E+00 S 3 2 0 I + lithium_amide +lithium amide (LiNH%2#) + 55.5 2.7961 0.0198 2.5152 0.08740 3.7534 0.00 + 1 2.000000 0.087783 + 3 1.000036 0.302262 + 7 1.000035 0.609955 +---------------------------------------------------------------------------- + 184 LI2-C 5 -1.0000000000 0.49720 2.1100E+00 2.1100E+00 S 3 2 0 I + lithium_carbonate +lithium carbonate (Li%2#C-O%3#) + 87.9 3.2029 0.0551 2.6598 0.09936 3.5417 0.00 + 3 2.000000 0.187871 + 6 1.000025 0.162550 + 8 2.999995 0.649579 +---------------------------------------------------------------------------- + 185 Li-F 5 -1.0000000000 0.46262 2.6350E+00 2.6350E+00 S 2 1 3 I + lithium_fluoride_LiF +lithium fluoride (LiF) + 94.0 3.1667 0.0171 2.7049 0.07593 3.7478 0.00 + 3 1.000000 0.267585 + 9 1.000001 0.732415 +melti 848.2 Lithium flouride +boili 1673. Lithium flouride +Index of ref 1.392 old RPP value +---------------------------------------------------------------------------- + 186 Li-H 5 -1.0000000000 0.50321 8.2000E-01 8.2000E-01 S 2 1 1 I + lithium_hydride_LiH +lithium hydride (LiH) + 36.5 2.3580 -0.0988 1.4515 0.90567 2.5849 0.00 + 1 1.000000 0.126797 + 3 1.000043 0.873203 +Melting point 692 +---------------------------------------------------------------------------- + 187 Li-I 5 -1.0000000000 0.41939 3.4940E+00 3.4940E+00 S 2 1 0 I + lithium_iodide_LiI +lithium iodide (LiI) + 485.1 6.2671 0.0892 3.3702 0.23274 2.7146 0.00 + 3 1.000000 0.051858 + 53 1.000006 0.948142 +---------------------------------------------------------------------------- + 188 Li2-O 5 -1.0000000000 0.46952 2.0130E+00 2.0130E+00 S 2 2 0 I + lithium_oxide +lithium oxide Li%2#O + 73.6 2.9340 -0.0511 2.5874 0.08035 3.7878 0.00 + 3 2.000000 0.464570 + 8 1.000000 0.535430 +---------------------------------------------------------------------------- + 189 Li2-B 5 -1.0000000000 0.48487 2.4400E+00 2.4400E+00 S 3 2 0 I + lithium_tetraborate +lithium tetraborate Li%2#B%4#O%7# + 94.6 3.2093 0.0737 2.6502 0.11075 3.4389 0.00 + 3 2.000000 0.082085 + 5 3.999624 0.255680 + 8 6.999978 0.662235 +---------------------------------------------------------------------------- + 190 Lung 5 -1.0000000000 0.54965 1.0500E+00 1.0500E+00 S 13 1 0 B + lung_ICRP +lung (ICRP) + 75.3 3.4708 0.2261 2.8001 0.08588 3.5353 0.00 + 1 1.000000 0.101278 + 6 0.084775 0.102310 + 7 0.020357 0.028650 + 8 0.470926 0.757072 + 11 0.000797 0.001840 + 12 0.000299 0.000730 + 15 0.000257 0.000800 + 16 0.000698 0.002250 + 17 0.000747 0.002660 + 19 0.000494 0.001940 + 20 0.000022 0.000090 + 26 0.000066 0.000370 + 30 0.000002 0.000010 +---------------------------------------------------------------------------- + 191 M3-wa 5 -1.0000000000 0.55512 1.0500E+00 1.0500E+00 S 5 1 0 B + M3_WAX +M3 WAX + 67.9 3.2540 0.1523 2.7529 0.07864 3.6412 0.00 + 1 1.000000 0.114318 + 6 0.481436 0.655823 + 8 0.050800 0.092183 + 12 0.048898 0.134792 + 20 0.000634 0.002883 +---------------------------------------------------------------------------- + 192 Mg-C- 5 -1.0000000000 0.49814 2.9580E+00 2.9580E+00 S 3 1 0 I + magnesium_carbonate +magnesium carbonate MgCO%3# + 118.0 3.4319 0.0860 2.7997 0.09219 3.5003 0.00 + 6 1.000000 0.142455 + 8 2.999932 0.569278 + 12 0.999977 0.288267 +---------------------------------------------------------------------------- + 193 Mg-F2 5 -1.0000000000 0.48153 3.0000E+00 3.0000E+00 S 2 2 0 I + magnesium_fluoride +magnesium fluoride MgF%2# + 134.3 3.7105 0.1369 2.8630 0.07934 3.6485 0.00 + 9 2.000000 0.609883 + 12 1.000000 0.390117 +---------------------------------------------------------------------------- + 194 Mg-O 5 -1.0000000000 0.49622 3.5800E+00 3.5800E+00 S 2 1 0 I + magnesium_oxide_MgO +magnesium oxide MgO + 143.8 3.6404 0.0575 2.8580 0.08313 3.5968 0.00 + 8 1.000000 0.396964 + 12 1.000000 0.603036 +---------------------------------------------------------------------------- + 195 Mg-B4 5 -1.0000000000 0.49014 2.5300E+00 2.5300E+00 S 3 4 0 I + magnesium_tetraborate +magnesium tetraborate MgB%4#O%7# + 108.3 3.4328 0.1147 2.7635 0.09703 3.4893 0.00 + 5 4.000000 0.240837 + 8 7.000634 0.623790 + 12 1.000090 0.135373 +---------------------------------------------------------------------------- + 196 Hg-I2 5 -1.0000000000 0.40933 6.3600E+00 6.3600E+00 S 2 2 0 I + mercuric_iodide +mercuric iodide HgI%2# + 684.5 6.3787 0.1040 3.4728 0.21513 2.7264 0.00 + 53 2.000000 0.558560 + 80 0.999999 0.441440 +---------------------------------------------------------------------------- + 197 Metha 5 -1.0000000000 0.62334 6.6715E-04 6.6715E-04 G 2 4 3 O + methane +methane (CH%4#) + 41.7 9.5243 1.6263 3.9716 0.09253 3.6257 0.00 + 1 4.000000 0.251306 + 6 1.000064 0.748694 +Boiling point -161.48 +Melting point -182.47 +Index of ref (n-1)*E6 444.0 http://www.kayelaby.npl.co.uk/ +---------------------------------------------------------------------------- + 198 Metha 5 -1.0000000000 0.56176 7.9140E-01 7.9140E-01 L 3 4 0 O + methanol +methanol (CH%3#OH) + 67.6 3.5160 0.2529 2.7639 0.08970 3.5477 0.00 + 1 4.000000 0.125822 + 6 1.000068 0.374852 + 8 1.000043 0.499326 +---------------------------------------------------------------------------- + 199 mix-D 5 -1.0000000000 0.56479 9.9000E-01 9.9000E-01 S 5 1 0 B + mix_D_wax +mix D wax + 60.9 3.0780 0.1371 2.7145 0.07490 3.6823 0.00 + 1 1.000000 0.134040 + 6 0.487068 0.777960 + 8 0.016459 0.035020 + 12 0.011941 0.038594 + 22 0.002260 0.014386 +---------------------------------------------------------------------------- + 200 MS20 5 -1.0000000000 0.53886 1.0000E+00 1.0000E+00 S 6 1 0 B + ms20_tissue_substitute +ms20 tissue substitute + 75.1 3.5341 0.1997 2.8033 0.08294 3.6061 0.00 + 1 1.000000 0.081192 + 6 0.603046 0.583442 + 7 0.015774 0.017798 + 8 0.144617 0.186381 + 12 0.066547 0.130287 + 17 0.000315 0.000900 +---------------------------------------------------------------------------- + 201 Skelm 5 -1.0000000000 0.54938 1.0400E+00 1.0400E+00 S 13 1 0 B + skeletal_muscle_ICRP +skeletal muscle (ICRP) + 75.3 3.4809 0.2282 2.7999 0.08636 3.5330 0.00 + 1 1.000000 0.100637 + 6 0.089918 0.107830 + 7 0.019793 0.027680 + 8 0.472487 0.754773 + 11 0.000327 0.000750 + 12 0.000078 0.000190 + 15 0.000582 0.001800 + 16 0.000753 0.002410 + 17 0.000223 0.000790 + 19 0.000774 0.003020 + 20 0.000007 0.000030 + 26 0.000007 0.000040 + 30 0.000008 0.000050 +---------------------------------------------------------------------------- + 202 Strim 5 -1.0000000000 0.55005 1.0400E+00 1.0400E+00 S 9 1 0 B + striated_muscle_ICRU +striated muscle (ICRU) + 74.7 3.4636 0.2249 2.8032 0.08507 3.5383 0.00 + 1 1.000000 0.101997 + 6 0.101201 0.123000 + 7 0.024693 0.035000 + 8 0.450270 0.729003 + 11 0.000344 0.000800 + 12 0.000081 0.000200 + 15 0.000638 0.002000 + 16 0.001541 0.005000 + 19 0.001264 0.005000 +---------------------------------------------------------------------------- + 203 Eqvmu 5 -1.0000000000 0.54828 1.1100E+00 1.1100E+00 L 4 1 0 B + muscle-equivalent_liquid_with_sucrose +muscle-equivalent liquid with sucrose + 74.3 3.3910 0.2098 2.7550 0.09481 3.4699 0.00 + 1 1.000000 0.098234 + 6 0.133452 0.156214 + 7 0.025970 0.035451 + 8 0.455395 0.710100 +---------------------------------------------------------------------------- + 204 Eqvmu 5 -1.0000000000 0.55014 1.0700E+00 1.0700E+00 L 4 1 0 B + muscle-equivalent_liquid_without_sucrose +muscle-equivalent liquid without sucrose + 74.2 3.4216 0.2187 2.7680 0.09143 3.4982 0.00 + 1 1.000000 0.101969 + 6 0.098807 0.120058 + 7 0.025018 0.035451 + 8 0.458746 0.742522 +---------------------------------------------------------------------------- + 205 Napht 5 -1.0000000000 0.53053 1.1450E+00 1.1450E+00 S 2 8 0 O + naphtalene +naphtalene (C%10#H%8#) + 68.4 3.2274 0.1374 2.5429 0.14766 3.2654 0.00 + 1 8.000000 0.062909 + 6 10.000584 0.937091 +---------------------------------------------------------------------------- + 206 Nitro 5 -1.0000000000 0.51986 1.1987E+00 1.1987E+00 L 4 5 0 O + nitrobenzene +nitrobenzene (C%6#H%5#NO%2#) + 75.8 3.4073 0.1777 2.6630 0.12727 3.3091 0.00 + 1 5.000000 0.040935 + 6 6.000329 0.585374 + 7 1.000028 0.113773 + 8 2.000058 0.259918 +---------------------------------------------------------------------------- + 207 N2-O 5 -1.0000000000 0.49985 1.8309E-03 1.8309E-03 G 2 2 0 I + nitrous_oxide +nitrous oxide (N%2#O) + 84.9 10.1575 1.6477 4.1565 0.11992 3.3318 0.00 + 7 2.000000 0.636483 + 8 1.000003 0.363517 +---------------------------------------------------------------------------- + 208 Elvam 5 -1.0000000000 0.55063 1.0800E+00 1.0800E+00 S 4 1 0 P + Nylon_du_Pont_Elvamide_8062M +Nylon du Pont Elvamide 8062M + 64.3 3.1250 0.1503 2.6004 0.11513 3.4044 0.00 + 1 1.000000 0.103509 + 6 0.525704 0.648415 + 7 0.069199 0.099536 + 8 0.090405 0.148539 +---------------------------------------------------------------------------- + 209 Nylon 5 -1.0000000000 0.54790 1.1400E+00 1.1800E+00 S 4 11 0 P + Nylon_type_6_6-6 +Nylon (type 6, 6/6) [(CH(CH%2#)%5#NO)%n#] + 63.9 3.0634 0.1336 2.5834 0.11818 3.3826 0.00 + 1 11.000000 0.097976 + 6 6.000405 0.636856 + 7 1.000040 0.123779 + 8 1.000045 0.141389 +---------------------------------------------------------------------------- + 210 Nylon 5 -1.0000000000 0.55236 1.1400E+00 1.1400E+00 S 4 15 0 P + Nylon_type_6-10 +Nylon type 6/10 [(CH(CH%2#)%7#NO)%n#] + 63.2 3.0333 0.1304 2.5681 0.11852 3.3912 0.00 + 1 15.000000 0.107062 + 6 8.000514 0.680449 + 7 1.000039 0.099189 + 8 1.000039 0.113300 +---------------------------------------------------------------------------- + 211 Rilsa 5 -1.0000000000 0.55649 1.4250E+00 1.4250E+00 S 4 21 0 P + Nylon_type_11_Rilsan +Nylon type 11 Rilsan ([C%11#H%21#ON)%n#], [(CH(CH%2#)%10#NO)%n#]) + 61.6 2.7514 0.0678 2.4281 0.14868 3.2576 0.00 + 1 21.000000 0.115476 + 6 11.000696 0.720819 + 7 1.000035 0.076417 + 8 1.000042 0.087289 +---------------------------------------------------------------------------- + 212 Octan 5 -1.0000000000 0.57778 7.0260E-01 7.0260E-01 L 2 18 2 O + octane +octane (C%8#H%18#) + 54.7 3.1834 0.1882 2.5664 0.11387 3.4776 0.00 + 1 18.000000 0.158821 + 6 8.000541 0.841179 +Boiling point 125.6 +Melting point -58.7 +---------------------------------------------------------------------------- + 213 Paraf 5 -1.0000000000 0.57275 9.3000E-01 9.3000E-01 S 2 52 0 O + paraffin +paraffin (CH%3#(CH%2#)%n\approx23#CH%3#) + 55.9 2.9551 0.1289 2.5084 0.12087 3.4288 0.00 + 1 52.000000 0.148605 + 6 25.001575 0.851395 +---------------------------------------------------------------------------- + 214 Penta 5 -1.0000000000 0.58212 6.2620E-01 6.2620E-01 L 2 12 1 O + n-pentane +n-pentane (C%5#H%12#) + 53.6 3.2504 0.2086 2.5855 0.10809 3.5265 0.00 + 1 12.000000 0.167635 + 6 5.000308 0.832365 +Index of ref (n-1)*E6 1711.0 http://www.kayelaby.npl.co.uk/ +---------------------------------------------------------------------------- + 215 Photo 5 -1.0000000000 0.45453 3.8150E+00 3.8150E+00 S 8 1 0 M + photographic_emulsion +photographic emulsion + 331.0 5.3319 0.1009 3.4866 0.12399 3.0094 0.00 + 1 1.000000 0.014100 + 6 0.430082 0.072261 + 7 0.098602 0.019320 + 8 0.295338 0.066101 + 16 0.004213 0.001890 + 35 0.312321 0.349103 + 47 0.314193 0.474105 + 53 0.001757 0.003120 +---------------------------------------------------------------------------- + 216 Plast 5 -1.0000000000 0.54141 1.0320E+00 1.0320E+00 S 2 10 1 P + polyvinyltoluene +polyvinyltoluene [(2-CH%3#C%6#H%4#CHCH%2#)%n#] + 64.7 3.1997 0.1464 2.4855 0.16101 3.2393 0.00 + 1 10.000000 0.085000 + 6 9.033760 0.915000 +Index of refraction 1.58 +---------------------------------------------------------------------------- + 217 Pu-O2 5 -1.0000000000 0.40583 1.1460E+01 1.1460E+01 S 2 2 0 I + plutonium_dioxide +plutonium dioxide (PuO%2#) + 746.5 5.9719 -0.2311 3.5554 0.20594 2.6522 0.00 + 8 2.000000 0.118055 + 94 0.979460 0.881945 +---------------------------------------------------------------------------- + 218 Pacry 5 -1.0000000000 0.52767 1.1700E+00 1.1700E+00 S 3 3 0 P + polyacrylonitrile +polyacrylonitrile [(C%3#H%3#N)%n#] + 69.6 3.2459 0.1504 2.5159 0.16275 3.1975 0.00 + 1 3.000000 0.056983 + 6 3.000184 0.679056 + 7 1.000034 0.263962 +---------------------------------------------------------------------------- + 219 Lexan 5 -1.0000000000 0.52697 1.2000E+00 1.2000E+00 S 3 14 0 P + polycarbonate_Lexan +polycarbonate (Lexan, [OC%6#H%4#C(CH%3#)%2#C%6#H%4#OCO)%n#]) + 73.1 3.3201 0.1606 2.6225 0.12860 3.3288 0.00 + 1 14.000000 0.055491 + 6 16.001127 0.755751 + 8 3.000142 0.188758 +---------------------------------------------------------------------------- + 220 Pchlo 5 -1.0000000000 0.52518 1.3000E+00 1.3000E+00 S 3 18 0 P + polychlorostyrene +polychlorostyrene [(C%17#H%18#C%l2#)%n#] + 81.7 3.4659 0.1238 2.9241 0.07530 3.5441 0.00 + 1 18.000000 0.061869 + 6 17.001129 0.696325 + 17 2.000101 0.241806 +---------------------------------------------------------------------------- + 221 Polye 5 -1.0000000000 0.57034 9.4000E-01 8.9000E-01 S 2 2 0 P + polyethylene +polyethylene [(CH%2#CH%2#)%n#] + 57.4 3.0016 0.1370 2.5177 0.12108 3.4292 0.00 + 1 2.000000 0.143711 + 6 1.000062 0.856289 +---------------------------------------------------------------------------- + 222 Poly 5 -1.0000000000 0.52037 1.4000E+00 1.4000E+00 S 3 4 0 P + polyethylene_terephthalate_Mylar +polyethylene terephthalate (Mylar) [(C%10#H%8#O%4#)%n#] + 78.7 3.3262 0.1562 2.6507 0.12679 3.3076 0.00 + 1 4.000000 0.041959 + 6 5.000266 0.625017 + 8 2.000059 0.333025 +---------------------------------------------------------------------------- + 223 Acryl 5 -1.0000000000 0.53937 1.1900E+00 1.1900E+00 S 3 8 1 P + polymethylmethacrylate_acrylic +polymethylmethacrylate (acrylic, [(CH%2#C(CH%3#)(COOCH%3#))%n#] + 74.0 3.3297 0.1824 2.6681 0.11433 3.3836 0.00 + 1 8.000000 0.080538 + 6 5.000308 0.599848 + 8 2.000073 0.319614 +Index of refraction 1.491 +---------------------------------------------------------------------------- + 224 Polyo 5 -1.0000000000 0.53287 1.4250E+00 1.4250E+00 S 3 2 0 P + polyoxymethylene +polyoxymethylene [(CH%2#O)%n#] + 77.4 3.2514 0.1584 2.6838 0.10808 3.4002 0.00 + 1 2.000000 0.067135 + 6 1.000059 0.400017 + 8 1.000035 0.532848 +---------------------------------------------------------------------------- + 225 Polyp 5 -1.0000000000 0.55998 9.4000E-01 9.0500E-01 S 2 3 2 P + polypropylene +polypropylene [(CH(CH%3#)CH%2#)%n#] + 57.4 3.0016 0.1370 2.5177 0.12108 3.4292 0.00 + 1 2.000000 0.143711 + 6 1.000062 0.856289 +Note: Chem formula wrong in Sternheimer. <i>I</i> and density effect constants + for polyethylene, scaled with density, were used for these calculations. +---------------------------------------------------------------------------- + 226 Polys 5 -1.0000000000 0.53768 1.0600E+00 1.0600E+00 S 2 8 1 P + polystyrene +polystyrene [(C%6#H%5#CHCH%2#)%n#] + 68.7 3.2999 0.1647 2.5031 0.16454 3.2224 0.00 + 1 8.000000 0.077418 + 6 8.000541 0.922582 +Index of ref 1.59 +---------------------------------------------------------------------------- + 227 Teflo 5 -1.0000000000 0.47992 2.2000E+00 2.2000E+00 S 2 1 0 P + polytetrafluoroethylene_Teflon +polytetrafluoroethylene (Teflon, [(CF%2#CF%2#)%n#]) + 99.1 3.4161 0.1648 2.7404 0.10606 3.4046 0.00 + 6 1.000000 0.240183 + 9 1.999945 0.759817 +---------------------------------------------------------------------------- + 228 KEL-F 5 -1.0000000000 0.48081 2.1000E+00 2.1000E+00 S 3 2 0 P + polytrifluorochloroethylene +polytrifluorochloroethylene [(C%2#F%3#Cl)%n#] + 120.7 3.8551 0.1714 3.0265 0.07727 3.5085 0.00 + 6 2.000000 0.206250 + 9 2.999925 0.489354 + 17 0.999983 0.304395 +---------------------------------------------------------------------------- + 229 Pviny 5 -1.0000000000 0.53432 1.1900E+00 1.1900E+00 S 3 6 0 P + polyvinylacetate +polyvinylacetate [(CH%2#CHOCOCH%3#)%n#] + 73.7 3.3309 0.1769 2.6747 0.11442 3.3762 0.00 + 1 6.000000 0.070245 + 6 4.000256 0.558066 + 8 2.000076 0.371689 +---------------------------------------------------------------------------- + 230 Pviny 5 -1.0000000000 0.54480 1.3000E+00 1.3000E+00 S 3 4 0 P + polyvinyl_alcohol +polyvinyl alcohol [(C%2#H3-O-H)%n#] + 69.7 3.1115 0.1401 2.6315 0.11178 3.3893 0.00 + 1 4.000000 0.091517 + 6 2.000131 0.545298 + 8 1.000039 0.363185 +---------------------------------------------------------------------------- + 231 Pviny 5 -1.0000000000 0.54537 1.1200E+00 1.1200E+00 S 3 13 0 P + polyvinyl_butyral +polyvinyl butyral [(C%8#H%13#0%2#)%n#] + 67.2 3.1865 0.1555 2.6186 0.11544 3.3983 0.00 + 1 13.000000 0.092802 + 6 8.000543 0.680561 + 8 2.000082 0.226637 +---------------------------------------------------------------------------- + 232 PVC 5 -1.0000000000 0.51201 1.3000E+00 1.3000E+00 S 3 3 1 P + polyvinylchloride_PVC +polyvinylchloride (PVC) [(CH%2#CHCl)%n#] + 108.2 4.0532 0.1559 2.9415 0.12438 3.2104 0.00 + 1 3.000000 0.048380 + 6 2.000138 0.384360 + 17 1.000053 0.567260 +Index of refraction 1.531 +---------------------------------------------------------------------------- + 233 Saran 5 -1.0000000000 0.49513 1.7000E+00 1.7000E+00 S 3 2 0 P + polyvinylidene_chloride_Saran +polyvinylidene chloride (Saran) [(C%2#H%2#Cl%2#)%n#] + 134.3 4.2506 0.1314 2.9009 0.15466 3.1020 0.00 + 1 2.000000 0.020793 + 6 2.000176 0.247793 + 17 2.000142 0.731413 +---------------------------------------------------------------------------- + 234 Pvnyd 5 -1.0000000000 0.49973 1.7600E+00 1.7600E+00 S 3 2 0 P + polyvinylidene_fluoride +polyvinylidene fluoride [(CH%2#CHF%2#)%n#] + 88.8 3.3793 0.1717 2.7375 0.10316 3.4200 0.00 + 1 2.000000 0.031480 + 6 2.000121 0.375141 + 9 2.000069 0.593379 +---------------------------------------------------------------------------- + 235 Pvnyl 5 -1.0000000000 0.53984 1.2500E+00 1.2500E+00 S 4 9 0 P + polyvinyl_pyrrolidone +polyvinyl pyrrolidone [(C%6#H%9#NO)%n#] + 67.7 3.1017 0.1324 2.5867 0.12504 3.3326 0.00 + 1 9.000000 0.081616 + 6 6.000414 0.648407 + 7 1.000042 0.126024 + 8 1.000044 0.143953 +---------------------------------------------------------------------------- + 236 K-I 5 -1.0000000000 0.43373 3.1300E+00 3.1300E+00 S 2 1 0 I + potassium_iodide_KI +potassium iodide (KI) + 431.9 6.1088 0.1044 3.3442 0.22053 2.7558 0.00 + 19 1.000000 0.235528 + 53 1.000000 0.764472 +---------------------------------------------------------------------------- + 237 K2-O 5 -1.0000000000 0.48834 2.3200E+00 2.3200E+00 S 2 1 0 I + potassium_oxide +potassium oxide (K%2#O) + 189.9 4.6463 0.0480 3.0110 0.16789 3.0121 0.00 + 8 1.000000 0.169852 + 19 2.000003 0.830148 +---------------------------------------------------------------------------- + 238 Propa 5 -1.0000000000 0.58962 1.8794E-03 1.8680E-03 G 2 8 2 O + propane +propane (C%3#H%8#) + 47.1 8.7878 1.4326 3.7998 0.09916 3.5920 0.00 + 1 8.000000 0.182855 + 6 3.000189 0.817145 +Boiling point -42.1 +Melting point -187.63 +---------------------------------------------------------------------------- + 239 Propa 5 -1.0000000000 0.58962 4.3000E-01 4.9300E-01 L 2 8 2 O + liquid_propane +liquid propane (C%3#H%8#) + 52.0 3.5529 0.2861 2.6568 0.10329 3.5620 0.00 + 1 8.000000 0.182855 + 6 3.000189 0.817145 +Boiling point -42.1 +Melting point -187.63 +---------------------------------------------------------------------------- + 240 n-pro 5 -1.0000000000 0.56577 8.0350E-01 8.0350E-01 L 3 8 0 O + n-propyl_alcohol +n-propyl alcohol (C%3#H%7#OH) + 61.1 3.2915 0.2046 2.6681 0.09644 3.5415 0.00 + 1 8.000000 0.134173 + 6 3.000193 0.599595 + 8 1.000037 0.266232 +---------------------------------------------------------------------------- + 241 Pyrid 5 -1.0000000000 0.53096 9.8190E-01 9.8190E-01 L 3 5 0 O + pyridine +pyridine (C%5#H%5#N) + 66.2 3.3148 0.1670 2.5245 0.16399 3.1977 0.00 + 1 5.000000 0.063710 + 6 5.000285 0.759217 + 7 1.000028 0.177073 +---------------------------------------------------------------------------- + 242 Rubbe 5 -1.0000000000 0.57034 9.2000E-01 9.2000E-01 S 2 8 0 O + rubber_butyl +rubber butyl ([C%4#H8)%n#] + 56.5 2.9915 0.1347 2.5154 0.12108 3.4296 0.00 + 1 8.000000 0.143711 + 6 4.000246 0.856289 +---------------------------------------------------------------------------- + 243 Rubbe 5 -1.0000000000 0.55785 9.2000E-01 9.2000E-01 S 2 8 0 O + rubber_natural +rubber natural [(C%5#H8)%n#] + 59.8 3.1272 0.1512 2.4815 0.15058 3.2879 0.00 + 1 8.000000 0.118371 + 6 5.000309 0.881629 +---------------------------------------------------------------------------- + 244 Rubbe 5 -1.0000000000 0.51956 1.2300E+00 1.2300E+00 S 3 5 0 O + rubber_neoprene +rubber neoprene [(C%4#H%5#Cl)%n#] + 93.0 3.7911 0.1501 2.9461 0.09763 3.3632 0.00 + 1 5.000000 0.056920 + 6 4.000259 0.542646 + 17 1.000049 0.400434 +---------------------------------------------------------------------------- + 245 Si-O2 5 -1.0000000000 0.49930 2.3200E+00 2.2000E+00 S 2 2 3 I + silicon_dioxide_fused_quartz +silicon dioxide (fused quartz) (SiO%2#) + 139.2 4.0029 0.1385 3.0025 0.08408 3.5064 0.00 + 8 2.000000 0.532565 + 14 1.000000 0.467435 +Melting point 1713. +Boiling point 2950. +Index of refraction 1.458 +---------------------------------------------------------------------------- + 246 Ag-Br 5 -1.0000000000 0.43670 6.4730E+00 6.4730E+00 S 2 1 0 I + silver_bromide_AgBr +silver bromide (AgBr) + 486.6 5.6139 0.0352 3.2109 0.24582 2.6820 0.00 + 35 1.000000 0.425537 + 47 1.000000 0.574463 +---------------------------------------------------------------------------- + 247 Ag-Cl 5 -1.0000000000 0.44655 5.5600E+00 5.5600E+00 S 2 1 0 I + silver_chloride_AgCl +silver chloride (AgCl) + 398.4 5.3437 -0.0139 3.2022 0.22968 2.7041 0.00 + 17 1.000000 0.247368 + 47 0.999989 0.752632 +---------------------------------------------------------------------------- + 248 Ag-ha 5 -1.0000000000 0.43663 6.4700E+00 6.4700E+00 S 3 1 0 M + ag_halides_in_phot_emulsion +ag halides in phot emulsion + 487.1 5.6166 0.0353 3.2117 0.24593 2.6814 0.00 + 35 1.000000 0.422895 + 47 1.004995 0.573748 + 53 0.004998 0.003357 +---------------------------------------------------------------------------- + 249 Ag-I 5 -1.0000000000 0.42594 6.0100E+00 6.0100E+00 S 2 1 0 I + silver_iodide_AgI +silver iodide (AgI) + 543.5 5.9342 0.0148 3.2908 0.25059 2.6572 0.00 + 47 1.000000 0.459458 + 53 1.000000 0.540542 +---------------------------------------------------------------------------- + 250 Skin 5 -1.0000000000 0.54932 1.1000E+00 1.1000E+00 S 13 1 0 B + skin_ICRP +skin (ICRP) + 72.7 3.3546 0.2019 2.7526 0.09459 3.4643 0.00 + 1 1.000000 0.100588 + 6 0.190428 0.228250 + 7 0.033209 0.046420 + 8 0.387683 0.619002 + 11 0.000031 0.000070 + 12 0.000025 0.000060 + 15 0.000107 0.000330 + 16 0.000497 0.001590 + 17 0.000755 0.002670 + 19 0.000218 0.000850 + 20 0.000038 0.000150 + 26 0.000002 0.000010 + 30 0.000002 0.000010 +---------------------------------------------------------------------------- + 251 Na2-C 5 -1.0000000000 0.49062 2.5320E+00 2.5320E+00 S 3 1 0 I + sodium_carbonate +sodium carbonate (Na%2#CO%3#) + 125.0 3.7178 0.1287 2.8591 0.08715 3.5638 0.00 + 6 1.000000 0.113323 + 8 2.999933 0.452861 + 11 1.999955 0.433815 +---------------------------------------------------------------------------- + 252 Na-I 5 -1.0000000000 0.42697 3.6670E+00 3.6670E+00 S 2 1 3 I + sodium_iodide_NaI +sodium iodide (NaI) + 452.0 6.0572 0.1203 3.5920 0.12516 3.0398 0.00 + 11 1.000000 0.153373 + 53 1.000002 0.846627 +Melting point 660. +Boiling point 1304. +Index of ref 1.775 +---------------------------------------------------------------------------- + 253 Na2-O 5 -1.0000000000 0.48404 2.2700E+00 2.2700E+00 S 2 1 0 I + sodium_monoxide +sodium monoxide (Na%2#O) + 148.8 4.1892 0.1652 2.9793 0.07501 3.6943 0.00 + 8 1.000000 0.258143 + 11 1.999995 0.741857 +---------------------------------------------------------------------------- + 254 Na-N- 5 -1.0000000000 0.49415 2.2610E+00 2.2610E+00 S 3 1 0 I + sodium_nitrate +sodium nitrate (NaNO%3#) + 114.6 3.6502 0.1534 2.8221 0.09391 3.5097 0.00 + 7 1.000000 0.164795 + 8 3.000009 0.564720 + 11 1.000004 0.270485 +---------------------------------------------------------------------------- + 255 Stilb 5 -1.0000000000 0.53260 9.7070E-01 9.7070E-01 S 2 12 0 O + stilbene +stilbene (C%6#H%5#)CHCH(C%6#H%5#) + 67.7 3.3680 0.1734 2.5142 0.16659 3.2168 0.00 + 1 12.000000 0.067101 + 6 14.000813 0.932899 +---------------------------------------------------------------------------- + 256 Sucro 5 -1.0000000000 0.53170 1.5805E+00 1.5805E+00 S 3 22 0 O + sucrose +sucrose (C%12#H%22#O%11#) + 77.5 3.1526 0.1341 2.6558 0.11301 3.3630 0.00 + 1 22.000000 0.064779 + 6 12.000771 0.421070 + 8 11.000442 0.514151 +---------------------------------------------------------------------------- + 257 Terph 5 -1.0000000000 0.52148 1.2340E+00 1.2340E+00 S 2 10 0 O + terphenyl +terphenyl (C%18#H%10#) + 71.7 3.2639 0.1322 2.5429 0.14964 3.2685 0.00 + 1 10.000000 0.044543 + 6 18.001057 0.955457 +---------------------------------------------------------------------------- + 258 Teste 5 -1.0000000000 0.55108 1.0400E+00 1.0400E+00 S 13 1 0 B + testes_ICRP +testes (ICRP) + 75.0 3.4698 0.2274 2.7988 0.08533 3.5428 0.00 + 1 1.000000 0.104166 + 6 0.074336 0.092270 + 7 0.013775 0.019940 + 8 0.468038 0.773884 + 11 0.000951 0.002260 + 12 0.000044 0.000110 + 15 0.000391 0.001250 + 16 0.000441 0.001460 + 17 0.000666 0.002440 + 19 0.000515 0.002080 + 20 0.000024 0.000100 + 26 0.000003 0.000020 + 30 0.000003 0.000020 +---------------------------------------------------------------------------- + 259 C2-Cl 5 -1.0000000000 0.48241 1.6250E+00 1.6250E+00 L 2 2 0 O + tetrachloroethylene +tetrachloroethylene (C%2#C%l4#) + 159.2 4.6619 0.1713 2.9083 0.18595 3.0156 0.00 + 6 2.000000 0.144856 + 17 3.999924 0.855144 +---------------------------------------------------------------------------- + 260 Tl-Cl 5 -1.0000000000 0.40861 7.0040E+00 7.0040E+00 S 2 1 0 I + thallium_chloride_TlCl +thallium chloride (TlCl) + 690.3 6.3009 0.0705 3.5716 0.18599 2.7690 0.00 + 17 1.000000 0.147822 + 81 0.999999 0.852187 +---------------------------------------------------------------------------- + 261 Soft 5 -1.0000000000 0.55121 1.0000E+00 1.0000E+00 S 13 1 0 B + soft_tissue_ICRP +soft tissue (ICRP) + 72.3 3.4354 0.2211 2.7799 0.08926 3.5110 0.00 + 1 1.000000 0.104472 + 6 0.186513 0.232190 + 7 0.017138 0.024880 + 8 0.380046 0.630238 + 11 0.000474 0.001130 + 12 0.000052 0.000130 + 15 0.000414 0.001330 + 16 0.000599 0.001990 + 17 0.000365 0.001340 + 19 0.000491 0.001990 + 20 0.000055 0.000230 + 26 0.000009 0.000050 + 30 0.000004 0.000030 +---------------------------------------------------------------------------- + 262 Tissu 5 -1.0000000000 0.54975 1.0000E+00 1.0000E+00 S 4 1 0 B + soft_tissue_ICRU_four-component +soft tissue (ICRU four-component) + 74.9 3.5087 0.2377 2.7908 0.09629 3.4371 0.00 + 1 1.000000 0.101172 + 6 0.092072 0.111000 + 7 0.018493 0.026000 + 8 0.474381 0.761828 +---------------------------------------------------------------------------- + 263 TE-ga 5 -1.0000000000 0.54993 1.0641E-03 1.0641E-03 G 4 1 0 B + tissue-equivalent_gas_Methane_based +tissue-equivalent gas (Methane based) + 61.2 9.9500 1.6442 4.1399 0.09946 3.4708 0.00 + 1 1.000000 0.101869 + 6 0.375802 0.456179 + 7 0.024846 0.035172 + 8 0.251564 0.406780 +---------------------------------------------------------------------------- + 264 TE-ga 5 -1.0000000000 0.55027 1.8263E-03 1.8263E-03 G 4 1 0 B + tissue-equivalent_gas_Propane_based +tissue-equivalent gas (Propane based) + 59.5 9.3529 1.5139 3.9916 0.09802 3.5159 0.00 + 1 1.000000 0.102672 + 6 0.465030 0.568940 + 7 0.024546 0.035022 + 8 0.180007 0.293366 +---------------------------------------------------------------------------- + 265 Ti-O2 5 -1.0000000000 0.47572 4.2600E+00 4.2600E+00 S 2 2 0 I + titanium_dioxide +titanium dioxide (TiO%2#) + 179.5 3.9522 -0.0119 3.1647 0.08569 3.3267 0.00 + 8 2.000000 0.400592 + 22 1.000271 0.599408 +---------------------------------------------------------------------------- + 266 Tolue 5 -1.0000000000 0.54265 8.6690E-01 8.6690E-01 L 2 8 0 O + toluene +toluene (C%6#H%5#CH%3#) + 62.5 3.3026 0.1722 2.5728 0.13284 3.3558 0.00 + 1 8.000000 0.087510 + 6 7.000463 0.912490 +---------------------------------------------------------------------------- + 267 C2-H- 5 -1.0000000000 0.48710 1.4600E+00 1.4600E+00 L 3 1 0 O + trichloroethylene +trichloroethylene (C%2#HCl%3#) + 148.1 4.6148 0.1803 2.9140 0.18272 3.0137 0.00 + 1 1.000000 0.007671 + 6 2.000158 0.182831 + 17 3.000193 0.809498 +---------------------------------------------------------------------------- + 268 Triet 5 -1.0000000000 0.53800 1.0700E+00 1.0700E+00 S 4 15 0 O + triethyl_phosphate +triethyl phosphate C%6#H%15#PO%4# + 81.2 3.6242 0.2054 2.9428 0.06922 3.6302 0.00 + 1 15.000000 0.082998 + 6 6.000356 0.395628 + 8 4.000136 0.351334 + 15 1.000036 0.170040 +---------------------------------------------------------------------------- + 269 W-F6 5 -1.0000000000 0.42976 2.4000E+00 2.4000E+00 S 2 6 0 I + tungsten_hexafluoride +tungsten hexafluoride (WF%6#) + 354.4 5.9881 0.3020 4.2602 0.03658 3.5134 0.00 + 9 6.000000 0.382723 + 74 1.000055 0.617277 +---------------------------------------------------------------------------- + 270 U-C2 5 -1.0000000000 0.39687 1.1280E+01 1.1280E+01 S 2 2 0 I + uranium_dicarbide +uranium dicarbide (UC%2#) + 752.0 6.0247 -0.2191 3.5208 0.21120 2.6577 0.00 + 6 2.000000 0.091669 + 92 0.999978 0.908331 +---------------------------------------------------------------------------- + 271 U-C 5 -1.0000000000 0.39194 1.3630E+01 1.3630E+01 S 2 1 0 I + uranium_monocarbide_UC +uranium monocarbide (UC) + 862.0 6.1210 -0.2524 3.4941 0.22972 2.6169 0.00 + 6 1.000000 0.048036 + 92 0.999982 0.951964 +---------------------------------------------------------------------------- + 272 U-O2 5 -1.0000000000 0.39996 1.0960E+01 1.0960E+01 S 2 2 0 I + uranium_oxide +uranium oxide (UO%2#) + 720.6 5.9605 -0.1938 3.5292 0.20463 2.6711 0.00 + 8 2.000000 0.118502 + 92 0.999999 0.881498 +---------------------------------------------------------------------------- + 273 Urea 5 -1.0000000000 0.53284 1.3230E+00 1.3230E+00 S 4 4 0 O + urea +urea (CO(NH%2#)%2#) + 72.8 3.2032 0.1603 2.6525 0.11609 3.3461 0.00 + 1 4.000000 0.067131 + 6 1.000072 0.199999 + 7 2.000083 0.466459 + 8 1.000046 0.266411 +---------------------------------------------------------------------------- + 274 Valin 5 -1.0000000000 0.54632 1.2300E+00 1.2300E+00 S 4 11 0 O + valine +valine (C%5#H%11#NOi%2#) + 67.7 3.1059 0.1441 2.6227 0.11386 3.3774 0.00 + 1 11.000000 0.094641 + 6 5.000305 0.512645 + 7 1.000035 0.119565 + 8 2.000072 0.273150 +---------------------------------------------------------------------------- + 275 Viton 5 -1.0000000000 0.48585 1.8000E+00 1.8000E+00 S 3 2 0 P + viton_fluoroelastomer +viton fluoroelastomer [(C%5#H%2#F8)%n#] + 98.6 3.5943 0.2106 2.7874 0.09965 3.4556 0.00 + 1 2.000000 0.009417 + 6 5.000366 0.280555 + 9 8.000378 0.710028 +---------------------------------------------------------------------------- + 276 Water 5 -1.0000000000 0.55509 1.0000E+00 1.0000E+00 L 2 2 3 I + water_liquid +water (liquid) (H%2#O) + 79.7 3.5017 0.2400 2.8004 0.09116 3.4773 0.00 + 1 2.000000 0.111894 + 8 1.000044 0.888106 +Index of refraction 1.333 +Melting point 0.0 +Boiling point 99.964 CRC2006 4-98 +---------------------------------------------------------------------------- + 277 Water 5 -1.0000000000 0.55509 7.5618E-04 7.5618E-04 G 2 2 0 I + water_vapor +water (vapor) (H%2#O) + 71.6 10.5962 1.7952 4.3437 0.08101 3.5901 0.00 + 1 2.000000 0.111894 + 8 1.000044 0.888106 +---------------------------------------------------------------------------- + 278 Xylen 5 -1.0000000000 0.54631 8.7000E-01 8.7000E-01 L 2 10 0 O + xylene +xylene (C%8#H%10#) + 61.8 3.2698 0.1695 2.5675 0.13216 3.3564 0.00 + 1 10.000000 0.094935 + 6 8.000548 0.905065 +---------------------------------------------------------------------------- + 279 Heavy 5 -1.0000000000 0.40594 1.9300E+01 1.9300E+01 S 3 1 1 M + heavymet_in_ATLAS_calorimeter +heavymet in ATLAS calorimeter + 727.0 5.4059 0.2167 3.4960 0.15509 2.8447 0.14 + 28 1.000000 0.035000 + 29 0.395844 0.015000 + 74 8.665723 0.950000 +Note: Tungsten properties except for average Z/A used in calculations +---------------------------------------------------------------------------- + 280 Heavy 5 -1.0000000000 0.40915 1.9300E+01 1.9300E+01 S 3 1 1 M + heavymet_in_Rochester_gamma_stop +heavymet as Rochester gamma stop + 727.0 5.4059 0.2167 3.4960 0.15509 2.8447 0.14 + 28 1.000000 0.060000 + 29 0.615758 0.040000 + 74 4.788952 0.900000 +Note: Tungsten properties except for average Z/A used in calculations +---------------------------------------------------------------------------- + 281 Std-R 0 11.0000000000 9 0.50000 2.6500E+00 2.6500E+00 S 2 1 1 M + standard_rock +standard rock + 136.4 3.7738 0.0492 3.0549 0.08301 3.4120 0.00 + 11 1.000000 1.000000 + 12 0.000000 0.000000 +Note: <A HREF="../standardrock.html">Explanation of "Standard Rock." +---------------------------------------------------------------------------- + 282 Hydro 3 1.0080000000 7 0.99212 6.0000E-02 7.0800E-02 L 1 1 1 E +H nonsense + Liquid hydrogen (H%2#) + 21.8 2.8438 0.2000 2.0000 0.32969 3.0000 0.00 + 1 1.000000 1.000000 +Note: This looks like nonsense. ind = 85 is correct! +---------------------------------------------------------------------------- + 283 Heliu 6 4.0026020000 2 0.49967 1.2490E-01 1.2490E-01 L 1 1 2 E +He liquid_helium +liquid helium (He) + 41.8 4.5180 0.4729 2.0000 0.65713 3.0000 0.00 + 2 1.000000 1.000000 +Boiling point -268.93 +Index of ref 1.024 +---------------------------------------------------------------------------- + 284 Nitro 3 14.0070000000 2 0.49976 8.0700E-01 8.0700E-01 L 1 1 4 E +N liquid_nitrogen +liquid nitrogen (N%2#) + 82.0 3.9996 0.3039 2.0000 0.53289 3.0000 0.00 + 7 1.000000 1.000000 +Melting point -210.00 +Boiling point -195.86 +Index of ref 1.19876 CRC2006 4-148 +Note: Index of refraction at boiling point, 1 atm. +---------------------------------------------------------------------------- + 285 Oxyge 3 15.9990000000 3 0.50002 1.1410E+00 1.1410E+00 L 1 1 4 E +O liquid_oxygen +liquid oxygen (O%2#) + 95.0 3.9471 0.2868 2.0000 0.52231 3.0000 0.00 + 8 1.000000 1.000000 +Melting point (C) -218.79 +Boiling point (C) -182.95 +Index of ref 1.2243 +Note: Index of refraction at boiling point, 1 atm. +---------------------------------------------------------------------------- + 286 Fluor 9 18.9984031630 6 0.47372 1.5070E+00 1.5070E+00 L 1 1 2 E +F liquid_fluorine +liquid fluorine (F%2#) + 115.0 4.1050 0.2000 3.0000 0.14504 3.0000 0.00 + 9 1.000000 1.000000 +Melting point -219.62 +Boiling point -188.12 +---------------------------------------------------------------------------- + 287 Neon 4 20.1797000000 6 0.49555 1.2040E+00 1.2040E+00 L 1 1 3 E +Ne liquid_neon +liquid neon (Ne) + 137.0 4.6345 0.2000 3.0000 0.16916 3.0000 0.00 + 10 1.000000 1.000000 +Boiling point -246.08 +Melting point -248.59 +Index of ref 1.092 +---------------------------------------------------------------------------- + 288 Chlor 3 35.4530000000 2 0.47951 1.5740E+00 1.5740E+00 L 1 1 2 E +Cl liquid_chlorine +liquid chlorine (Cl%2#) + 174.0 4.8776 0.2000 3.0000 0.18024 3.0000 0.00 + 17 1.000000 1.000000 +Melting point -101.5 +Boiling point -34.04 +---------------------------------------------------------------------------- + 289 Argon 3 39.9480000000 1 0.45059 1.3960E+00 1.3960E+00 L 1 1 3 E +Ar liquid_argon +liquid argon (Ar) + 188.0 5.2146 0.2000 3.0000 0.19559 3.0000 0.00 + 18 1.000000 1.000000 +Boiling point -185.85 +Melting point -189.36 +Index of ref 1.233 +---------------------------------------------------------------------------- + 290 Bromi 3 79.9040000000 1 0.43803 3.1028E+00 3.1028E+00 L 1 1 2 E +Br liquid_bromine +bromine liquid (Br%2#) + 357.0 0.0000 0.0000 0.0000 0.0000 0.0000 0.00 + 35 1.000000 1.000000 +melting point -7.2 +boiling point 58.78 +---------------------------------------------------------------------------- + 291 Krypt 3 83.7980000000 2 0.42960 2.4180E+00 2.4180E+00 L 1 1 4 E +Kr liquid_krypton_Kr +liquid krypton (Kr) + 352.0 5.9674 0.4454 3.0000 0.23491 3.0000 0.00 + 36 1.000000 1.000000 +melting point -157.36 +boiling point -153.22 +Index refraction 1.3032 CRC2006 4-148 +Note: Index of refraction at boiling point, 1 atm. +---------------------------------------------------------------------------- + 292 Xenon 3 131.2930000000 6 0.41129 2.9530E+00 2.9530E+00 L 1 1 4 E +Xe liquid_xenon_Xe +liquid xenon (Xe) + 482.0 6.4396 0.5993 3.0000 0.26595 3.0000 0.00 + 54 1.000000 1.000000 +Melting point -111.75 +Boiling point -108.0 +Index refraction 1.3918 CRC2006 4-148 +Note: Index of refraction at boiling point, 1 atm. +---------------------------------------------------------------------------- + 293 C-O2 5 -1.0000000000 0.49989 1.5630E+00 1.5630E+00 S 2 2 1 I + solid_carbon_dioxide_dry_ice +solid carbon dioxide (dry ice, CO%2#) + 85.0 3.4513 0.2000 2.0000 0.43387 3.0000 0.00 + 6 2.000000 0.272916 + 8 4.000010 0.727084 +Note: Sublimation point 194.7 K = -78.4 C +---------------------------------------------------------------------------- + 294 Hydro 5 1.0079400000 7 0.99212 6.0000E-02 6.0000E-02 L 1 1 0 E +H bubble_chamber_H_liquid +Hydrogen BC liquid DEG calc to check code + 21.8 3.0093 0.2000 2.0000 0.35807 3.0000 0.00 + 1 1.000000 1.000000 +---------------------------------------------------------------------------- + 295 Water 5 -1.0000000000 0.55509 1.0000E+00 1.0000E+00 L 2 2 0 I + water_as_calc_from_steam_to_check_code +water as calc from steam to check code + 71.6 3.5017 0.2000 2.0000 0.44251 3.0000 0.00 + 1 2.000000 0.111894 + 8 1.000044 0.888106 +---------------------------------------------------------------------------- + 296 Aerog 5 -1.0000000000 0.50093 2.0000E-01 2.0000E-01 S 3 2 1 M + silica_aerogel +silica aerogel for rho = 0.2 (0.03 H%2#O, 0.97 SiO%2#) + 139.2 6.4507 0.6029 3.0000 0.26675 3.0000 0.00 + 8 2.000000 0.543192 + 14 1.000000 0.453451 + 1 2.000000 0.003357 +Note: See A. R. Buzykaev et al, NIM A433 396 (1999) +---------------------------------------------------------------------------- + 297 Carbo 4 12.0107000000 8 0.49955 2.2650E+00 3.5200E+00 S 1 1 2 E +C carbon_gem_diamond +carbon (gem diamond) + 78.0 2.8680 -0.0178 2.3415 0.26142 2.8697 0.12 + 6 1.000000 1.000000 +Note: variety of melting points found, e.g. 4400 C, 3675 C +Index of ref (n-1)*E6 2.419 +---------------------------------------------------------------------------- + 298 Deute 9 2.014101764 13 0.49650 1.8000E-04 1.6770E-04 D 1 1 3 E +D deuterium_gas +deuterium gas (D%2#) + 19.2 9.5835 1.8639 3.2718 0.14092 5.7273 0.00 + 1 1.000000 1.000000 +Boiling point (C) -249.5 (mass from Phys. Rev. A 47, 3433 - 3436 (1993)) +Triple point -254.461 CRC2006 +Index of ref (n-1)*E6 138.0 +---------------------------------------------------------------------------- + 299 D-liq 9 2.014101764 13 0.49650 1.4320E-01 1.6380E-01 L 1 1 3 E +D liquid_deuterium +liquid deuterium (D%2#) + 21.8 3.2632 0.4759 1.9215 0.13483 5.6249 0.00 + 1 1.000000 1.000000 +Boiling point -249.5 +Triple point -254.461 CRC2006 +Index of ref 1.112 +---------------------------------------------------------------------------- + 300 Salt 5 -1.0000000000 0.47910 2.1650E+00 2.1700E+00 S 2 2 3 I + sodium_chloride_NaCl +sodium chloride (NaCl) + 175.3 4.4250 0.2000 3.0000 0.15962 3.0000 0.00 + 11 1.000000 0.393375 + 17 1.000000 0.606626 +Melting point (C) 802.018 CRC2008 15-11 +Boiling point (C) 1465. +Index of refraction 1.544 +---------------------------------------------------------------------------- + 301 PbWO4 5 -1.0000000000 0.41315 8.3900E+00 8.3000E+00 S 3 1 2 I + lead_tungstate +lead tungstate (PbWO%4#) + 600.7 5.8420 0.4045 3.0000 0.22758 3.0000 0.00 + 82 1.000000 0.455347 + 74 1.000000 0.404011 + 8 4.000000 0.140462 +Melting point 1123. +Index of refraction 2.20 +---------------------------------------------------------------------------- + 302 Calif 5 251.0795900000 3 0.39031 1.5100E+00 1.5100E+01 S 1 1 3 R +Cf californium_Cf +californium (Cf) + 966.0 6.3262 0.5623 3.0000 0.25796 3.0000 0.00 + 98 1.000000 1.000000 +melting 900. +Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +Note: I<SUB><I>eff</I></SUB> = 966 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 303 Einst 4 252.0830000000 4 0.39273 0.0000E+00 1.4000E+01 S 1 1 3 R +Es einsteinium_Es +einsteinium (Es) + 980.0 6.3488 0.5697 3.0000 0.25952 3.0000 0.00 + 99 1.000000 1.000000 +melting 860. +Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 980 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 304 Fermi 5 257.0951000000 5 0.38896 0.0000E+00 1.4000E+01 S 1 1 3 R +Fm fermium_Fm +fermium (Fm) + 994.0 6.3868 0.5821 3.0000 0.26219 3.0000 0.00 + 100 1.000000 1.000000 +Melting: 1527. +Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 994 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 305 Mende 5 258.0984300000 3 0.39132 0.0000E+00 1.4000E+01 S 1 1 3 R +Md mendelevium_Md +mendelevium (Md) + 1007.0 6.4068 0.5886 3.0000 0.26360 3.0000 0.00 + 101 1.000000 1.000000 +Melting 827. +Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1007 eV assumed in calculating critical energies and <I><I>dE/dx</I></I>. +---------------------------------------------------------------------------- + 306 Nobel 4 259.1010000000 7 0.39367 0.0000E+00 1.4000E+01 S 1 1 2 R +No nobelium_No +nobelium (No) + 1020.0 6.4264 0.5950 3.0000 0.26500 3.0000 0.00 + 102 1.000000 1.000000 +Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1020 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 307 Lawre 5 262.1096100000 2 0.39296 0.0000E+00 1.4000E+01 S 1 1 2 R +Lr lawrencium_Lr +lawrencium (Lr) + 1034.0 6.4555 0.6045 3.0000 0.26710 3.0000 0.00 + 103 1.000000 1.000000 +Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = Z*10.0 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 308 Ruthe 5 267.1217900000 4 0.38934 0.0000E+00 1.4000E+01 S 1 1 2 R +Rf rutherfordium_Rf +rutherfordium (Rf) + 1047.0 6.4898 0.6157 3.0000 0.26960 3.0000 0.00 + 104 1.000000 1.000000 +Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1047 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 309 Dubni 5 268.1256700000 4 0.39161 0.0000E+00 1.4000E+01 S 1 1 2 R +Db dubnium_Db +dubnium (Db) + 1061.0 6.5105 0.6224 3.0000 0.27114 3.0000 0.00 + 105 1.000000 1.000000 +Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1061 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 310 Seabo 5 269.1286300000 5 0.39095 0.0000E+00 1.4000E+01 S 1 1 2 R +Sg seaborgium_Sg +seaborgium (Sg) + 1074.0 6.5365 0.6309 3.0000 0.27308 3.0000 0.00 + 106 1.000000 1.000000 +Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1074 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 311 Bohri 5 270.1333600000 4 0.39610 0.0000E+00 1.4000E+01 S 1 1 2 R +Bh bohrium_Bh +bohrium (Bh) + 1087.0 6.5549 0.6369 3.0000 0.27447 3.0000 0.00 + 107 1.000000 1.000000 +Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1087 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 312 Hassi 5 269.1337500000 13 0.40129 0.0000E+00 1.4000E+01 S 1 1 2 R +Hs hassium_Hs +hassium (Hs) + 1102.0 6.5913 0.6488 3.0000 0.27724 3.0000 0.00 + 108 1.000000 1.000000 +Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1102 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 313 Meitn 4 278.1563000000 7 0.39471 0.0000E+00 1.4000E+01 S 1 1 2 R +Mt meitnerium_Mt +meitnerium (Mt) + 1115.0 6.6019 0.6522 3.0000 0.27805 3.0000 0.00 + 109 1.000000 1.000000 +Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1115 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 314 Darms 4 281.1645000000 6 0.39123 0.0000E+00 1.4000E+01 S 1 1 2 R +Ds darmstadtium_Ds +darmstadtium (Ds) + 1129.0 6.6357 0.6632 3.0000 0.28068 3.0000 0.00 + 110 1.000000 1.000000 +Note: Since there is no stable isotope, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1129 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 315 Roent 4 282.1691200000 7 0.39620 0.0000E+00 1.4000E+01 S 1 1 2 R +Rg roentgenium_Rg +roentgenium (Rg) + 1143.0 6.6477 0.6672 3.0000 0.28162 3.0000 0.00 + 111 1.000000 1.000000 +Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1143 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 316 Coper 5 285.17712 5 0.39274 0.0000E+00 1.4000E+01 S 1 1 2 R +Cn copernicium_Cn +copernicium (Cn) + 1156.0 6.6791 0.6774 3.0000 0.28410 3.0000 0.00 + 112 1.000000 1.000000 +Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = Z*10.0 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 317 nihon 5 286.1822100000 6 0.39764 0.0000E+00 1.4000E+01 S 1 1 1 R +Nh nihonium_Nh +nihonium (Nh) + 1171.0 6.6925 0.6818 3.0000 0.28517 3.0000 0.00 + 113 1.000000 1.000000 +Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1171 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 318 flero 5 289.1904200000 5 0.39421 0.0000E+00 1.4000E+01 S 1 1 1 R +Fl flerovium_Fl +flerovium (Fl) + 1185.0 6.7249 0.6923 3.0000 0.28779 3.0000 0.00 + 114 1.000000 1.000000 +Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1185 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 319 mosco 5 289.1936300000 6 0.39904 0.0000E+00 1.4000E+01 S 1 1 1 R +Mc moscovium_Mc +moscovium (Mc) + 1199.0 6.7363 0.6960 3.0000 0.28871 3.0000 0.00 + 115 1.000000 1.000000 +Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1199 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 320 liver 4 293.2045000000 6 0.39563 0.0000E+00 1.4000E+01 S 1 1 1 R +Lv livermorium_Lv +livermorium (Lv) + 1213.0 6.7571 0.7028 3.0000 0.29041 3.0000 0.00 + 116 1.000000 1.000000 +Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1213 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 321 tenne 4 294.2105100000 7 0.39796 0.0000E+00 1.4000E+01 S 1 1 1 R +Ts tennessine_Ts +tennessine (Ts) + 1227.0 6.7800 0.7103 3.0000 0.29231 3.0000 0.00 + 117 1.000000 1.000000 +Note: Density 14.0 g/cm<SUP>3</SUP> and I<SUB><I>eff</I></SUB> = 1227 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 322 ogane 5 294.2139220000 8 0.40107 1.2000E-02 1.2000E-02 G 1 1 2 R +Og oganesson_Og +oganesson (Og) + 1242.0 13.8662 2.0204 -1.9972 -0.07035 3.0000 0.00 + 118 1.000000 1.000000 +Note: Density is that of an ideal monatomic gas. +Note: I<SUB><I>eff</I></SUB> = 1242 eV assumed in calculating critical energies and <I>dE/dx</I>. +---------------------------------------------------------------------------- + 323 Astat 5 209.9871500000 6 0.40479 0.0000E+00 5.0000E+00 S 1 1 3 R +At astatine_At +astatine (At) + 825.0 7.0039 0.7833 3.0000 0.31184 3.0000 0.00 + 85 1.000000 1.000000 +Melting : 302. +Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope (8.1 hr). +Note: Density 5.0 g/cm<SUP>3</SUP> assumed. +---------------------------------------------------------------------------- + 324 Franc 5 223.0197400000 2 0.39010 1.8700E+00 1.8700E+00 S 1 1 4 R +Fr francium_Fr +francium (Fr) + 827.0 8.0292 1.1175 3.0000 0.43214 3.0000 0.00 + 87 1.000000 1.000000 +Melting 27. +Boiling 677. +Note: Francium is less stable than any other element lighter than nobelium, element 102. +Note: Since there are no stable isotopes, [atomic mass] is that of the longest-lived isotope known as of Jun 2017. +---------------------------------------------------------------------------- + 325 Ice 5 -1.0000000000 0.55509 1.0000E+00 0.9180E+00 L 2 2 3 I + water_ice +water (ice) (H%2#O) + 79.7 3.5017 0.2400 2.8004 0.09116 3.4773 0.00 + 1 2.000000 0.111894 + 8 1.000044 0.888106 +Index of refraction 1.309 +Melting point 0.0 +Boiling point 99.964 CRC2006 4-98 +---------------------------------------------------------------------------- + 326 CF4 5 -1.0000000000 0.47721 3.78E-3 3.78E-3 G 2 1 4 O + carbon_tetrafluoride +carbon tetrafluoride (CF%4#) + 115.0 0.0 0. .0000 0. .0000 0.00 + 6 1.000000 0.136548 + 9 4.000000 0.86345 +Melting : -183.6 +boiling -127.8 +Note: Physical properties such as gas density are not well vetted +Note: Ieff supplied by Hans Bichsel +---------------------------------------------------------------------------- + 327 LaBr3 5 -1.0000000000 0.42787 5.2900e+00 5.2900e+00 S 2 1 1 I + lanthanum_bromide +lanthanum bromide (LaBr%3#) + 454.5 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 57 1.000000 0.366875 + 35 3.000000 0.633124 +Note: Ieff calculated using the ICRU37 algorithm given in Table 5.1 +---------------------------------------------------------------------------- + 328 YBr3 5 -1.0000000000 0.43820 5.2900e+00 5.2900e+00 S 2 1 1 I + yttrium_bromide +yttrium bromide (YBr%3#) + 410.0 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 39 1.000000 0.270545 + 35 3.000000 0.729455 +Note: Ieff calculated using the ICRU37 algorithm given in Table 5.1 +---------------------------------------------------------------------------- + 329 BSO 5 -1.0000000000 0.42260 9.2000e+00 7.1200e+00 S 3 12 3 I + bismuth_silicate_BSO +bismuth silicate (BSO) [(Bi%2#O%3#)%2#(SiO%2#)%3#] + 519.2 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 8 12.000000 0.172629 + 14 3.000000 0.075759 + 83 4.000000 0.751613 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +Note: Evalite structure; less common is Bi{12}SiO{20} +Note: Check density. Probably wrong +---------------------------------------------------------------------------- + 330 PbF2 5 -1.0000000000 0.40784 7.7700e+00 7.7700e+00 S 2 1 1 I + lead_fluoride +lead fluoride (PbF%2#) + 635.4 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 82 1.000000 0.845035 + 9 2.000000 0.154965 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +---------------------------------------------------------------------------- + 331 LaF3 5 -1.0000000000 0.42879 5.9000e+00 5.9000e+00 S 2 1 1 I + lanthanum_fluoride +lanthanum fluoride (LaF%3#) + 336.3 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 57 1.000000 0.709061 + 9 3.000000 0.290939 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +---------------------------------------------------------------------------- + 332 CeF3 5 -1.0000000000 0.43123 6.1600e+00 6.1600e+00 S 2 1 1 I + cerium_fluoride +cerium fluoride (CeF%3#) + 348.4 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 58 1.000000 0.710847 + 9 3.000000 0.289153 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +---------------------------------------------------------------------------- + 333 LuF3 5 -1.0000000000 0.42248 8.3000e+00 8.3000e+00 S 2 1 1 I + lutetium_fluoride +lutetium fluoride (LuF%3#) + 458.7 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 71 1.000000 0.754291 + 9 3.000000 0.245709 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +---------------------------------------------------------------------------- + 334 LaCl3 5 -1.0000000000 0.44034 3.8600e+00 3.8600e+00 S 2 1 1 I + lanthanum_chloride +lanthanum chloride (LaCl%3#) + 329.5 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 57 1.000000 0.566350 + 17 3.000000 0.433650 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +---------------------------------------------------------------------------- + 335 LuAlO 5 -1.0000000000 0.43209 8.3000e+00 8.3000e+00 S 3 1 1 I + lutetium_aluminum_oxide_1 +lutetium aluminum oxide (1) (LuAlO%3#) + 423.2 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 71 1.000000 0.700017 + 13 1.000000 0.107949 + 8 3.000000 0.192034 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +---------------------------------------------------------------------------- + 336 LuAlO 5 -1.0000000000 0.43907 6.7300e+00 6.7300e+00 S 3 3 1 I + lutetium_aluminum_oxide_2 +lutetium aluminum oxide (2) (Lu%3#Al%5#O%12#) + 365.9 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 71 3.000000 0.616224 + 13 5.000000 0.158379 + 8 12.000000 0.225396 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +---------------------------------------------------------------------------- + 337 LuSiO 5 -1.0000000000 0.42793 7.4000e+00 7.4000e+00 S 3 2 1 I + lutetium_silicon_oxide +lutetium silicon oxide (Lu%2#SiO%5#) + 472.0 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 71 2.000000 0.764020 + 14 1.000000 0.061320 + 8 5.000000 0.174660 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +---------------------------------------------------------------------------- + 338 YAlO-1 5 -1.0000000000 0.46374 5.5000e+00 5.5000e+00 S 3 1 1 I + yttrium_aluminum_oxide_1 +yttrium aluminum oxide (1) (YAlO%3#) + 239.3 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 39 1.000000 0.542487 + 13 1.000000 0.164636 + 8 3.000000 0.292876 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +---------------------------------------------------------------------------- + 339 YAlO-2 5 -1.0000000000 0.46831 4.5600e+00 4.5600e+00 S 3 3 1 I + yttrium_aluminum_oxide_2 +yttrium aluminum oxide (2) (Y%3#Al%5#O%12#) + 218.0 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 39 3.000000 0.449308 + 13 5.000000 0.227263 + 8 12.000000 0.323428 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +---------------------------------------------------------------------------- + 340 YSiO 5 -1.0000000000 0.46171 4.5400e+00 4.5400e+00 S 3 2 1 I + yttrium_silicon_oxide +yttrium silicon oxide (Y%2#SiO%5#) + 258.1 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 39 2.000000 0.621949 + 14 1.000000 0.098237 + 8 5.000000 0.279813 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +---------------------------------------------------------------------------- + 341 GdSiO 5 -1.0000000000 0.43069 6.7100e+00 6.7100e+00 S 3 2 1 I + gadolinium_silicate +gadolinium silicate (Gd%2#SiO%5#) + 405.4 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 64 2.000000 0.744233 + 14 1.000000 0.066462 + 8 5.000000 0.189305 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +---------------------------------------------------------------------------- + 342 baksa 5 -1.0000000000 0.49228 2.7400e+00 2.7400e+00 S 2 0 1 I + baksan_rock +baksan rock + 175.6 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 11 0.100000 0.095103 + 12 0.900000 0.904897 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +--------------------------------------------------------------------------- + 343 bakst 5 -1.0000000000 0.49228 2.7400e+00 2.6500e+00 S 2 0 1 I + baksan_rock_st +baksan rock, std rock density + 175.6 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 11 0.100000 0.095103 + 12 0.900000 0.904897 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +--------------------------------------------------------------------------- + 344 MtBla 5 -1.0000000000 0.48003 2.6000e+00 2.6000e+00 S 2 0 1 I + MtBlanc_rock +Mt Blanc rock + 159.2 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 6 0.132000 0.073601 + 11 0.868000 0.926399 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +--------------------------------------------------------------------------- + 345 MtBst 5 -1.0000000000 0.48003 2.6000e+00 2.6500e+00 S 2 0 1 I + MtBlanc_rock_sd +Mt Blanc rock, std rock density + 159.2 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 6 0.132000 0.073601 + 11 0.868000 0.926399 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +--------------------------------------------------------------------------- + 346 KGFst 5 -1.0000000000 0.48605 3.0200e+00 2.6500e+00 S 2 0 1 I + KGF_rock_st +Kolar Gold Fields rock, std rock density + 183.4 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 12 0.380000 0.355713 + 13 0.620000 0.644287 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +--------------------------------------------------------------------------- + 347 KGF 5 -1.0000000000 0.48605 3.0200e+00 3.0200e+00 S 2 0 1 I + KGF_rock +Kolar Gold Fields rock + 183.4 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 12 0.380000 0.355713 + 13 0.620000 0.644287 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +--------------------------------------------------------------------------- + 348 UD 5 -1.0000000000 0.49602 2.7000e+00 2.7000e+00 S 11 0 1 I + UD_rock +UD rock for doug + 145.4 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 14 0.245239 0.334025 + 22 0.001368 0.003176 + 13 0.056485 0.073911 + 26 0.009477 0.025666 + 25 0.000148 0.000394 + 12 0.004120 0.004856 + 20 0.009895 0.019232 + 11 0.041643 0.046428 + 19 0.001606 0.003045 + 15 0.000592 0.000889 + 8 0.629426 0.488377 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +--------------------------------------------------------------------------- + 349 LMP 5 -1.0000000000 0.49641 2.7000e+00 2.7000e+00 S 11 0 1 I + LMP_rock +LMP rock for Doug + 145.9 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 14 0.248086 0.335584 + 22 0.001242 0.002863 + 13 0.066504 0.086423 + 26 0.008725 0.023467 + 25 0.000146 0.000386 + 12 0.010053 0.011768 + 20 0.007152 0.013805 + 11 0.002935 0.003250 + 19 0.015537 0.029258 + 15 0.000437 0.000652 + 8 0.639181 0.492543 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +--------------------------------------------------------------------------- + 350 UM 5 -1.0000000000 0.49407 2.7000e+00 2.7000e+00 S 11 0 1 I + UM_rock +UM rock for Doug + 152.7 0.0000 0.0000 0.0000 0.00000 0.0000 0.00 + 14 0.184026 0.238952 + 22 0.002244 0.004966 + 13 0.069046 0.086130 + 26 0.030831 0.079602 + 25 0.000822 0.002088 + 12 0.042435 0.047684 + 20 0.031499 0.058365 + 11 0.025503 0.027107 + 19 0.000642 0.001160 + 15 0.000791 0.001133 + 8 0.612161 0.452813 +Note: Ieff calculated using the ICRU37 Table 5.1 algorithm for liquids and solids +--------------------------------------------------------------------------- + 351 HvWat 5 -1.0000000000 0.49931 1.1070E+00 1.1070E+00 L 2 2 3 I + deuterium_oxide_liquid +deuterium oxide (liquid) (D%2#O) + 79.7 3.5017 0.2400 2.8004 0.09116 3.4773 0.00 + 298 2.000000 0.201133 + 8 1.000044 0.798867 +Index of refraction 1.328 +Melting point 3.82 +Boiling point 101.4 +----------------------------------------------------------------------------- diff --git a/Environment/readProperties.py b/Environment/readProperties.py new file mode 100755 index 0000000000000000000000000000000000000000..552c70d70b64f58ee479562aa8102c357d4181a8 --- /dev/null +++ b/Environment/readProperties.py @@ -0,0 +1,475 @@ +#!/usr/bin/env python3 + +import sys, math, itertools, re, csv, pprint +from collections import OrderedDict +import io + + +############################################################## +# +# reading input data, return media properties data +# c.f. https://pdg.lbl.gov/2020/AtomicNuclearProperties/Properties8_Key.pdf +# +def parseData(filename): + + with open(filename) as f: + + line = f.readline() + while (line.strip() != ""): + + entry = {} + + # main material data line + + entry["sternheimer_index"] = int(line[:5]) + entry["sternheimer_label"] = line[5:10].strip() + index = 0 + words = line[11:].split() + entry["sign_figures_weight"] = int(words[index]) + index += 1 + entry["weight"] = float(words[index]) + index += 1 + entry["error_last_digit"] = 0 + if (entry["weight"]>0): + entry["error_last_digit"] = int(words[index]) + index += 1 + entry["Z_over_A"] = float(words[index]) + index += 1 + entry["sternheimhers_density"] = float(words[index]) + index += 1 + entry["corrected_density"] = float(words[index]) + index += 1 + entry["state"] = words[index] # Solid, Liquid, Gas, Diatomic gas + index += 1 + entry["num_elements"] = int(words[index]) + index += 1 + entry["num_atoms_1"] = int(words[index]) + index += 1 + entry["num_extra_lines"] = int(words[index]) + index += 1 + entry["type"] = words[index] # Element, Radioactive, Inorg. comp., Org. comp., Polymer, Mixture, Biological/dosimetry + index += 1 + + if (index != len(words)): + print ("error in line: " + line + " index=" + str(index) + " len=" + str(len(words))) + sys.exit(1) + + # name line + line = f.readline() + words = line.split() + index = 0 + if (entry["type"] in ["E", "R"] ): + entry["symbol"] = words[index] + index += 1 + entry["name"] = words[index] + index += 1 + + if (index != len(words)): + print ("error in line: " + line + " index=" + str(index) + " len=" + str(len(words))) + sys.exit(1) + + # name+formula line + line = f.readline() + entry["name_and_formula"] = line.strip() + + + # ionization data + line = f.readline() + words = line.split() + index = 0 + entry["Ieff"] = float(words[index]) + index += 1 + entry["Cbar"] = float(words[index]) + index += 1 + entry["x0"] = float(words[index]) + index += 1 + entry["x1"] = float(words[index]) + index += 1 + entry["aa"] = float(words[index]) + index += 1 + entry["sk"] = float(words[index]) + index += 1 + entry["dlt0"] = float(words[index]) + index += 1 + + if (index != len(words)): + print ("error in line: " + line + " index=" + str(index) + " len=" + str(len(words))) + sys.exit(1) + + + for i in range(entry["num_elements"]): + + elem = "element_{}".format(i) + if (not elem in entry): + entry[elem] = {} + + line = f.readline() + words = line.split() + index = 0 + entry[elem]["Z"] = int(words[index]) + index += 1 + entry[elem]["Num_frac"] = float(words[index]) + index += 1 + entry[elem]["weight_frac"] = float(words[index]) + index += 1 + + if (index != len(words)): + print ("error in line: " + line + " index=" + str(index) + " len=" + str(len(words))) + sys.exit(1) + + + skip = False + for i in range(entry["num_extra_lines"]): + + # optional lines + line = f.readline() + if (skip): + continue + key = line[:5] + if (key == " " or + key == "Note:"): + skip = True + continue + n_empty = 0 + comment = key + c = 6 + while (c<=25): + comment += line[c] + c += 1 + if (line[c].strip() == ''): + n_empty += 1 + else: + n_empty = 0 + if (n_empty > 3): + break + + value = float(line[c:45]) + if (not "properties" in entry): + entry["properties"] = {} + entry["properties"][key] = value; + + line = f.readline() # move to separator line "---------------" + line = f.readline() # move to next entry + yield entry + + +def TypeEnum(type): + if type=='E': + return "Element" + elif type=='R': + return "RadioactiveElement" + elif type=='I': + return 'InorganicCompound' + elif type=='O': + return "OrganicCompound" + elif type=="P": + return "Polymer" + elif type=='M': + return "Mixture" + elif type=="B": + return "BiologicalDosimetry" + else: + return "Unkonwn" + +def StateEnum(state): + if state=='S': + return "Solid" + elif state=='L': + return "Liquid" + elif state=='G': + return 'Gas' + elif state=='D': + return "DiatomicGas" + else: + return "Unkonwn" + + +def ClassName(name): + name = name.replace('-', '_') + words = name.split('_') + str = "" + for w in words: + str += w.capitalize() + if str[0].isdigit(): + str = "_" + str + return str + + + + +########################################################## +# +# returns dict containing all data from pythia-xml input +# +def read_data(filename): + + data = [] + counter = 0 + + for entry in parseData(filename): + data.append(entry) + + return data + + +############################################################### +# +# return string with a list of classes for all particles +# +def gen_code(media_db): + + string = """ + // enum for all media + enum class Medium : MediumIntType { + Unkown, +""" + + imedium = 0 + for entry in media_db: + cname = ClassName(entry["name"]) + string += " {} = {} ,\n".format(cname, imedium) + imedium += 1 + string += " {} = {} ,\n".format("First", 0) + string += " {} = {} ,\n".format("Last", imedium-1) + string += " };\n\n" + return string + + +############################################################### +# +# return string with a list of classes for all particles +# +def gen_classes(media_db): + + string = """ + // list of C++ classes to access media properties" + +// typedef std::map<std::string, double> Properties; +// typedef std::array<Properties, static_cast<MediumIntType>(Medium::Last)+1> Constituents; this is wrong> num_elements + + """ + + for entry in media_db: + + cname = ClassName(entry["name"]) + + constituents = "{" + comma = "" + for i in range(entry["num_elements"]): + elem = "element_{}".format(i) + constituents += "{}{{ {{ {{\"Z\", {} }}, {{\"NumFrac\", {} }}, {{\"WeightFrac\", {} }} }} }}".format(comma, entry[elem]["Z"], + entry[elem]["Num_frac"], + entry[elem]["weight_frac"]) + comma = ", " + constituents += "}" + + properties = "{" + if "properties" in entry: + comma = "" + for k,v in entry["properties"].items(): + properties += "{}{{ \"{}\", {} }}".format(comma, k, v) + comma = ", " + properties += "}" + + symbol = "Unknown"; + if ("symbol" in entry): + symbol = entry["symbol"] + + + class_string = """ + /** + * \class {cname} + * + * Media properties from properties8.dat file from NIST: + * - Sternheimer index {stern_index}, label {stern_label} + **/ + + class {cname} {{ + public: + static constexpr Medium medium() {{ return Medium::{cname}; }} + + static std::string const name() {{ return data_.name(); }} + static std::string const pretty_name() {{ return data_.pretty_name(); }} + static double weight() {{ return data_.weight (); }} + static int weight_significant_figure() {{ return data_.weight_significant_figure (); }} + static int weight_error_last_digit() {{ return data_.weight_error_last_digit(); }} + static double Z_over_A() {{ return data_.Z_over_A(); }} + static double sternheimer_density() {{ return data_.sternheimer_density(); }} + static double corrected_density() {{ return data_.corrected_density(); }} + static State state() {{ return data_.state(); }} + static MediumType type() {{ return data_.type(); }} + static std::string const symbol() {{ return data_.symbol(); }} + + static double Ieff() {{ return data_.Ieff(); }} + static double Cbar() {{ return data_.Cbar(); }} + static double x0() {{ return data_.x0(); }} + static double x1() {{ return data_.x1(); }} + static double aa() {{ return data_.aa(); }} + static double sk() {{ return data_.sk(); }} + static double dlt0() {{ return data_.dlt0(); }} + + //static constexpr Constituents constituents() {{ return {constituents}; }} + //static constexpr Properties properties() {{ return {properties}; }} + + inline static const MediumData data_ {{ "{name}", "{nice_name}", {weight}, + {weight_significant_figure}, {weight_error_last_digit}, {Z_over_A}, + {sternheimer_density}, {corrected_density}, State::{state}, + MediumType::{type}, "{symbol}", {Ieff}, {Cbar}, {x0}, {x1}, {aa}, {sk}, {dlt0} }}; + }}; + + """.format(cname=cname, + stern_label=entry["sternheimer_label"], + stern_index=entry["sternheimer_index"], + weight_significant_figure=entry["sign_figures_weight"], + weight=entry["weight"], + weight_error_last_digit=entry["error_last_digit"], + Z_over_A = entry["Z_over_A"], + sternheimer_density = entry["sternheimhers_density"], + corrected_density = entry["corrected_density"], + state=StateEnum(entry["state"]), + type=TypeEnum(entry["type"]), + symbol=symbol, + name=entry["name"], + nice_name=entry["name_and_formula"].replace('\\','\\\\'), + Ieff=entry["Ieff"], + Cbar=entry["Cbar"], + x0=entry["x0"], + x1=entry["x1"], + aa=entry["aa"], + sk=entry["sk"], + dlt0=entry["dlt0"], + constituents=constituents, + properties=properties); + + + # static std::string const name() {{ return "{name}"; }} + # static std::string const pretty_name() {{ return "{nice_name}"; }} + # static constexpr double weight() {{ return {weight} ; }} + # static constexpr int weight_significant_figure() {{ return {weight_significant_figure} ; }} + # static constexpr int weight_error_last_digit() {{ return {weight_error_last_digit}; }} + # static constexpr double Z_over_A() {{ return {Z_over_A}; }} + # static constexpr double sternheimer_density() {{ return {sternheimer_density}; }} + # static constexpr double corrected_density() {{ return {corrected_density}; }} + # static constexpr State state() {{ return State::{state}; }} + # static constexpr MediumType type() {{ return MediumType::{type}; }} + # static std::string const symbol() {{ return "{symbol}"; }} + + # static constexpr double Ieff() {{ return {Ieff}; }} + # static constexpr double Cbar() {{ return {Cbar}; }} + # static constexpr double x0() {{ return {x0}; }} + # static constexpr double x1() {{ return {x1}; }} + # static constexpr double aa() {{ return {aa}; }} + # static constexpr double sk() {{ return {sk}; }} + # static constexpr double dlt0() {{ return {dlt0}; }} + + + string += class_string + + +# private:\n" +# static constexpr CodeIntType TypeIndex = static_cast<CodeIntType const>(Type);\n" + return string + +############################################################### +# +# return string with a list of classes for all particles +# +def gen_data_array(media_db): + + string = """ + // array of MediumData entries + static const std::array<const MediumData, static_cast<MediumIntType>(Medium::Last)+1> medium_data = { + """ + + comma="" + for entry in media_db: + cname = ClassName(entry["name"]) + string += "{} {}::data_".format(comma, cname) + comma = ",\n" + string += " };\n\n" + return string + +############################################################### +# +# return string with a list of classes for all particles +# +def gen_media_map(media_db): + + string = """ + // mapping of enum Medium to Medium classes + static auto MediumMap = std::make_tuple( + """ + comma="" + for entry in media_db: + cname = ClassName(entry["name"]) + string += "{} {}()".format(comma, cname) + comma = ",\n" + string += " );\n\n" + return string + + +############################################################### +# +# +def inc_start(): + string = """ +// generated by readProperties.py +// MANUAL EDITS ON OWN RISK. THEY WILL BE OVERWRITTEN. +// since this is automatic code, we don't attempt to generate automatic unit testing, too: LCOV_EXCL_START +namespace corsika::environment { + +""" + return string + + +############################################################### +# +# +def detail_start(): + string = ('namespace detail {\n\n') + return string + + +############################################################### +# +# +def detail_end(): + string = "\n}//end namespace detail\n" + return string + +############################################################### +# +# +def inc_end(): + string = """ +\n} // end namespace corsika::environment +// since this was automatic code, we didn't attempt to generate automatic unit testing, too: LCOV_EXCL_STOP +""" + return string + + + +################################################################### +# +# Main function +# +if __name__ == "__main__": + + if len(sys.argv) != 2: + print("usage: {:s} <properties8.dat>".format(sys.argv[0]), file=sys.stderr) + sys.exit(1) + + print("\n readProperties.py: automatically produce media properties from input files\n") + + media_db = read_data(sys.argv[1]) + + with open("GeneratedMediaProperties.inc", "w") as f: + print(inc_start(), file=f) + print(gen_code(media_db), file=f) + print(gen_classes(media_db), file=f) + print(detail_start(), file=f) + print(gen_data_array(media_db), file=f) + print(detail_end(), file=f) + print(inc_end(), file=f) + + diff --git a/Environment/testEnvironment.cc b/Environment/testEnvironment.cc index 088dacb1c281befe76301145f1e5de4992e7d085..e93eb64f63835c18f50dafc9b2ce8964309e3985 100644 --- a/Environment/testEnvironment.cc +++ b/Environment/testEnvironment.cc @@ -11,10 +11,12 @@ #include <corsika/environment/HomogeneousMedium.h> #include <corsika/environment/IMagneticFieldModel.h> #include <corsika/environment/IMediumModel.h> +#include <corsika/environment/IMediumPropertyModel.h> #include <corsika/environment/IRefractiveIndexModel.h> #include <corsika/environment/InhomogeneousMedium.h> #include <corsika/environment/LayeredSphericalAtmosphereBuilder.h> #include <corsika/environment/LinearApproximationIntegrator.h> +#include <corsika/environment/MediumPropertyModel.h> #include <corsika/environment/NuclearComposition.h> #include <corsika/environment/SlidingPlanarExponential.h> #include <corsika/environment/UniformMagneticField.h> @@ -61,8 +63,8 @@ TEST_CASE("FlatExponential") { gCS, {20_cm / second, 0_m / second, 0_m / second})); Trajectory<Line> const trajectory(line, tEnd); - REQUIRE((medium.IntegratedGrammage(trajectory, 2_m) / (rho0 * 2_m)) == Approx(1)); - REQUIRE((medium.ArclengthFromGrammage(trajectory, rho0 * 5_m) / 5_m) == Approx(1)); + CHECK((medium.IntegratedGrammage(trajectory, 2_m) / (rho0 * 2_m)) == Approx(1)); + CHECK((medium.ArclengthFromGrammage(trajectory, rho0 * 5_m) / 5_m) == Approx(1)); } SECTION("vertical") { @@ -72,8 +74,8 @@ TEST_CASE("FlatExponential") { LengthType const length = 2 * lambda; GrammageType const exact = rho0 * lambda * (exp(length / lambda) - 1); - REQUIRE((medium.IntegratedGrammage(trajectory, length) / exact) == Approx(1)); - REQUIRE((medium.ArclengthFromGrammage(trajectory, exact) / length) == Approx(1)); + CHECK((medium.IntegratedGrammage(trajectory, length) / exact) == Approx(1)); + CHECK((medium.ArclengthFromGrammage(trajectory, exact) / length) == Approx(1)); } SECTION("escape grammage") { @@ -83,9 +85,9 @@ TEST_CASE("FlatExponential") { GrammageType const escapeGrammage = rho0 * lambda; - REQUIRE(trajectory.NormalizedDirection().dot(axis).magnitude() < 0); - REQUIRE(medium.ArclengthFromGrammage(trajectory, 1.2 * escapeGrammage) == - std::numeric_limits<typename GrammageType::value_type>::infinity() * 1_m); + CHECK(trajectory.NormalizedDirection().dot(axis).magnitude() < 0); + CHECK(medium.ArclengthFromGrammage(trajectory, 1.2 * escapeGrammage) == + std::numeric_limits<typename GrammageType::value_type>::infinity() * 1_m); } SECTION("inclined") { @@ -96,8 +98,8 @@ TEST_CASE("FlatExponential") { LengthType const length = 2 * lambda; GrammageType const exact = rho0 * lambda * (exp(cosTheta * length / lambda) - 1) / cosTheta; - REQUIRE((medium.IntegratedGrammage(trajectory, length) / exact) == Approx(1)); - REQUIRE((medium.ArclengthFromGrammage(trajectory, exact) / length) == Approx(1)); + CHECK((medium.IntegratedGrammage(trajectory, length) / exact) == Approx(1)); + CHECK((medium.ArclengthFromGrammage(trajectory, exact) / length) == Approx(1)); } } @@ -170,9 +172,9 @@ TEST_CASE("InhomogeneousMedium") { DensityFunction<decltype(e), LinearApproximationIntegrator> const rho(e); SECTION("DensityFunction") { - REQUIRE(e.Derivative<1>(gOrigin, direction) / (1_kg / 1_m / 1_m / 1_m / 1_m) == - Approx(1)); - REQUIRE(rho.EvaluateAt(gOrigin) == e(gOrigin)); + CHECK(e.Derivative<1>(gOrigin, direction) / (1_kg / 1_m / 1_m / 1_m / 1_m) == + Approx(1)); + CHECK(rho.EvaluateAt(gOrigin) == e(gOrigin)); } auto const exactGrammage = [](auto l) { return 1_m * rho0 * (exp(l / 1_m) - 1); }; @@ -184,51 +186,55 @@ TEST_CASE("InhomogeneousMedium") { InhomogeneousMedium<IMediumModel, decltype(rho)> const inhMedium(composition, rho); SECTION("Integration") { - REQUIRE(rho.IntegrateGrammage(trajectory, l) / exactGrammage(l) == - Approx(1).epsilon(1e-2)); - REQUIRE(rho.ArclengthFromGrammage(trajectory, exactGrammage(l)) / - exactLength(exactGrammage(l)) == - Approx(1).epsilon(1e-2)); - REQUIRE(rho.MaximumLength(trajectory, 1e-2) > - l); // todo: write reasonable test when implementation is working - - REQUIRE(rho.IntegrateGrammage(trajectory, l) == - inhMedium.IntegratedGrammage(trajectory, l)); - REQUIRE(rho.ArclengthFromGrammage(trajectory, 20_g / (1_cm * 1_cm)) == - inhMedium.ArclengthFromGrammage(trajectory, 20_g / (1_cm * 1_cm))); + CHECK(rho.IntegrateGrammage(trajectory, l) / exactGrammage(l) == + Approx(1).epsilon(1e-2)); + CHECK(rho.ArclengthFromGrammage(trajectory, exactGrammage(l)) / + exactLength(exactGrammage(l)) == + Approx(1).epsilon(1e-2)); + CHECK(rho.MaximumLength(trajectory, 1e-2) > + l); // todo: write reasonable test when implementation is working + + CHECK(rho.IntegrateGrammage(trajectory, l) == + inhMedium.IntegratedGrammage(trajectory, l)); + CHECK(rho.ArclengthFromGrammage(trajectory, 20_g / (1_cm * 1_cm)) == + inhMedium.ArclengthFromGrammage(trajectory, 20_g / (1_cm * 1_cm))); } } TEST_CASE("LayeredSphericalAtmosphereBuilder") { - LayeredSphericalAtmosphereBuilder builder(gOrigin); + + LayeredSphericalAtmosphereBuilder builder = + environment::make_layered_spherical_atmosphere_builder<>::create( + gOrigin, units::constants::EarthRadius::Mean); + builder.setNuclearComposition( {{{particles::Code::Nitrogen, particles::Code::Oxygen}}, {{.6, .4}}}); builder.addLinearLayer(1_km, 10_km); builder.addLinearLayer(2_km, 20_km); - builder.addLinearLayer(3_km, 30_km); + builder.addExponentialLayer(540.1778_g / (1_cm * 1_cm), 772170.16_cm, 30_km); - REQUIRE(builder.size() == 3); + CHECK(builder.size() == 3); auto const builtEnv = builder.assemble(); auto const& univ = builtEnv.GetUniverse(); - REQUIRE(builder.size() == 0); + CHECK(builder.size() == 0); auto const R = builder.getEarthRadius(); - REQUIRE(univ->GetChildNodes().size() == 1); - - REQUIRE(univ->GetContainingNode(Point(gCS, 0_m, 0_m, R + 35_km)) == univ.get()); - REQUIRE(dynamic_cast<Sphere const&>( - univ->GetContainingNode(Point(gCS, 0_m, 0_m, R + 8_km))->GetVolume()) - .GetRadius() == R + 10_km); - REQUIRE(dynamic_cast<Sphere const&>( - univ->GetContainingNode(Point(gCS, 0_m, 0_m, R + 12_km))->GetVolume()) - .GetRadius() == R + 20_km); - REQUIRE(dynamic_cast<Sphere const&>( - univ->GetContainingNode(Point(gCS, 0_m, 0_m, R + 24_km))->GetVolume()) - .GetRadius() == R + 30_km); + CHECK(univ->GetChildNodes().size() == 1); + + CHECK(univ->GetContainingNode(Point(gCS, 0_m, 0_m, R + 35_km)) == univ.get()); + CHECK(dynamic_cast<Sphere const&>( + univ->GetContainingNode(Point(gCS, 0_m, 0_m, R + 8_km))->GetVolume()) + .GetRadius() == R + 10_km); + CHECK(dynamic_cast<Sphere const&>( + univ->GetContainingNode(Point(gCS, 0_m, 0_m, R + 12_km))->GetVolume()) + .GetRadius() == R + 20_km); + CHECK(dynamic_cast<Sphere const&>( + univ->GetContainingNode(Point(gCS, 0_m, 0_m, R + 24_km))->GetVolume()) + .GetRadius() == R + 30_km); } TEST_CASE("UniformMagneticField w/ Homogeneous Medium") { @@ -251,13 +257,13 @@ TEST_CASE("UniformMagneticField w/ Homogeneous Medium") { AtmModel medium(B0, density, protonComposition); // and test at several locations - REQUIRE(B0.GetComponents(gCS) == - medium.GetMagneticField(Point(gCS, -10_m, 4_m, 35_km)).GetComponents(gCS)); - REQUIRE( + CHECK(B0.GetComponents(gCS) == + medium.GetMagneticField(Point(gCS, -10_m, 4_m, 35_km)).GetComponents(gCS)); + CHECK( B0.GetComponents(gCS) == medium.GetMagneticField(Point(gCS, 1000_km, -1000_km, 1000_km)).GetComponents(gCS)); - REQUIRE(B0.GetComponents(gCS) == - medium.GetMagneticField(Point(gCS, 0_m, 0_m, 0_m)).GetComponents(gCS)); + CHECK(B0.GetComponents(gCS) == + medium.GetMagneticField(Point(gCS, 0_m, 0_m, 0_m)).GetComponents(gCS)); // create a new magnetic field vector Vector B1(gCS, 23_T, 57_T, -4_T); @@ -266,16 +272,16 @@ TEST_CASE("UniformMagneticField w/ Homogeneous Medium") { medium.SetMagneticField(B1); // and test at several locations - REQUIRE(B1.GetComponents(gCS) == - medium.GetMagneticField(Point(gCS, -10_m, 4_m, 35_km)).GetComponents(gCS)); - REQUIRE( + CHECK(B1.GetComponents(gCS) == + medium.GetMagneticField(Point(gCS, -10_m, 4_m, 35_km)).GetComponents(gCS)); + CHECK( B1.GetComponents(gCS) == medium.GetMagneticField(Point(gCS, 1000_km, -1000_km, 1000_km)).GetComponents(gCS)); - REQUIRE(B1.GetComponents(gCS) == - medium.GetMagneticField(Point(gCS, 0_m, 0_m, 0_m)).GetComponents(gCS)); + CHECK(B1.GetComponents(gCS) == + medium.GetMagneticField(Point(gCS, 0_m, 0_m, 0_m)).GetComponents(gCS)); // check the density and nuclear composition - REQUIRE(density == medium.GetMassDensity(Point(gCS, 0_m, 0_m, 0_m))); + CHECK(density == medium.GetMassDensity(Point(gCS, 0_m, 0_m, 0_m))); medium.GetNuclearComposition(); // create a line of length 1 m @@ -289,8 +295,52 @@ TEST_CASE("UniformMagneticField w/ Homogeneous Medium") { Trajectory<Line> const trajectory(line, tEnd); // and check the integrated grammage - REQUIRE((medium.IntegratedGrammage(trajectory, 3_m) / (density * 3_m)) == Approx(1)); - REQUIRE((medium.ArclengthFromGrammage(trajectory, density * 5_m) / 5_m) == Approx(1)); + CHECK((medium.IntegratedGrammage(trajectory, 3_m) / (density * 3_m)) == Approx(1)); + CHECK((medium.ArclengthFromGrammage(trajectory, density * 5_m) / 5_m) == Approx(1)); +} + +TEST_CASE("LayeredSphericalAtmosphereBuilder w/ magnetic field") { + + // setup our interface types + using ModelInterface = IMagneticFieldModel<IMediumModel>; + + // the composition we use for the homogenous medium + NuclearComposition const protonComposition(std::vector<Code>{Code::Proton}, + std::vector<float>{1.f}); + + // create magnetic field vectors + Vector B0(gCS, 0_T, 0_T, 1_T); + + LayeredSphericalAtmosphereBuilder builder = + environment::make_layered_spherical_atmosphere_builder< + ModelInterface, + UniformMagneticField>::create(gOrigin, units::constants::EarthRadius::Mean, B0); + + builder.setNuclearComposition( + {{{particles::Code::Nitrogen, particles::Code::Oxygen}}, {{.6, .4}}}); + builder.addLinearLayer(1_km, 10_km); + builder.addExponentialLayer(1222.6562_g / (1_cm * 1_cm), 994186.38_cm, 20_km); + + CHECK(builder.size() == 2); + + auto const builtEnv = builder.assemble(); + auto const& univ = builtEnv.GetUniverse(); + + CHECK(builder.size() == 0); + CHECK(univ->GetChildNodes().size() == 1); + auto const R = builder.getEarthRadius(); + + // check magnetic field at several locations + const Point pTest(gCS, -10_m, 4_m, R + 35_m); + CHECK(B0.GetComponents(gCS) == univ->GetContainingNode(pTest) + ->GetModelProperties() + .GetMagneticField(pTest) + .GetComponents(gCS)); + const Point pTest2(gCS, 10_m, -4_m, R + 15_km); + CHECK(B0.GetComponents(gCS) == univ->GetContainingNode(pTest2) + ->GetModelProperties() + .GetMagneticField(pTest2) + .GetComponents(gCS)); } TEST_CASE("UniformRefractiveIndex w/ Homogeneous") { @@ -313,10 +363,10 @@ TEST_CASE("UniformRefractiveIndex w/ Homogeneous") { AtmModel medium(n, density, protonComposition); // and require that it is constant - REQUIRE(n == medium.GetRefractiveIndex(Point(gCS, -10_m, 4_m, 35_km))); - REQUIRE(n == medium.GetRefractiveIndex(Point(gCS, +210_m, 0_m, 7_km))); - REQUIRE(n == medium.GetRefractiveIndex(Point(gCS, 0_m, 0_m, 0_km))); - REQUIRE(n == medium.GetRefractiveIndex(Point(gCS, 100_km, 400_km, 350_km))); + CHECK(n == medium.GetRefractiveIndex(Point(gCS, -10_m, 4_m, 35_km))); + CHECK(n == medium.GetRefractiveIndex(Point(gCS, +210_m, 0_m, 7_km))); + CHECK(n == medium.GetRefractiveIndex(Point(gCS, 0_m, 0_m, 0_km))); + CHECK(n == medium.GetRefractiveIndex(Point(gCS, 100_km, 400_km, 350_km))); // a new refractive index const double n2{2.3472123}; @@ -325,16 +375,90 @@ TEST_CASE("UniformRefractiveIndex w/ Homogeneous") { medium.SetRefractiveIndex(n2); // check that the returned refractive index is correct - REQUIRE(n2 == medium.GetRefractiveIndex(Point(gCS, -10_m, 4_m, 35_km))); - REQUIRE(n2 == medium.GetRefractiveIndex(Point(gCS, +210_m, 0_m, 7_km))); - REQUIRE(n2 == medium.GetRefractiveIndex(Point(gCS, 0_m, 0_m, 0_km))); - REQUIRE(n2 == medium.GetRefractiveIndex(Point(gCS, 100_km, 400_km, 350_km))); + CHECK(n2 == medium.GetRefractiveIndex(Point(gCS, -10_m, 4_m, 35_km))); + CHECK(n2 == medium.GetRefractiveIndex(Point(gCS, +210_m, 0_m, 7_km))); + CHECK(n2 == medium.GetRefractiveIndex(Point(gCS, 0_m, 0_m, 0_km))); + CHECK(n2 == medium.GetRefractiveIndex(Point(gCS, 100_km, 400_km, 350_km))); + + // define our axis vector + Vector const axis(gCS, QuantityVector<dimensionless_d>(0, 0, 1)); + + // check the density and nuclear composition + CHECK(density == medium.GetMassDensity(Point(gCS, 0_m, 0_m, 0_m))); + medium.GetNuclearComposition(); + + // create a line of length 1 m + Line const line(gOrigin, Vector<SpeedType::dimension_type>( + gCS, {1_m / second, 0_m / second, 0_m / second})); + + // the end time of our line + auto const tEnd = 1_s; + + // and the associated trajectory + Trajectory<Line> const trajectory(line, tEnd); + + // and check the integrated grammage + CHECK((medium.IntegratedGrammage(trajectory, 3_m) / (density * 3_m)) == Approx(1)); + CHECK((medium.ArclengthFromGrammage(trajectory, density * 5_m) / 5_m) == Approx(1)); +} + +TEST_CASE("MediumProperties") { + + // test access of medium properties via enum and class types + + const Medium type = Medium::AirDry1Atm; + const MediumData& air = mediumData(type); + CHECK(air.Ieff() == 85.7); + CHECK(air.Cbar() == 10.5961); + CHECK(air.x0() == 1.7418); + CHECK(air.x1() == 4.2759); + CHECK(air.aa() == 0.10914); + CHECK(air.sk() == 3.3994); + CHECK(air.dlt0() == 0.0); +} + +TEST_CASE("MediumPropertyModel w/ Homogeneous") { + + // setup our interface types + using IModelInterface = IMediumPropertyModel<IMediumModel>; + using AtmModel = MediumPropertyModel<HomogeneousMedium<IModelInterface>>; + + // the constant density + const auto density{19.2_g / cube(1_cm)}; + + // the composition we use for the homogenous medium + NuclearComposition const protonComposition(std::vector<Code>{Code::Proton}, + std::vector<float>{1.f}); + + // the refrative index that we use + const Medium type = Medium::AirDry1Atm; + + // create the atmospheric model + AtmModel medium(type, density, protonComposition); + + // and require that it is constant + CHECK(type == medium.medium(Point(gCS, -10_m, 4_m, 35_km))); + CHECK(type == medium.medium(Point(gCS, +210_m, 0_m, 7_km))); + CHECK(type == medium.medium(Point(gCS, 0_m, 0_m, 0_km))); + CHECK(type == medium.medium(Point(gCS, 100_km, 400_km, 350_km))); + + // a new refractive index + const Medium type2 = Medium::StandardRock; + + // update the refractive index of this atmospheric model + medium.set_medium(type2); + + // check that the returned refractive index is correct + CHECK(type2 == medium.medium(Point(gCS, -10_m, 4_m, 35_km))); + CHECK(type2 == medium.medium(Point(gCS, +210_m, 0_m, 7_km))); + CHECK(type2 == medium.medium(Point(gCS, 0_m, 0_m, 0_km))); + CHECK(type2 == medium.medium(Point(gCS, 100_km, 400_km, 350_km))); // define our axis vector Vector const axis(gCS, QuantityVector<dimensionless_d>(0, 0, 1)); // check the density and nuclear composition - REQUIRE(density == medium.GetMassDensity(Point(gCS, 0_m, 0_m, 0_m))); + CHECK(density == medium.GetMassDensity(Point(gCS, 0_m, 0_m, 0_m))); medium.GetNuclearComposition(); // create a line of length 1 m @@ -348,6 +472,6 @@ TEST_CASE("UniformRefractiveIndex w/ Homogeneous") { Trajectory<Line> const trajectory(line, tEnd); // and check the integrated grammage - REQUIRE((medium.IntegratedGrammage(trajectory, 3_m) / (density * 3_m)) == Approx(1)); - REQUIRE((medium.ArclengthFromGrammage(trajectory, density * 5_m) / 5_m) == Approx(1)); + CHECK((medium.IntegratedGrammage(trajectory, 3_m) / (density * 3_m)) == Approx(1)); + CHECK((medium.ArclengthFromGrammage(trajectory, density * 5_m) / 5_m) == Approx(1)); } diff --git a/Framework/Particles/CMakeLists.txt b/Framework/Particles/CMakeLists.txt index 0b0e6bb96a7db32ca1be1eec4828aee4a50ad7bc..96d89ebeb0a3c73ef3b21b44b5e3a2fdb42a5dfb 100644 --- a/Framework/Particles/CMakeLists.txt +++ b/Framework/Particles/CMakeLists.txt @@ -1,6 +1,3 @@ -set(Python_ADDITIONAL_VERSIONS 3) -find_package(PythonInterp 3 REQUIRED) - add_custom_command ( OUTPUT ${PROJECT_BINARY_DIR}/Framework/Particles/GeneratedParticleProperties.inc ${PROJECT_BINARY_DIR}/Framework/Particles/particle_db.pkl diff --git a/Framework/Particles/pdxml_reader.py b/Framework/Particles/pdxml_reader.py index 16978d643142950a52993baab35d69987899a79e..15dfd81ed22820b73f38e61d87c6013df0fb2fad 100755 --- a/Framework/Particles/pdxml_reader.py +++ b/Framework/Particles/pdxml_reader.py @@ -410,7 +410,7 @@ def gen_classes(particle_db): antiP = cname_anti break - string += "\n"; + string += "\n" string += "/** @class " + cname + "\n\n" string += " * Particle properties are taken from the PYTHIA8 ParticleData.xml file:<br>\n" string += " * - pdg=" + str(particle_db[cname]['pdg']) +"\n" diff --git a/Framework/ProcessSequence/ProcessSequence.h b/Framework/ProcessSequence/ProcessSequence.h index adffdd9ebfe443cbcc590c472b18c2ed1f4ecdcd..32d3025940e78be21d15d58f5593f32d4a8f514e 100644 --- a/Framework/ProcessSequence/ProcessSequence.h +++ b/Framework/ProcessSequence/ProcessSequence.h @@ -53,6 +53,14 @@ namespace corsika::process { static bool constexpr t1SwitchProcSeq = is_switch_process_sequence_v<TProcess1type>; static bool constexpr t2SwitchProcSeq = is_switch_process_sequence_v<TProcess2type>; + // make sure only BaseProcess types TProcess1/2 are passed + static_assert(std::is_base_of_v<BaseProcess<TProcess1type>, TProcess1type>, + "can only use process derived from BaseProcess in " + "ProcessSequence, for Process 1"); + static_assert(std::is_base_of_v<BaseProcess<TProcess2type>, TProcess2type>, + "can only use process derived from BaseProcess in " + "ProcessSequence, for Process 2"); + TProcess1 A_; // this is a reference, if possible TProcess2 B_; // this is a reference, if possible diff --git a/Framework/ProcessSequence/SwitchProcessSequence.h b/Framework/ProcessSequence/SwitchProcessSequence.h index f1b1dfcf5eee747f2007d207788ad2f686285766..9f69e73c40c61c7ad5461ac77120ec4a182e4ce2 100644 --- a/Framework/ProcessSequence/SwitchProcessSequence.h +++ b/Framework/ProcessSequence/SwitchProcessSequence.h @@ -72,9 +72,6 @@ namespace corsika::process { "can only use process derived from BaseProcess in " "SwitchProcessSequence, for Process 2"); - // make sure TSelect is a function - static_assert(!std::is_function_v<TSelect>, "TSelect must be a function type"); - // make sure none of TProcess1/2 is a StackProcess static_assert(!std::is_base_of_v<StackProcess<TProcess1type>, TProcess1type>, "cannot use StackProcess in SwitchProcessSequence, for Process 1"); @@ -82,14 +79,10 @@ namespace corsika::process { "cannot use StackProcess in SwitchProcessSequence, for Process 2"); // if TProcess1/2 are already ProcessSequences, make sure they do not contain - // StackProcess - // if constexpr (t1ProcSeq) { + // any StackProcess static_assert(!contains_stack_process_v<TProcess1type>, "cannot use StackProcess in SwitchProcessSequence, remove from " "ProcessSequence 1"); - //} - - // if constexpr (t2ProcSeq) static_assert(!contains_stack_process_v<TProcess2type>, "cannot use StackProcess in SwitchProcessSequence, remove from " "ProcessSequence 2"); diff --git a/Framework/Utilities/SaveBoostHistogram.hpp b/Framework/Utilities/SaveBoostHistogram.hpp index 55bf482926c988cb561ada322dc56a67f3842649..508c982aa4b0e06444eb0d95186d3e5138381a9d 100644 --- a/Framework/Utilities/SaveBoostHistogram.hpp +++ b/Framework/Utilities/SaveBoostHistogram.hpp @@ -15,10 +15,14 @@ #include <numeric> #include <utility> #include <vector> +#include <string> #pragma once namespace corsika::utl { + + enum class SaveMode { overwrite, append }; + /** * This functions saves a boost::histogram into a numpy file. Only rather basic axis * types are supported: regular, variable, integer, category<int>. Only "ordinary" bin @@ -29,9 +33,12 @@ namespace corsika::utl { */ template <class Axes, class Storage> inline void save_hist(boost::histogram::histogram<Axes, Storage> const& h, - std::string const& filename) { + std::string const& filename, SaveMode mode = SaveMode::append) { unsigned const rank = h.rank(); + // append vs. overwrite + const std::string mode_str = (mode == SaveMode::append ? "a" : "w"); + std::vector<size_t> axes_dims; axes_dims.reserve(rank); @@ -41,7 +48,7 @@ namespace corsika::utl { std::vector<char> axis_types; axis_types.reserve(rank); - for (int i = 0; i < rank; ++i) { + for (unsigned int i = 0; i < rank; ++i) { auto const& ax = h.axis(i); unsigned const has_underflow = (ax.options() & 0x01) ? 1 : 0; unsigned const has_overflow = (ax.options() & 0x02) ? 1 : 0; @@ -61,7 +68,7 @@ namespace corsika::utl { ax_edges.push_back(ax.bin(ax.size() - 1).upper()); cnpy::npz_save(filename, std::string{"binedges_"} + std::to_string(i), - ax_edges.data(), {ax_edges.size()}, "a"); + ax_edges.data(), {ax_edges.size()}, mode_str); } else { axis_types.push_back('d'); std::vector<int64_t> bins; // we assume that discrete axes have integer bins @@ -70,13 +77,14 @@ namespace corsika::utl { for (int j = 0; j < ax.size(); ++j) { bins.push_back(ax.bin(j).lower()); } cnpy::npz_save(filename, std::string{"bins_"} + std::to_string(i), bins.data(), - {bins.size()}, "a"); + {bins.size()}, mode_str); } } - cnpy::npz_save(filename, std::string{"axistypes"}, axis_types.data(), {rank}, "a"); - cnpy::npz_save(filename, std::string{"overflow"}, overflow.get(), {rank}, "a"); - cnpy::npz_save(filename, std::string{"underflow"}, underflow.get(), {rank}, "a"); + cnpy::npz_save(filename, std::string{"axistypes"}, axis_types.data(), {rank}, + mode_str); + cnpy::npz_save(filename, std::string{"overflow"}, overflow.get(), {rank}, mode_str); + cnpy::npz_save(filename, std::string{"underflow"}, underflow.get(), {rank}, mode_str); auto const prod_axis_size = std::accumulate(axes_dims.cbegin(), axes_dims.cend(), unsigned{1}, std::multiplies<>()); @@ -100,7 +108,7 @@ namespace corsika::utl { temp[p] = *x; } - cnpy::npz_save(filename, "data", temp.get(), axes_dims, "a"); + cnpy::npz_save(filename, "data", temp.get(), axes_dims, mode_str); // In Python this array can directly be assigned to a histogram view if that // histogram has its axes correspondingly: hist.view(flow=True)[:] = file['data'] } diff --git a/Processes/CONEXSourceCut/CMakeLists.txt b/Processes/CONEXSourceCut/CMakeLists.txt index 1ef0f7c3f388a9fdad658b2c61a8e90d129e2ae7..708046731afa5de9d172a7a3f2992a292ad18c4c 100644 --- a/Processes/CONEXSourceCut/CMakeLists.txt +++ b/Processes/CONEXSourceCut/CMakeLists.txt @@ -56,6 +56,12 @@ CORSIKA_ADD_TEST(testCONEXSourceCut SOURCES ${MODEL_HEADERS} ) # +target_compile_definitions ( + testCONEXSourceCut + PRIVATE + REFDATADIR="${CMAKE_CURRENT_SOURCE_DIR}" + ) +# target_link_libraries ( testCONEXSourceCut ProcessCONEXSourceCut diff --git a/Processes/CONEXSourceCut/CONEXSourceCut.cc b/Processes/CONEXSourceCut/CONEXSourceCut.cc index 94059e886498ddb0adf4cac3b9f2f10c61e55916..d6c6e7e282599d373725b82d817e583ba9f37354 100644 --- a/Processes/CONEXSourceCut/CONEXSourceCut.cc +++ b/Processes/CONEXSourceCut/CONEXSourceCut.cc @@ -6,10 +6,12 @@ * the license. */ +#include <corsika/logging/Logging.h> #include <corsika/process/conex_source_cut/CONEXSourceCut.h> #include <corsika/process/conex_source_cut/CONEX_f.h> #include <corsika/random/RNGManager.h> #include <corsika/units/PhysicalConstants.h> + #include <algorithm> #include <fstream> #include <iomanip> @@ -23,32 +25,28 @@ using namespace corsika::setup; corsika::process::EProcessReturn CONEXSourceCut::DoSecondaries( corsika::setup::StackView& vS) { auto p = vS.begin(); - while (p != vS.end()) { Code const pid = p.GetPID(); - - auto const it = std::find_if(egs_em_codes_.cbegin(), egs_em_codes_.cend(), - [=](auto const& p) { return pid == p.first; }); - if (it != egs_em_codes_.cend()) { - // EM particle - - auto const egs_pid = it->second; - - addParticle(egs_pid, p.GetEnergy(), p.GetMass(), p.GetPosition(), - p.GetMomentum().normalized(), p.GetTime()); - + if (addParticle(pid, p.GetEnergy(), p.GetMass(), p.GetPosition(), + p.GetMomentum().normalized(), p.GetTime())) { p.Delete(); } ++p; } - return corsika::process::EProcessReturn::eOk; } -void CONEXSourceCut::addParticle(int egs_pid, HEPEnergyType energy, HEPEnergyType mass, - geometry::Point const& position, +bool CONEXSourceCut::addParticle(particles::Code pid, HEPEnergyType energy, + HEPEnergyType mass, geometry::Point const& position, geometry::Vector<dimensionless_d> const& direction, TimeType t) { + + auto const it = std::find_if(egs_em_codes_.cbegin(), egs_em_codes_.cend(), + [=](auto const& p) { return pid == p.first; }); + if (it == egs_em_codes_.cend()) { return false; } + + // EM particle + auto const egs_pid = it->second; std::cout << "position conexObs: " << position.GetCoordinates(conexObservationCS_) << std::endl; @@ -122,6 +120,8 @@ void CONEXSourceCut::addParticle(int egs_pid, HEPEnergyType energy, HEPEnergyTyp int n = 1, i = 1; conex::cegs4_(n, i); + + return true; } void CONEXSourceCut::SolveCE() { @@ -160,10 +160,14 @@ void CONEXSourceCut::SolveCE() { conex::get_shower_hadron_(icuth, nX, Hadrons[0]); std::ofstream file{"conex_output.txt"}; + file << fmt::format("#{:>8} {:>13} {:>13} {:>13} {:>13} {:>13} {:>13} {:>13}\n", "X", + "N", "dEdX", "Mu", "dMu", "Gamma", "El", "Had"); for (int i = 0; i < nX; ++i) { - file << X[i] << " " << N[i] << " " << dEdX[i] << " " << Mu[i] << " " << dMu[i] << " " - << Gamma[i] << " " << Electrons[i] << " " << Hadrons[i] << std::endl; + file << fmt::format( + " {:>8.2f} {:>13.3} {:>13.3} {:>13.3} {:>13.3} {:>13.3} {:>13.3} {:>13.3}\n", + X[i], N[i], dEdX[i], Mu[i], dMu[i], Gamma[i], Electrons[i], Hadrons[i]); } + file.close(); std::ofstream fitout{"conex_fit.txt"}; fitout << fitpars[1 - 1] << " # log10(eprima/eV)" << std::endl; @@ -179,6 +183,7 @@ void CONEXSourceCut::SolveCE() { fitout << fitpars[11 - 1] << " # phi" << std::endl; fitout << fitpars[12 - 1] << " # inelasticity 1st int." << std::endl; fitout << fitpars[13 - 1] << " # ???" << std::endl; + fitout.close(); } CONEXSourceCut::CONEXSourceCut(geometry::Point center, @@ -186,7 +191,7 @@ CONEXSourceCut::CONEXSourceCut(geometry::Point center, units::si::LengthType groundDist, units::si::LengthType injectionHeight, units::si::HEPEnergyType primaryEnergy, - particles::PDGCode primaryID) + particles::PDGCode primaryPDG) : center_{center} , showerAxis_{showerAxis} , groundDist_{groundDist} @@ -278,7 +283,7 @@ CONEXSourceCut::CONEXSourceCut(geometry::Point center, std::cout << "theta (deg) = " << theta << "; phi (deg) = " << phi << std::endl; - int ipart = static_cast<int>(primaryID); + int ipart = static_cast<int>(primaryPDG); auto rng = corsika::random::RNGManager::GetInstance().GetRandomStream("cascade"); double dimpact = 0.; // valid only if shower core is fixed on the observation plane; for diff --git a/Processes/CONEXSourceCut/CONEXSourceCut.h b/Processes/CONEXSourceCut/CONEXSourceCut.h index 121d8c16369a144bac054678f1c6b9af021b308a..b8a714666ca49342f252fbb7061701d739db7be7 100644 --- a/Processes/CONEXSourceCut/CONEXSourceCut.h +++ b/Processes/CONEXSourceCut/CONEXSourceCut.h @@ -31,13 +31,12 @@ namespace corsika::process { CONEXSourceCut(geometry::Point center, environment::ShowerAxis const& showerAxis, units::si::LengthType groundDist, units::si::LengthType injectionHeight, - units::si::HEPEnergyType primaryEnergy, - particles::PDGCode primaryID); + units::si::HEPEnergyType primaryEnergy, particles::PDGCode pdg); corsika::process::EProcessReturn DoSecondaries(corsika::setup::StackView&); void SolveCE(); - void addParticle(int egs_pid, units::si::HEPEnergyType energy, + bool addParticle(particles::Code pid, units::si::HEPEnergyType energy, units::si::HEPEnergyType mass, geometry::Point const& position, geometry::Vector<units::si::dimensionless_d> const& direction, units::si::TimeType t); diff --git a/Processes/CONEXSourceCut/conex_fit_REF.txt b/Processes/CONEXSourceCut/conex_fit_REF.txt new file mode 100644 index 0000000000000000000000000000000000000000..4930ab8259be9a50c912a3db2251169dc39e7f83 --- /dev/null +++ b/Processes/CONEXSourceCut/conex_fit_REF.txt @@ -0,0 +1,13 @@ +15 # log10(eprima/eV) +60 # theta +1e+30 # X1 (first interaction) +1093.9 # Nmax +475.585 # X0 +50.3301 # P1 +-0.00584492 # P2 +3.55546e-06 # P3 +4.49378e-05 # chi^2 / sqrt(Nmax) +880.549 # Xmax +-0 # phi +-1 # inelasticity 1st int. +100000 # ??? diff --git a/Processes/CONEXSourceCut/conex_output_REF.txt b/Processes/CONEXSourceCut/conex_output_REF.txt new file mode 100644 index 0000000000000000000000000000000000000000..fd32d4e2effa259d0b409524bc3d550522ee66a0 --- /dev/null +++ b/Processes/CONEXSourceCut/conex_output_REF.txt @@ -0,0 +1,208 @@ +# X N dEdX Mu dMu Gamma El Had + 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 10.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 20.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 30.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 40.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 50.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 60.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 70.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 80.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 90.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 100.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 110.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 120.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 130.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 140.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 150.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 160.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 170.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 180.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 190.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 200.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 210.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 220.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 230.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 240.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 250.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 260.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 270.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 280.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 290.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 300.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 310.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 320.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 330.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 340.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 350.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 360.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 370.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 380.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 390.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 400.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 410.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 420.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 430.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 440.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 450.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 460.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 470.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 480.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 490.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 500.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 510.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 520.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 530.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 540.00 0.00 0.00062 0.00 0.00 1.00 0.00 0.00 + 550.00 0.512 0.00246 0.000784 0.000802 1.69 0.272 0.00518 + 560.00 1.45 0.00598 0.00326 0.00256 4.23 0.787 0.00985 + 570.00 3.23 0.0123 0.00719 0.00411 9.26 1.78 0.0145 + 580.00 6.30 0.0227 0.0126 0.00569 18.0 3.51 0.0195 + 590.00 11.2 0.0385 0.0194 0.00734 32.0 6.27 0.0248 + 600.00 18.4 0.0613 0.0278 0.00906 53.3 10.4 0.0304 + 610.00 28.6 0.0925 0.0376 0.0108 84.1 16.2 0.0364 + 620.00 42.3 0.134 0.0489 0.0125 127.0 24.1 0.0425 + 630.00 60.1 0.186 0.0615 0.0142 184.0 34.5 0.0489 + 640.00 82.5 0.251 0.0753 0.0158 258.0 47.5 0.0553 + 650.00 110.0 0.328 0.0902 0.0173 350.0 63.4 0.0618 + 660.00 142.0 0.416 0.106 0.0186 464.0 82.5 0.0681 + 670.00 180.0 0.518 0.123 0.0198 600.0 105.0 0.0744 + 680.00 223.0 0.632 0.14 0.0208 759.0 130.0 0.0803 + 690.00 270.0 0.757 0.157 0.0216 942.0 158.0 0.086 + 700.00 322.0 0.892 0.175 0.0223 1.15e+03 189.0 0.0913 + 710.00 378.0 1.04 0.193 0.0227 1.38e+03 222.0 0.0962 + 720.00 437.0 1.19 0.21 0.023 1.62e+03 257.0 0.101 + 730.00 497.0 1.34 0.227 0.023 1.89e+03 294.0 0.104 + 740.00 559.0 1.50 0.244 0.0229 2.17e+03 331.0 0.108 + 750.00 621.0 1.65 0.26 0.0227 2.46e+03 369.0 0.111 + 760.00 683.0 1.81 0.275 0.0223 2.76e+03 406.0 0.113 + 770.00 742.0 1.96 0.289 0.0218 3.06e+03 443.0 0.114 + 780.00 799.0 2.10 0.303 0.0212 3.36e+03 478.0 0.116 + 790.00 853.0 2.23 0.315 0.0205 3.66e+03 511.0 0.116 + 800.00 902.0 2.35 0.327 0.0197 3.94e+03 542.0 0.116 + 810.00 947.0 2.45 0.337 0.0189 4.21e+03 570.0 0.116 + 820.00 986.0 2.55 0.347 0.018 4.47e+03 595.0 0.115 + 830.00 1.02e+03 2.63 0.355 0.0171 4.70e+03 616.0 0.113 + 840.00 1.05e+03 2.69 0.362 0.0162 4.92e+03 634.0 0.112 + 850.00 1.07e+03 2.74 0.369 0.0153 5.10e+03 648.0 0.109 + 860.00 1.08e+03 2.77 0.374 0.0144 5.27e+03 659.0 0.107 + 870.00 1.09e+03 2.79 0.379 0.0135 5.40e+03 666.0 0.104 + 880.00 1.10e+03 2.79 0.382 0.0126 5.50e+03 669.0 0.101 + 890.00 1.09e+03 2.78 0.385 0.0117 5.58e+03 669.0 0.0983 + 900.00 1.08e+03 2.76 0.387 0.0109 5.63e+03 665.0 0.095 + 910.00 1.07e+03 2.72 0.388 0.0101 5.64e+03 658.0 0.0916 + 920.00 1.05e+03 2.67 0.388 0.00933 5.64e+03 649.0 0.0881 + 930.00 1.03e+03 2.62 0.388 0.00861 5.60e+03 636.0 0.0845 + 940.00 1.01e+03 2.55 0.388 0.00793 5.54e+03 622.0 0.0809 + 950.00 978.0 2.48 0.387 0.00729 5.46e+03 605.0 0.0773 + 960.00 947.0 2.39 0.385 0.00669 5.36e+03 587.0 0.0737 + 970.00 913.0 2.31 0.383 0.00613 5.24e+03 567.0 0.0702 + 980.00 878.0 2.22 0.38 0.00561 5.11e+03 546.0 0.0667 + 990.00 841.0 2.12 0.378 0.00512 4.96e+03 524.0 0.0633 + 1000.00 803.0 2.03 0.375 0.00467 4.80e+03 501.0 0.0599 + 1010.00 765.0 1.93 0.371 0.00426 4.63e+03 478.0 0.0566 + 1020.00 726.0 1.83 0.368 0.00387 4.45e+03 455.0 0.0535 + 1030.00 688.0 1.73 0.364 0.00352 4.26e+03 431.0 0.0504 + 1040.00 650.0 1.64 0.36 0.0032 4.07e+03 408.0 0.0475 + 1050.00 612.0 1.54 0.356 0.0029 3.88e+03 385.0 0.0447 + 1060.00 575.0 1.45 0.352 0.00263 3.69e+03 362.0 0.042 + 1070.00 539.0 1.36 0.348 0.00239 3.50e+03 340.0 0.0394 + 1080.00 504.0 1.27 0.344 0.00216 3.31e+03 319.0 0.037 + 1090.00 470.0 1.19 0.34 0.00196 3.12e+03 298.0 0.0346 + 1100.00 438.0 1.10 0.336 0.00177 2.94e+03 278.0 0.0324 + 1110.00 407.0 1.03 0.331 0.0016 2.76e+03 258.0 0.0303 + 1120.00 377.0 0.952 0.327 0.00145 2.58e+03 240.0 0.0283 + 1130.00 349.0 0.881 0.323 0.00131 2.41e+03 222.0 0.0265 + 1140.00 323.0 0.814 0.319 0.00119 2.25e+03 206.0 0.0247 + 1150.00 298.0 0.751 0.314 0.00108 2.10e+03 190.0 0.023 + 1160.00 274.0 0.692 0.31 0.000973 1.95e+03 175.0 0.0215 + 1170.00 252.0 0.636 0.306 0.000881 1.81e+03 161.0 0.02 + 1180.00 231.0 0.584 0.302 0.000798 1.67e+03 148.0 0.0186 + 1190.00 212.0 0.535 0.298 0.000722 1.55e+03 136.0 0.0173 + 1200.00 194.0 0.49 0.294 0.000655 1.43e+03 125.0 0.0161 + 1210.00 177.0 0.447 0.29 0.000593 1.32e+03 114.0 0.015 + 1220.00 161.0 0.408 0.286 0.000538 1.21e+03 104.0 0.014 + 1230.00 147.0 0.372 0.283 0.000489 1.11e+03 94.8 0.013 + 1240.00 134.0 0.338 0.279 0.000444 1.02e+03 86.3 0.0121 + 1250.00 121.0 0.307 0.275 0.000403 933.0 78.5 0.0112 + 1260.00 110.0 0.279 0.272 0.000367 853.0 71.3 0.0104 + 1270.00 99.8 0.253 0.268 0.000335 779.0 64.7 0.0097 + 1280.00 90.3 0.229 0.265 0.000305 710.0 58.6 0.00901 + 1290.00 81.6 0.207 0.262 0.000278 647.0 53.0 0.00838 + 1300.00 73.7 0.187 0.258 0.000254 588.0 47.9 0.00779 + 1310.00 66.5 0.169 0.255 0.000232 534.0 43.2 0.00724 + 1320.00 59.9 0.152 0.252 0.000212 485.0 39.0 0.00673 + 1330.00 53.9 0.137 0.249 0.000194 439.0 35.1 0.00626 + 1340.00 48.5 0.123 0.246 0.000178 397.0 31.6 0.00582 + 1350.00 43.5 0.111 0.243 0.000163 359.0 28.4 0.00541 + 1360.00 39.1 0.0995 0.24 0.00015 324.0 25.5 0.00503 + 1370.00 35.0 0.0892 0.237 0.000138 293.0 22.9 0.00469 + 1380.00 31.4 0.08 0.234 0.000127 264.0 20.5 0.00436 + 1390.00 28.1 0.0716 0.231 0.000117 237.0 18.4 0.00406 + 1400.00 25.1 0.0641 0.229 0.000108 213.0 16.4 0.00379 + 1410.00 22.4 0.0573 0.226 9.93e-05 192.0 14.7 0.00353 + 1420.00 20.0 0.0512 0.223 9.17e-05 172.0 13.1 0.00329 + 1430.00 17.9 0.0457 0.221 8.48e-05 154.0 11.7 0.00307 + 1440.00 16.0 0.0408 0.218 7.85e-05 138.0 10.4 0.00287 + 1450.00 14.2 0.0364 0.216 7.28e-05 124.0 9.29 0.00268 + 1460.00 12.7 0.0325 0.214 6.75e-05 111.0 8.27 0.0025 + 1470.00 11.3 0.0289 0.211 6.27e-05 98.9 7.36 0.00234 + 1480.00 10.0 0.0258 0.209 5.83e-05 88.3 6.54 0.00219 + 1490.00 8.93 0.0229 0.207 5.42e-05 78.7 5.81 0.00205 + 1500.00 7.94 0.0204 0.204 5.05e-05 70.2 5.16 0.00192 + 1510.00 7.05 0.0182 0.202 4.70e-05 62.5 4.58 0.0018 + 1520.00 6.27 0.0161 0.2 4.39e-05 55.7 4.06 0.00169 + 1530.00 5.57 0.0144 0.198 4.10e-05 49.5 3.60 0.00159 + 1540.00 4.95 0.0128 0.196 3.83e-05 44.0 3.18 0.0015 + 1550.00 4.40 0.0114 0.194 3.58e-05 39.1 2.82 0.00141 + 1560.00 3.91 0.0101 0.192 3.35e-05 34.7 2.49 0.00133 + 1570.00 3.47 0.00899 0.19 3.14e-05 30.8 2.20 0.00125 + 1580.00 3.09 0.008 0.188 2.94e-05 27.3 1.95 0.00118 + 1590.00 2.75 0.00712 0.186 2.76e-05 24.2 1.72 0.00112 + 1600.00 2.44 0.00635 0.185 2.59e-05 21.4 1.52 0.00106 + 1610.00 2.18 0.00566 0.183 2.44e-05 19.0 1.34 0.001 + 1620.00 1.94 0.00505 0.181 2.29e-05 16.8 1.19 0.000948 + 1630.00 1.73 0.00451 0.179 2.16e-05 14.9 1.05 0.0009 + 1640.00 1.55 0.00404 0.177 2.04e-05 13.1 0.923 0.000855 + 1650.00 1.38 0.00362 0.176 1.92e-05 11.6 0.814 0.000814 + 1660.00 1.24 0.00324 0.174 1.81e-05 10.3 0.718 0.000775 + 1670.00 1.11 0.00292 0.173 1.71e-05 9.07 0.634 0.00074 + 1680.00 0.998 0.00263 0.171 1.62e-05 8.01 0.559 0.000706 + 1690.00 0.9 0.00237 0.169 1.53e-05 7.08 0.494 0.000675 + 1700.00 0.812 0.00214 0.168 1.45e-05 6.25 0.436 0.000647 + 1710.00 0.736 0.00195 0.166 1.38e-05 5.52 0.385 0.00062 + 1720.00 0.668 0.00177 0.165 1.31e-05 4.87 0.34 0.000595 + 1730.00 0.608 0.00161 0.163 1.24e-05 4.30 0.301 0.000572 + 1740.00 0.556 0.00148 0.162 1.18e-05 3.80 0.266 0.00055 + 1750.00 0.509 0.00136 0.161 1.12e-05 3.36 0.236 0.00053 + 1760.00 0.469 0.00125 0.159 1.07e-05 2.97 0.209 0.000512 + 1770.00 0.433 0.00116 0.158 1.02e-05 2.63 0.185 0.000494 + 1780.00 0.401 0.00108 0.156 9.71e-06 2.33 0.165 0.000478 + 1790.00 0.373 0.001 0.155 9.27e-06 2.06 0.147 0.000463 + 1800.00 0.349 0.000939 0.154 8.86e-06 1.83 0.131 0.000448 + 1810.00 0.327 0.000882 0.152 8.48e-06 1.62 0.117 0.000435 + 1820.00 0.308 0.000831 0.151 8.12e-06 1.44 0.105 0.000423 + 1830.00 0.291 0.000787 0.15 7.78e-06 1.28 0.0941 0.000411 + 1840.00 0.276 0.000747 0.149 7.46e-06 1.14 0.0847 0.0004 + 1850.00 0.262 0.000712 0.147 7.16e-06 1.02 0.0764 0.00039 + 1860.00 0.251 0.000681 0.146 6.88e-06 0.914 0.0692 0.000381 + 1870.00 0.24 0.000653 0.145 6.62e-06 0.82 0.0629 0.000372 + 1880.00 0.231 0.000629 0.144 6.37e-06 0.737 0.0573 0.000364 + 1890.00 0.222 0.000607 0.143 6.14e-06 0.665 0.0524 0.000356 + 1900.00 0.215 0.000587 0.142 5.92e-06 0.601 0.0481 0.000349 + 1910.00 0.208 0.000569 0.141 5.72e-06 0.545 0.0443 0.000342 + 1920.00 0.202 0.000553 0.139 5.52e-06 0.495 0.041 0.000335 + 1930.00 0.197 0.000539 0.138 5.34e-06 0.452 0.0381 0.000329 + 1940.00 0.192 0.000526 0.137 5.17e-06 0.414 0.0355 0.000324 + 1950.00 0.188 0.000514 0.136 5.01e-06 0.381 0.0332 0.000318 + 1960.00 0.184 0.000503 0.135 4.85e-06 0.351 0.0312 0.000313 + 1970.00 0.18 0.000493 0.134 4.71e-06 0.325 0.0295 0.000309 + 1980.00 0.177 0.000484 0.133 4.57e-06 0.303 0.0279 0.000304 + 1990.00 0.174 0.000476 0.132 4.44e-06 0.283 0.0265 0.0003 + 2000.00 0.171 0.000469 0.131 4.32e-06 0.265 0.0252 0.000296 + 2010.00 0.168 0.000461 0.13 4.20e-06 0.249 0.0241 0.000292 + 2020.00 0.166 0.000455 0.129 4.10e-06 0.235 0.0232 0.000289 + 2030.00 0.164 0.000449 0.128 3.99e-06 0.223 0.0223 0.000285 + 2040.00 0.162 0.000443 0.127 3.89e-06 0.212 0.0215 0.000282 + 2050.00 0.16 0.000437 0.127 3.80e-06 0.202 0.0208 0.000279 + 2060.00 0.158 0.00 0.126 3.71e-06 0.193 0.0201 0.000276 diff --git a/Processes/CONEXSourceCut/testCONEXSourceCut.cc b/Processes/CONEXSourceCut/testCONEXSourceCut.cc index 82d208521e4b2fd86aca6349305c5dbaec609e58..378cd9259488e8ded32678929e987ba507387e07 100644 --- a/Processes/CONEXSourceCut/testCONEXSourceCut.cc +++ b/Processes/CONEXSourceCut/testCONEXSourceCut.cc @@ -6,18 +6,28 @@ * the license. */ +#include <corsika/setup/SetupEnvironment.h> + #include <corsika/environment/Environment.h> #include <corsika/environment/LayeredSphericalAtmosphereBuilder.h> +#include <corsika/environment/MediumPropertyModel.h> +#include <corsika/environment/UniformMagneticField.h> + #include <corsika/geometry/Point.h> #include <corsika/geometry/RootCoordinateSystem.h> #include <corsika/geometry/Vector.h> + #include <corsika/particles/ParticleProperties.h> + #include <corsika/process/conex_source_cut/CONEXSourceCut.h> #include <corsika/process/sibyll/Interaction.h> #include <corsika/process/sibyll/NuclearInteraction.h> + #include <corsika/random/RNGManager.h> + #include <corsika/units/PhysicalUnits.h> #include <corsika/utl/CorsikaFenv.h> + #include <catch2/catch.hpp> using namespace corsika; @@ -25,6 +35,12 @@ using namespace corsika::environment; using namespace corsika::geometry; using namespace corsika::units::si; +const std::string refDataDir = std::string(REFDATADIR); // from cmake + +template <typename T> +using MExtraEnvirnoment = + environment::MediumPropertyModel<environment::UniformMagneticField<T>>; + TEST_CASE("CONEXSourceCut") { random::RNGManager::GetInstance().RegisterRandomStream("cascade"); random::RNGManager::GetInstance().RegisterRandomStream("sibyll"); @@ -32,11 +48,16 @@ TEST_CASE("CONEXSourceCut") { feenableexcept(FE_INVALID); // setup environment, geometry - using EnvType = Environment<setup::IEnvironmentModel>; - EnvType env; + setup::Environment env; const CoordinateSystem& rootCS = env.GetCoordinateSystem(); Point const center{rootCS, 0_m, 0_m, 0_m}; - environment::LayeredSphericalAtmosphereBuilder builder{center, conex::earthRadius}; + + auto builder = environment::make_layered_spherical_atmosphere_builder< + setup::EnvironmentInterface, + MExtraEnvirnoment>::create(center, conex::earthRadius, + environment::Medium::AirDry1Atm, + geometry::Vector{rootCS, 0_T, 50_mT, 0_T}); + builder.setNuclearComposition( {{particles::Code::Nitrogen, particles::Code::Oxygen}, {0.7847f, 1.f - 0.7847f}}); // values taken from AIRES manual, Ar removed for now @@ -87,7 +108,43 @@ TEST_CASE("CONEXSourceCut") { std::cout << "position EM: " << emPosition.GetCoordinates(conex.GetObserverCS()) << " " << emPosition.GetCoordinates(rootCS) << std::endl; - conex.addParticle(0, Eem, 0_eV, emPosition, momentum.normalized(), 0_s); - + conex.addParticle(particles::Code::Proton, Eem, 0_eV, emPosition, momentum.normalized(), + 0_s); + // supperimpose a photon + auto const momentumPhoton = showerAxis.GetDirection() * 1_TeV; + conex.addParticle(particles::Code::Gamma, 1_TeV, 0_eV, emPosition, + momentumPhoton.normalized(), 0_s); conex.SolveCE(); } + +#include <algorithm> +#include <iterator> +#include <string> +#include <fstream> + +TEST_CASE("ConexOutput", "[output validation]") { + + auto file = GENERATE(as<std::string>{}, "conex_fit", "conex_output"); + + SECTION(std::string("check saved data, ") + file + ".txt") { + + // compare to binary reference data + std::ifstream file1(file + ".txt"); + std::ifstream file1ref(refDataDir + "/" + file + "_REF.txt"); + + std::istreambuf_iterator<char> begin1(file1); + std::istreambuf_iterator<char> begin1ref(file1ref); + + std::istreambuf_iterator<char> end; + + while (begin1 != end && begin1ref != end) { + CHECK(*begin1 == *begin1ref); + ++begin1; + ++begin1ref; + } + CHECK(begin1 == end); + CHECK(begin1ref == end); + file1.close(); + file1ref.close(); + } +} diff --git a/Processes/EnergyLoss/EnergyLoss.cc b/Processes/EnergyLoss/EnergyLoss.cc index 336294d8e97ee9be5fdc3c82b46b30365849e826..66c8a76e24858c08431c15a8a5c4995c72096fce 100644 --- a/Processes/EnergyLoss/EnergyLoss.cc +++ b/Processes/EnergyLoss/EnergyLoss.cc @@ -265,3 +265,15 @@ void EnergyLoss::PrintProfile() const { HEPEnergyType EnergyLoss::GetTotal() const { return std::accumulate(profile_.cbegin(), profile_.cend(), HEPEnergyType::zero()); } + +void EnergyLoss::showResults() const { + using namespace corsika::units::si; // required for operator::_MeV + std::cout << " ******************************" << std::endl + << " PROCESS::ContinuousProcess: " << std::endl; + std::cout << " energy lost dE (GeV) : " << energy_lost_ / 1_GeV << std::endl; +} + +void EnergyLoss::reset() { + using namespace corsika::units::si; // required for operator::_MeV + energy_lost_ = 0_GeV; +} diff --git a/Processes/EnergyLoss/EnergyLoss.h b/Processes/EnergyLoss/EnergyLoss.h index 89d20bf05a09346eaf825ce647d990f316ee7006..f60e16b358f2dbf9671009b5c0c4eef1eeaae9a4 100644 --- a/Processes/EnergyLoss/EnergyLoss.h +++ b/Processes/EnergyLoss/EnergyLoss.h @@ -45,6 +45,10 @@ namespace corsika::process::energy_loss { static units::si::HEPEnergyType TotalEnergyLoss(setup::Stack::ParticleType const&, const units::si::GrammageType); + void showResults() const; + void reset(); + corsika::units::si::HEPEnergyType energyLost() const { return energy_lost_; } + private: void FillProfile(setup::Trajectory const&, units::si::HEPEnergyType); @@ -57,6 +61,7 @@ namespace corsika::process::energy_loss { environment::ShowerAxis const& shower_axis_; corsika::units::si::HEPEnergyType emCut_; std::vector<units::si::HEPEnergyType> profile_; // longitudinal profile + units::si::HEPEnergyType energy_lost_ = 0 * units::si::electronvolt; }; units::si::GrammageType const dX_threshold_ = std::invoke([]() { diff --git a/Processes/InteractionCounter/CMakeLists.txt b/Processes/InteractionCounter/CMakeLists.txt index e7f374dbf345b888659c7b035b03ec1f24cf7494..235246c713af90d1c48a7080284544b87131ffbb 100644 --- a/Processes/InteractionCounter/CMakeLists.txt +++ b/Processes/InteractionCounter/CMakeLists.txt @@ -49,7 +49,13 @@ CORSIKA_ADD_TEST(testInteractionCounter SOURCES testInteractionCounter.cc ${MODEL_HEADERS} ) - +# +target_compile_definitions ( + testInteractionCounter + PRIVATE + REFDATADIR="${CMAKE_CURRENT_SOURCE_DIR}" + ) +# target_link_libraries ( testInteractionCounter ProcessInteractionCounter diff --git a/Processes/InteractionCounter/InteractionCounter.hpp b/Processes/InteractionCounter/InteractionCounter.hpp index 83bc130011b1f77e8101143af4cdb2684e46b18b..c565eb6a106f13877b96511b7de7918cd16e4d8d 100644 --- a/Processes/InteractionCounter/InteractionCounter.hpp +++ b/Processes/InteractionCounter/InteractionCounter.hpp @@ -56,7 +56,7 @@ namespace corsika::process::interaction_counter { return process_.GetInteractionLength(particle); } - auto const& GetHistogram() const { return histogram_; } + InteractionHistogram const& GetHistogram() const { return histogram_; } }; } // namespace corsika::process::interaction_counter diff --git a/Processes/InteractionCounter/InteractionHistogram.cc b/Processes/InteractionCounter/InteractionHistogram.cc index 8ae626ffe57d1b0dd1cc016667b409a26b697f9a..45d04469b4c8fa7f9dd7ed1f22b41817ab4f3a2a 100644 --- a/Processes/InteractionCounter/InteractionHistogram.cc +++ b/Processes/InteractionCounter/InteractionHistogram.cc @@ -41,12 +41,14 @@ void InteractionHistogram::fill(particles::Code projectile_id, } } -void InteractionHistogram::saveLab(std::string const& filename) const { - corsika::utl::save_hist(inthist_lab_, filename); +void InteractionHistogram::saveLab(std::string const& filename, + utl::SaveMode mode) const { + corsika::utl::save_hist(inthist_lab_, filename, mode); } -void InteractionHistogram::saveCMS(std::string const& filename) const { - corsika::utl::save_hist(inthist_cms_, filename); +void InteractionHistogram::saveCMS(std::string const& filename, + utl::SaveMode mode) const { + corsika::utl::save_hist(inthist_cms_, filename, mode); } InteractionHistogram& InteractionHistogram::operator+=( diff --git a/Processes/InteractionCounter/InteractionHistogram.hpp b/Processes/InteractionCounter/InteractionHistogram.hpp index 96d243f1223505498d211d675fc8cba6ec620fb6..d374eb8d1778379134222b8de0beeb0dcfc181fb 100644 --- a/Processes/InteractionCounter/InteractionHistogram.hpp +++ b/Processes/InteractionCounter/InteractionHistogram.hpp @@ -54,9 +54,11 @@ namespace corsika::process::interaction_counter { hist_type const& labHist() const { return inthist_lab_; } - void saveLab(std::string const& filename) const; + void saveLab(std::string const& filename, + utl::SaveMode mode = utl::SaveMode::append) const; - void saveCMS(std::string const& filename) const; + void saveCMS(std::string const& filename, + utl::SaveMode mode = utl::SaveMode::append) const; InteractionHistogram& operator+=(InteractionHistogram const& other); diff --git a/Processes/InteractionCounter/testInteractionCounter.cc b/Processes/InteractionCounter/testInteractionCounter.cc index af43fe63eae05e941998fef7e180a47ca020e032..5417f3e3ec90ea7955e705e6fb836efd22198f8f 100644 --- a/Processes/InteractionCounter/testInteractionCounter.cc +++ b/Processes/InteractionCounter/testInteractionCounter.cc @@ -27,69 +27,7 @@ using namespace corsika::process::interaction_counter; using namespace corsika::units; using namespace corsika::units::si; -auto setupEnvironment(particles::Code target_code) { - // setup environment, geometry - auto env = std::make_unique<environment::Environment<environment::IMediumModel>>(); - auto& universe = *(env->GetUniverse()); - const geometry::CoordinateSystem& cs = env->GetCoordinateSystem(); - - auto theMedium = - environment::Environment<environment::IMediumModel>::CreateNode<geometry::Sphere>( - geometry::Point{cs, 0_m, 0_m, 0_m}, - 1_km * std::numeric_limits<double>::infinity()); - - using MyHomogeneousModel = environment::HomogeneousMedium<environment::IMediumModel>; - theMedium->SetModelProperties<MyHomogeneousModel>( - 1_kg / (1_m * 1_m * 1_m), - environment::NuclearComposition(std::vector<particles::Code>{target_code}, - std::vector<float>{1.})); - - auto const* nodePtr = theMedium.get(); - universe.AddChild(std::move(theMedium)); - - return std::make_tuple(std::move(env), &cs, nodePtr); -} - -template <typename TNodeType> -auto setupStack(int vA, int vZ, HEPEnergyType vMomentum, TNodeType* vNodePtr, - geometry::CoordinateSystem const& cs) { - auto stack = std::make_unique<setup::Stack>(); - auto constexpr mN = corsika::units::constants::nucleonMass; - - geometry::Point const origin(cs, {0_m, 0_m, 0_m}); - corsika::stack::MomentumVector const pLab(cs, {vMomentum, 0_GeV, 0_GeV}); - - HEPEnergyType const E0 = sqrt(units::static_pow<2>(mN * vA) + pLab.squaredNorm()); - setup::Stack::StackIterator particle = - stack->AddParticle(std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, - units::si::TimeType, unsigned short, unsigned short>{ - particles::Code::Nucleus, E0, pLab, origin, 0_ns, vA, vZ}); - - particle.SetNode(vNodePtr); - return std::make_tuple( - std::move(stack), std::make_unique<decltype(setup::StackView(particle))>(particle)); -} - -template <typename TNodeType> -auto setupStack(particles::Code vProjectileType, HEPEnergyType vMomentum, - TNodeType* vNodePtr, geometry::CoordinateSystem const& cs) { - auto stack = std::make_unique<setup::Stack>(); - - geometry::Point const origin(cs, {0_m, 0_m, 0_m}); - corsika::stack::MomentumVector const pLab(cs, {vMomentum, 0_GeV, 0_GeV}); - - HEPEnergyType const E0 = sqrt( - units::static_pow<2>(particles::GetMass(vProjectileType)) + pLab.squaredNorm()); - auto particle = stack->AddParticle( - std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{ - vProjectileType, E0, pLab, origin, 0_ns}); - - particle.SetNode(vNodePtr); - return std::make_tuple( - std::move(stack), std::make_unique<decltype(setup::StackView(particle))>(particle)); -} +const std::string refDataDir = std::string(REFDATADIR); // from cmake struct DummyProcess { template <typename TParticle> @@ -103,7 +41,7 @@ struct DummyProcess { } }; -TEST_CASE("InteractionCounter") { +TEST_CASE("InteractionCounter", "[process]") { logging::SetLevel(logging::level::debug); @@ -114,12 +52,13 @@ TEST_CASE("InteractionCounter") { REQUIRE(countedProcess.GetInteractionLength(nullptr) == 100_g / 1_cm / 1_cm); } - auto [env, csPtr, nodePtr] = setupEnvironment(particles::Code::Oxygen); + auto [env, csPtr, nodePtr] = setup::testing::setupEnvironment(particles::Code::Oxygen); [[maybe_unused]] auto& env_dummy = env; SECTION("DoInteraction nucleus") { unsigned short constexpr A = 14, Z = 7; - auto [stackPtr, secViewPtr] = setupStack(A, Z, 105_TeV, nodePtr, *csPtr); + auto [stackPtr, secViewPtr] = setup::testing::setupStack(particles::Code::Nucleus, A, + Z, 105_TeV, nodePtr, *csPtr); REQUIRE(stackPtr->getEntries() == 1); REQUIRE(secViewPtr->getEntries() == 0); @@ -132,14 +71,18 @@ TEST_CASE("InteractionCounter") { auto const& h2 = countedProcess.GetHistogram().CMSHist(); REQUIRE(h2.at(h2.axis(0).index(1'000'070'140), h2.axis(1).index(1.6e12)) == 1); - // REQUIRE(h2.at(1'000'070'140, 92) == 1); // bin 1.584 .. 1.995 TeV √s REQUIRE(std::accumulate(h2.cbegin(), h2.cend(), 0) == 1); + + countedProcess.GetHistogram().saveLab("testInteractionCounter_file1.npz", + utl::SaveMode::overwrite); + countedProcess.GetHistogram().saveCMS("testInteractionCounter_file2.npz", + utl::SaveMode::overwrite); } SECTION("DoInteraction Lambda") { auto constexpr code = particles::Code::Lambda0; - auto constexpr codeInt = static_cast<particles::CodeIntType>(code); - auto [stackPtr, secViewPtr] = setupStack(code, 105_TeV, nodePtr, *csPtr); + auto [stackPtr, secViewPtr] = + setup::testing::setupStack(code, 0, 0, 105_TeV, nodePtr, *csPtr); REQUIRE(stackPtr->getEntries() == 1); REQUIRE(secViewPtr->getEntries() == 0); @@ -155,3 +98,38 @@ TEST_CASE("InteractionCounter") { REQUIRE(std::accumulate(h2.cbegin(), h2.cend(), 0) == 1); } } + +#include <algorithm> +#include <iterator> +#include <string> +#include <fstream> + +TEST_CASE("InteractionCounterOutput", "[output validation]") { + + auto file = GENERATE(as<std::string>{}, "testInteractionCounter_file1", + "testInteractionCounter_file2"); + + SECTION(std::string("check saved data, ") + file + ".npz") { + + std::cout << file + ".npz vs " << refDataDir + "/" + file + "_REF.npz" << std::endl; + + // compare to binary reference data + std::ifstream file1(file + ".npz"); + std::ifstream file1ref(refDataDir + "/" + file + "_REF.npz"); + + std::istreambuf_iterator<char> begin1(file1); + std::istreambuf_iterator<char> begin1ref(file1ref); + + std::istreambuf_iterator<char> end; + + while (begin1 != end && begin1ref != end) { + CHECK(*begin1 == *begin1ref); + ++begin1; + ++begin1ref; + } + CHECK(begin1 == end); + CHECK(begin1ref == end); + file1.close(); + file1ref.close(); + } +} diff --git a/Processes/InteractionCounter/testInteractionCounter_file1_REF.npz b/Processes/InteractionCounter/testInteractionCounter_file1_REF.npz new file mode 100644 index 0000000000000000000000000000000000000000..13e2d5d49e16b6a2e7eb6b95dc1a26bccab18ae8 Binary files /dev/null and b/Processes/InteractionCounter/testInteractionCounter_file1_REF.npz differ diff --git a/Processes/InteractionCounter/testInteractionCounter_file2_REF.npz b/Processes/InteractionCounter/testInteractionCounter_file2_REF.npz new file mode 100644 index 0000000000000000000000000000000000000000..8509b27e4d690a386c2710a24ceda6a1143bf757 Binary files /dev/null and b/Processes/InteractionCounter/testInteractionCounter_file2_REF.npz differ diff --git a/Processes/OnShellCheck/testOnShellCheck.cc b/Processes/OnShellCheck/testOnShellCheck.cc index 0d45b1e2946d814d47039d11f74249ace3282526..77c64e178da2726fabcd7c3792af60d270417c25 100644 --- a/Processes/OnShellCheck/testOnShellCheck.cc +++ b/Processes/OnShellCheck/testOnShellCheck.cc @@ -27,7 +27,7 @@ using namespace corsika::units::si; TEST_CASE("OnShellCheck", "[processes]") { feenableexcept(FE_INVALID); - using EnvType = environment::Environment<setup::IEnvironmentModel>; + using EnvType = setup::Environment; EnvType env; const geometry::CoordinateSystem& rootCS = env.GetCoordinateSystem(); diff --git a/Processes/ParticleCut/ParticleCut.cc b/Processes/ParticleCut/ParticleCut.cc index 728c7d25bb149ea20fb492628c9326f489426e62..5176ab88737ff10f310ede66f397d861d49c73c1 100644 --- a/Processes/ParticleCut/ParticleCut.cc +++ b/Processes/ParticleCut/ParticleCut.cc @@ -119,6 +119,7 @@ namespace corsika::process { fEnergy = 0_GeV; } + // LCOV_EXCL_START void ParticleCut::ShowResults() const { C8LOG_INFO(fmt::format( " ******************************\n" @@ -131,6 +132,7 @@ namespace corsika::process { " ******************************", fEmEnergy / 1_GeV, uiEmCount, fInvEnergy / 1_GeV, uiInvCount, fEnergy / 1_GeV)); } + // LCOV_EXCL_STOP void ParticleCut::Reset() { fEmEnergy = 0_GeV; diff --git a/Processes/ParticleCut/testParticleCut.cc b/Processes/ParticleCut/testParticleCut.cc index 921eecc3ea2e59095f276bb03d7faec4ab43174a..95e217bc73017b0c39e84b415fa722bd82d287a7 100644 --- a/Processes/ParticleCut/testParticleCut.cc +++ b/Processes/ParticleCut/testParticleCut.cc @@ -16,6 +16,7 @@ #include <corsika/utl/CorsikaFenv.h> #include <corsika/setup/SetupStack.h> +#include <corsika/setup/SetupTrajectory.h> #include <catch2/catch.hpp> @@ -26,7 +27,8 @@ using namespace corsika::units::si; TEST_CASE("ParticleCut", "[processes]") { feenableexcept(FE_INVALID); - using EnvType = environment::Environment<setup::IEnvironmentModel>; + using EnvType = setup::Environment; + EnvType env; const geometry::CoordinateSystem& rootCS = env.GetCoordinateSystem(); @@ -43,6 +45,9 @@ TEST_CASE("ParticleCut", "[processes]") { particles::Code::Electron, particles::Code::MuPlus, particles::Code::NuE, particles::Code::Neutron, particles::Code::NuMu}; + // common staring point + const geometry::Point point0(rootCS, 0_m, 0_m, 0_m); + SECTION("cut on particle type: inv") { ParticleCut cut(20_GeV, false, true); @@ -53,8 +58,7 @@ TEST_CASE("ParticleCut", "[processes]") { std::tuple<particles::Code, units::si::HEPEnergyType, corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{ particles::Code::Proton, Eabove, - corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}), - geometry::Point(rootCS, 0_m, 0_m, 0_m), 0_ns}); + corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}), point0, 0_ns}); // view on secondary particles setup::StackView view(particle); // ref. to primary particle through the secondary view. @@ -65,7 +69,9 @@ TEST_CASE("ParticleCut", "[processes]") { for (auto proType : particleList) projectile.AddSecondary(std::make_tuple( proType, Eabove, corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}), - geometry::Point(rootCS, 0_m, 0_m, 0_m), 0_ns)); + point0, 0_ns)); + CHECK(view.getEntries() == 11); + CHECK(stack.getEntries() == 12); cut.DoSecondaries(view); @@ -79,10 +85,9 @@ TEST_CASE("ParticleCut", "[processes]") { ParticleCut cut(20_GeV, true, false); // add primary particle to stack - auto particle = stack.AddParticle( - std::make_tuple(particles::Code::Proton, Eabove, - corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}), - geometry::Point(rootCS, 0_m, 0_m, 0_m), 0_ns)); + auto particle = stack.AddParticle(std::make_tuple( + particles::Code::Proton, Eabove, + corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}), point0, 0_ns)); // view on secondary particles corsika::setup::StackView view(particle); // ref. to primary particle through the secondary view. @@ -93,7 +98,7 @@ TEST_CASE("ParticleCut", "[processes]") { for (auto proType : particleList) { projectile.AddSecondary(std::make_tuple( proType, Eabove, corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}), - geometry::Point(rootCS, 0_m, 0_m, 0_m), 0_ns)); + point0, 0_ns)); } cut.DoSecondaries(view); @@ -106,10 +111,9 @@ TEST_CASE("ParticleCut", "[processes]") { ParticleCut cut(20_GeV, true, true); // add primary particle to stack - auto particle = stack.AddParticle( - std::make_tuple(particles::Code::Proton, Eabove, - corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}), - geometry::Point(rootCS, 0_m, 0_m, 0_m), 0_ns)); + auto particle = stack.AddParticle(std::make_tuple( + particles::Code::Proton, Eabove, + corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}), point0, 0_ns)); // view on secondary particles setup::StackView view{particle}; // ref. to primary particle through the secondary view. @@ -120,17 +124,17 @@ TEST_CASE("ParticleCut", "[processes]") { for (auto proType : particleList) projectile.AddSecondary(std::make_tuple( proType, Ebelow, corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}), - geometry::Point(rootCS, 0_m, 0_m, 0_m), 0_ns)); + point0, 0_ns)); unsigned short A = 18; unsigned short Z = 8; projectile.AddSecondary( std::make_tuple(particles::Code::Nucleus, Eabove * A, corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}), - geometry::Point(rootCS, 0_m, 0_m, 0_m), 0_ns, A, Z)); + point0, 0_ns, A, Z)); projectile.AddSecondary( std::make_tuple(particles::Code::Nucleus, Ebelow * A, corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}), - geometry::Point(rootCS, 0_m, 0_m, 0_m), 0_ns, A, Z)); + point0, 0_ns, A, Z)); cut.DoSecondaries(view); @@ -143,10 +147,9 @@ TEST_CASE("ParticleCut", "[processes]") { const TimeType too_late = 1_s; // add primary particle to stack - auto particle = stack.AddParticle( - std::make_tuple(particles::Code::Proton, Eabove, - corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}), - geometry::Point(rootCS, 0_m, 0_m, 0_m), 1_ns)); + auto particle = stack.AddParticle(std::make_tuple( + particles::Code::Proton, Eabove, + corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}), point0, 1_ns)); // view on secondary particles corsika::setup::StackView view(particle); // ref. to primary particle through the secondary view. @@ -157,7 +160,7 @@ TEST_CASE("ParticleCut", "[processes]") { for (auto proType : particleList) { projectile.AddSecondary(std::make_tuple( proType, Eabove, corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}), - geometry::Point(rootCS, 0_m, 0_m, 0_m), too_late)); + point0, too_late)); } cut.DoSecondaries(view); @@ -166,4 +169,29 @@ TEST_CASE("ParticleCut", "[processes]") { cut.Reset(); CHECK(cut.GetCutEnergy() == 0_GeV); } + + corsika::setup::Trajectory const track{ + geometry::Line{point0, + geometry::Vector<units::si::SpeedType::dimension_type>{ + rootCS, {0_m / second, 0_m / second, -units::constants::c}}}, + 12_m / units::constants::c}; + + SECTION("cut on DoContinous, just invisibles") { + + ParticleCut cut(20_GeV, false, true); + CHECK(cut.GetECut() == 20_GeV); + + // add particles, all with energies above the threshold + // only cut is by species + for (auto proType : particleList) { + auto particle = stack.AddParticle(std::make_tuple( + proType, Eabove, corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, 0_GeV}), + point0, 0_ns)); + cut.DoContinuous(particle, track); + } + + CHECK(stack.getEntries() == 9); + CHECK(cut.GetNumberInvParticles() == 2); + CHECK(cut.GetInvEnergy() / 1_GeV == 2000); + } } diff --git a/Processes/Proposal/CMakeLists_PROPOSAL.txt b/Processes/Proposal/CMakeLists_PROPOSAL.txt index ad1b75b76d839ad1ac2173f4dbc1a6917d5a41c5..7045ae65db2b0a81b82bfd38ba643d1a9056590e 100644 --- a/Processes/Proposal/CMakeLists_PROPOSAL.txt +++ b/Processes/Proposal/CMakeLists_PROPOSAL.txt @@ -55,8 +55,8 @@ else (IN_CORSIKA8) endif (IN_CORSIKA8) add_library(PROPOSAL::PROPOSAL ALIAS PROPOSAL) -target_compile_features(PROPOSAL PUBLIC cxx_std_11) -set_target_properties(PROPOSAL PROPERTIES CXX_EXTENSIONS OFF) +#target_compile_features(PROPOSAL PUBLIC cxx_std_11) +#set_target_properties(PROPOSAL PROPERTIES CXX_EXTENSIONS OFF) target_include_directories( PROPOSAL PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> diff --git a/Processes/Proposal/ContinuousProcess.cc b/Processes/Proposal/ContinuousProcess.cc index 371f28262bd3b7a5e5f67fc2d2415c221cd43ffc..fb4d528fa83d41178739c3a1c25888feff808a16 100644 --- a/Processes/Proposal/ContinuousProcess.cc +++ b/Processes/Proposal/ContinuousProcess.cc @@ -44,7 +44,7 @@ namespace corsika::process::proposal { } template <> - ContinuousProcess::ContinuousProcess(setup::SetupEnvironment const& _env, + ContinuousProcess::ContinuousProcess(setup::Environment const& _env, corsika::units::si::HEPEnergyType _emCut) : ProposalProcessBase(_env, _emCut) {} @@ -146,14 +146,14 @@ namespace corsika::process::proposal { return dist; } - void ContinuousProcess::ShowResults() const { + void ContinuousProcess::showResults() const { using namespace corsika::units::si; // required for operator::_MeV std::cout << " ******************************" << std::endl << " PROCESS::ContinuousProcess: " << std::endl; std::cout << " energy lost dE (GeV) : " << energy_lost_ / 1_GeV << std::endl; } - void ContinuousProcess::Reset() { + void ContinuousProcess::reset() { using namespace corsika::units::si; // required for operator::_MeV energy_lost_ = 0_GeV; } diff --git a/Processes/Proposal/ContinuousProcess.h b/Processes/Proposal/ContinuousProcess.h index 7d9a88d28fc9a0c92e050806aa1533fd5c8c0b05..6d6641e529134d8ad6aa80a048caaba3acbc50af 100644 --- a/Processes/Proposal/ContinuousProcess.h +++ b/Processes/Proposal/ContinuousProcess.h @@ -72,8 +72,8 @@ namespace corsika::process::proposal { template <typename Particle, typename Track> corsika::units::si::LengthType MaxStepLength(Particle const&, Track const&); - void ShowResults() const; - void Reset(); - corsika::units::si::HEPEnergyType GetEnergyLost() const { return energy_lost_; } + void showResults() const; + void reset(); + corsika::units::si::HEPEnergyType energyLost() const { return energy_lost_; } }; } // namespace corsika::process::proposal diff --git a/Processes/Proposal/Interaction.cc b/Processes/Proposal/Interaction.cc index b2417b4260baec292ed779dbc912de9b1a5bd11e..f5ce68a800d56a2f855a46670638400b96fbffe5 100644 --- a/Processes/Proposal/Interaction.cc +++ b/Processes/Proposal/Interaction.cc @@ -22,7 +22,7 @@ namespace corsika::process::proposal { template <> - Interaction::Interaction(setup::SetupEnvironment const& _env, + Interaction::Interaction(setup::Environment const& _env, corsika::units::si::HEPEnergyType _emCut) : ProposalProcessBase(_env, _emCut) {} diff --git a/Processes/Proposal/ProposalProcessBase.cc b/Processes/Proposal/ProposalProcessBase.cc index 240c59d77f9977233e67e4017002407dfd3c2b52..a29dd15c2611a268a358094503d14a5b09c7a98c 100644 --- a/Processes/Proposal/ProposalProcessBase.cc +++ b/Processes/Proposal/ProposalProcessBase.cc @@ -15,6 +15,7 @@ #include <corsika/units/PhysicalUnits.h> #include <corsika/utl/COMBoost.h> #include <cstdlib> +#include <iostream> #include <limits> #include <memory> #include <random> @@ -26,28 +27,34 @@ namespace corsika::process::proposal { return false; } - ProposalProcessBase::ProposalProcessBase(setup::SetupEnvironment const& _env, + ProposalProcessBase::ProposalProcessBase(setup::Environment const& _env, corsika::units::si::HEPEnergyType _emCut) : emCut_(_emCut) , fRNG(corsika::random::RNGManager::GetInstance().GetRandomStream("proposal")) { - auto all_compositions = std::vector<const environment::NuclearComposition*>(); + using namespace corsika::units::si; // required for operator::_MeV _env.GetUniverse()->walk([&](auto& vtn) { - if (vtn.HasModelProperties()) - all_compositions.push_back(&vtn.GetModelProperties().GetNuclearComposition()); - }); - for (auto& ncarg : all_compositions) { - auto comp_vec = std::vector<PROPOSAL::Components::Component>(); - auto frac_iter = ncarg->GetFractions().cbegin(); - for (auto& pcode : ncarg->GetComponents()) { - comp_vec.emplace_back(GetName(pcode), GetNucleusZ(pcode), GetNucleusA(pcode), - *frac_iter); - ++frac_iter; + if (vtn.HasModelProperties()) { + const auto& prop = vtn.GetModelProperties(); + const auto& medium = mediumData(prop.medium(corsika::geometry::Point( + geometry::RootCoordinateSystem::GetInstance().GetRootCoordinateSystem(), 0_cm, + 0_cm, 0_cm))); + + auto comp_vec = std::vector<PROPOSAL::Components::Component>(); + const auto& comp = prop.GetNuclearComposition(); + auto frac_iter = comp.GetFractions().cbegin(); + for (auto& pcode : comp.GetComponents()) { + comp_vec.emplace_back(GetName(pcode), GetNucleusZ(pcode), GetNucleusA(pcode), + *frac_iter); + ++frac_iter; + } + + media[comp.hash()] = + PROPOSAL::Medium(medium.name(), medium.Ieff(), -medium.Cbar(), medium.aa(), + medium.sk(), medium.x0(), medium.x1(), medium.dlt0(), + medium.corrected_density(), comp_vec); } - media[ncarg->hash()] = PROPOSAL::Medium( - "Modified Air", PROPOSAL::Air().GetI(), PROPOSAL::Air().GetC(), - PROPOSAL::Air().GetA(), PROPOSAL::Air().GetM(), PROPOSAL::Air().GetX0(), - PROPOSAL::Air().GetX1(), PROPOSAL::Air().GetD0(), 1.0, comp_vec); - } + }); + PROPOSAL::InterpolationDef::order_of_interpolation = 2; PROPOSAL::InterpolationDef::nodes_cross_section = 100; PROPOSAL::InterpolationDef::nodes_propagate = 1000; diff --git a/Processes/Proposal/ProposalProcessBase.h b/Processes/Proposal/ProposalProcessBase.h index 17c6b22d6c2142ca6ddd3b136ca47b71429dc6aa..6346721e77428db40666ad1765c0fd9052cb549d 100644 --- a/Processes/Proposal/ProposalProcessBase.h +++ b/Processes/Proposal/ProposalProcessBase.h @@ -89,7 +89,7 @@ namespace corsika::process::proposal { //! Store cut and nuclear composition of the whole universe in media which are //! required for creating crosssections by proposal. //! - ProposalProcessBase(corsika::setup::SetupEnvironment const& _env, + ProposalProcessBase(corsika::setup::Environment const& _env, corsika::units::si::HEPEnergyType _emCut); //! diff --git a/Processes/Pythia/testPythia8.cc b/Processes/Pythia/testPythia8.cc index 6a8ae279badbbb7336357fefb208f926d55b4748..71b7768e5c66f60929f9d9383035276e81f5d9e9 100644 --- a/Processes/Pythia/testPythia8.cc +++ b/Processes/Pythia/testPythia8.cc @@ -15,9 +15,11 @@ #include <corsika/particles/ParticleProperties.h> #include <corsika/geometry/Point.h> + #include <corsika/units/PhysicalUnits.h> #include <corsika/utl/CorsikaFenv.h> + #include <catch2/catch.hpp> TEST_CASE("Pythia", "[processes]") { @@ -75,13 +77,10 @@ TEST_CASE("Pythia", "[processes]") { #include <corsika/units/PhysicalUnits.h> #include <corsika/particles/ParticleProperties.h> +#include <corsika/setup/SetupEnvironment.h> #include <corsika/setup/SetupStack.h> #include <corsika/setup/SetupTrajectory.h> -#include <corsika/environment/Environment.h> -#include <corsika/environment/HomogeneousMedium.h> -#include <corsika/environment/NuclearComposition.h> - using namespace corsika; using namespace corsika::units::si; @@ -96,42 +95,24 @@ auto sumMomentum(TStackView const& view, geometry::CoordinateSystem const& vCS) TEST_CASE("pythia process") { - // setup environment, geometry - environment::Environment<environment::IMediumModel> env; - - geometry::CoordinateSystem const& cs = env.GetCoordinateSystem(); - - auto theMedium = - environment::Environment<environment::IMediumModel>::CreateNode<geometry::Sphere>( - geometry::Point{cs, 0_m, 0_m, 0_m}, - 1_km * std::numeric_limits<double>::infinity()); - - using MyHomogeneousModel = environment::HomogeneousMedium<environment::IMediumModel>; - theMedium->SetModelProperties<MyHomogeneousModel>( - 1_kg / (1_m * 1_m * 1_m), - environment::NuclearComposition( - std::vector<particles::Code>{particles::Code::Hydrogen}, - std::vector<float>{1.})); - - auto const* nodePtr = theMedium.get(); // save the medium for later use before moving it + auto [env, csPtr, nodePtr] = setup::testing::setupEnvironment(particles::Code::Proton); + auto const& cs = *csPtr; + [[maybe_unused]] auto const& env_dummy = env; + [[maybe_unused]] auto const& node_dummy = nodePtr; SECTION("pythia decay") { feenableexcept(FE_INVALID); - setup::Stack stack; - const HEPEnergyType E0 = 10_GeV; - HEPMomentumType P0 = - sqrt(E0 * E0 - particles::PiPlus::GetMass() * particles::PiPlus::GetMass()); - auto plab = corsika::stack::MomentumVector(cs, {0_GeV, 0_GeV, P0}); - geometry::Point pos(cs, 0_m, 0_m, 0_m); - auto particle = stack.AddParticle( - std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{ - particles::Code::PiPlus, E0, plab, pos, 0_ns}); + const HEPEnergyType P0 = 10_GeV; + auto [stackPtr, secViewPtr] = + setup::testing::setupStack(particles::Code::PiPlus, 0, 0, P0, nodePtr, *csPtr); + const auto plab = corsika::stack::MomentumVector( + cs, {P0, 0_eV, 0_eV}); // this is secret knowledge about setupStack + auto& stack = *stackPtr; + auto& view = *secViewPtr; + auto particle = stackPtr->first(); random::RNGManager::GetInstance().RegisterRandomStream("pythia"); - setup::StackView view(particle); - process::pythia::Decay model; [[maybe_unused]] const TimeType time = model.GetLifetime(particle); @@ -168,18 +149,11 @@ TEST_CASE("pythia process") { SECTION("pythia interaction") { - setup::Stack stack; - const HEPEnergyType E0 = 100_GeV; - HEPMomentumType P0 = - sqrt(E0 * E0 - particles::PiPlus::GetMass() * particles::PiPlus::GetMass()); - auto plab = corsika::stack::MomentumVector(cs, {0_GeV, 0_GeV, -P0}); - geometry::Point pos(cs, 0_m, 0_m, 0_m); - auto particle = stack.AddParticle( - std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{ - particles::Code::PiPlus, E0, plab, pos, 0_ns}); - particle.SetNode(nodePtr); - setup::StackView view(particle); + feenableexcept(FE_INVALID); + auto [stackPtr, secViewPtr] = setup::testing::setupStack(particles::Code::PiPlus, 0, + 0, 100_GeV, nodePtr, *csPtr); + auto& view = *secViewPtr; + auto particle = stackPtr->first(); process::pythia::Interaction model; diff --git a/Processes/QGSJetII/testQGSJetII.cc b/Processes/QGSJetII/testQGSJetII.cc index eafe725dbcd676afcf402ea562a589d228f468dc..84dad94cfea6e61825e98cedcf4bc9081cc62f38 100644 --- a/Processes/QGSJetII/testQGSJetII.cc +++ b/Processes/QGSJetII/testQGSJetII.cc @@ -110,57 +110,29 @@ TEST_CASE("QgsjetII", "[processes]") { #include <corsika/units/PhysicalUnits.h> #include <corsika/particles/ParticleProperties.h> +#include <corsika/setup/SetupEnvironment.h> #include <corsika/setup/SetupStack.h> #include <corsika/setup/SetupTrajectory.h> -#include <corsika/environment/Environment.h> -#include <corsika/environment/HomogeneousMedium.h> -#include <corsika/environment/NuclearComposition.h> -#include <corsika/process/qgsjetII/qgsjet-II-04.h> - using namespace corsika::units::si; using namespace corsika::units; +using namespace corsika; TEST_CASE("QgsjetIIInterface", "[processes]") { - // setup environment, geometry - environment::Environment<environment::IMediumModel> env; - auto& universe = *(env.GetUniverse()); - - auto theMedium = - environment::Environment<environment::IMediumModel>::CreateNode<geometry::Sphere>( - geometry::Point{env.GetCoordinateSystem(), 0_m, 0_m, 0_m}, - 1_km * std::numeric_limits<double>::infinity()); - - using MyHomogeneousModel = environment::HomogeneousMedium<environment::IMediumModel>; - theMedium->SetModelProperties<MyHomogeneousModel>( - 1_kg / (1_m * 1_m * 1_m), - environment::NuclearComposition( - std::vector<particles::Code>{particles::Code::Oxygen}, std::vector<float>{1.})); - - auto const* nodePtr = theMedium.get(); - universe.AddChild(std::move(theMedium)); - - const geometry::CoordinateSystem& cs = env.GetCoordinateSystem(); + auto [env, csPtr, nodePtr] = setup::testing::setupEnvironment(particles::Code::Oxygen); + [[maybe_unused]] auto const& env_dummy = env; + [[maybe_unused]] auto const& node_dummy = nodePtr; corsika::random::RNGManager::GetInstance().RegisterRandomStream("qgsjet"); SECTION("InteractionInterface") { - setup::Stack stack; - const HEPEnergyType E0 = 100_GeV; - HEPMomentumType P0 = - sqrt(E0 * E0 - particles::Proton::GetMass() * particles::Proton::GetMass()); - auto plab = corsika::stack::MomentumVector(cs, {0_GeV, 0_GeV, -P0}); - geometry::Point pos(cs, 0_m, 0_m, 0_m); - auto particle = stack.AddParticle( - std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{ - particles::Code::Proton, E0, plab, pos, 0_ns}); - - particle.SetNode(nodePtr); - setup::StackView view(particle); - auto projectile = view.GetProjectile(); + auto [stackPtr, secViewPtr] = setup::testing::setupStack(particles::Code::Proton, 0, + 0, 110_GeV, nodePtr, *csPtr); + setup::StackView& view = *(secViewPtr.get()); + auto particle = stackPtr->first(); + auto projectile = secViewPtr->GetProjectile(); auto const projectileMomentum = projectile.GetMomentum(); Interaction model; @@ -168,7 +140,7 @@ TEST_CASE("QgsjetIIInterface", "[processes]") { [[maybe_unused]] const process::EProcessReturn ret = model.DoInteraction(view); [[maybe_unused]] const GrammageType length = model.GetInteractionLength(particle); - CHECK(length / (1_g / square(1_cm)) == Approx(93.47).margin(0.1)); + CHECK(length / (1_g / square(1_cm)) == Approx(93.04).margin(0.1)); /*********************************** It as turned out already two times (#291 and #307) that the detailed output of diff --git a/Processes/Sibyll/NuclearInteraction.cc b/Processes/Sibyll/NuclearInteraction.cc index de77d5d33a32b1cb4461abb88552ee14bea415a0..4c22491a41ffaec2a24c1870357a132542a59143 100644 --- a/Processes/Sibyll/NuclearInteraction.cc +++ b/Processes/Sibyll/NuclearInteraction.cc @@ -29,21 +29,20 @@ using std::tuple; using std::vector; using namespace corsika; -using namespace corsika::setup; using Particle = corsika::setup::Stack::ParticleType; // StackIterator; // ParticleType; using View = corsika::setup::StackView; // StackView::ParticleType; -using Track = Trajectory; +using Track = setup::Trajectory; namespace corsika::process::sibyll { template <> - NuclearInteraction<SetupEnvironment>::~NuclearInteraction() { + NuclearInteraction<setup::Environment>::~NuclearInteraction() { C8LOG_DEBUG( fmt::format("Nuclib::NuclearInteraction n={} Nnuc={}", count_, nucCount_)); } template <> - void NuclearInteraction<SetupEnvironment>::PrintCrossSectionTable( + void NuclearInteraction<setup::Environment>::PrintCrossSectionTable( corsika::particles::Code pCode) { using namespace corsika::particles; const int k = targetComponentsIndex_.at(pCode); @@ -68,7 +67,7 @@ namespace corsika::process::sibyll { } template <> - void NuclearInteraction<SetupEnvironment>::InitializeNuclearCrossSections() { + void NuclearInteraction<setup::Environment>::InitializeNuclearCrossSections() { using namespace corsika::particles; using namespace units::si; @@ -134,7 +133,8 @@ namespace corsika::process::sibyll { } template <> - units::si::CrossSectionType NuclearInteraction<SetupEnvironment>::ReadCrossSectionTable( + units::si::CrossSectionType + NuclearInteraction<setup::Environment>::ReadCrossSectionTable( const int ia, particles::Code pTarget, units::si::HEPEnergyType elabnuc) { using namespace corsika::particles; using namespace units::si; @@ -154,8 +154,8 @@ namespace corsika::process::sibyll { template <> template <> tuple<units::si::CrossSectionType, units::si::CrossSectionType> - NuclearInteraction<SetupEnvironment>::GetCrossSection(Particle const& vP, - const particles::Code TargetId) { + NuclearInteraction<setup::Environment>::GetCrossSection( + Particle const& vP, const particles::Code TargetId) { using namespace units::si; if (vP.GetPID() != particles::Code::Nucleus) throw std::runtime_error( @@ -195,7 +195,7 @@ namespace corsika::process::sibyll { template <> template <> - units::si::GrammageType NuclearInteraction<SetupEnvironment>::GetInteractionLength( + units::si::GrammageType NuclearInteraction<setup::Environment>::GetInteractionLength( Particle const& vP) { using namespace units; @@ -306,7 +306,7 @@ namespace corsika::process::sibyll { template <> template <> - process::EProcessReturn NuclearInteraction<SetupEnvironment>::DoInteraction( + process::EProcessReturn NuclearInteraction<setup::Environment>::DoInteraction( View& view) { // this routine superimposes different nucleon-nucleon interactions @@ -615,8 +615,8 @@ namespace corsika::process::sibyll { } template <> - NuclearInteraction<SetupEnvironment>::NuclearInteraction( - process::sibyll::Interaction& hadint, SetupEnvironment const& env) + NuclearInteraction<setup::Environment>::NuclearInteraction( + process::sibyll::Interaction& hadint, setup::Environment const& env) : environment_(env) , hadronicInteraction_(hadint) { diff --git a/Processes/Sibyll/testSibyll.cc b/Processes/Sibyll/testSibyll.cc index dae9741fcb3cba2641d6bd5a9ff885cb3752ed1c..007be947e5d4c8103da17cabee6b39700120463a 100644 --- a/Processes/Sibyll/testSibyll.cc +++ b/Processes/Sibyll/testSibyll.cc @@ -74,13 +74,14 @@ TEST_CASE("Sibyll", "[processes]") { #include <corsika/units/PhysicalUnits.h> #include <corsika/particles/ParticleProperties.h> +#include <corsika/setup/SetupEnvironment.h> #include <corsika/setup/SetupStack.h> #include <corsika/setup/SetupTrajectory.h> #include <corsika/environment/Environment.h> #include <corsika/environment/HomogeneousMedium.h> #include <corsika/environment/NuclearComposition.h> -#include <corsika/process/sibyll/sibyll2.3d.h> +#include <corsika/environment/UniformMagneticField.h> using namespace corsika::units::si; using namespace corsika::units; @@ -94,40 +95,23 @@ auto sumMomentum(TStackView const& view, geometry::CoordinateSystem const& vCS) TEST_CASE("SibyllInterface", "[processes]") { - // setup environment, geometry - environment::Environment<environment::IMediumModel> env; - auto& universe = *(env.GetUniverse()); - - auto theMedium = - environment::Environment<environment::IMediumModel>::CreateNode<geometry::Sphere>( - geometry::Point{env.GetCoordinateSystem(), 0_m, 0_m, 0_m}, - 1_km * std::numeric_limits<double>::infinity()); - - using MyHomogeneousModel = environment::HomogeneousMedium<environment::IMediumModel>; - theMedium->SetModelProperties<MyHomogeneousModel>( - 1_kg / (1_m * 1_m * 1_m), - environment::NuclearComposition( - std::vector<particles::Code>{particles::Code::Oxygen}, std::vector<float>{1.})); - - auto const* nodePtr = theMedium.get(); - universe.AddChild(std::move(theMedium)); - - const geometry::CoordinateSystem& cs = env.GetCoordinateSystem(); + auto [env, csPtr, nodePtr] = setup::testing::setupEnvironment(particles::Code::Oxygen); + auto const& cs = *csPtr; + [[maybe_unused]] auto const& env_dummy = env; + [[maybe_unused]] auto const& node_dummy = nodePtr; random::RNGManager::GetInstance().RegisterRandomStream("sibyll"); SECTION("InteractionInterface - low energy") { - setup::Stack stack; - const HEPEnergyType E0 = 60_GeV; - HEPMomentumType P0 = - sqrt(E0 * E0 - particles::Proton::GetMass() * particles::Proton::GetMass()); - auto plab = corsika::stack::MomentumVector(cs, {P0, 0_eV, 0_eV}); - geometry::Point pos(cs, 0_m, 0_m, 0_m); - auto particle = - stack.AddParticle(std::make_tuple(particles::Code::Proton, E0, plab, pos, 0_ns)); - particle.SetNode(nodePtr); - corsika::setup::StackView view(particle); + const HEPEnergyType P0 = 60_GeV; + auto [stack, viewPtr] = + setup::testing::setupStack(particles::Code::Proton, 0, 0, P0, nodePtr, cs); + const auto plab = corsika::stack::MomentumVector( + cs, {P0, 0_eV, 0_eV}); // this is secret knowledge about setupStack + setup::StackView& view = *viewPtr; + + auto particle = stack->first(); Interaction model; @@ -197,75 +181,39 @@ TEST_CASE("SibyllInterface", "[processes]") { CHECK((pSum - plab).norm() / 1_GeV == Approx(0).margin(plab.norm() * 0.05 / 1_GeV)); CHECK(pSum.norm() / P0 == Approx(1).margin(0.05)); [[maybe_unused]] const GrammageType length = model.GetInteractionLength(particle); - } - - SECTION("InteractionInterface - high energy") { - - setup::Stack stack; - const HEPEnergyType E0 = 60_EeV; - HEPMomentumType P0 = - sqrt(E0 * E0 - particles::Proton::GetMass() * particles::Proton::GetMass()); - auto plab = corsika::stack::MomentumVector(cs, {P0, 0_eV, 0_eV}); - geometry::Point pos(cs, 0_m, 0_m, 0_m); - auto particle = - stack.AddParticle(std::make_tuple(particles::Code::Proton, E0, plab, pos, 0_ns)); - particle.SetNode(nodePtr); - corsika::setup::StackView view(particle); - - Interaction model; - - [[maybe_unused]] const process::EProcessReturn ret = model.DoInteraction(view); - auto const pSum = sumMomentum(view, cs); - CHECK(pSum.GetComponents(cs).GetX() / P0 == Approx(1).margin(0.001)); - CHECK(pSum.GetComponents(cs).GetY() / 1_GeV == Approx(0).margin(1e-4)); - CHECK(pSum.GetComponents(cs).GetZ() / 1_GeV == Approx(0).margin(1e-4)); - - CHECK((pSum - plab).norm() / 1_GeV == Approx(0).margin(plab.norm() * 0.001 / 1_GeV)); - CHECK(pSum.norm() / P0 == Approx(1).margin(0.05)); - [[maybe_unused]] const GrammageType length = model.GetInteractionLength(particle); + CHECK(length / 1_g * 1_cm * 1_cm == Approx(88.7).margin(0.1)); + CHECK(view.getSize() == 20); } SECTION("NuclearInteractionInterface") { - setup::Stack stack; - const HEPEnergyType E0 = 400_GeV; - HEPMomentumType P0 = - sqrt(E0 * E0 - particles::Proton::GetMass() * particles::Proton::GetMass()); - auto plab = corsika::stack::MomentumVector(cs, {0_GeV, 0_GeV, -P0}); - geometry::Point pos(cs, 0_m, 0_m, 0_m); - - auto particle = stack.AddParticle( - std::make_tuple(particles::Code::Nucleus, E0, plab, pos, 0_ns, 4, 2)); - particle.SetNode(nodePtr); - corsika::setup::StackView view(particle); + auto [stack, viewPtr] = + setup::testing::setupStack(particles::Code::Nucleus, 4, 2, 500_GeV, nodePtr, cs); + setup::StackView& view = *viewPtr; + auto particle = stack->first(); Interaction hmodel; - NuclearInteraction model(hmodel, env); + NuclearInteraction model(hmodel, *env); [[maybe_unused]] const process::EProcessReturn ret = model.DoInteraction(view); [[maybe_unused]] const GrammageType length = model.GetInteractionLength(particle); + CHECK(length / 1_g * 1_cm * 1_cm == Approx(44.2).margin(.1)); + CHECK(view.getSize() == 11); } SECTION("DecayInterface") { - setup::Stack stack; - const HEPEnergyType E0 = 10_GeV; - HEPMomentumType P0 = - sqrt(E0 * E0 - particles::Proton::GetMass() * particles::Proton::GetMass()); - auto plab = corsika::stack::MomentumVector(cs, {0_GeV, 0_GeV, -P0}); - geometry::Point pos(cs, 0_m, 0_m, 0_m); - auto particle = - stack.AddParticle(std::make_tuple(particles::Code::Lambda0, E0, plab, pos, 0_ns)); - corsika::setup::StackView view(particle); + auto [stackPtr, viewPtr] = + setup::testing::setupStack(particles::Code::Lambda0, 0, 0, 10_GeV, nodePtr, cs); + setup::StackView& view = *viewPtr; + auto& stack = *stackPtr; + auto particle = stack.first(); Decay model; - model.PrintDecayConfig(); - [[maybe_unused]] const TimeType time = model.GetLifetime(particle); /*[[maybe_unused]] const process::EProcessReturn ret =*/model.DoDecay(view); - // run checks // lambda decays into proton and pi- or neutron and pi+ CHECK(stack.getEntries() == 3); diff --git a/Processes/StackInspector/testStackInspector.cc b/Processes/StackInspector/testStackInspector.cc index d76d9fd09b0bd57b37f81daa3f57106eea151910..9814efa02b7f9848eadb24cca7b0b508ac60a763 100644 --- a/Processes/StackInspector/testStackInspector.cc +++ b/Processes/StackInspector/testStackInspector.cc @@ -37,11 +37,9 @@ TEST_CASE("StackInspector", "[processes]") { stack.Clear(); HEPEnergyType E0 = 100_GeV; stack.AddParticle( - std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{ - particles::Code::Electron, E0, - corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, -1_GeV}), - Point(rootCS, {0_m, 0_m, 10_km}), 0_ns}); + std::make_tuple(particles::Code::Electron, E0, + corsika::stack::MomentumVector(rootCS, {0_GeV, 0_GeV, -1_GeV}), + Point(rootCS, {0_m, 0_m, 10_km}), 0_ns)); SECTION("interface") { diff --git a/Processes/UrQMD/testUrQMD.cc b/Processes/UrQMD/testUrQMD.cc index 2b1f5bcefeb69a5ea327dd3684c228b0c188a184..17a010c2fb324bea5aa800c793451bafbce48f7c 100644 --- a/Processes/UrQMD/testUrQMD.cc +++ b/Processes/UrQMD/testUrQMD.cc @@ -53,70 +53,6 @@ auto sumMomentum(TStackView const& view, geometry::CoordinateSystem const& vCS) return sum; } -auto setupEnvironment(particles::Code vTargetCode) { - // setup environment, geometry - auto env = std::make_unique<environment::Environment<environment::IMediumModel>>(); - auto& universe = *(env->GetUniverse()); - const geometry::CoordinateSystem& cs = env->GetCoordinateSystem(); - - auto theMedium = - environment::Environment<environment::IMediumModel>::CreateNode<geometry::Sphere>( - geometry::Point{cs, 0_m, 0_m, 0_m}, - 1_km * std::numeric_limits<double>::infinity()); - - using MyHomogeneousModel = environment::HomogeneousMedium<environment::IMediumModel>; - theMedium->SetModelProperties<MyHomogeneousModel>( - 1_kg / (1_m * 1_m * 1_m), - environment::NuclearComposition(std::vector<particles::Code>{vTargetCode}, - std::vector<float>{1.})); - - auto const* nodePtr = theMedium.get(); - universe.AddChild(std::move(theMedium)); - - return std::make_tuple(std::move(env), &cs, nodePtr); -} - -template <typename TNodeType> -auto setupStack(int vA, int vZ, HEPEnergyType vMomentum, TNodeType* vNodePtr, - geometry::CoordinateSystem const& cs) { - auto stack = std::make_unique<setup::Stack>(); - auto constexpr mN = corsika::units::constants::nucleonMass; - - geometry::Point const origin(cs, {0_m, 0_m, 0_m}); - corsika::stack::MomentumVector const pLab(cs, {vMomentum, 0_GeV, 0_GeV}); - - HEPEnergyType const E0 = sqrt(units::static_pow<2>(mN * vA) + pLab.squaredNorm()); - auto particle = - stack->AddParticle(std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, - units::si::TimeType, unsigned short, unsigned short>{ - particles::Code::Nucleus, E0, pLab, origin, 0_ns, vA, vZ}); - - particle.SetNode(vNodePtr); - return std::make_tuple( - std::move(stack), std::make_unique<decltype(setup::StackView{particle})>(particle)); -} - -template <typename TNodeType> -auto setupStack(particles::Code vProjectileType, HEPEnergyType vMomentum, - TNodeType* vNodePtr, geometry::CoordinateSystem const& cs) { - auto stack = std::make_unique<setup::Stack>(); - - geometry::Point const origin(cs, {0_m, 0_m, 0_m}); - corsika::stack::MomentumVector const pLab(cs, {vMomentum, 0_GeV, 0_GeV}); - - HEPEnergyType const E0 = sqrt( - units::static_pow<2>(particles::GetMass(vProjectileType)) + pLab.squaredNorm()); - auto particle = stack->AddParticle( - std::tuple<particles::Code, units::si::HEPEnergyType, - corsika::stack::MomentumVector, geometry::Point, units::si::TimeType>{ - vProjectileType, E0, pLab, origin, 0_ns}); - - particle.SetNode(vNodePtr); - return std::make_tuple( - std::move(stack), std::make_unique<decltype(setup::StackView{particle})>(particle)); -} - TEST_CASE("UrQMD") { SECTION("conversion") { REQUIRE_THROWS(process::UrQMD::ConvertFromUrQMD(106, 0)); @@ -130,7 +66,8 @@ TEST_CASE("UrQMD") { UrQMD urqmd; SECTION("interaction length") { - auto [env, csPtr, nodePtr] = setupEnvironment(particles::Code::Nitrogen); + auto [env, csPtr, nodePtr] = + setup::testing::setupEnvironment(particles::Code::Nitrogen); auto const& cs = *csPtr; [[maybe_unused]] auto const& env_dummy = env; [[maybe_unused]] auto const& node_dummy = nodePtr; @@ -141,7 +78,7 @@ TEST_CASE("UrQMD") { particles::Code::K0, particles::Code::K0Bar, particles::Code::K0Long}; for (auto code : validProjectileCodes) { - auto [stack, view] = setupStack(code, 100_GeV, nodePtr, cs); + auto [stack, view] = setup::testing::setupStack(code, 0, 0, 100_GeV, nodePtr, cs); REQUIRE(stack->getEntries() == 1); REQUIRE(view->getEntries() == 0); @@ -152,12 +89,14 @@ TEST_CASE("UrQMD") { } SECTION("nucleus projectile") { - auto [env, csPtr, nodePtr] = setupEnvironment(particles::Code::Oxygen); + auto [env, csPtr, nodePtr] = + setup::testing::setupEnvironment(particles::Code::Oxygen); [[maybe_unused]] auto const& env_dummy = env; // against warnings [[maybe_unused]] auto const& node_dummy = nodePtr; // against warnings unsigned short constexpr A = 14, Z = 7; - auto [stackPtr, secViewPtr] = setupStack(A, Z, 400_GeV, nodePtr, *csPtr); + auto [stackPtr, secViewPtr] = setup::testing::setupStack(particles::Code::Nucleus, A, + Z, 400_GeV, nodePtr, *csPtr); REQUIRE(stackPtr->getEntries() == 1); REQUIRE(secViewPtr->getEntries() == 0); @@ -176,12 +115,13 @@ TEST_CASE("UrQMD") { } SECTION("\"special\" projectile") { - auto [env, csPtr, nodePtr] = setupEnvironment(particles::Code::Oxygen); + auto [env, csPtr, nodePtr] = + setup::testing::setupEnvironment(particles::Code::Oxygen); [[maybe_unused]] auto const& env_dummy = env; // against warnings [[maybe_unused]] auto const& node_dummy = nodePtr; // against warnings - auto [stackPtr, secViewPtr] = - setupStack(particles::Code::PiPlus, 400_GeV, nodePtr, *csPtr); + auto [stackPtr, secViewPtr] = setup::testing::setupStack(particles::Code::PiPlus, 0, + 0, 400_GeV, nodePtr, *csPtr); REQUIRE(stackPtr->getEntries() == 1); REQUIRE(secViewPtr->getEntries() == 0); @@ -202,12 +142,13 @@ TEST_CASE("UrQMD") { } SECTION("K0Long projectile") { - auto [env, csPtr, nodePtr] = setupEnvironment(particles::Code::Oxygen); + auto [env, csPtr, nodePtr] = + setup::testing::setupEnvironment(particles::Code::Oxygen); [[maybe_unused]] auto const& env_dummy = env; // against warnings [[maybe_unused]] auto const& node_dummy = nodePtr; // against warnings - auto [stackPtr, secViewPtr] = - setupStack(particles::Code::K0Long, 400_GeV, nodePtr, *csPtr); + auto [stackPtr, secViewPtr] = setup::testing::setupStack(particles::Code::K0Long, 0, + 0, 400_GeV, nodePtr, *csPtr); REQUIRE(stackPtr->getEntries() == 1); REQUIRE(secViewPtr->getEntries() == 0); diff --git a/Setup/SetupEnvironment.h b/Setup/SetupEnvironment.h index 94b6ed91f0357fd82f6b217f63f1f6351fce1176..f4265e3ddf7342b2972e6317a14bbf946c664ff1 100644 --- a/Setup/SetupEnvironment.h +++ b/Setup/SetupEnvironment.h @@ -9,10 +9,69 @@ #pragma once #include <corsika/environment/Environment.h> +#include <corsika/environment/IMagneticFieldModel.h> #include <corsika/environment/IMediumModel.h> -#include <corsika/environment/NameModel.h> +#include <corsika/environment/IMediumPropertyModel.h> +#include <corsika/environment/IRefractiveIndexModel.h> namespace corsika::setup { - using IEnvironmentModel = environment::IMediumModel; - using SetupEnvironment = environment::Environment<IEnvironmentModel>; -} // namespace corsika::setup + + /** + Definition of the default environemnt model interface. Each model + interface provides properties of the environment in a position + bdependent way. + */ + + using EnvironmentInterface = environment::IMediumPropertyModel< + environment::IMagneticFieldModel<environment::IMediumModel>>; + using Environment = environment::Environment<EnvironmentInterface>; + +} // end namespace corsika::setup + +#include <corsika/environment/HomogeneousMedium.h> +#include <corsika/environment/InhomogeneousMedium.h> +#include <corsika/environment/MediumPropertyModel.h> +#include <corsika/environment/UniformMagneticField.h> + +/** + * standard environment for unit testing. This can be moved to + * "test" directory, when available. + */ +namespace corsika::setup::testing { + + inline auto setupEnvironment(particles::Code vTargetCode) { + + using namespace corsika::units::si; + using namespace corsika; + + auto env = std::make_unique<setup::Environment>(); + auto& universe = *(env->GetUniverse()); + const geometry::CoordinateSystem& cs = env->GetCoordinateSystem(); + + /** + * our world is a sphere at 0,0,0 with R=infty + */ + auto world = setup::Environment::CreateNode<geometry::Sphere>( + geometry::Point{cs, 0_m, 0_m, 0_m}, + 1_km * std::numeric_limits<double>::infinity()); + + /** + * construct suited environment medium model: + */ + using MyHomogeneousModel = + environment::MediumPropertyModel<environment::UniformMagneticField< + environment::HomogeneousMedium<setup::EnvironmentInterface>>>; + + world->SetModelProperties<MyHomogeneousModel>( + environment::Medium::AirDry1Atm, geometry::Vector(cs, 0_T, 0_T, 1_T), + 1_kg / (1_m * 1_m * 1_m), + environment::NuclearComposition(std::vector<particles::Code>{vTargetCode}, + std::vector<float>{1.})); + + auto const* nodePtr = world.get(); + universe.AddChild(std::move(world)); + + return std::make_tuple(std::move(env), &cs, nodePtr); + } + +} // namespace corsika::setup::testing diff --git a/Setup/SetupStack.h b/Setup/SetupStack.h index 8930cb74eeae2ba63bbead4f79085617880ed0ba..f06aaf76093c88121e6f5d3f096d958fd5966909 100644 --- a/Setup/SetupStack.h +++ b/Setup/SetupStack.h @@ -26,9 +26,8 @@ namespace corsika::setup { // the GeometryNode stack needs to know the type of geometry-nodes from the // environment: template <typename TStackIter> - using SetupGeometryDataInterface = - typename stack::node::MakeGeometryDataInterface<TStackIter, - setup::SetupEnvironment>::type; + using SetupGeometryDataInterface = typename stack::node::MakeGeometryDataInterface< + TStackIter, corsika::setup::Environment>::type; // combine particle data stack with geometry information for tracking template <typename TStackIter> @@ -38,7 +37,7 @@ namespace corsika::setup { using StackWithGeometry = corsika::stack::CombinedStack< typename corsika::stack::nuclear_extension::ParticleDataStack::StackImpl, - corsika::stack::node::GeometryData<setup::SetupEnvironment>, + corsika::stack::node::GeometryData<setup::Environment>, StackWithGeometryInterface>; // ------------------------------------------ @@ -131,3 +130,44 @@ namespace corsika::setup { using StackView = detail::TheStackView; } // namespace corsika::setup + +/** + * standard stack setup for unit tests. This can be moved to "test" + * directory, when available. + */ + +namespace corsika::setup::testing { + + inline auto setupStack(particles::Code vProjectileType, int vA, int vZ, + units::si::HEPEnergyType vMomentum, + const setup::Environment::BaseNodeType* vNodePtr, + geometry::CoordinateSystem const& cs) { + + using namespace corsika; + using namespace corsika::units::si; + + auto stack = std::make_unique<setup::Stack>(); + + geometry::Point const origin(cs, {0_m, 0_m, 0_m}); + corsika::stack::MomentumVector const pLab(cs, {vMomentum, 0_GeV, 0_GeV}); + + if (vProjectileType == particles::Code::Nucleus) { + auto constexpr mN = corsika::units::constants::nucleonMass; + HEPEnergyType const E0 = sqrt(units::static_pow<2>(mN * vA) + pLab.squaredNorm()); + auto particle = stack->AddParticle( + std::make_tuple(particles::Code::Nucleus, E0, pLab, origin, 0_ns, vA, vZ)); + particle.SetNode(vNodePtr); + return std::make_tuple(std::move(stack), + std::make_unique<setup::StackView>(particle)); + } else { // not a nucleus + HEPEnergyType const E0 = sqrt( + units::static_pow<2>(particles::GetMass(vProjectileType)) + pLab.squaredNorm()); + auto particle = + stack->AddParticle(std::make_tuple(vProjectileType, E0, pLab, origin, 0_ns)); + particle.SetNode(vNodePtr); + return std::make_tuple(std::move(stack), + std::make_unique<setup::StackView>(particle)); + } + } + +} // namespace corsika::setup::testing