8#include <tracking/trackFindingCDC/findlets/minimal/TrackCreatorSingleSegments.h>
10#include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
11#include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
12#include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
14#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
16#include <framework/core/ModuleParamList.templateDetails.h>
19using namespace TrackFindingCDC;
28 return "Creates a track for each segments that is yet unused by any of the given tracks.";
33 moduleParamList->
addParameter(prefixed(prefix,
"MinimalHitsBySuperLayerId"),
35 "Map of super layer ids to minimum hit number, "
36 "for which left over segments shall be forwarded as tracks, "
37 "if the exceed the minimal hit requirement. Default empty.",
42 std::vector<CDCTrack>& tracks)
47 const bool toHits =
true;
49 segment.unsetAndForwardMaskedFlag(toHits);
52 for (
const CDCTrack& track : tracks) {
53 track.setAndForwardMaskedFlag();
57 segment.receiveMaskedFlag(toHits);
62 if (segment->hasMaskedFlag()) {
65 if (recoHit2D.getWireHit()->hasMaskedFlag()) ++nMasked;
71 if (nMasked > segment.size() * 0.2)
continue;
73 ISuperLayer iSuperLayer = segment.getISuperLayer();
77 if (segment.getTrajectory2D().isFitted()) {
79 segment.setAndForwardMaskedFlag(toHits);
81 otherSegment.receiveMaskedFlag(toHits);
The Module parameter list class.
Class representing a two dimensional reconstructed hit in the central drift chamber.
A reconstructed sequence of two dimensional hits in one super layer.
Class representing a sequence of three dimensional reconstructed hits.
TrackCreatorSingleSegments()
Constructor setting up default parameters.
void apply(const std::vector< CDCSegment2D > &segments, std::vector< CDCTrack > &tracks) final
Main algorithm.
std::string getDescription() final
Short description of the findlet.
std::map< ISuperLayer, size_t > m_param_minimalHitsBySuperLayerId
Parameter: Map of super layer ids to minimum hit number for which left over segments shall be forward...
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.