IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 621d79ac authored by ralfulrich's avatar ralfulrich
Browse files

clang-format

parent 0d71c250
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ namespace corsika::environment {
class Environment {
public:
using BaseNodeType = VolumeTreeNode<IEnvironmentModel>;
Environment()
: fCoordinateSystem{corsika::geometry::RootCoordinateSystem::GetInstance()
.GetRootCoordinateSystem()}
......@@ -65,8 +65,8 @@ namespace corsika::environment {
typename BaseNodeType::VTNUPtr fUniverse;
};
//using SetupBaseNodeType = VolumeTreeNode<corsika::setup::IEnvironmentModel>;
//using SetupEnvironment = Environment<corsika::setup::IEnvironmentModel>;
// using SetupBaseNodeType = VolumeTreeNode<corsika::setup::IEnvironmentModel>;
// using SetupEnvironment = Environment<corsika::setup::IEnvironmentModel>;
} // namespace corsika::environment
......
......@@ -12,8 +12,8 @@
#ifndef _include_VolumeTreeNode_H
#define _include_VolumeTreeNode_H
#include <corsika/geometry/Volume.h>
#include <corsika/environment/IMediumModel.h>
#include <corsika/geometry/Volume.h>
#include <memory>
#include <vector>
......
......@@ -4,16 +4,19 @@
#include <corsika/environment/Environment.h>
#include <corsika/setup/SetupStack.h>
using TestEnvironmentType = corsika::environment::Environment<corsika::environment::IMediumModel>;
using TestEnvironmentType =
corsika::environment::Environment<corsika::environment::IMediumModel>;
template <typename T>
using SetupGeometryDataInterface = GeometryDataInterface<T, TestEnvironmentType>;
// combine particle data stack with geometry information for tracking
template <typename StackIter>
using StackWithGeometryInterface =
corsika::stack::CombinedParticleInterface<corsika::setup::detail::ParticleDataStack::PIType,
SetupGeometryDataInterface, StackIter>;
using TestCascadeStack = corsika::stack::CombinedStack<typename corsika::setup::detail::ParticleDataStack::StackImpl, GeometryData<TestEnvironmentType>, StackWithGeometryInterface>;
using StackWithGeometryInterface = corsika::stack::CombinedParticleInterface<
corsika::setup::detail::ParticleDataStack::PIType, SetupGeometryDataInterface,
StackIter>;
using TestCascadeStack = corsika::stack::CombinedStack<
typename corsika::setup::detail::ParticleDataStack::StackImpl,
GeometryData<TestEnvironmentType>, StackWithGeometryInterface>;
#endif
......@@ -11,8 +11,8 @@
#ifndef _include_TRAJECTORY_H
#define _include_TRAJECTORY_H
#include <corsika/geometry/Point.h>
#include <corsika/geometry/Line.h>
#include <corsika/geometry/Point.h>
#include <corsika/units/PhysicalUnits.h>
namespace corsika::geometry {
......@@ -47,10 +47,10 @@ namespace corsika::geometry {
void LimitEndTo(corsika::units::si::LengthType limit) {
fTimeLength = T::TimeFromArclength(limit);
}
auto NormalizedDirection() const {
static_assert(std::is_same_v<T, corsika::geometry::Line>);
return T::GetV0().normalized();
static_assert(std::is_same_v<T, corsika::geometry::Line>);
return T::GetV0().normalized();
}
};
......
......@@ -25,8 +25,7 @@ namespace corsika::process {
* \p from and \p to.
*/
template <typename Particle, typename VTNType>
EProcessReturn DoBoundaryCrossing(Particle&, VTNType const& from,
VTNType const& to);
EProcessReturn DoBoundaryCrossing(Particle&, VTNType const& from, VTNType const& to);
};
template <class T>
......
......@@ -45,12 +45,11 @@ namespace corsika::utl {
template <typename T>
class Singleton {
public:
static T& GetInstance()
{
static T& GetInstance() {
static T instance;
return instance;
}
Singleton(const Singleton&) = delete;
Singleton& operator=(const Singleton&) = delete;
......
......@@ -51,9 +51,9 @@ namespace corsika::process::HadronicElasticModel {
corsika::units::si::CrossSectionType CrossSection(SquaredHEPEnergyType s) const;
public:
HadronicElasticInteraction(// x & y values taken from DL for pp collisions
units::si::CrossSectionType x = 0.0217 * units::si::barn,
units::si::CrossSectionType y = 0.05608 * units::si::barn);
HadronicElasticInteraction( // x & y values taken from DL for pp collisions
units::si::CrossSectionType x = 0.0217 * units::si::barn,
units::si::CrossSectionType y = 0.05608 * units::si::barn);
void Init();
template <typename Particle, typename Track>
......
......@@ -11,24 +11,26 @@
#ifndef _include_process_trackinling_teststack_h_
#define _include_process_trackinling_teststack_h_
#include <corsika/geometry/Point.h>
#include <corsika/environment/Environment.h>
#include <corsika/geometry/Point.h>
#include <corsika/geometry/Vector.h>
#include <corsika/particles/ParticleProperties.h>
#include <corsika/units/PhysicalUnits.h>
#include <corsika/setup/SetupStack.h>
#include <corsika/units/PhysicalUnits.h>
using TestEnvironmentType = corsika::environment::Environment<corsika::environment::Empty>;
using TestEnvironmentType =
corsika::environment::Environment<corsika::environment::Empty>;
template <typename T>
using SetupGeometryDataInterface = GeometryDataInterface<T, TestEnvironmentType>;
// combine particle data stack with geometry information for tracking
template <typename StackIter>
using StackWithGeometryInterface =
corsika::stack::CombinedParticleInterface<corsika::setup::detail::ParticleDataStack::PIType,
SetupGeometryDataInterface, StackIter>;
using TestTrackingLineStack = corsika::stack::CombinedStack<typename corsika::setup::detail::ParticleDataStack::StackImpl, GeometryData<TestEnvironmentType>, StackWithGeometryInterface>;
using StackWithGeometryInterface = corsika::stack::CombinedParticleInterface<
corsika::setup::detail::ParticleDataStack::PIType, SetupGeometryDataInterface,
StackIter>;
using TestTrackingLineStack = corsika::stack::CombinedStack<
typename corsika::setup::detail::ParticleDataStack::StackImpl,
GeometryData<TestEnvironmentType>, StackWithGeometryInterface>;
#endif
......@@ -20,8 +20,8 @@
// extension with geometry information for tracking
#include <corsika/environment/Environment.h>
#include <corsika/stack/CombinedStack.h>
#include <corsika/setup/SetupEnvironment.h>
#include <corsika/stack/CombinedStack.h>
#include <tuple>
#include <utility>
......@@ -33,7 +33,7 @@ class GeometryData {
public:
using BaseNodeType = typename TEnvType::BaseNodeType;
// these functions are needed for the Stack interface
void Init() {}
void Clear() { fNode.clear(); }
......@@ -44,9 +44,7 @@ public:
// custom data access function
void SetNode(const int i, BaseNodeType const* v) { fNode[i] = v; }
auto const* GetNode(const int i) const {
return fNode[i];
}
auto const* GetNode(const int i) const { return fNode[i]; }
// these functions are also needed by the Stack interface
void IncrementSize() { fNode.push_back(nullptr); }
......@@ -74,19 +72,16 @@ public:
void SetParticleData(const std::tuple<BaseNodeType const*> v) {
SetNode(std::get<0>(v));
}
void SetParticleData(GeometryDataInterface& parent, const std::tuple<BaseNodeType const*>) {
void SetParticleData(GeometryDataInterface& parent,
const std::tuple<BaseNodeType const*>) {
SetNode(parent.GetNode()); // copy Node from parent particle!
}
void SetParticleData() { SetNode(nullptr); }
void SetParticleData(GeometryDataInterface& parent) {
SetNode(parent.GetNode()); // copy Node from parent particle!
}
void SetNode(BaseNodeType const* v) {
GetStackData().SetNode(GetIndex(), v);
}
auto const* GetNode() const {
return GetStackData().GetNode(GetIndex());
}
void SetNode(BaseNodeType const* v) { GetStackData().SetNode(GetIndex(), v); }
auto const* GetNode() const { return GetStackData().GetNode(GetIndex()); }
};
namespace corsika::setup {
......@@ -116,7 +111,8 @@ namespace corsika::setup {
SetupGeometryDataInterface, StackIter>;
using StackWithGeometry =
corsika::stack::CombinedStack<typename ParticleDataStack::StackImpl, GeometryData<setup::SetupEnvironment>,
corsika::stack::CombinedStack<typename ParticleDataStack::StackImpl,
GeometryData<setup::SetupEnvironment>,
StackWithGeometryInterface>;
} // namespace detail
......
File added
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