CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
ContinuousProcessStepLength.hpp
1 /*
2  * (c) Copyright 2021 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/ContinuousProcessIndex.hpp>
13 
14 namespace corsika {
15 
23  public:
25  : step_(step)
26  , id_(0) {}
28  : step_(step)
29  , id_(id) {}
30  void setLength(LengthType const step) { step_ = step; }
31  LengthType getLength() const { return step_; }
32  void setIndex(ContinuousProcessIndex const id) { id_ = id; }
33  ContinuousProcessIndex getIndex() const { return id_; }
34  operator ContinuousProcessIndex() const { return id_; }
35  operator LengthType() const { return step_; }
36  bool operator<(ContinuousProcessStepLength const& r) const { return step_ < r.step_; }
37 
38  private:
39  LengthType step_;
41  };
42 
43 } // namespace corsika
Import and extend the phys::units package.
To index individual processes (continuous processes) inside a ProcessSequence.
`, since they are used everywhere as integral part of the framework.
To store step length in LengthType and unique index in ProcessSequence of shortest step ContinuousPro...