10 #include <tracking/eventTimeExtraction/findlets/Chi2BasedEventTimeExtractor.h>
12 #include <tracking/eventTimeExtraction/utilities/TimeExtractionUtils.h>
13 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
15 #include <framework/core/ModuleParamList.h>
16 #include <framework/logging/Logger.h>
19 using namespace TrackFindingCDC;
23 moduleParamList->
addParameter(prefixed(prefix,
"maximalExtractedT0"), m_param_maximalExtractedT0,
24 "Hard cut on this value of extracted times in the positive as well as the negative direction.",
25 m_param_maximalExtractedT0);
30 m_wasSuccessful =
false;
34 double extractedDeltaT0 = derivatives.first;
35 double uncertainty = derivatives.second;
37 if (std::isnan(extractedDeltaT0)) {
38 B2DEBUG(50,
"Extracted delta t0 is nan. Aborting");
42 if (m_eventT0->hasEventT0()) {
43 extractedDeltaT0 += m_eventT0->getEventT0();
44 const double oldUncertainty = m_eventT0->getEventT0Uncertainty();
45 uncertainty = std::sqrt(uncertainty * uncertainty + oldUncertainty * oldUncertainty);
48 if (std::abs(extractedDeltaT0) > m_param_maximalExtractedT0) {
49 B2DEBUG(50,
"Extracted t0 of " << extractedDeltaT0 <<
" is too large");
54 m_eventT0->setEventT0(eventT0Component);
55 m_wasSuccessful =
true;
56 B2DEBUG(50,
"Chi2 gave a result of " << extractedDeltaT0);