IAP GITLAB

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

added first template-tracking code

parent 62b62a47
No related branches found
No related tags found
No related merge requests found
......@@ -2,9 +2,11 @@
add_subdirectory (NullModel)
add_subdirectory (Sibyll)
add_subdirectory (StackInspector)
add_subdirectory (TrackingLine)
#add_custom_target(CORSIKAprocesses)
add_library (CORSIKAprocesses INTERFACE)
add_dependencies(CORSIKAprocesses ProcessNullModel)
add_dependencies(CORSIKAprocesses ProcessSibyll)
add_dependencies(CORSIKAprocesses ProcessStackInspector)
add_dependencies(CORSIKAprocesses ProcessTrackingLine)
set (
MODEL_HEADERS
TrackingLine.h
)
set (
MODEL_NAMESPACE
corsika/process/tracking_line
)
add_library (ProcessTrackingLine INTERFACE)
CORSIKA_COPY_HEADERS_TO_NAMESPACE (ProcessTrackingLine ${MODEL_NAMESPACE} ${MODEL_HEADERS})
target_include_directories (
ProcessTrackingLine
INTERFACE
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include/include>
)
install (FILES ${MODEL_HEADERS} DESTINATION include/${MODEL_NAMESPACE})
# # --------------------
# # code unit testing
# add_executable (testStackInspector testStackInspector.cc)
# target_link_libraries (
# testStackInspector
# CORSIKAunits
# CORSIKAthirdparty # for catch2
# )
# add_test (NAME testStackInspector COMMAND testStackInspector)
#ifndef _include_corsika_processes_TrackinLine_h_
#define _include_corsika_processes_TrackinLine_h_
#include <corsika/geometry/Vector.h>
#include <corsika/geometry/Point.h>
#include <corsika/units/PhysicalUnits.h>
#include <corsika/setup/SetupStack.h>
#include <corsika/setup/SetupTrajectory.h>
using namespace corsika;
namespace corsika::process {
namespace tracking_line {
template <typename Stack>
class TrackingLine { // Newton-step, naja.. not yet
typedef typename Stack::ParticleType Particle;
public:
void Init() {}
setup::Trajectory GetTrack(Particle& p) {
geometry::Vector<SpeedType::dimension_type> v = p.GetDirection();
geometry::Line traj(p.GetPosition(), v);
return geometry::Trajectory<corsika::geometry::Line>(traj, 100_ns);
}
};
} // namespace stack_inspector
} // namespace corsika::process
#endif
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