IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 35455921 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

save node in trackingTest "stack"

parent 8883a66e
No related branches found
No related tags found
No related merge requests found
...@@ -69,14 +69,16 @@ TEST_CASE("TrackingLine") { ...@@ -69,14 +69,16 @@ TEST_CASE("TrackingLine") {
//~ std::cout << env.GetUniverse().get() << std::endl; //~ std::cout << env.GetUniverse().get() << std::endl;
DummyParticle p(1_GeV, Vector<MOMENTUM>(cs, 0_GeV, 0_GeV, 1_GeV),
Point(cs, 0_m, 0_m, 0_m));
auto const radius = 20_m; auto const radius = 20_m;
auto theMedium = corsika::environment::Environment::CreateNode<Sphere>( auto theMedium = corsika::environment::Environment::CreateNode<Sphere>(
Point{env.GetCoordinateSystem(), 0_m, 0_m, 0_m}, radius); Point{env.GetCoordinateSystem(), 0_m, 0_m, 0_m}, radius);
universe.AddChild(std::move(theMedium)); universe.AddChild(std::move(theMedium));
Point p0(cs, 0_m, 0_m, 0_m);
auto* const node = universe.GetContainingNode(p0);
DummyParticle p(1_GeV, Vector<MOMENTUM>(cs, 0_GeV, 0_GeV, 1_GeV),
p0, node);
Point const origin(cs, {0_m, 0_m, 0_m}); Point const origin(cs, {0_m, 0_m, 0_m});
Vector<corsika::units::si::SpeedType::dimension_type> v(cs, 0_m / second, Vector<corsika::units::si::SpeedType::dimension_type> v(cs, 0_m / second,
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#define _include_process_trackinling_teststack_h_ #define _include_process_trackinling_teststack_h_
#include <corsika/geometry/Point.h> #include <corsika/geometry/Point.h>
#include <corsika/environment/Environment.h>
#include <corsika/geometry/Vector.h> #include <corsika/geometry/Vector.h>
#include <corsika/particles/ParticleProperties.h> #include <corsika/particles/ParticleProperties.h>
#include <corsika/units/PhysicalUnits.h> #include <corsika/units/PhysicalUnits.h>
...@@ -23,18 +24,22 @@ struct DummyParticle { ...@@ -23,18 +24,22 @@ struct DummyParticle {
corsika::units::si::HEPEnergyType fEnergy; corsika::units::si::HEPEnergyType fEnergy;
corsika::geometry::Vector<MOMENTUM> fMomentum; corsika::geometry::Vector<MOMENTUM> fMomentum;
corsika::geometry::Point fPosition; corsika::geometry::Point fPosition;
corsika::environment::BaseNodeType const* fNodePtr;
DummyParticle(corsika::units::si::HEPEnergyType pEnergy, DummyParticle(corsika::units::si::HEPEnergyType pEnergy,
corsika::geometry::Vector<MOMENTUM> pMomentum, corsika::geometry::Vector<MOMENTUM> pMomentum,
corsika::geometry::Point pPosition) corsika::geometry::Point pPosition,
corsika::environment::BaseNodeType const* pNodePtr)
: fEnergy(pEnergy) : fEnergy(pEnergy)
, fMomentum(pMomentum) , fMomentum(pMomentum)
, fPosition(pPosition) {} , fPosition(pPosition)
, fNodePtr(pNodePtr) {}
auto GetEnergy() const { return fEnergy; } auto GetEnergy() const { return fEnergy; }
auto GetMomentum() const { return fMomentum; } auto GetMomentum() const { return fMomentum; }
auto GetPosition() const { return fPosition; } auto GetPosition() const { return fPosition; }
auto GetPID() const { return corsika::particles::Code::Unknown; } auto GetPID() const { return corsika::particles::Code::Unknown; }
auto* GetNode() const { return fNodePtr; }
}; };
struct DummyStack { struct DummyStack {
......
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