IAP GITLAB

TrackingStraight.hpp 1.84 KB
Newer Older
Ralf Ulrich's avatar
Ralf Ulrich committed
1
/*
Ralf Ulrich's avatar
Ralf Ulrich committed
2
 * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
Ralf Ulrich's avatar
Ralf Ulrich committed
3 4 5 6 7 8 9 10 11 12 13 14 15
 *
 * This software is distributed under the terms of the GNU General Public
 * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
 * the license.
 */

#pragma once

#include <corsika/framework/core/PhysicalUnits.hpp>
#include <corsika/framework/geometry/Line.hpp>
#include <corsika/framework/geometry/Plane.hpp>
#include <corsika/framework/geometry/Sphere.hpp>
#include <corsika/framework/geometry/Vector.hpp>
Ralf Ulrich's avatar
Ralf Ulrich committed
16
#include <corsika/framework/geometry/StraightTrajectory.hpp>
17
#include <corsika/framework/geometry/Intersections.hpp>
Ralf Ulrich's avatar
Ralf Ulrich committed
18
#include <corsika/framework/core/Logging.hpp>
19
#include <corsika/modules/tracking/Intersect.hpp>
Ralf Ulrich's avatar
Ralf Ulrich committed
20 21 22 23 24 25

#include <type_traits>
#include <utility>

namespace corsika::tracking_line {

26
  /**
Ralf Ulrich's avatar
Ralf Ulrich committed
27
   * Tracking of particles without charge or in no magnetic fields.
28
   *
Ralf Ulrich's avatar
Ralf Ulrich committed
29 30
   * This will simply follow traight lines, but intersect them with
   * the geometry volume model of the environment.
31 32
   *
   **/
Ralf Ulrich's avatar
Ralf Ulrich committed
33

34
  class Tracking : public Intersect<Tracking> {
Ralf Ulrich's avatar
Ralf Ulrich committed
35

Ralf Ulrich's avatar
Ralf Ulrich committed
36 37
    using Intersect<Tracking>::nextIntersect;

Ralf Ulrich's avatar
Ralf Ulrich committed
38
  public:
Ralf Ulrich's avatar
Ralf Ulrich committed
39
    //! Determine track of particle
40
    template <typename TParticle>
Ralf Ulrich's avatar
Ralf Ulrich committed
41
    auto getTrack(TParticle const& particle);
Ralf Ulrich's avatar
Ralf Ulrich committed
42

Ralf Ulrich's avatar
Ralf Ulrich committed
43
    //! find intersection of Sphere with Track
Ralf Ulrich's avatar
Ralf Ulrich committed
44 45
    template <typename TParticle>
    static Intersections intersect(TParticle const& particle, Sphere const& sphere);
Ralf Ulrich's avatar
Ralf Ulrich committed
46

Ralf Ulrich's avatar
Ralf Ulrich committed
47
    //! find intersection of Volume node with Track of particle
48
    template <typename TParticle, typename TBaseNodeType>
Ralf Ulrich's avatar
Ralf Ulrich committed
49
    static Intersections intersect(TParticle const& particle, TBaseNodeType const& node);
Ralf Ulrich's avatar
Ralf Ulrich committed
50

Ralf Ulrich's avatar
Ralf Ulrich committed
51
    //! find intersection of Plane with Track
Ralf Ulrich's avatar
Ralf Ulrich committed
52 53
    template <typename TParticle>
    static Intersections intersect(TParticle const& particle, Plane const& plane);
Ralf Ulrich's avatar
Ralf Ulrich committed
54 55 56 57
  };

} // namespace corsika::tracking_line

Ralf Ulrich's avatar
Ralf Ulrich committed
58
#include <corsika/detail/modules/tracking/TrackingStraight.inl>