Belle II Software  release-05-01-25
AsicBackgroundDetector.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2012 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Sasha Glazov, Tracking group *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 #include <vector>
12 #include <string>
13 #include <map>
14 #include <tracking/trackFindingCDC/findlets/base/Findlet.h>
15 #include <framework/database/DBArray.h>
16 #include <cdc/dbobjects/CDCChannelMap.h>
17 
18 namespace Belle2 {
24  namespace TrackFindingCDC {
25  class CDCWireHit;
26 
28  class AsicBackgroundDetector : public Findlet<CDCWireHit&> {
29  private:
31  using Super = Findlet<CDCWireHit&>;
32 
33  public:
35  AsicBackgroundDetector() = default;
36 
38  void initialize() final;
39 
41  void beginRun() final;
42 
44  std::string getDescription() final;
45 
47  virtual void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) final;
48 
50  virtual void apply(std::vector<CDCWireHit>& wireHits) final;
51 
52  private:
53 
55  void applyAsicFilter(std::vector<CDCWireHit*>& wireHits);
59  std::unique_ptr<DBArray<CDCChannelMap> > m_channelMapFromDB;
60 
62  std::map<int, std::pair<int, int> > m_map;
63 
65  size_t m_minimal_hit_number{4};
66 
68  double m_deviation_from_median{10.};
69 
71  size_t m_nsignal_max{4};
72  };
73  }
75 }
Belle2::CDCChannelMap
Database object of CDC channel map.
Definition: CDCChannelMap.h:32
Belle2::TrackFindingCDC::AsicBackgroundDetector::AsicBackgroundDetector
AsicBackgroundDetector()=default
Default constructor.
Belle2::TrackFindingCDC::AsicBackgroundDetector::m_deviation_from_median
double m_deviation_from_median
distance from median TDC, to be considered as bg.
Definition: AsicBackgroundDetector.h:76
Belle2::DBArray
Class for accessing arrays of objects in the database.
Definition: DBArray.h:36
Belle2::TrackFindingCDC::AsicBackgroundDetector::m_minimal_hit_number
size_t m_minimal_hit_number
min. number of hits in ASIC for background check
Definition: AsicBackgroundDetector.h:73
Belle2::TrackFindingCDC::AsicBackgroundDetector::m_channelMapFromDB
std::unique_ptr< DBArray< CDCChannelMap > > m_channelMapFromDB
Channel map retrieved from DB.
Definition: AsicBackgroundDetector.h:67
Belle2::TrackFindingCDC::AsicBackgroundDetector::apply
virtual void apply(std::vector< CDCWireHit > &wireHits) final
Main algorithm marking hit as background.
Definition: AsicBackgroundDetector.cc:59
Belle2::TrackFindingCDC::AsicBackgroundDetector::exposeParameters
virtual void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
Definition: AsicBackgroundDetector.cc:78
Belle2::TrackFindingCDC::AsicBackgroundDetector::m_map
std::map< int, std::pair< int, int > > m_map
map from ewire to board/channel ID
Definition: AsicBackgroundDetector.h:70
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::AsicBackgroundDetector::getDescription
std::string getDescription() final
Short description of the findlet.
Definition: AsicBackgroundDetector.cc:54
Belle2::TrackFindingCDC::AsicBackgroundDetector::Super
Findlet< CDCWireHit & > Super
Type of the base class.
Definition: AsicBackgroundDetector.h:39
Belle2::TrackFindingCDC::AsicBackgroundDetector::m_nsignal_max
size_t m_nsignal_max
max. number of signal-like hits in ASIC for background check
Definition: AsicBackgroundDetector.h:79
Belle2::TrackFindingCDC::CDCWireHit
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:65
Belle2::ModuleParamList
The Module parameter list class.
Definition: ModuleParamList.h:46
Belle2::TrackFindingCDC::AsicBackgroundDetector::beginRun
void beginRun() final
Reload channel map if needed.
Definition: AsicBackgroundDetector.cc:38
Belle2::TrackFindingCDC::AsicBackgroundDetector::initialize
void initialize() final
Access database here:
Definition: AsicBackgroundDetector.cc:25
Belle2::TrackFindingCDC::AsicBackgroundDetector::applyAsicFilter
void applyAsicFilter(std::vector< CDCWireHit * > &wireHits)
Algorithm marking hit as background for each CDC ASIC.
Definition: AsicBackgroundDetector.cc:95