From 68e4732f1009625d3236d575e3417a1d87866280 Mon Sep 17 00:00:00 2001 From: mertelx Date: Mon, 8 Jan 2024 17:06:15 +0100 Subject: [PATCH] Remove ObserverPoint: Was deprecated in version 3.2.1 --- CHANGELOG.md | 2 ++ include/crpropa/module/Observer.h | 13 ------------- src/module/Observer.cpp | 17 ----------------- 3 files changed, 2 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffd856c6e..bf972ce31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## CRPropa vNext ### Bug fixes: + * Fixed sign for exponential decay of magn. field strength with Galactic height in LogarithmicSpiralField ### New features: @@ -10,6 +11,7 @@ ### Removed features * AMRMagneticField - underlying library (saga) is no longer supported. +* ObserverPoint: Use Observer1D instead. ### New plugins and resources linked on the webpages diff --git a/include/crpropa/module/Observer.h b/include/crpropa/module/Observer.h index adf7c8fc4..0de4ce5d3 100644 --- a/include/crpropa/module/Observer.h +++ b/include/crpropa/module/Observer.h @@ -121,19 +121,6 @@ class ObserverTracking: public ObserverFeature { }; -/** - @class ObserverPoint - @brief Detects particles when reaching x = 0 - -Should be removed and replaced by Observer1D - */ -class ObserverPoint: public ObserverFeature { -public: - DetectionState checkDetection(Candidate *candidate) const; - std::string getDescription() const; -}; - - /** @class Observer1D @brief Detects particles when reaching x = 0 diff --git a/src/module/Observer.cpp b/src/module/Observer.cpp index c600dce50..067ca71a1 100644 --- a/src/module/Observer.cpp +++ b/src/module/Observer.cpp @@ -133,23 +133,6 @@ std::string ObserverTracking::getDescription() const { return ss.str(); } -// ObserverPoint -------------------------------------------------------------- -DetectionState ObserverPoint::checkDetection(Candidate *candidate) const { - KISS_LOG_WARNING << "ObserverPoint is deprecated and is no longer supported. Please use Observer1D instead.\n"; - double x = candidate->current.getPosition().x; - if (x > 0) { - // Limits the next step size to prevent candidates from overshooting in case of non-detection - candidate->limitNextStep(x); - return NOTHING; - } - // Detects particles when reaching x = 0 - return DETECTED; -} - -std::string ObserverPoint::getDescription() const { - return "ObserverPoint: observer at x = 0"; -} - // Observer1D -------------------------------------------------------------- DetectionState Observer1D::checkDetection(Candidate *candidate) const { double x = candidate->current.getPosition().x;