Belle II Software development
AsicBackgroundDetector.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#include <vector>
10#include <string>
11#include <map>
12#include <tracking/trackingUtilities/findlets/base/Findlet.h>
13#include <framework/database/DBArray.h>
14#include <cdc/dbobjects/CDCChannelMap.h>
15
16namespace Belle2 {
21
22 namespace TrackingUtilities {
23 class CDCWireHit;
24 }
25
26 namespace TrackFindingCDC {
27
29 class AsicBackgroundDetector : public TrackingUtilities::Findlet<TrackingUtilities::CDCWireHit&> {
30 private:
33
34 public:
37
39 void initialize() final;
40
42 void beginRun() final;
43
45 std::string getDescription() final;
46
48 virtual void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) final;
49
51 virtual void apply(std::vector<TrackingUtilities::CDCWireHit>& wireHits) final;
52
53 private:
54
56 void applyAsicFilter(std::vector<TrackingUtilities::CDCWireHit*>& wireHits);
61
63 std::map<int, std::pair<int, int> > m_map;
64
67
70
72 size_t m_nsignal_max{4};
73
76 };
77 }
79}
Database object of CDC channel map.
Class for accessing arrays of objects in the database.
Definition DBArray.h:26
The Module parameter list class.
std::unique_ptr< DBArray< CDCChannelMap > > m_channelMapFromDB
Channel map retrieved from DB.
double m_deviation_from_median
distance from median TDC, to be considered as bg.
void beginRun() final
Reload channel map if needed.
size_t m_nsignal_max
max. number of signal-like hits in ASIC for background check
std::map< int, std::pair< int, int > > m_map
map from ewire to board/channel ID
std::string getDescription() final
Short description of the findlet.
size_t m_max_asic_error_messages
max. number of logged error messages for number of hits per ASIC check
void applyAsicFilter(std::vector< TrackingUtilities::CDCWireHit * > &wireHits)
Algorithm marking hit as background for each CDC ASIC.
virtual void apply(std::vector< TrackingUtilities::CDCWireHit > &wireHits) final
Main algorithm marking hit as background.
virtual void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
TrackingUtilities::Findlet< TrackingUtilities::CDCWireHit & > Super
Type of the base class.
size_t m_minimal_hit_number
min. number of hits in ASIC for background check
AsicBackgroundDetector()=default
Default constructor.
Class representing a hit wire in the central drift chamber.
Definition CDCWireHit.h:58
Interface for a minimal algorithm part that wants to expose some parameters to a module.
Definition Findlet.h:26
STL class.
STL class.
STL class.
Abstract base class for different kinds of events.
STL namespace.