 |
Belle II Software
release-05-01-25
|
10 #include <tracking/trackFindingCDC/findlets/minimal/TrackQualityAsserter.h>
12 #include <tracking/trackFindingCDC/processing/TrackQualityTools.h>
13 #include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
14 #include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
16 #include <tracking/trackFindingCDC/utilities/Algorithms.h>
17 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
19 #include <framework/core/ModuleParamList.templateDetails.h>
22 using namespace TrackFindingCDC;
25 : m_param_corrections( {
"LayerBreak",
"LargeAngle",
"OneSuperlayer",
"Small"})
26 , m_param_onlyNotFittedTracks(
false)
32 return "Many tracks in the CDC can not be fitted. For fitting them, we remove "
33 "parts of the hits or maybe the whole track.";
37 const std::string& prefix)
39 moduleParamList->
addParameter(prefixed(prefix,
"corrections"),
41 "The list of corrections to apply. "
42 "Choose from LayerBreak, LargeAngle, "
43 "LargeBreak2, OneSuperlayer, Small, B2B, "
44 "MoveToNextAxial, None, Split, and "
48 moduleParamList->
addParameter(prefixed(prefix,
"onlyNotFittedTracks"),
50 "Flag to apply the corrections only to not fitted tracks.",
76 std::vector<CDCTrack> splittedTracks;
83 if (correctorFunction ==
"LayerBreak") {
86 }
else if (correctorFunction ==
"LargeAngle") {
89 }
else if (correctorFunction ==
"LargeBreak2") {
92 }
else if (correctorFunction ==
"OneSuperlayer") {
95 }
else if (correctorFunction ==
"Small") {
98 }
else if (correctorFunction ==
"B2B") {
101 }
else if (correctorFunction ==
"MoveToNextAxial") {
104 }
else if (correctorFunction ==
"None") {
107 }
else if (correctorFunction ==
"Split") {
110 }
else if (correctorFunction ==
"ArcLength2D") {
113 }
else if (correctorFunction ==
"CDCWall") {
115 B2FATAL(
"Do not use this function as it is not working probably.");
118 B2FATAL(
"Do not know corrector function " << correctorFunction);
122 erase_remove_if(track, [](
const CDCRecoHit3D & recoHit3D) ->
bool {
126 automatonCell.unsetTakenFlag();
136 erase_remove_if(tracks, [](
const CDCTrack & track) ->
bool {
return track.size() < 3; });
138 for (
const CDCTrack& splittedTrack : splittedTracks) {
139 tracks.push_back(splittedTrack);
bool m_param_onlyNotFittedTracks
Parameter : Flag to use the corrections only for not fitted tracks.
Class representing a three dimensional reconstructed hit.
bool hasAssignedFlag() const
Gets the current state of the already assigned marker flag.
Class representing a sequence of three dimensional reconstructed hits.
const CDCWireHit & getWireHit() const
Getter for the wire hit.
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.
std::string getDescription() override
Get the description of the findlet.
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.
Cell used by the cellular automata.
TrackQualityAsserter()
Constructor setting up the default parameters.
The Module parameter list class.
void apply(std::vector< CDCTrack > &tracks) final
Main function to clean up the tracks.