CORSIKA8  0.0.0
The framework to simulate particle cascades for astroparticle physics
CONEXhybrid.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 
13 #include <corsika/framework/geometry/Point.hpp>
14 #include <corsika/framework/geometry/Vector.hpp>
15 #include <corsika/framework/process/SecondariesProcess.hpp>
16 #include <corsika/media/ShowerAxis.hpp>
17 
18 #include <corsika/modules/conex/CONEX_f.hpp>
19 
20 namespace corsika {
21 
22  namespace conex {
23  LengthType constexpr earthRadius{6371315 * meter};
24  } // namespace conex
25 
26  class CONEXhybrid : public SecondariesProcess<CONEXhybrid> {
27 
28  public:
29  CONEXhybrid(Point center, ShowerAxis const& showerAxis, LengthType groundDist,
30  LengthType injectionHeight, HEPEnergyType primaryEnergy, PDGCode pdg);
31 
32  template <typename TStackView>
33  void doSecondaries(TStackView&);
34 
35  void solveCE();
36 
37  bool addParticle(Code pid, HEPEnergyType energy, HEPEnergyType mass,
38  Point const& position, Vector<dimensionless_d> const& direction,
39  TimeType t);
40 
41  CoordinateSystemPtr const& getObserverCS() const { return conexObservationCS_; }
42 
43  HEPEnergyType getEnergyEM() const;
44  void reset();
45 
46  private:
47  // data members
49  static std::array<std::pair<Code, int>, 3> constexpr egs_em_codes_{
50  {{Code::Photon, 0}, {Code::Electron, -1}, {Code::Positron, -1}}};
51 
52  Point const center_;
53  ShowerAxis const& showerAxis_;
54  LengthType groundDist_;
55  Point const showerCore_;
56  CoordinateSystemPtr const conexObservationCS_;
57  DirectionVector const x_sf_,
58  y_sf_;
59  HEPEnergyType energy_em_;
60  };
61 } // namespace corsika
62 
63 #include <corsika/detail/modules/conex/CONEXhybrid.inl>
The environment::ShowerAxis is created from a Point and a Vector and inside an Environment.
Definition: ShowerAxis.hpp:44
Import and extend the phys::units package.
The cascade namespace assembles all objects needed to simulate full particles cascades.
Processes acting on the secondaries produced by other processes.
std::shared_ptr< CoordinateSystem const > CoordinateSystemPtr
To refer to CoordinateSystems, only the CoordinateSystemPtr must be used.
Interface to particle properties.