CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
MediumProperties.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 
11 namespace corsika {
12 
64  enum class MediumType {
66  Unknown,
67  Element,
68  RadioactiveElement,
69  InorganicCompound,
70  OrganicCompound,
71  Polymer,
72  Mixture,
73  BiologicalDosimetry
74  };
75 
77  enum class StateOfMatter { Unknown, Solid, Liquid, Gas, DiatomicGas };
78 
82  enum class Medium : int16_t;
83 
87  typedef std::underlying_type<Medium>::type MediumIntType;
88 
93  struct MediumData {
94  std::string name_;
95  std::string pretty_name_;
96  double weight_;
97  int weight_significant_figure_;
98  int weight_error_last_digit_;
99  double Z_over_A_;
100  double sternheimer_density_;
101  double corrected_density_;
102  StateOfMatter state_;
103  MediumType type_;
104  std::string symbol_;
105  double Ieff_;
106  double Cbar_;
107  double x0_;
108  double x1_;
109  double aa_;
110  double sk_;
111  double dlt0_;
112 
116  std::string getName() const { return name_; }
117  std::string getPrettyName() const { return pretty_name_; }
118  double getWeight() const { return weight_; }
119  const int& weight_significant_figure() const {
120  return weight_significant_figure_;
121  }
122  const int& weight_error_last_digit() const {
123  return weight_error_last_digit_;
124  }
125  const double& Z_over_A() const { return Z_over_A_; }
126  double getSternheimerDensity() const {
127  return sternheimer_density_;
128  }
129  double getCorrectedDensity() const {
130  return corrected_density_;
131  }
132  StateOfMatter getStateOfMatter() const { return state_; }
133  MediumType getType() const { return type_; }
134  std::string getSymbol() const { return symbol_; }
135  double getIeff() const { return Ieff_; }
136  double getCbar() const { return Cbar_; }
137  double getX0() const { return x0_; }
138  double getX1() const { return x1_; }
139  double getAA() const { return aa_; }
140  double getSK() const { return sk_; }
141  double getDlt0() const { return dlt0_; }
142  };
144 
146 
147 } // namespace corsika
148 
149 #include <corsika/media/GeneratedMediaProperties.inc>
150 
151 namespace corsika {
152 
162  constexpr MediumData const& mediumData(Medium const m) {
163  return corsika::detail::medium_data[static_cast<MediumIntType>(m)];
164  }
165 
167 
168 } // namespace corsika
MediumType getType() const
state
std::string getPrettyName() const
returns name
std::string getSymbol() const
type
double getCbar() const
Ieff.
const int & weight_significant_figure() const
return weight
StateOfMatter getStateOfMatter() const
corrected density
StateOfMatter
Physical state of medium.
double getSK() const
AA.
double getWeight() const
returns pretty name
double getDlt0() const
Sk.
double getIeff() const
symbol
const int & weight_error_last_digit() const
return significnat figures of weight
double getX1() const
X0.
double getSternheimerDensity() const
Z_over_A_.
`, since they are used everywhere as integral part of the framework.
Enum for all known Media types.
double getCorrectedDensity() const
Sternheimer density.
MediumType
General type of medium.
double getAA() const
X1.
const double & Z_over_A() const
return error of weight
double getX0() const
Cbar.