CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
TrackingLeapFrogCurved.hpp
Go to the documentation of this file.
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 
11 #include <corsika/modules/tracking/TrackingStraight.hpp> // for neutral particles
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/LeapFrogTrajectory.hpp>
16 #include <corsika/framework/geometry/Vector.hpp>
17 #include <corsika/framework/geometry/Intersections.hpp>
22 #include <corsika/modules/tracking/Intersect.hpp>
23 
24 #include <type_traits>
25 #include <utility>
26 
27 namespace corsika {
28 
29  namespace tracking_leapfrog_curved {
30 
48  class Tracking : public Intersect<Tracking> {
49 
51 
52  public:
53  Tracking()
54  : straightTracking_{tracking_line::Tracking()} {}
55 
56  template <typename TParticle>
57  auto getTrack(TParticle const& particle);
58 
69  template <typename TParticle>
70  static Intersections intersect(TParticle const& particle, Sphere const& sphere);
71 
78  template <typename TParticle, typename TBaseNodeType>
79  static Intersections intersect(TParticle const& particle,
80  TBaseNodeType const& node);
81 
94  template <typename TParticle>
95  static Intersections intersect(TParticle const& particle, Plane const& plane);
96 
97  static std::string getName() { return "LeapFrog-curved"; }
98  static std::string getVersion() { return "1.0.0"; }
99 
100  protected:
106  template <typename TParticle>
107  auto getLinearTrajectory(TParticle& particle);
108 
109  protected:
111  straightTracking_;
112 
113  }; // namespace tracking_leapfrog_curved
114 
115  } // namespace tracking_leapfrog_curved
116 
117 } // namespace corsika
118 
119 #include <corsika/detail/modules/tracking/TrackingLeapFrogCurved.inl>
static Intersections intersect(TParticle const &particle, Sphere const &sphere)
find intersection of Sphere with Track
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.
auto getLinearTrajectory(TParticle &particle)
Use internally stored class tracking_line::Tracking to perform a straight line tracking, if no magnetic bendig was detected.
Container to store and return a list of intersections of a trajectory with a geometric volume objects...
The class tracking_leapfrog_curved::Tracking is based on the Bachelor thesis of Andre Schmidt (KIT)...
`, since they are used everywhere as integral part of the framework.
Interface to particle properties.
Describes a sphere in space.
Definition: Sphere.hpp:23