8#include <tracking/trackFindingCDC/findlets/minimal/TrackQualityAsserter.h>
10#include <tracking/trackFindingCDC/processing/TrackQualityTools.h>
11#include <tracking/trackingUtilities/eventdata/tracks/CDCTrack.h>
12#include <tracking/trackingUtilities/eventdata/hits/CDCWireHit.h>
14#include <tracking/trackingUtilities/utilities/Algorithms.h>
15#include <tracking/trackingUtilities/utilities/StringManipulation.h>
17#include <framework/core/ModuleParamList.templateDetails.h>
20using namespace TrackFindingCDC;
21using namespace TrackingUtilities;
25, m_param_onlyNotFittedTracks(
false)
31 return "Many tracks in the CDC can not be fitted. For fitting them, we remove "
32 "parts of the hits or maybe the whole track.";
36 const std::string& prefix)
38 moduleParamList->
addParameter(prefixed(prefix,
"corrections"),
40 "The list of corrections to apply. "
41 "Choose from LayerBreak, LargeAngle, "
42 "LargeBreak2, OneSuperlayer, Small, B2B, "
43 "MoveToNextAxial, None, Split, and "
47 moduleParamList->
addParameter(prefixed(prefix,
"onlyNotFittedTracks"),
49 "Flag to apply the corrections only to not fitted tracks.",
75 std::vector<CDCTrack> splittedTracks;
82 if (correctorFunction ==
"LayerBreak") {
85 }
else if (correctorFunction ==
"LargeAngle") {
88 }
else if (correctorFunction ==
"LargeBreak2") {
91 }
else if (correctorFunction ==
"OneSuperlayer") {
94 }
else if (correctorFunction ==
"Small") {
97 }
else if (correctorFunction ==
"B2B") {
100 }
else if (correctorFunction ==
"MoveToNextAxial") {
103 }
else if (correctorFunction ==
"None") {
106 }
else if (correctorFunction ==
"Split") {
109 }
else if (correctorFunction ==
"ArcLength2D") {
112 }
else if (correctorFunction ==
"CDCWall") {
114 B2FATAL(
"Do not use this function as it is not working probably.");
117 B2FATAL(
"Do not know corrector function " << correctorFunction);
121 erase_remove_if(track, [](
const CDCRecoHit3D & recoHit3D) ->
bool {
135 erase_remove_if(tracks, [](
const CDCTrack & track) ->
bool {
return track.size() < 3; });
137 for (
const CDCTrack& splittedTrack : splittedTracks) {
138 tracks.push_back(splittedTrack);
The Module parameter list class.
std::string getDescription() override
Get the description of the findlet.
void apply(std::vector< TrackingUtilities::CDCTrack > &tracks) final
Main function to clean up the tracks.
bool m_param_onlyNotFittedTracks
Parameter : Flag to use the corrections only for not fitted tracks.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
std::vector< std::string > m_param_corrections
Parameter : The corrections to use.
TrackQualityAsserter()
Constructor setting up the default parameters.
Cell used by the cellular automata.
bool hasAssignedFlag() const
Gets the current state of the already assigned marker flag.
void unsetTakenFlag()
Resets the taken flag to false.
Class representing a three dimensional reconstructed hit.
const CDCWireHit & getWireHit() const
Getter for the wire hit.
Class representing a sequence of three dimensional reconstructed hits.
AutomatonCell & getAutomatonCell() const
Mutable getter for the automaton cell.
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.