8#include <tracking/trackFindingCDC/findlets/minimal/TrackQualityAsserter.h>
10#include <tracking/trackFindingCDC/processing/TrackQualityTools.h>
11#include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
12#include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
14#include <tracking/trackFindingCDC/utilities/Algorithms.h>
15#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
17#include <framework/core/ModuleParamList.templateDetails.h>
20using namespace TrackFindingCDC;
24, m_param_onlyNotFittedTracks(
false)
30 return "Many tracks in the CDC can not be fitted. For fitting them, we remove "
31 "parts of the hits or maybe the whole track.";
35 const std::string& prefix)
37 moduleParamList->
addParameter(prefixed(prefix,
"corrections"),
39 "The list of corrections to apply. "
40 "Choose from LayerBreak, LargeAngle, "
41 "LargeBreak2, OneSuperlayer, Small, B2B, "
42 "MoveToNextAxial, None, Split, and "
46 moduleParamList->
addParameter(prefixed(prefix,
"onlyNotFittedTracks"),
48 "Flag to apply the corrections only to not fitted tracks.",
74 std::vector<CDCTrack> splittedTracks;
81 if (correctorFunction ==
"LayerBreak") {
84 }
else if (correctorFunction ==
"LargeAngle") {
87 }
else if (correctorFunction ==
"LargeBreak2") {
90 }
else if (correctorFunction ==
"OneSuperlayer") {
93 }
else if (correctorFunction ==
"Small") {
96 }
else if (correctorFunction ==
"B2B") {
99 }
else if (correctorFunction ==
"MoveToNextAxial") {
102 }
else if (correctorFunction ==
"None") {
105 }
else if (correctorFunction ==
"Split") {
108 }
else if (correctorFunction ==
"ArcLength2D") {
111 }
else if (correctorFunction ==
"CDCWall") {
113 B2FATAL(
"Do not use this function as it is not working probably.");
116 B2FATAL(
"Do not know corrector function " << correctorFunction);
120 erase_remove_if(track, [](
const CDCRecoHit3D & recoHit3D) ->
bool {
134 erase_remove_if(tracks, [](
const CDCTrack & track) ->
bool {
return track.size() < 3; });
136 for (
const CDCTrack& splittedTrack : splittedTracks) {
137 tracks.push_back(splittedTrack);
The Module parameter list class.
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 apply(std::vector< CDCTrack > &tracks) final
Main function to clean up the tracks.
std::string getDescription() override
Get the description of the findlet.
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.
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.