CORSIKA8  0.0.0
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 
63  enum class MediumType {
65  Unknown,
66  Element,
67  RadioactiveElement,
68  InorganicCompound,
69  OrganicCompound,
70  Polymer,
71  Mixture,
72  BiologicalDosimetry
73  };
74 
76  enum class StateOfMatter { Unknown, Solid, Liquid, Gas, DiatomicGas };
77 
78  enum class Medium : int16_t;
79 
80  using MediumIntType = std::underlying_type<Medium>::type;
81 
87  struct MediumData {
88  std::string name_;
89  std::string pretty_name_;
90  double weight_;
91  int weight_significant_figure_;
92  int weight_error_last_digit_;
93  double Z_over_A_;
94  double sternheimer_density_;
95  double corrected_density_;
96  StateOfMatter state_;
97  MediumType type_;
98  std::string symbol_;
99  double Ieff_;
100  double Cbar_;
101  double x0_;
102  double x1_;
103  double aa_;
104  double sk_;
105  double dlt0_;
106 
110  std::string getName() const { return name_; }
111  std::string getPrettyName() const { return pretty_name_; }
112  double getWeight() const { return weight_; }
113  const int& weight_significant_figure() const {
114  return weight_significant_figure_;
115  }
116  const int& weight_error_last_digit() const {
117  return weight_error_last_digit_;
118  }
119  const double& Z_over_A() const { return Z_over_A_; }
120  double getSternheimerDensity() const {
121  return sternheimer_density_;
122  }
123  double getCorrectedDensity() const {
124  return corrected_density_;
125  }
126  StateOfMatter getStateOfMatter() const { return state_; }
127  MediumType getType() const { return type_; }
128  std::string getSymbol() const { return symbol_; }
129  double getIeff() const { return Ieff_; }
130  double getCbar() const { return Cbar_; }
131  double getX0() const { return x0_; }
132  double getX1() const { return x1_; }
133  double getAA() const { return aa_; }
134  double getSK() const { return sk_; }
135  double getDlt0() const { return dlt0_; }
136  };
138 
140 
141 } // namespace corsika
142 
143 #include <corsika/media/GeneratedMediaProperties.inc>
144 
145 namespace corsika {
146 
156  constexpr MediumData const& mediumData(Medium const m) {
157  return corsika::detail::medium_data[static_cast<MediumIntType>(m)];
158  }
159 
161 
162 } // 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_.
The cascade namespace assembles all objects needed to simulate full particles cascades.
Simple object to group together the properties of a medium.
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.