CORSIKA8  0.0.0
The framework to simulate particle cascades for astroparticle physics
TrackingStraight.hpp
1 /*
2  * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
3  *
4  * This software is distributed under the terms of the GNU General Public
5  * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
6  * the license.
7  */
8 
9 #pragma once
10 
12 #include <corsika/framework/geometry/Line.hpp>
13 #include <corsika/framework/geometry/Plane.hpp>
14 #include <corsika/framework/geometry/Sphere.hpp>
15 #include <corsika/framework/geometry/Vector.hpp>
16 #include <corsika/framework/geometry/StraightTrajectory.hpp>
17 #include <corsika/framework/geometry/Intersections.hpp>
19 #include <corsika/modules/tracking/Intersect.hpp>
20 
21 #include <type_traits>
22 #include <utility>
23 
24 namespace corsika::tracking_line {
25 
34  class Tracking : public Intersect<Tracking> {
35 
37 
38  public:
42  template <typename TParticle>
43  static auto makeStep(TParticle const& particle, LengthType const steplength);
44 
46  template <typename TParticle>
47  auto getTrack(TParticle const& particle);
48 
50  template <typename TParticle>
51  static Intersections intersect(TParticle const& particle, Sphere const& sphere);
52 
54  template <typename TParticle, typename TBaseNodeType>
55  static Intersections intersect(TParticle const& particle, TBaseNodeType const& node);
56 
58  template <typename TParticle>
59  static Intersections intersect(TParticle const& particle, Plane const& plane);
60 
61  static std::string getName() { return "Tracking-Straight"; }
62  static std::string getVersion() { return "1.0.0"; }
63  };
64 
65 } // namespace corsika::tracking_line
66 
67 #include <corsika/detail/modules/tracking/TrackingStraight.inl>
Import and extend the phys::units package.
This is a CRTP class to provide a generic volume-tree intersection for the purpose of tracking...
Definition: Intersect.hpp:37
Tracking of particles without charge or in no magnetic fields.
CORSIKA8 logging utilities.
Container to store and return a list of intersections of a trajectory with a geometric volume objects...
auto getTrack(TParticle const &particle)
Determine track of particle.
static Intersections intersect(TParticle const &particle, Sphere const &sphere)
find intersection of Sphere with Track
static auto makeStep(TParticle const &particle, LengthType const steplength)
Performs one straight step of length steplength.
Describes a sphere in space.
Definition: Sphere.hpp:23