Newer
Older
* (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
*
* See file AUTHORS for a list of contributors.
*
* 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.
*/
#ifndef _Physics_StackInspector_StackInspector_h_
#define _Physics_StackInspector_StackInspector_h_
#include <corsika/process/StackProcess.h>
namespace corsika::process {
namespace stack_inspector {
template <typename TStack>
class StackInspector : public corsika::process::StackProcess<StackInspector<TStack>> {
ralfulrich
committed
using corsika::process::StackProcess<StackInspector<TStack>>::GetStep;
StackInspector(const int vNStep, const bool vReportStack,
const corsika::units::si::HEPEnergyType vE0);
ralfulrich
committed
void Init();
EProcessReturn DoStack(const TStack&);
/**
* To set a new E0, for example when a new shower event is started
*/
Felix Riehn
committed
void SetE0(const corsika::units::si::HEPEnergyType vE0) { E0_ = vE0; }
ralfulrich
committed
private:
Felix Riehn
committed
bool ReportStack_;
corsika::units::si::HEPEnergyType E0_;
const corsika::units::si::HEPEnergyType dE_threshold_ = std::invoke([]() {
using namespace units::si;
return 1_eV;
});
decltype(std::chrono::system_clock::now()) StartTime_;
} // namespace corsika::process
#endif