Belle II Software development
HitBasedT0Extractor.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <tracking/eventTimeExtraction/findlets/BaseEventTimeExtractor.dcl.h>
11
12#include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
13
14#include <framework/dataobjects/EventMetaData.h>
15#include <framework/datastore/StoreObjPtr.h>
16
17#include <vector>
18#include <limits>
19
20namespace Belle2 {
27 class HitBasedT0Extractor final : public BaseEventTimeExtractor<TrackFindingCDC::CDCWireHit&> {
28
29 private:
32
33 public:
36
38 virtual ~HitBasedT0Extractor() = default;
39
41 std::string getDescription() override final;
42
44 void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) override final;
45
47 void apply(std::vector<TrackFindingCDC::CDCWireHit>& inputWireHits) override final;
48
50 void initialize() override final;
51
52 private:
53
54 unsigned int m_param_minHitCount = 20;
56 float m_param_searchWindow = 70.0f;
58 float m_param_fitWindow = 100.0f;
66 bool m_param_storeAllFits = false;
68 // don't use fit results which have a chi2 larger than configured here
69 float m_param_rejectIfChiSquareLargerThan = std::numeric_limits<float>::max();
73 float m_param_refitWindow = 50.0f;
76 };
78}
Class to extract the event t0.
Store event, run, and experiment numbers.
Definition: EventMetaData.h:33
Findlet to extract the T0 time of an event only using CDC Hits.
void initialize() override final
Initialize the event meta data.
std::string getDescription() override final
Short description of the findlet.
float m_param_rejectIfChiSquareLargerThan
largest allowable chi2 value
int m_param_binCountTimeHistogram
number of bins in the timing histogram
bool m_param_rejectByBackgroundFlag
don't use hits for the fit which have been flagged as background
void apply(std::vector< TrackFindingCDC::CDCWireHit > &inputWireHits) override final
Collects all Wire Hits and executes the t0 fit.
StoreObjPtr< EventMetaData > m_eventMetaData
access to event nr for debugging purposes
float m_param_searchWindow
the window (+-m_param_searchWindow) in ns where to search for the best t0
bool m_param_storeAllFits
store an image of the histogram and fit result, for debug purpose only
bool m_param_rejectIfNotTakenFlag
don't use hits for the fit which have not been assigned to any track
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override final
Expose the parameters to a module.
float m_param_rejectIfUncertaintyLargerThan
largest allowable uncertainty value
HitBasedT0Extractor()=default
Constructor registering the subordinary findlets to the processing signal distribution machinery.
virtual ~HitBasedT0Extractor()=default
Make destructor of interface virtual.
float m_param_fitWindow
the space (+-m_param_fitWindow) in ns used to fit the t0
unsigned int m_param_minHitCount
minimum number of hits
float m_param_refitWindow
the width of the window in ns (+- m_param_refitWindow) used to refit the final t0 value
The Module parameter list class.
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:55
Abstract base class for different kinds of events.
STL namespace.