CORSIKA  @c8_version@
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/Box.hpp>
16 #include <corsika/framework/geometry/Vector.hpp>
17 #include <corsika/framework/geometry/StraightTrajectory.hpp>
18 #include <corsika/framework/geometry/Intersections.hpp>
20 #include <corsika/modules/tracking/Intersect.hpp>
21 
22 #include <type_traits>
23 #include <utility>
24 
25 namespace corsika::tracking_line {
26 
35  class Tracking : public Intersect<Tracking> {
36 
38 
39  public:
41  template <typename TParticle>
42  auto getTrack(TParticle const& particle);
43 
45  template <typename TParticle>
46  static Intersections intersect(TParticle const& particle, Sphere const& sphere);
47 
48  template <typename TParticle>
49  static Intersections intersect(TParticle const& particle, Box const& box);
50 
52  template <typename TParticle, typename TBaseNodeType>
53  static Intersections intersect(TParticle const& particle, TBaseNodeType const& node);
54 
56  template <typename TParticle>
57  static Intersections intersect(TParticle const& particle, Plane const& plane);
58 
59  static std::string getName() { return "Tracking-Straight"; }
60  static std::string getVersion() { return "1.0.0"; }
61  };
62 
63 } // namespace corsika::tracking_line
64 
65 #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
Describes a sphere in space.
Definition: Sphere.hpp:23
Describes a sphere in space.
Definition: Box.hpp:24