CORSIKA8  0.0.0
The framework to simulate particle cascades for astroparticle physics
StackInspector.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/process/StackProcess.hpp>
13 
14 #include <chrono>
15 
16 namespace corsika {
17 
18  template <typename TStack>
19  class StackInspector : public StackProcess<StackInspector<TStack>> {
20 
21  typedef typename TStack::particle_type Particle;
22 
24 
25  public:
26  StackInspector(const int vNStep, const bool vReportStack, const HEPEnergyType vE0);
27  ~StackInspector();
28 
29  void doStack(TStack const&);
30 
34  void setE0(const HEPEnergyType vE0) { E0_ = vE0; }
35 
36  private:
37  bool ReportStack_;
38  HEPEnergyType E0_;
39  const HEPEnergyType dE_threshold_ = 1_eV;
40  decltype(std::chrono::system_clock::now()) StartTime_;
41  };
42 
43 } // namespace corsika
44 
45 #include <corsika/detail/modules/StackInspector.inl>
Import and extend the phys::units package.
void setE0(const HEPEnergyType vE0)
To set a new E0, for example when a new shower event is started.
The cascade namespace assembles all objects needed to simulate full particles cascades.
int getStep() const
return the current Cascade step counter
Process to act on the entire particle stack.