IAP GITLAB

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

finish merge from master

parent 0047c686
No related branches found
No related tags found
1 merge request!35Resolve "Change operator+ to operator<< for ProcessSequence"
Pipeline #67 failed
...@@ -42,14 +42,14 @@ namespace corsika::environment { ...@@ -42,14 +42,14 @@ namespace corsika::environment {
NuclearComposition const& GetNuclearComposition() const override { return fNuclComp; } NuclearComposition const& GetNuclearComposition() const override { return fNuclComp; }
corsika::units::si::GrammageType IntegratedGrammage( corsika::units::si::GrammageType IntegratedGrammage(
corsika::geometry::Trajectory<corsika::geometry::Line> const& pTraj, corsika::geometry::Trajectory<corsika::geometry::Line> const&,
corsika::units::si::LengthType pTo) const override { corsika::units::si::LengthType pTo) const override {
using namespace corsika::units::si; using namespace corsika::units::si;
return pTo * fDensity; return pTo * fDensity;
} }
corsika::units::si::LengthType ArclengthFromGrammage( corsika::units::si::LengthType ArclengthFromGrammage(
corsika::geometry::Trajectory<corsika::geometry::Line> const& pTraj, corsika::geometry::Trajectory<corsika::geometry::Line> const&,
corsika::units::si::GrammageType pGrammage) const override { corsika::units::si::GrammageType pGrammage) const override {
return pGrammage / fDensity; return pGrammage / fDensity;
} }
......
...@@ -58,14 +58,11 @@ namespace corsika::cascade { ...@@ -58,14 +58,11 @@ namespace corsika::cascade {
void Step(Particle& particle) { void Step(Particle& particle) {
using namespace corsika::units::si;
using std::cout; using std::cout;
using std::endl; using std::endl;
using std::log; using std::log;
// get access to random number generator
static corsika::random::RNG& rmng =
corsika::random::RNGManager::GetInstance().GetRandomStream("s_rndm");
// determine geometric tracking // determine geometric tracking
corsika::setup::Trajectory step = fTracking.GetTrack(particle); corsika::setup::Trajectory step = fTracking.GetTrack(particle);
...@@ -105,7 +102,7 @@ namespace corsika::cascade { ...@@ -105,7 +102,7 @@ namespace corsika::cascade {
// Environment::GetDistance(step, next_decay); // Environment::GetDistance(step, next_decay);
LengthType const distance_decay = next_decay * particle.GetMomentum().norm() / LengthType const distance_decay = next_decay * particle.GetMomentum().norm() /
particle.GetEnergy() * particle.GetEnergy() *
corsika::units::si::constants::cSquared; corsika::units::constants::c;
// take minimum of geometry, interaction, decay for next step // take minimum of geometry, interaction, decay for next step
auto const min_distance = auto const min_distance =
...@@ -160,10 +157,10 @@ namespace corsika::cascade { ...@@ -160,10 +157,10 @@ namespace corsika::cascade {
} }
private: private:
corsika::environment::Environment const& fEnvironment;
Tracking& fTracking; Tracking& fTracking;
ProcessList& fProcessSequence; ProcessList& fProcessSequence;
Stack& fStack; Stack& fStack;
corsika::environment::Environment const& fEnvironment;
corsika::random::RNG& fRNG = corsika::random::RNG& fRNG =
corsika::random::RNGManager::GetInstance().GetRandomStream("cascade"); corsika::random::RNGManager::GetInstance().GetRandomStream("cascade");
}; };
......
...@@ -95,8 +95,8 @@ namespace phys { ...@@ -95,8 +95,8 @@ namespace phys {
QUANTITY_DEFINE_SCALING_LITERALS(eV, energy_d, QUANTITY_DEFINE_SCALING_LITERALS(eV, energy_d,
magnitude(corsika::units::constants::eV)) magnitude(corsika::units::constants::eV))
// QUANTITY_DEFINE_SCALING_LITERALS(barn, corsika::units::si::area_d, // QUANTITY_DEFINE_SCALING_LITERALS(barn, corsika::units::si::area_d,
// magnitude(corsika::units::si::constants::barn)) // magnitude(corsika::units::si::constants::barn))
QUANTITY_DEFINE_SCALING_LITERALS(barn, corsika::units::si::sigma_d, QUANTITY_DEFINE_SCALING_LITERALS(barn, corsika::units::si::sigma_d,
magnitude(corsika::units::constants::barn)) magnitude(corsika::units::constants::barn))
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include <corsika/random/RNGManager.h> #include <corsika/random/RNGManager.h>
#include <corsika/units/PhysicalUnits.h> #include <corsika/units/PhysicalUnits.h>
namespace corsika::process::sibyll { namespace corsika::process::sibyll {
class Interaction : public corsika::process::InteractionProcess<Interaction> { class Interaction : public corsika::process::InteractionProcess<Interaction> {
...@@ -117,7 +116,6 @@ namespace corsika::process::sibyll { ...@@ -117,7 +116,6 @@ namespace corsika::process::sibyll {
return int_length; return int_length;
} }
return std::numeric_limits<double>::infinity() * 1_g / (1_cm * 1_cm); return std::numeric_limits<double>::infinity() * 1_g / (1_cm * 1_cm);
/* /*
......
...@@ -12,8 +12,6 @@ namespace corsika::process::sibyll { ...@@ -12,8 +12,6 @@ namespace corsika::process::sibyll {
typedef corsika::geometry::Vector<corsika::units::hep::energy_hep_d> MomentumVector; typedef corsika::geometry::Vector<corsika::units::hep::energy_hep_d> MomentumVector;
namespace corsika::process::sibyll {
class SibStackData { class SibStackData {
public: public:
...@@ -34,8 +32,7 @@ namespace corsika::process::sibyll { ...@@ -34,8 +32,7 @@ namespace corsika::process::sibyll {
using namespace corsika::units; using namespace corsika::units;
using namespace corsika::units::hep; using namespace corsika::units::hep;
auto tmp = v.GetComponents(); auto tmp = v.GetComponents();
for (int idx = 0; idx < 3; ++idx) for (int idx = 0; idx < 3; ++idx) s_plist_.p[idx][i] = tmp[idx] / 1_GeV;
s_plist_.p[idx][i] = tmp[idx] / 1_GeV;
} }
int GetId(const int i) const { return s_plist_.llist[i]; } int GetId(const int i) const { return s_plist_.llist[i]; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment