Skip to content

Commit

Permalink
remove ObserverTrajectoryLength, same can be done with a ObserverTime…
Browse files Browse the repository at this point in the history
…Evolution with one timestep.
  • Loading branch information
JulienDoerner committed Sep 3, 2024
1 parent 63a1a31 commit e8f373f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
10 changes: 0 additions & 10 deletions include/crpropa/module/Observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};


/** @} */

}
Expand Down
12 changes: 0 additions & 12 deletions src/module/Observer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e8f373f

Please sign in to comment.