8 #include <tracking/eventTimeExtraction/findlets/Chi2BasedEventTimeExtractor.h>
10 #include <tracking/eventTimeExtraction/utilities/TimeExtractionUtils.h>
11 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
13 #include <framework/core/ModuleParamList.h>
14 #include <framework/logging/Logger.h>
17 using namespace TrackFindingCDC;
21 moduleParamList->
addParameter(prefixed(prefix,
"maximalExtractedT0"), m_param_maximalExtractedT0,
22 "Hard cut on this value of extracted times in the positive as well as the negative direction.",
23 m_param_maximalExtractedT0);
28 m_wasSuccessful =
false;
32 double extractedDeltaT0 = derivatives.first;
33 double uncertainty = derivatives.second;
35 if (std::isnan(extractedDeltaT0)) {
36 B2DEBUG(25,
"Extracted delta t0 is nan. Aborting");
40 if (m_eventT0->hasEventT0()) {
41 extractedDeltaT0 += m_eventT0->getEventT0();
42 const double oldUncertainty = m_eventT0->getEventT0Uncertainty();
43 uncertainty =
std::sqrt(uncertainty * uncertainty + oldUncertainty * oldUncertainty);
46 if (std::abs(extractedDeltaT0) > m_param_maximalExtractedT0) {
47 B2DEBUG(25,
"Extracted t0 of " << extractedDeltaT0 <<
" is too large");
52 m_eventT0->setEventT0(eventT0Component);
53 m_wasSuccessful =
true;
54 B2DEBUG(25,
"Chi2 gave a result of " << extractedDeltaT0);
The Module parameter list class.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.
Structure for storing the extracted event t0s together with its detector and its uncertainty.