IAP GITLAB

Commit 852b09ac authored by Remy Prechelt's avatar Remy Prechelt

Initial implementation of radio emission interface.

parent f3d7da9d
......@@ -25,6 +25,9 @@ add_subdirectory (ParticleCut)
add_subdirectory (InteractionCounter)
add_subdirectory (SwitchProcess)
# radio implementation
add_subdirectory (Radio)
##########################################
# add_custom_target(CORSIKAprocesses)
add_library (CORSIKAprocesses INTERFACE)
......
/*
* (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
*
* See file AUTHORS for a list of contributors.
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#pragma once
#include <corsika/geometry/Point.h>
namespace corsika::process::radio {
/**
* A common abstract interface for radio antennas.
*
* All concrete antenna implementations should be of
* type Antenna<T> where T is a concrete antenna implementation.
*
*/
template <typename AntennaImpl>
class Antenna final {
public:
/**
* Get the location of this antenna.
*/
corsika::geometry::Point const& GetLocation() const;
/**
* Get the name of this name antenna.
*
* This is used in producing the output data file.
*/
std::string const& GetName() const;
}; // END: class Antenna final
} // namespace corsika::process::radio
# this directory contains a base interface for radio implementations.
# explicitly list sources
set (
MODEL_SOURCES
RadioEmission.cpp
)
# explicitly list headers
set (
MODEL_HEADERS
RadioEmission.hpp
Antenna.hpp
)
# explicitly set the namespace
set (
MODEL_NAMESPACE
corsika/process/radio/
)
# create the static library
add_library (ProcessRadio ${MODEL_SOURCES})
# and copy the headers to namespace
CORSIKA_COPY_HEADERS_TO_NAMESPACE (ProcessRadio ${MODEL_NAMESPACE} ${MODEL_HEADERS})
# set the properties of the TAUOLA interface
set_target_properties (ProcessRadio
PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION 1
)
# and add the current directory for private headers
target_include_directories(ProcessRadio PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
# setup the include directories
target_include_directories (
ProcessRadio
INTERFACE
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include/include>
)
# add dependencies on the various CORSIKA and TAUOLA
target_link_libraries (
ProcessRadio
CORSIKAunits
CORSIKAparticles
CORSIKAgeometry
)
# and finally configure the library install
install (
TARGETS ProcessRadio
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
/*
* (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
*
* See file AUTHORS for a list of contributors.
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#include "corsika/process/radio/RadioEmission.hpp"
/*
* (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
*
* See file AUTHORS for a list of contributors.
*
* This software is distributed under the terms of the GNU General Public
* Licence version 3 (GPL Version 3). See file LICENSE for a full version of
* the license.
*/
#pragma once
#include <corsika/process/ContinuousProcess.h>
namespace corsika::process::radio {
/**
* A common interface for simulating radio emission.
*
* All radio implmentations should be of type RadioEmission<T> where
* T is a concrete radio implementation. This interface class provides
* common methods that should be used where possible to ensure cosistency
* across the ecosystem of radio implementations. Radio processes
*
* Currently, all radio implementations must provide:
*
* - Emit(Particle &, Track&)
* - MaxStepLength(Particle const&, Track const&)
* - GetAntennas()
* - AddAntenna(const Antenna&)
*/
template <typename RadioImpl>
class RadioEmission final : public corsika::process::ContinuousProcess<RadioImpl> {
public:
/**
* Emit the radio emission from a particle across a track.
*
* @param particle The current particle.
* @param track The current track.
*
*/
template <typename Particle, typename Track>
EProcessReturn Emit(Particle&, Track const&);
/**
* Return the maximum step length for this particle and track.
*
* @param particle The current particle.
* @param track The current track.
*
* @returns The maximum length of this track.
*/
template <typename Particle, typename Track>
units::si::LengthType MaxStepLength(Particle const& particle, Track const& track) const;
/**
* Get a const reference to the collection of antennas.
*/
template <template <typename> typename Collection, typename Antenna>
Collection<Antenna> const& GetAntennas();
/**
* Add antenna to this radio emission process.
*
* @param antenna The antenna to add to this radio model.
*/
template <typename Antenna>
void AddAntenna(const Antenna& antenna);
/**
* Delete an antenna from this radio emission process.
*
* @param antenna The antenna to delete from this radio model.
*/
template <typename Antenna>
void DeleteAntenna(const Antenna& antenna);
/**
* Perform the continuous process (radio emission).
*
* @param particle The current particle.
* @param track The current track.
*/
template <typename Particle, typename Track>
EProcessReturn DoContinuous(Particle&, Track const&) const;
}; // class RadioEmission final : public...
} // namespace corsika::process::radio
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment