From e8f373ffeb0c4ab50874d4517b56127d079ed46f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JulienD=C3=B6rner?= Date: Tue, 3 Sep 2024 09:59:06 +0200 Subject: [PATCH] remove ObserverTrajectoryLength, same can be done with a ObserverTimeEvolution with one timestep. --- include/crpropa/module/Observer.h | 10 ---------- src/module/Observer.cpp | 12 ------------ 2 files changed, 22 deletions(-) diff --git a/include/crpropa/module/Observer.h b/include/crpropa/module/Observer.h index 42234998e..529aa62ee 100644 --- a/include/crpropa/module/Observer.h +++ b/include/crpropa/module/Observer.h @@ -282,16 +282,6 @@ class ObserverTimeEvolution: public ObserverFeature { std::string getDescription() const; }; -class ObserverTrajectoryLength: public ObserverFeature { -private: - double maxLength; -public: - ObserverTrajectoryLength(double l); - - DetectionState checkDetection(Candidate *candidate) const; -}; - - /** @} */ } diff --git a/src/module/Observer.cpp b/src/module/Observer.cpp index 3b464ed15..5f1b3a2d5 100644 --- a/src/module/Observer.cpp +++ b/src/module/Observer.cpp @@ -365,17 +365,5 @@ std::string ObserverSurface::getDescription() const { return ss.str(); } -// ObserverTrajectoryLength --------------------------------------------------- -ObserverTrajectoryLength::ObserverTrajectoryLength(double l) : maxLength(l) { } - -DetectionState ObserverTrajectoryLength::checkDetection(Candidate *cand) const { - double currentLength = cand -> getTrajectoryLength(); - - if (currentLength > maxLength) - return DETECTED; - - cand -> limitNextStep(maxLength - currentLength); - return NOTHING; -} } // namespace crpropa