diff --git a/corsika/detail/framework/utility/SaveBoostHistogram.inl b/corsika/detail/framework/utility/SaveBoostHistogram.inl index 817fd6714a0a00ba492c31e9a45fa7c89ac2b5ff..656a776cf48978eb5327ef9dd6591afbcdc6243a 100644 --- a/corsika/detail/framework/utility/SaveBoostHistogram.inl +++ b/corsika/detail/framework/utility/SaveBoostHistogram.inl @@ -25,8 +25,7 @@ namespace corsika { template <class Axes, class Storage> inline void save_hist(boost::histogram::histogram<Axes, Storage> const& h, std::string const& filename, bool overwrite) { - if (boost::filesystem::status(filename).type() != - boost::filesystem::file_type::file_not_found) { + if (boost::filesystem::exists(filename)) { if (overwrite) { boost::filesystem::remove(filename); } else { diff --git a/examples/cascade_proton_example.cpp b/examples/cascade_proton_example.cpp index 8779ab4a7d0031780d259d44a25d5a86c218c230..81d8101d794ce5b0d0b9bc4a1f09431b284d1997 100644 --- a/examples/cascade_proton_example.cpp +++ b/examples/cascade_proton_example.cpp @@ -80,7 +80,7 @@ int main() { UniformMagneticField<HomogeneousMedium<setup::EnvironmentInterface>>>; world->setModelProperties<MyHomogeneousModel>( - Medium::AirDry1Atm, MagneticFieldVector(rootCS, 0_T, 0_T, 1_T), + Medium::AirDry1Atm, MagneticFieldVector(rootCS, 0_T, 0_T, 1_mT), 1_kg / (1_m * 1_m * 1_m), NuclearComposition(std::vector<Code>{Code::Hydrogen}, std::vector<float>{(float)1.})); @@ -92,7 +92,7 @@ int main() { stack.clear(); const Code beamCode = Code::Proton; const HEPMassType mass = Proton::mass; - const HEPEnergyType E0 = 1000_GeV; + const HEPEnergyType E0 = 200_GeV; double theta = 0.; double phi = 0.; diff --git a/examples/corsika.cpp b/examples/corsika.cpp index ab2bdf232872bfc6574ad03fd23bd271004e316e..134da28be6fc96f0f6c8cffed01b227f63fbfc20 100644 --- a/examples/corsika.cpp +++ b/examples/corsika.cpp @@ -88,13 +88,11 @@ void registerRandomStreams(int seed) { RNGManager<>::getInstance().registerRandomStream("pythia"); RNGManager<>::getInstance().registerRandomStream("urqmd"); RNGManager<>::getInstance().registerRandomStream("proposal"); - if (seed == 0) { std::random_device rd; seed = rd(); cout << "new random seed (auto) " << seed << endl; } - RNGManager<>::getInstance().setSeed(seed); }