10#include <tracking/eventTimeExtraction/findlets/GridEventTimeExtractor.dcl.h>
11#include <tracking/eventTimeExtraction/findlets/BaseEventTimeExtractor.icc.h>
12#include <tracking/eventTimeExtraction/utilities/TimeExtractionUtils.h>
13#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
14#include <framework/core/ModuleParamList.h>
15#include <framework/logging/Logger.h>
22 template <
class AFindlet>
28 template <
class AFindlet>
51 }
else if (m_param_abortOnUnsuccessfulStep) {
52 B2DEBUG(25,
"Aborting because time extraction was not successful.");
58 if (not m_eventT0WithQuality.empty()) {
59 m_wasSuccessful =
true;
61 const auto& bestChi2 = std::max_element(m_eventT0WithQuality.begin(), m_eventT0WithQuality.end(),
62 [](
const auto & lhs,
const auto & rhs) {
63 return lhs.quality < rhs.quality;
65 m_eventT0->setEventT0(*bestChi2);
72 template <
class AFindlet>
77 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"iterations"),
79 "How many iterations should be done?",
81 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"abortOnUnsuccessfulStep"),
83 "Abort on a single unsuccessful step. Otherwise, the success is defined by the last step",
85 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"maximalT0Value"),
87 "Maximal Grid Value of the T0 extraction",
89 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"minimalT0Value"),
91 "Maximal Grid Value of the T0 extraction",
93 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"gridSteps"),
95 "Number of steps in the grid",
98 m_findlet.exposeParameters(moduleParamList, TrackFindingCDC::prefixed(
"sub", prefix));
The Module parameter list class.
void addProcessingSignalListener(ProcessingSignalListener *psl)
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
GridEventTimeExtractor()
Add the subfindlet as listener.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override final
Expose the parameters.
virtual void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
void apply(std::vector< RecoTrack * > &recoTracks) override final
Timing extraction for this findlet.
Abstract base class for different kinds of events.
Structure for storing the extracted event t0s together with its detector and its uncertainty.