diff --git a/Processes/CMakeLists.txt b/Processes/CMakeLists.txt index c8f8557b074a16b0d152f84bc7e96273b10d063b..41a8277d9c736f387d68b255ff2af7415133c10c 100644 --- a/Processes/CMakeLists.txt +++ b/Processes/CMakeLists.txt @@ -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) diff --git a/Processes/TrackingLine/CMakeLists.txt b/Processes/TrackingLine/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..2911c9b787787f43ba837e64fd67c89921c699b0 --- /dev/null +++ b/Processes/TrackingLine/CMakeLists.txt @@ -0,0 +1,38 @@ + +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) + diff --git a/Processes/TrackingLine/TrackingLine.h b/Processes/TrackingLine/TrackingLine.h new file mode 100644 index 0000000000000000000000000000000000000000..602d5473269c8e15561967fe9adc8b16ff4dfa0c --- /dev/null +++ b/Processes/TrackingLine/TrackingLine.h @@ -0,0 +1,35 @@ +#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