IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 54e09312 authored by ralfulrich's avatar ralfulrich
Browse files

doxygen docu

parent c10b0ac9
No related branches found
No related tags found
No related merge requests found
...@@ -27,9 +27,6 @@ ...@@ -27,9 +27,6 @@
#include <limits> #include <limits>
#include <type_traits> #include <type_traits>
/**
* The cascade namespace assembles all objects needed to simulate full particles cascades.
*/
namespace corsika { namespace corsika {
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#pragma once #pragma once
#include <corsika/framework/geometry/RootCoordinateSystem.hpp>
#include <corsika/framework/geometry/QuantityVector.hpp> #include <corsika/framework/geometry/QuantityVector.hpp>
#include <corsika/framework/core/PhysicalUnits.hpp> #include <corsika/framework/core/PhysicalUnits.hpp>
......
...@@ -56,7 +56,7 @@ namespace corsika { ...@@ -56,7 +56,7 @@ namespace corsika {
std::vector<std::uint32_t> seeds(1); std::vector<std::uint32_t> seeds(1);
sseq.generate(seeds.begin(), seeds.end()); sseq.generate(seeds.begin(), seeds.end());
std::uint32_t seed = seeds[0]; std::uint32_t seed = seeds[0];
C8LOG_TRACE("Random seed stream {} seed {}", entry.first, seed); CORSIKA_LOG_TRACE("Random seed stream {} seed {}", entry.first, seed);
entry.second.seed(seed); entry.second.seed(seed);
} }
} }
......
...@@ -8,6 +8,10 @@ n/* ...@@ -8,6 +8,10 @@ n/*
#pragma once #pragma once
/**
* \file CoordinateSystem.hpp
**/
#include <corsika/framework/core/PhysicalUnits.hpp> #include <corsika/framework/core/PhysicalUnits.hpp>
#include <corsika/framework/geometry/QuantityVector.hpp> #include <corsika/framework/geometry/QuantityVector.hpp>
#include <corsika/framework/logging/Logging.hpp> #include <corsika/framework/logging/Logging.hpp>
...@@ -30,24 +34,33 @@ namespace corsika { ...@@ -30,24 +34,33 @@ namespace corsika {
*/ */
using CoordinateSystemPtr = std::shared_ptr<CoordinateSystem const>; using CoordinateSystemPtr = std::shared_ptr<CoordinateSystem const>;
class RootCoordinateSystem; // fwd decl /// this is the only way to create ONE unique root CS
static CoordinateSystemPtr get_root_CoordinateSystem(); // fwd decl static CoordinateSystemPtr get_root_CoordinateSystem();
/**
* Creates new CoordinateSystemPtr by translation along \a vector
*/
inline CoordinateSystemPtr make_translation(CoordinateSystemPtr const& cs, inline CoordinateSystemPtr make_translation(CoordinateSystemPtr const& cs,
QuantityVector<length_d> const& vector); QuantityVector<length_d> const& vector);
/** /**
* creates a new CS in which vVec points in direction of the new z-axis, \a vVec * creates a new CoordinateSystem in which vVec points in direction of the new z-axis, \a vVec
*/ */
template <typename TDim> template <typename TDim>
inline CoordinateSystemPtr make_rotationToZ(CoordinateSystemPtr const& cs, inline CoordinateSystemPtr make_rotationToZ(CoordinateSystemPtr const& cs,
Vector<TDim> const& vVec); Vector<TDim> const& vVec);
/**
* creates a new CoordinateSystem, rotated around axis by angle.
*/
template <typename TDim> template <typename TDim>
inline CoordinateSystemPtr make_rotation(CoordinateSystemPtr const& cs, inline CoordinateSystemPtr make_rotation(CoordinateSystemPtr const& cs,
QuantityVector<TDim> const& axis, QuantityVector<TDim> const& axis,
double const angle); double const angle);
/**
* creates a new CoordinateSystem, translated by \a translation and rotated around \a axis by \a angle.
*/
template <typename TDim> template <typename TDim>
inline CoordinateSystemPtr make_translationAndRotation( inline CoordinateSystemPtr make_translationAndRotation(
CoordinateSystemPtr const& cs, QuantityVector<length_d> const& translation, CoordinateSystemPtr const& cs, QuantityVector<length_d> const& translation,
...@@ -60,7 +73,7 @@ namespace corsika { ...@@ -60,7 +73,7 @@ namespace corsika {
* to other CoordinateSystems. Thus, the geometric * to other CoordinateSystems. Thus, the geometric
* transformation between all CoordinateSystems is always known and stored. * transformation between all CoordinateSystems is always known and stored.
* *
* The static (sigleton) function \sa make_root_CoordinateSystem is * The static (singleton) function \ref make_root_CoordinateSystem is
* the only way to create and access the global top-level * the only way to create and access the global top-level
* CoordinateSystem obect. CoordinateSystem objects should be * CoordinateSystem obect. CoordinateSystem objects should be
* *abosulte* *only* handled in their form of CoordinateSystemPtr, * *abosulte* *only* handled in their form of CoordinateSystemPtr,
...@@ -69,8 +82,8 @@ namespace corsika { ...@@ -69,8 +82,8 @@ namespace corsika {
* *
* Thus, new CoordinateSystem are only be created (via * Thus, new CoordinateSystem are only be created (via
* CoordinateSystemPtr) by transforing existing CoordinateSystem * CoordinateSystemPtr) by transforing existing CoordinateSystem
* using: \sa rotateToZ, \sa rotate, or \sa translateAndRotate, see * using: \ref make_rotationToZ, \ref make_rotation, or \ref
* below. * make_translationAndRotation, see below.
* *
* Warning: As a consequence, never try to access, modify, copy, the raw * Warning: As a consequence, never try to access, modify, copy, the raw
* CoordinateSystem objects directly, this will almost certainly result in undefined * CoordinateSystem objects directly, this will almost certainly result in undefined
...@@ -117,11 +130,11 @@ namespace corsika { ...@@ -117,11 +130,11 @@ namespace corsika {
static CoordinateSystem createCS() { return CoordinateSystem(); } static CoordinateSystem createCS() { return CoordinateSystem(); }
/** /**
* \defgroup manipulation and creation function * \name Friends
* Manipulation and creation functions.
* \{ * \{
**/ **/
/** this is the only way to create ONE unique root CS **/
friend CoordinateSystemPtr get_root_CoordinateSystem(); friend CoordinateSystemPtr get_root_CoordinateSystem();
friend CoordinateSystemPtr make_translation(CoordinateSystemPtr const& cs, friend CoordinateSystemPtr make_translation(CoordinateSystemPtr const& cs,
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
namespace corsika { namespace corsika {
/** /**
Description of physical four-vectors
FourVector fully supports units, e.g. E in [GeV/c] and p in [GeV], FourVector fully supports units, e.g. E in [GeV/c] and p in [GeV],
or also t in [s] and r in [m], etc. or also t in [s] and r in [m], etc.
...@@ -26,9 +28,9 @@ namespace corsika { ...@@ -26,9 +28,9 @@ namespace corsika {
[E/c]=[p]. [E/c]=[p].
The FourVector can return NormSqr and Norm, whereas Norm is The FourVector can return its squared-norm \ref getNormSqr and its
sqrt(abs(NormSqr)). The physical units are always calculated and norm \ref getNorm, whereas norm is sqrt(abs(norm-squared)). The
returned properly. physical units are always calculated and returned properly.
FourVector can also return if it is TimeLike, SpaceLike or PhotonLike. FourVector can also return if it is TimeLike, SpaceLike or PhotonLike.
...@@ -47,7 +49,7 @@ namespace corsika { ...@@ -47,7 +49,7 @@ namespace corsika {
using space_type = typename space_vec_type::quantity_type; using space_type = typename space_vec_type::quantity_type;
using time_type = typename std::decay<TTimeType>::type; using time_type = typename std::decay<TTimeType>::type;
//! check the types and the physical units here: // check the types and the physical units here:
static_assert(std::is_same<time_type, space_type>::value || static_assert(std::is_same<time_type, space_type>::value ||
std::is_same<time_type, decltype(std::declval<space_type>() / std::is_same<time_type, decltype(std::declval<space_type>() /
meter * second)>::value, meter * second)>::value,
...@@ -65,7 +67,7 @@ namespace corsika { ...@@ -65,7 +67,7 @@ namespace corsika {
FourVector(FourVector const&) = default; FourVector(FourVector const&) = default;
FourVector& operator=(const FourVector&) = default; FourVector& operator=(const FourVector&) = default;
~FourVector() = default; ~FourVector() = default;
FourVector(TTimeType const& eT, TSpaceVecType const& eS) FourVector(TTimeType const& eT, TSpaceVecType const& eS)
: timeLike_(eT) : timeLike_(eT)
, spaceLike_(eS) {} , spaceLike_(eS) {}
...@@ -90,28 +92,29 @@ namespace corsika { ...@@ -90,28 +92,29 @@ namespace corsika {
/** /**
* *
* @return $p_0^2 - \vec{p}^2$ * @return \f$p_0^2 - \vec{p}^2\f$
*/ */
norm_square_type getNormSqr() const; norm_square_type getNormSqr() const;
/** /**
* *
* @return $sqrt(p_0^2 - \vec{p}^2)$ * @return \f$\sqrt(p_0^2 - \vec{p}^2)\f$
*/ */
norm_type getNorm() const; norm_type getNorm() const;
/* /**
* FIXME: a better alternative would be to define an enumeration * \todo FIXME: a better alternative would be to define an enumeration
* enum { SpaceLike =-1, TimeLike, LightLike } V4R_Category; * enum { SpaceLike =-1, TimeLike, LightLike } V4R_Category;
* and a method called V4R_Category GetCategory() const; * and a method called V4R_Category GetCategory() const;
*
* RU: then you have to decide in the constructor which avoids "lazyness" * RU: then you have to decide in the constructor which avoids "lazyness"
*/ **/
///\return if \f$|p_0|>|\vec{p}|\f$
bool isTimelike() const; bool isTimelike() const;
///\return if \f$|p_0|<|\vec{p}|\f$
bool isSpacelike() const; bool isSpacelike() const;
/** /**
* @defgroup math operators (class members) * \name Math operators (class members)
* @{ * @{
*/ */
FourVector& operator+=(FourVector const&); FourVector& operator+=(FourVector const&);
...@@ -133,23 +136,21 @@ namespace corsika { ...@@ -133,23 +136,21 @@ namespace corsika {
/** @} */ /** @} */
protected: protected:
//! the data members // the data members
TTimeType timeLike_; TTimeType timeLike_;
TSpaceVecType spaceLike_; TSpaceVecType spaceLike_;
/** /**
* @defgroup the friends: (free) math operators * \name Free math operators
* @{
*
* We need to define them inline here since we do not want to * We need to define them inline here since we do not want to
* implement them as template functions. They are valid only for * implement them as template functions. They are valid only for
* the specific types as defined right here. * the specific types as defined right here.
* *
* * Note, these are "free function" (even if they don't look as
* Note, these are "free function" (event if they don't look as
* such). Thus, even if the input object uses internal references * such). Thus, even if the input object uses internal references
* for storage, the free math operators, of course, must provide * for storage, the free math operators, of course, must provide
* value-copies. * value-copies.
* @{
* *
**/ **/
friend FourVector<time_type, space_vec_type> operator+(FourVector const& a, friend FourVector<time_type, space_vec_type> operator+(FourVector const& a,
...@@ -189,8 +190,8 @@ namespace corsika { ...@@ -189,8 +190,8 @@ namespace corsika {
**/ **/
template <typename TTimeType, typename TSpaceVecType> template <typename TTimeType, typename TSpaceVecType>
inline std::ostream& operator<<(std::ostream& os, inline std::ostream& operator<<(
corsika::FourVector<TTimeType, TSpaceVecType> const& qv); std::ostream& os, corsika::FourVector<TTimeType, TSpaceVecType> const& qv);
} // namespace corsika } // namespace corsika
......
...@@ -47,7 +47,7 @@ namespace corsika { ...@@ -47,7 +47,7 @@ namespace corsika {
* *
* \returns A reference type QuantityVector&, but be aware, the underlying class data * \returns A reference type QuantityVector&, but be aware, the underlying class data
* is actually transformed to pCS, if needed. Thus, there may be an implicit call to * is actually transformed to pCS, if needed. Thus, there may be an implicit call to
* \sa rebase. * \ref rebase.
**/ **/
inline QuantityVector<length_d>& getCoordinates(CoordinateSystemPtr const& pCS); inline QuantityVector<length_d>& getCoordinates(CoordinateSystemPtr const& pCS);
...@@ -58,7 +58,7 @@ namespace corsika { ...@@ -58,7 +58,7 @@ namespace corsika {
* Note, if you access components in a different CoordinateSystem * Note, if you access components in a different CoordinateSystem
* pCS than the stored data, internally a temporary object will be * pCS than the stored data, internally a temporary object will be
* created and destroyed each call. This can be avoided by using * created and destroyed each call. This can be avoided by using
* \sa rebase first. * \ref rebase first.
**/ **/
inline LengthType getX(CoordinateSystemPtr const& pCS) const; inline LengthType getX(CoordinateSystemPtr const& pCS) const;
inline LengthType getY(CoordinateSystemPtr const& pCS) const; inline LengthType getY(CoordinateSystemPtr const& pCS) const;
......
...@@ -59,20 +59,21 @@ namespace corsika { ...@@ -59,20 +59,21 @@ namespace corsika {
/** /**
* this always returns a QuantityVector as triple * this always returns a QuantityVector as triple
* *
* \returns A reference type QuantityVector&, but be aware, the underlying class data * \return A reference type QuantityVector&, but be aware, the underlying class data
* is actually transformed to pCS, if needed. Thus, there may be an implicit call to * is actually transformed to pCS, if needed. Thus, there may be an implicit call to
* \sa rebase. * \ref rebase.
**/ **/
inline QuantityVector<TDimension>& getComponents(CoordinateSystemPtr const& pCS); inline QuantityVector<TDimension>& getComponents(CoordinateSystemPtr const& pCS);
/** /**
* \defgroup access coordinate components * \name Access coordinate components
* \{
* *
* Note, if you access components in a different CoordinateSystem * Note, if you access components in a different CoordinateSystem
* pCS than the stored data, internally a temporary object will be * pCS than the stored data, internally a temporary object will be
* created and destroyed each call. This can be avoided by using * created and destroyed each call. This can be avoided by using
* \sa rebase first. * \ref rebase first.
*
* \{
**/ **/
inline quantity_type getX(CoordinateSystemPtr const& pCS) const; inline quantity_type getX(CoordinateSystemPtr const& pCS) const;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <string> #include <string>
#include <corsika/framework/utility/Singleton.hpp> #include <corsika/framework/utility/Singleton.hpp>
#include <corsika/framework/logging/Logging.h> #include <corsika/framework/logging/Logging.hpp>
/*! /*!
......
...@@ -19,7 +19,7 @@ namespace corsika { ...@@ -19,7 +19,7 @@ namespace corsika {
/** /**
This utility class handles Lorentz boost between different This utility class handles Lorentz boost between different
referenence frames, using FourVectors. referenence frames, using FourVector.
*/ */
class COMBoost { class COMBoost {
......
PROJECT_NAME = CORSIKA 8 PROJECT_NAME = CORSIKA 8
PROJECT_NUMBER = 0.0.0 PROJECT_NUMBER = 0.0.0
PROJECT_BRIEF = "The framework to simulate particle cascades for astroparticle physics"
GENERATE_HTML = YES GENERATE_HTML = YES
GENERATE_LATEX = YES GENERATE_LATEX = YES
...@@ -29,6 +30,17 @@ INCLUDE_GRAPH = YES ...@@ -29,6 +30,17 @@ INCLUDE_GRAPH = YES
GRAPHICAL_HIERARCHY = YES GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES DIRECTORY_GRAPH = YES
GENERATE_LEGEND = YES GENERATE_LEGEND = YES
USE_MATHJAX = YES USE_MATHJAX = YES
MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
#JAVADOC_BANNER = YES
JAVADOC_AUTOBRIEF = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = YES
MULTILINE_CPP_IS_BRIEF = YES
MARKDOWN_SUPPORT = YES
BUILTIN_STL_SUPPORT = YES
CLANG_ASSISTED_PARSING = YES
SEARCHENGINE = YES SEARCHENGINE = YES
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment