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/trackFindingCDC/findlets/base/Findlet.h>
13#include <framework/database/DBArray.h>
14#include <cdc/dbobjects/CDCChannelMap.h>
15
16namespace Belle2 {
22 namespace TrackFindingCDC {
23 class CDCWireHit;
24
26 class AsicBackgroundDetector : public Findlet<CDCWireHit&> {
27 private:
30
31 public:
34
36 void initialize() final;
37
39 void beginRun() final;
40
42 std::string getDescription() final;
43
45 virtual void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) final;
46
48 virtual void apply(std::vector<CDCWireHit>& wireHits) final;
49
50 private:
51
53 void applyAsicFilter(std::vector<CDCWireHit*>& wireHits);
58
60 std::map<int, std::pair<int, int> > m_map;
61
64
67
69 size_t m_nsignal_max{4};
70
73 };
74 }
76}
Database object of CDC channel map.
Definition: CDCChannelMap.h:22
Class for accessing arrays of objects in the database.
Definition: DBArray.h:26
The Module parameter list class.
Marks hits as background based on the result of a filter.
virtual void apply(std::vector< CDCWireHit > &wireHits) final
Main algorithm marking hit as background.
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
virtual void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
size_t m_minimal_hit_number
min. number of hits in ASIC for background check
AsicBackgroundDetector()=default
Default constructor.
void applyAsicFilter(std::vector< CDCWireHit * > &wireHits)
Algorithm marking hit as background for each CDC ASIC.
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:55
Interface for a minimal algorithm part that wants to expose some parameters to a module.
Definition: Findlet.h:26
Abstract base class for different kinds of events.
STL namespace.