CORSIKA  @c8_version@
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 
29  template <typename TStack>
30  class StackInspector : public StackProcess<StackInspector<TStack>> {
31 
32  typedef typename TStack::particle_type Particle;
33 
35 
36  public:
37  StackInspector(int const nStep, bool const reportStack, HEPEnergyType const vE0);
38  ~StackInspector();
39 
40  void doStack(TStack const&);
41 
45  void setE0(HEPEnergyType const E0) { E0_ = E0; }
46 
47  private:
48  bool ReportStack_;
49  HEPEnergyType E0_;
50  const HEPEnergyType dE_threshold_ = 1_eV;
51  std::chrono::system_clock::time_point StartTime_;
52  };
53 
54 } // namespace corsika
55 
56 #include <corsika/detail/modules/StackInspector.inl>
Import and extend the phys::units package.
`, since they are used everywhere as integral part of the framework.
void setE0(HEPEnergyType const E0)
To set a new E0, for example when a new shower event is started.
int getStep() const
return the current Cascade step counter
Process to act on the entire particle stack.
StackProcess that will act each steps to perform diagnostics on the full stack.