8#include <tracking/trackFindingCDC/findlets/minimal/TrackRejecter.h>
10#include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
12#include <tracking/trackFindingCDC/filters/base/ChooseableFilter.icc.h>
14#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
15#include <tracking/trackFindingCDC/utilities/Algorithms.h>
17#include <framework/core/ModuleParamList.templateDetails.h>
20using namespace TrackFindingCDC;
26 : m_trackFilter(defaultFilterName)
33 return "Deletes fake tracks that have been rejected by a filter";
39 moduleParamList->
addParameter(prefixed(prefix,
"deleteRejected"),
41 "Delete the rejected tracks instead of marking them as background.",
47 auto reject = [
this](
CDCTrack & track) {
49 track->setCellWeight(filterWeight);
50 if (std::isnan(filterWeight)) {
51 track->setBackgroundFlag();
52 track->setTakenFlag();
60 erase_remove_if(tracks, reject);
62 std::for_each(tracks.begin(), tracks.end(), reject);
The Module parameter list class.
Class representing a sequence of three dimensional reconstructed hits.
Convenvience wrapper to setup a Chooseable filter from a specific factory object.
Filter can delegate to a filter chosen and set up at run time by parameters.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
bool m_param_deleteRejected
Parameter : Switch to delete the tracks instead of marking them as background.
void apply(std::vector< CDCTrack > &tracks) final
Main algorithm.
std::string getDescription() final
Short description of the findlet.
TrackRejecter(const std::string &defaultFilterName="all")
Constructor adding the filter as a subordinary processing signal listener.
ChooseableFilter< TrackFilterFactory > m_trackFilter
Reference to the filter to be used to filter.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
Abstract base class for different kinds of events.