8#include <tracking/trackFindingCDC/findlets/minimal/SegmentRejecter.h>
10#include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
12#include <tracking/trackFindingCDC/filters/base/ChooseableFilter.icc.h>
14#include <tracking/trackFindingCDC/utilities/Algorithms.h>
16#include <framework/core/ModuleParamList.templateDetails.h>
19using namespace TrackFindingCDC;
25 : m_segmentFilter(defaultFilterName)
32 return "Deletes fake segments that have been rejected by a filter";
38 moduleParamList->
addParameter(prefixed(prefix,
"deleteRejected"),
40 "Delete the rejected segments instead of marking this as background.",
48 segment2D->setCellWeight(filterWeight);
49 if (std::isnan(filterWeight)) {
50 segment2D->setBackgroundFlag();
51 segment2D->setTakenFlag();
59 erase_remove_if(segment2Ds, reject);
61 std::for_each(segment2Ds.begin(), segment2Ds.end(), reject);
The Module parameter list class.
A reconstructed sequence of two dimensional hits in one super layer.
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 segments instead of marking them as background.
ChooseableFilter< SegmentFilterFactory > m_segmentFilter
Reference to the filter to be used to filter.
std::string getDescription() final
Short description of the findlet.
void apply(std::vector< CDCSegment2D > &segment2Ds) final
Main algorithm.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
SegmentRejecter(const std::string &defaultFilterName="all")
Constructor adding the filter as a subordinary processing signal listener.
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.